Abstract
This paper discusses the construction of a meta-interpreter of Flat GHC, one of the simplest and earliest concurrent constraint languages.
Meta-interpretation has a long history in logic programming, and has been applied extensively to building programming systems, adding functionalities, modifying operational semantics and evaluation strategies, and so on. Our objective, in contrast, is to design the pair of (i) a representation of programs suitable for code mobility and (ii) a pure interpreter (or virtual machine) of the represented code, bearing networked applications of concurrent constraint programming in mind. This is more challenging than it might seem; indeed, meta-interpreters of many programming languages achieved their objectives by adding small primitives into the languages and exploiting their functionalities. A meta-interpreter in a pure, simple concurrent language is useful because it is fully amenable to theoretical support including partial evaluation.
After a number of trials and errors, we have arrived at treecode, a ground-term representation of Flat GHC programs that can be easily interpreted, transmitted over the network, and converted back to the original syntax. The paper describes how the interpreter works, where the subtleties lie, and what its design implies. It also describes how the interpreter, given the treecode of a program, is partially evaluated to the original program by the unfold/fold transformation system for Flat GHC.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aït-Kaci, H., Warren’s Abstract Machine: A Tutorial Reconstruction. The MIT Press, Cambridge, MA, 1991.
Ajiro, Y., Ueda, K. and Cho, K., Error-Correcting Source Code. In Proc. Fourth Int. Conf. on Principles and Practice of Constraint Programming (CP’98), LNCS 1520, Springer-Verlag, Berlin, 1998, pp. 40–54.
Ajiro, Y. and Ueda, K., Kima-an Automated Error Correction System for Concurrent Logic Programs. In Proc. Fourth Int. Workshop on Automated Debugging (AADEBUG 2000), Ducassé, M. (ed.), 2000. http://www.irisa.fr/lande/ducasse/aadebug2000/proceedings.html
Apt, K. R., Marek, V. W., Truszczynski M., and Warren D. S. (eds.), The Logic Programming Paradigm: A 25-Year Perspective. Springer-Verlag, Berlin, 1999.
Bowen, K. A. and Kowalski, R. A., Amalgamating Language and Meta-Language in Logic Programming. In Logic Programming, Clark, K. L. and Tärnlund, S. Å. (eds.), Academic Press, London, pp. 153–172, 1982.
Chikayama, T., Fujise, T. and Sekita, D., A Portable and Efficient Implementation of KL1. In Proc. 6th Int. Symp. on Programming Language Implementation and Logic Programming (PLILP’94), LNCS 844, Springer-Verlag, Berlin, 1994, pp. 25–39.
Clark, K. L. and Gregory, S., A Relational Language for Parallel Programming. In Proc. ACM Conf. on Functional Programming Languages and Computer Architecture (FPCA’81), ACM, 1981, pp. 171–178.
Clark, K. L. and Gregory, S., PARLOG: Parallel Programming in Logic. ACM. Trans. Prog. Lang. Syst., Vol. 8, No. 1 (1986), pp. 1–49.
Foster, I. and Taylor, S., Strand: a Practical Parallel Programming Tool. In Proc. 1989 North American Conf. on Logic Programming (NACLP’89), The MIT Press, Cambridge, MA, 1989, pp. 497–512.
Haridi, S., Van Roy, P., Brand, P. and Schulte, C., Programming Languages for Distributed Applications. New Generation Computing, Vol. 16, No. 3 (1998), pp. 223–261.
Huntbach, M. M., Ringwood, G. A., Agent-Oriented Programming: From Prolog to Guarded Definite Clauses. LNCS 1630, Springer-Verlag, Berlin, 1999.
Maher, M. J., Logic Semantics for a Class of Committed-Choice Programs. In Proc. Fourth Int. Conf. on Logic Programming (ICLP’87), The MIT Press, Cambridge, MA, 1987, pp. 858–876.
McCarthy, J., Lisp 1.5 Programmer’s Manual. MIT Press Cambridge, MA, 1962.
Miller, D. and Nadathur, G., Higher-order Logic Programming. In Proc. Third Int. Conf. on Logic Programming (ICLP’86), LNCS 225, Springer-Verlag, Berlin, 1986, pp. 448–462.
Milner, R. Communicating and Mobile Systems: the Pi-Calculus. Cambridge University Press, 1999.
Nakashima, H., Ueda, K. and Tomura, S., What Is a Variable in Prolog? In Proc. Int. Conf. on Fifth Generation Computer Systems 1984 (FGCS’84), ICOT, Tokyo, 1984, pp. 327–332.
Safra, M. and Shapiro, E. Y., Meta Interpreters for Real, In Information Processing 86, Kugler, H.-J. (ed.), North-Holland, Amsterdam, pp. 271–278, 1986.
Saraswat, V. A. and Rinard, M., Concurrent Constraint Programming (Extended Abstract). In Conf. Record of the Seventeenth Annual ACM Symp. on Principles of Programming Languages (POPL’90), ACM Press, 1990, pp. 232–245.
Saraswat, V. A., Kahn, K., and Levy, J., Janus: A Step Towards Distributed Constraint Programming. In Proc. 1990 North American Conference on Logic Programming (NACLP’90), The MIT Press, Cambridge, MA, 1990, pp. 431–446.
Shapiro, E. Y., Concurrent Prolog: A Progress Report. IEEE Computer, Vol. 19, No. 8 (1986), pp. 44–58.
Shapiro, E. Y. (ed.), Concurrent Prolog: Collected Papers, Volumes I+II. The MIT Press, Cambridge, MA, 1987.
Shapiro, E. Y., Warren, D. H. D., Fuchi, K., Kowalski, R. A., Furukawa, K., Ueda, K., Kahn, K. M., Chikayama, T. and Tick, E., The Fifth Generation Project: Personal Perspectives. Comm. ACM, Vol. 36, No. 3 (1993), pp. 46–103.
Smolka, G., The Oz Programming Model. In Computer Science Today, van Leeuwen, J. (ed.), LNCS 1000, Springer-Verlag, Berlin, 1995, pp. 324–343.
Takeuchi, A. and Furukawa, K., Partial Evaluation of Prolog Programs and Its Application to Meta Programming. In Information Processing 86, Kugler, H.-J. (ed.), North-Holland, Amsterdam, 1986, pp. 415–420.
Tamaki, H. and Sato, T., Unfold/Fold Transformation of Logic Programs. In Proc. Second Int. Logic Programming Conf. (ICLP’84), Uppsala Univ., Sweden, 1984, pp. 127–138.
Tick, E. The Deevolution of Concurrent Logic Programming Languages. J. Logic Programming, Vol. 23, No. 2 (1995), pp. 89–123.
Ueda, K., Guarded Horn Clauses. ICOT Tech. Report TR-103, ICOT, Tokyo, 1985. Also in Logic Programming’ 85, Wada, E. (ed.), LNCS 221, Springer-Verlag, Berlin, 1986, pp. 168–179.
Ueda, K. and Furukawa, K., Transformation Rules for GHC Programs. In Proc. Int. Conf. on Fifth Generation Computer Systems 1988 (FGCS’88), ICOT, Tokyo, 1988, pp. 582–591.
Ueda, K. and Chikayama, T. Design of the Kernel Language for the Parallel Inference Machine. The Computer Journal, Vol. 33, No. 6 (1990), pp. 494–500.
Ueda, K. and Morita, M., Moded Flat GHC and Its Message-Oriented Implementation Technique. New Generation Computing, Vol. 13, No. 1 (1994), pp. 3–43.
Ueda, K., Experiences with Strong Moding in Concurrent Logic/Constraint Programming. In Proc. Int. Workshop on Parallel Symbolic Languages and Systems (PSLS’95), LNCS 1068, Springer-Verlag, Berlin, 1996, pp. 134–153.
Ueda, K., Concurrent Logic/Constraint Programming: The Next 10 Years. InMarek, V. W., Truszczynski M., and Warren D. S. (eds.), The Logic Programming Paradigm: A 25-Year Perspective. Springer-Verlag, Berlin, 1999. [4], 1999, pp. 53–71.
Ueda, K., Linearity Analysis of Concurrent Logic Programs. In Proc. Int. Workshop on Parallel and Distributed Computing for Symbolic and Irregular Applications, Ito, T. and Yuasa, T. (eds.), World Scientific, Singapore, 2000, pp. 253–270.
van Emden, M. H. and de Lucena Filho, G. J., Predicate Logic as a Language for Parallel Programming. In Logic Programming, Clark, K. L. and Tärnlund, S.-Å. (eds.), Academic Press, London, 1982, pp. 189–198.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Ueda, K. (2002). A Pure Meta-interpreter for Flat GHC, a Concurrent Constraint Language. In: Kakas, A.C., Sadri, F. (eds) Computational Logic: Logic Programming and Beyond. Lecture Notes in Computer Science(), vol 2407. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45628-7_7
Download citation
DOI: https://doi.org/10.1007/3-540-45628-7_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43959-2
Online ISBN: 978-3-540-45628-5
eBook Packages: Springer Book Archive