Prototyping a formal system modeling workbench in the java ecosystem : A Domain Specific Language in Groovy

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Modeling is a fundamental property in today’s development of embedded systems. Models of computation enable us to describe the functionality and characteristics of a system on a higher abstraction level which gives the designer great insight in the behavior of the final implemented system at a very early stage in the design process. The ForSyDe modeling framework is based on the Model-of-computation (MoC) theory. Synchronous data-flow (SDF) is one MoC that uses actors and tokens to describe the communication and behavior of a system. Currently, the ForSyDe input modeling language exists only as a Haskell implementation and a System C implementation. The main problem is that the ForSyDe tool ecosystem is implemented across different languages without proper connections between tools. However, a framework to make such connections exists, namely the ForSyDe IO Java supporting library. In addition, any language running on the JVM can already be connected to ForSyDe IO. Hence, the thesis explores how a modeling workbench can be designed as a domain specific language (DSL) in the JVM language Groovy using the Gradle environment. Since there are many modules in the ForSyDe modeling framework, one for each MoC, this thesis targets one module: SDF. This choice is enough to explore whether it is possible to achieve the same modeling that Haskell provides in a JVM language, without sacrificing the user experience while modeling. The resulting Groovy DSL can describe the Synchronous Data-Flow MoC with the purpose of modeling SDF graphs, often used in image processing applications. By using the produced DSL workbench, a designer can model SDF applications in an efficient way. There were some differences when comparing the Groovy DSL to the Haskell implementation, such as the methods for defining actors and connecting them. However, the core modeling concepts are the same. Combining Groovy and Gradle offered an easy way of designing a DSL using the concept of closures. The created Groovy DSL is the first member of a family of textual DSL’s for describing MoC’s and therefore acts as a foundation for future work within the ForSyDe modeling framework. It can be extended to support more modules and functions or to inspire others to develop new DSL’s.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)