Logo

An Interactive Teaching Tool for Designing and Visualising Domain-Specific Languages

A cross-platform interactive tool that allows students to design their own Domain-Specific Languages (DSLs) while simultaneously visualising the underlying data structures.

Features

Python-based

Users can create DSLs in a familiar and popular language.

Python Image

Lexical Analysis

Automaton Diagrams and Lexical Tables generated from lexical rules.

Lexical Analysis Image

Syntax Analysis

Abstract Syntax Trees automatically generated from syntax rules.

Syntax Analysis Image

Semantic Analysis

Users can also add and test semantic rules such as non-mutability.

Semantic Analysis Image

Context

Compiler Theory is a foundational topic in Computer Science Education. It teaches students how high-level source code gets translated to low-level machine code that computers can understand and execute.

Despite its significance, research shows that students often struggle to see the relevance of the subject and have difficulty understanding the concepts.

Project Aims

  1. Design and develop a cross-platform interactive tool that can design Domain-Specific Languages (DSLs) while simultaneously visualising the underlying data structures.
  2. Evaluate if such a tool can increase students’ understanding of complex compiler theory concepts and their engagement and interest in Compiler Theory.

Implementation

  • Requirements Analysis: Based on an extensive review covering computer science pedagogy, compiler theory and current tools for creating Domain-Specific Languages and compiler visualisations.
  • User Interface: Based on Ben Shneiderman's Golden Rules of Interface Design. His rules include striving for consistency, catering to universal usability, offering informative feedback, preventing errors, permitting easy reversal of actions and reducing short-term memory load.
  • Software Pattern: The Model-View-Controller design pattern was followed for efficient code management, modular design and user satisfaction.
  • Development Process: A hybrid methodolody, coined Water-Scrum-Fall, was embraced.
  • System Testing: Functions and modules in the code were tested seperately to ensure that each individual segment of the code was working as it should. The program was also tested with four groups of users and iteratively improved.

Evaluation Method

Self-assessment of Tool Experience (Quantitative)

Students were given the tool and prompted to explore the application without any external guidance. Using a Likert Scale, they reported how clear and intuitive the design and functionality was, as well as how confident they were in their ability to use it.

Task-based Evaluation (Qualitative)

Students completed tasks with and without the tool, and compared these experiences to assess the implementation and conceptual approach, to provide insights for DSLDoodle and similar tools respectively (Technology Acceptance Model). Feedback was obtained through surveys.

Preliminary Findings

  • Intuitive and User-Friendly
    Most users found DSLDoodle intuitive and user friendly without external guidance, although there's room for improvement in the design of the Semantic analyser.
    Design and Functionality. Design and Functionality
    Confidence. Tool Confidence
    Average. Average
  • Visualisation aids Comprehension and Engagement
    Overarching finding from user feedback was the immense value derived from the visualisation capabilities. Supports the pedagogical viewpoint that interactive visualization, especially in subjects with a high degree of abstraction, can significantly improve understanding.
  • Cross-Platform Capabilities are Useful
    Results show students would use DSLDoodle on multiple platforms which makes the tool more accessible and inclusive.
    Platform Preferences.
  • Utility Beyond Education
    Although developed with an educational focus, the feedback highlighting its potential for debugging and managing code opens doors for its application beyond educational contexts.
  • Supplementary Tool
    Feedback consistently underscored the potential of DSLDoodle as a complementary resource in Compiler Theory courses. It could effectively bridge the gap between theoretical lectures and practical understanding, as well as potentially increase engagement and interest in Compiler Theory courses.

Conclusions

Preliminary findings suggest that the integration of tools like DSLDoodle into the curriculum can boost student engagement and foster a deeper understanding of Compiler Theory. This work underscores the potential of visual interactive tools in Computer Science Education in general.

Resources

Literature Review

Ahmed Ghoor

Project Proposal

Ahmed Ghoor and Julian Janisch

Final Paper

Ahmed Ghoor

GitHub Repository

Ahmed Ghoor

Team