Towards a theory for reflective programming languages. Anurag Mendhekar Daniel P. Friedman, Department of Computer Science Indiana University Bloomington IN 47405. Abstract This paper attempts to develop a better theoretical understanding of reflective systems. We begin by a developing a reflective extension of the call-by-value lambda calculus and define a simple operational semantics for it based on the infinite tower model described by Smith in [1]. We then develop an equational logic from this semantics. The resulting logic is shown to be weak because of reflective properties. We establish properties about this logic and show that it corresponds to the operational semantics. The infinite tower model described by Smith [1] can really be described in much simpler operational terms. While the system we have described here does not support first-class environments, we believe that it captures the essence of reflective programming. We point out that there are limitations to the reflective capability of systems and that reflective systems depend crucially on a defining system that cannot be reflected upon. Reflection is a very attractive solution for building extensible systems. This paper shows that reasoning about such systems is much harder. Language designers must take this into account when introducing reflection into languages. We develop a calculus for reasoning about programs in this system. The resulting calculus is shown to be consistent, although extremely weak. This weakness is a consequence of the reflective properties of the system. Equational logics derive their power from behavioral equivalence between terms. Since behavioral equivalence between terms is significantly reduced in reflective systems, the corresponding equational logic has turned out to be weak. Although weak, this logic is only a starting point for developing theoretical models for reflective languages. The insight gained by developing this logic will help us design reflective programming languages that will be easier to reason about and implement. Reference: [1] Smith, B.C., Reflection and Semantics in a Procedural Language, MIT-LCS-TR-272, MIT, (Cambridge, 1982).