Ett inbäddat domänspecifikt språk för visualisering av datastrukturer och algoritmer
Ladda ner
Publicerad
Typ
Examensarbete på kandidatnivå
Bachelor Thesis
Bachelor Thesis
Program
Modellbyggare
Tidskriftstitel
ISSN
Volymtitel
Utgivare
Sammanfattning
This project presents a framework for algorithm visualization that emphasizes the separation of execution logic from its visualization. The main research question was how a log-based embedded Domain-Specific Language (eDSL) could be designed to generate a structured log file capable of describing algorithm behavior, without coupling the algorithm code with the visual interface. The project focused on three primary objectives: designing a log format that can represent both individual operations and grouped code blocks, developing a library with minimal impact on the algorithm’s structure, and exploring how the log can be used to generate visualizations in a separate frontend. The project has resulted in a TypeScript-based library that includes predefined data structures and variable classes, capable of automatically logging relevant operations. The generated log is in JSON format and contains detailed information such as variable states, scopes and animation types. Although a prototype for visualization was initiated, it was not completed due to time constraints, highlighting an opportunity for future work. Nonetheless, the project demonstrates that a decoupled model for algorithm visualization using a log-based eDSL is entirely feasible.
Beskrivning
Ämne/nyckelord
datastructures, algorithms, visualization, embedded language, domain specific language, programming, computer science
