Promotionsvorhaben

A Functional, Comprehensive, and Extensible Multi-Platform Querying and Transformation Approach

Name
Tassilo Horn
Status
Abgeschlossen
Abschluss der Promotion
Erstbetreuer*in
Prof. Dr. Jürgen Ebert
Gutachter*in 2
Prof. Dr. Albert Zündorf
Nowadays, models have become central artifacts in several application areas such as software development, reverse and re-engineering, simulation and verification, and optimization. Their benefits are that they are precisely defined in terms of metamodels and that they can be processed by generic tools. In whichever application area models are used, there is the need for analyzing and extracting information from them using querying tools, and for manipulating models or generating new models from given models using transformations. This thesis is about a new model querying and transformation approach called FunnyQT which is realized as a set of APIs and embedded domain-specific languages (DSLs) in the JVM-based functional Lisp-dialect Clojure. Founded on a powerful model management and manipulation API, FunnyQT provides querying services such as comprehensions, quantified expressions, regular path expressions, logic-based, relational model querying, and pattern matching. On the transformation side, it supports the definition of typical unidirectional model-to-model transformations, of complex in-place transformations based on rules using pattern matching for identifying structures of interest and rewriting them, it supports defining bidirectional transformations that built upon its relational querying capabilities in order to synchronize information back and forth between two models and it supports a new kind of co-evolution transformations that allow for evolving a model together with its metamodel simultaneously. Next to the querying and transformation services, several auxiliary services such as polymorphic functions, model visualization, and XML processing are supported, too. There are several properties which make FunnyQT unique. First of all, it is just a Clojure library. Thus, a FunnyQT query or a transformation is essentially a Clojure program. However, most higher-level querying and transformation services are provided as task-oriented embedded DSLs which use Clojure's powerful macro-system to provide the users with tailor-made language constructs important for the task at hand. Since queries and transformations are essentially just Clojure programs, they may use any Clojure or Java library for their own purpose. For example, FunnyQT has no service dedicated to model-to-text transformations because users can just use some existing JVM-based templating tool together with FunnyQT's querying service for this purpose. Conversely, just like every Clojure program, FunnyQT queries and transformations compile to normal JVM byte-code and can easily be called from other JVM languages such as Java. Furthermore, FunnyQT is platform-independent and designed with extensibility in mind. By default, it supports the Eclipse Modeling Framework and JGraLab and support for other modeling frameworks can be added with minimal effort and without having to modify the respective framework's classes or FunnyQT itself. Lastly, because FunnyQT is embedded in a functional language, it has a functional emphasis itself. Every query and every transformation compiles to a function which can be passed around, given to higher-order functions, or be parametrized with other functions itself.