TY - JOUR
T1 - Meta-programming in CLP(ℛ)
AU - Heintze, Nevin
AU - Michaylov, Spiro
AU - Stuckey, Peter J.
AU - Yap, Roland H.C.
PY - 1997/1/1
Y1 - 1997/1/1
N2 - A widely used property of Prolog is that it is possible to write Prolog programs to construct and manipulate other Prolog programs in a very general manner. Unfortunately, this property is not carried over to richer languages such as CLP(ℛ) - the manipulation of CLP(ℛ) programs in CLP(ℛ) is quite limited. The reason is that the equality of terms in CLP(ℛ) is not based on their syntactic structure. We propose an extended language, CLP(ℛ + script M sign;), in which programs may be represented and structurally manipulated. Importantly, CLP(ℛ + script M sign;) is not just a meta-language for CLP(ℛ), but it can also be used as its own meta-language. We present a decision algorithm for ℛ + script M sign; constraints, discuss implementation issues, and describe the implementation of a subclass of ℛ + script M sign; constraints. Finally, by building on the extended language, we present an integrated set of system predicates and a methodology for practical meta-programming.
AB - A widely used property of Prolog is that it is possible to write Prolog programs to construct and manipulate other Prolog programs in a very general manner. Unfortunately, this property is not carried over to richer languages such as CLP(ℛ) - the manipulation of CLP(ℛ) programs in CLP(ℛ) is quite limited. The reason is that the equality of terms in CLP(ℛ) is not based on their syntactic structure. We propose an extended language, CLP(ℛ + script M sign;), in which programs may be represented and structurally manipulated. Importantly, CLP(ℛ + script M sign;) is not just a meta-language for CLP(ℛ), but it can also be used as its own meta-language. We present a decision algorithm for ℛ + script M sign; constraints, discuss implementation issues, and describe the implementation of a subclass of ℛ + script M sign; constraints. Finally, by building on the extended language, we present an integrated set of system predicates and a methodology for practical meta-programming.
UR - http://www.scopus.com/inward/record.url?scp=0031538393&partnerID=8YFLogxK
U2 - 10.1016/S0743-1066(96)00145-8
DO - 10.1016/S0743-1066(96)00145-8
M3 - Article
AN - SCOPUS:0031538393
VL - 33
SP - 221
EP - 259
JO - Journal of Logic Programming
JF - Journal of Logic Programming
SN - 0743-1066
IS - 3
ER -