M-LISP(ID:1644/mli004)A hybrid of M-expression LISP and Scheme. Related languages
References: Having established this framework, we then extend M-LISP with the metalinguistics eval and reify operators (the latter is a nonstrict operator that converts its argument to its metalanguage representation). These operators encapsulate the metalinguistics representation conversions that occur globally in S-expression LISP. We show that the naive versions of these operators render LISPS equational logic inconsistent. On the positive side, we show that a naturally restricted form of the eual operator is confluent and therefore a conservative extension of M-LISP. Unfortunately, we must weaken the logic considerably to obtain a consistent theory of reification. in SIGPLAN Notices 26(09) September 1991 (PEPM '91). view details [Comparing M-LISP with] 2-LISP and 3-LISP M-LISP has closer parallels to - and was originally motivated by - 2-LISP, the precursor to the more widely noted reflective 3-LISP. In 2-LISP, Smith attempts to reconcile the notions of evaluation and reduction in pure Scheme. Although it is generally agreed that this is a worthwhile goal, Smith’s solution in 2-LISP was rather complicated, and none of the subsequent treatments of reflection adopted it. 2-LISP is yet another descendant of McCarthy’s problematic coding algorithm but with additional structure superimposed on it. Comparing specific aspects of M-LISP and 2-LISP, our representation function % corresponds to Smith’s reifying up operator, and its inverse %-1 corresponds to Smith’s down operator. In 2-LISP, down and up are user operators, and down depends on the termination of its argument. Thus down is not the inverse of up. Our set K. of term representations corresponds roughly to Smith’s handles. Extended M-LISP corresponds to a restricted form of Smiths 3-LISP and the suite of reflective languages which followed. The restrictions relate to the fact that our eual is a function of one argument: a representation of a term. On the other hand, 3-LISP is developed in the context of an evaluator that determines the meaning of an expression relative to an environment and a continuation. 3-LISP reifiers have access not only to the representation of their argument but also to representations of the environment and continuation. In Smith’s view, the body of the reifier is executed - in the implementation - one level up in an "infinite tower" of evaluators. 3-LISP’s eval operator is a function of 3-arguments: representations of an expression, an environment, and a continuation; and a call of eval spawns a new evaluation context or level of the tower below. In this paper we have made no attempt to integrate distinct contexts of evaluation into a coherent structure. There is one evaluation context, and the phenomenon is developed in a purely substitutional setting. in TOPLAS 14(4) October 1992 view details |