文档详情

Incremental Extension of a Domain Specific Language Interpreter.pdf

发布:2017-04-11约3.92万字共17页下载文档
文本预览下载声明
Incremental Extension of a Domain Specific Language Interpreter Olivier Michel1 and Jean-Louis Giavitto1 IBISC - FRE 2873 CNRS Universite? d’E?vry, Genopole Tour E?vry 2, 523 place des terrasses de l’Agora, 91000 E?vry, France Abstract. We have developed an interpreter for the domain-specific language MGS using OCAML as the implementation language. In this third implementation of MGS, we wanted to provide the end-user with easy in- cremental addition of new data structures and their associated functions to the language. We detail in this paper our solution, in a functional setting, which is based on techniques similar to those found in aspect- oriented programming. 1 Introduction This work takes place in the MGS [11, 16] project1 which develops new data and control structures for the modelization and simulation of dynamical systems with a dynamical structure [14]. These features are embedded in a simple functional language, called also MGS, which is used to model various physical and biological processes [30, 31, 13]. The adequacy of MGS to its application domain is achieved through the fol- lowing three features: 1. it embeds a very rich family of data structures used for the representation of the states of dynamical systems; 2. it provides a very large set of functions operating on these data structures; 3. it offers a new way of specifying uniformly functions defined by case on arbitrary data structures, using topological rewriting [12]. An interpreter for the MGS language has been implemented in the OCAML [21, 28] language. The decisive advantages of OCAML for us were that (1) it provides both functional and object-oriented features in the same environment and (2) it produces very effective code [1, 2]. One of the main problems raised by the MGS project is the wish to offer easy incremental addition of new data structures and their associated functions to answer the needs expressed by the end-users. As a matter of fact, the initial release of the interpreter di
显示全部
相似文档