Global Variables in Logic Programming
暂无分享,去创建一个
We show that adding global variables to logic programming can solve some common problems of reliability and programmer productivity in large logic programs. By presenting a formal semantics for logic programs with global variables, we show that this addition retains a clean semantics. This addition has the consequences that conjunction is neither commutative nor absorptive, but we show that the practical loss is small. We also describe an implementation of Prolog with global variables as a translator to ordinary Prolog which preserves the eeciency of the Prolog program, while statically detecting some programming errors, and avoiding others altogether.
[1] Verónica Dahl,et al. Backtrackable State with Linear Affine Implication and Assumption Grammars , 1996, ASIAN.
[2] Alfred V. Aho,et al. Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.
[3] Peter Van Roy. A useful extension to Prolog's definite clause grammar notation , 1989, SIGP.
[4] J. Lloyd. Foundations of Logic Programming , 1984, Symbolic Computation.