[comp.lang.lisp] reflexivity

napoli@crin.crin.fr (Amedeo NAPOLI) (10/08/88)

Does anybody have clear definition of the following terms:
- meta-circularity
- reflexivity, self-reflexivity
for a language ?

Are there good (and easy to read) references on these or related topics ?

Thanx in advance

Amedeo Napoli
-- 
--- Amedeo Napoli @ CRIN / Centre de Recherche en Informatique de Nancy
EMAIL : napoli@crin.crin.fr - POST : BP 239, 54506 VANDOEUVRE CEDEX, France

sean@lfcs.ed.ac.uk (Sean Matthews (AI)) (10/08/88)

In article <612@crin.crin.fr> napoli@crin.crin.fr (Amedeo NAPOLI) writes:
>Does anybody have clear definition of the following terms:
>- meta-circularity
>- reflexivity, self-reflexivity
>for a language ?
>
>Are there good (and easy to read) references on these or related topics ?

reflection is where a programming language has access to its own interpreter,
and can modify it.

see:
B.C.Smith:
Reflection and Semantics in Lisp
Xerox Parc Intelligent Systems Lab. TR ISL-5
also in 1984 proceedings of 11th POPL  (ACM)

Reflection and Semantics in a Procdeural Language
Technical Report, Laboratory of Computer Science, MIT

P.Maes and D.Nardi (editors)
Meta-Level Architectures and Reflection
Elsevier Science Publishers 1988

jcgs@harlqn.UUCP (John Sturdy) (10/12/88)

In article <826@etive.ed.ac.uk> sean@lfcs.ed.ac.uk (Sean Matthews (AI)) writes:
>In article <612@crin.crin.fr> napoli@crin.crin.fr (Amedeo NAPOLI) writes:
>>Does anybody have clear definition of the following terms:
>>- meta-circularity, reflexivity, self-reflexivity
>
>reflection is where a programming language has access to its own interpreter,
>and can modify it.
Or a finer distinction:
Reflection is where a program can modify its own text, and modify its
"internal" state, as ordinary data objects
Reification is where it can access (read) its text and state
Tower reflection and reification are where it can access its interpreter's
text and state (and its interpreter's interpreter's text and....)

To take examples from "ordinary" programming languages:
setjmp in the C/un*x library is a reifier, and longjmp is the corresponding
reflector. They move information between the "interpreter state" (CPU
stack and PC registers in this case) and the program's data space.
The "varargs" mechanism is just about a reflective device, too.

__John (jcgs@uk.co.harlqn)

jeff@aiva.ed.ac.uk (Jeff Dalton) (10/13/88)

In article <826@etive.ed.ac.uk> sean@lfcs.ed.ac.uk (Sean Matthews (AI)) writes:
>In article <612@crin.crin.fr> napoli@crin.crin.fr (Amedeo NAPOLI) writes:
>>Does anybody have clear definition of the following terms:
>>- meta-circularity
>>- reflexivity, self-reflexivity
>>for a language ?

>>Are there good (and easy to read) references on these or related topics ?

>reflection is where a programming language has access to its own interpreter,
>and can modify it.  [3 references follow]

The following may also be of interest:

   Alan Bawden.  Reification without Evaluation.  Proceedings of the
   1988 ACM Conference on Lisp and Functional Programming, p. 342ff.

The abstract begins:

   Constructing self-referential systems ... is actually more
   straightforward than you think.

Meta-circularity: a meta-circular interpreter for a language is
just an interpreter written in that language.  Textbook Lisp
interpreters typically have that property.  In particular, if
they implement a subset of some Lisp dialect they tend to be
written in that subset.

So meta-circularity is just the property of being implemented
by using the construct being implemented.

A good reference is:

   J. C. Reynolds.  Definitional Interpreters for Higher-order
   Programming Languages.  Proceedings of the ACM National
   Conference 1972, pp 717-740.

Jeff Dalton,                      JANET: J.Dalton@uk.ac.ed             
AI Applications Institute,        ARPA:  J.Dalton%uk.ac.ed@nss.cs.ucl.ac.uk
Edinburgh University.             UUCP:  ...!ukc!ed.ac.uk!J.Dalton

crovella@sunybcs.uucp (Mark Crovella) (10/14/88)

In article <612@crin.crin.fr> napoli@crin.crin.fr (Amedeo NAPOLI) writes:
>Does anybody have clear definition of the following terms:
>- meta-circularity
> [...]
>Are there good (and easy to read) references on these or related topics ?

For meta-circularity, try _Structure and Interpretation of
Computer Programs_, Harold Abelson and Gerald J. Sussman,
MIT Press, 1985.  Clear and precise.

Mark Crovella