M-LISP(ID:1644/mli004)


A hybrid of M-expression LISP and Scheme.


Related languages
2-LISP => M-LISP   Chief motivation for Strong Influence

References:
  • Muller, Robert "MetaLISP: a representation independent dialect of LISP with reduction semantics", Boston University, Boston, MA, 1989 view details
  • Muller, Robert "Syntax macros in M-LISP: A representation independent dialect of LISP with reduction semantics". Tech. Rep. CRCT TR-04-90, Harvard Univermty, Cambridge, Mass., 1990. view details Abstract: In this paper we introduce M-LISP, a dialect of LISP designed with an eye toward reconciling LISP’s metalinguistics power with the structural style of operational semantics advocated by Plotkin [28]. We begin by reviewing the original defimtion of LISP [20] in an attempt to clarify the source of its metalinguistics power. We find that it arises from a problematic clause in this definition. We then define the abstract syntax and operational semantics of M-LISP, essentially a hybrid of M-expression LISP and Scheme. Next, we tie the operational semantics to the corresponding equational logic. As usual, provable equality in the logic implies operational equality.

    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.
  • Muller, Robert "M-LISP: Its Natural Semantics and Equational Logic", view details
          in SIGPLAN Notices 26(09) September 1991 (PEPM '91). view details
  • Muller, Robert "M-LISP: a representation-independent dialect of LISP with reduction semantics" view details Abstract: In this paper we introduce M-LISP, a dialect of LISP designed with an eye toward reconciling LISP's metalinguistic power with the structural style of operational semantics advocated by Plotkin [28]. We begin by reviewing the original definition of LISP [20] in an attempt to clarify the source of its metalinguistic power. We find that it arises from a problematic clause in this definition. We then define the abstract syntax and operational semantics of M-LISP, essentially a hybrid of M-expression LISP and Scheme. Next, we tie the operational semantics to the corresponding equational logic. As usual, provable equality in the logic implies operational equality. Having established this framework we then extend M-LISP with the metalinguistic eval and reify operators (the latter is a nonstrict operator that converts its argument to its metalanguage representation). These operators encapsulate the matalinguistic representation conversions that occur globally in S-expression LISP. We show that the naive versions of these operators render LISP's equational logic inconsistent. On the positive side, we show that a naturally restricted form of the eval 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. DOI Extract: Introduction
    [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