Declarative meta programming for a language extensibility mechanism
暂无分享,去创建一个
Today, many dialects of traditional programming languages exist [6]. In most cases, they add some programming paradigm or functionality to the original language. A major drawback of these dialects is that they have hard coded the extensions into the compiler. In an open mechanism, programmers may introduce extensions to the language to t their own development needs. Otherwise every extension requires a re-implementation of the language compiler, which is not a exible solution. It has already been demonstrated that meta programming is a solution to this problem [10, 11]. For example, OpenJava is an extensible dialect of Java where the meta programs specify a transformation from the extended language to the original language. These meta programs are normal Java programs that make use of the OpenJava MOP to inspect and modify the code. In such a system, a meta program that adds accessor methods to a class looks more or less like this (in pseudo-code):
[1] Spyros Tzafestas,et al. Simply logical: Intelligent reasoning by example , 1995 .
[2] James R. Cordy,et al. Schema translation using structural transformation , 1994, CASCON.
[3] Kris De Volder,et al. Type-Oriented Logic Meta Programming , 1998 .
[4] Michiaki Tatsubori,et al. An Extension Mechanism for the Java Language , 1999 .
[5] Shigeru Chiba,et al. A metaobject protocol for C++ , 1995, OOPSLA.