August 5th, 2024

Lisp macros and read work because of a bug in the original definition of Lisp

M-LISP is a new LISP dialect that integrates operational semantics with metalinguistic features, addressing inconsistencies through eval and reify operators while enhancing the understanding of LISP's semantics and functional programming.

Read original articleLink Icon
Lisp macros and read work because of a bug in the original definition of Lisp

The paper introduces M-LISP, a representation-independent dialect of LISP that aims to reconcile LISP's metalinguistic capabilities with operational semantics as proposed by Plotkin. It begins by analyzing the original definition of LISP to identify the source of its metalinguistic power, which is attributed to a problematic clause. M-LISP is defined with an abstract syntax and operational semantics that combine elements of M-expression LISP and Scheme. The authors connect the operational semantics to equational logic, demonstrating that provable equality in the logic implies operational equality. M-LISP is further extended with metalinguistic operators, eval and reify, which facilitate representation conversions. However, the naive implementations of these operators lead to inconsistencies in LISP's equational logic. The paper shows that a restricted version of the eval operator maintains confluence and serves as a conservative extension of M-LISP, while the reify operator necessitates a weakened logic to achieve consistency. This work clarifies the origins of LISP's metalinguistic power, proposes a formal semantics for M-LISP, and contributes significantly to the understanding of LISP and functional programming languages.

- M-LISP is a new dialect of LISP that integrates operational semantics with metalinguistic features.

- The paper identifies a problematic clause in LISP's original definition as the source of its metalinguistic power.

- M-LISP combines elements of M-expression LISP and Scheme, establishing a formal operational semantics.

- The introduction of eval and reify operators in M-LISP addresses metalinguistic representation but leads to inconsistencies.

- The study enhances the understanding of LISP's semantics and its implications for functional programming languages.

Link Icon 2 comments