Functional evaluation of natural semantics specifications
Abstract
Typol is a language to implement natural semantics inside the Centaur programming environment. We explain why natural semantics can be considered as a generalization of the attribute grammars formalism. This relationship suggests introducing in the Typol setting some concepts from the attribute grammars framework. With these concepts, we can provide specialized evaluators to some classes of Typol programs, instead of the general Prolog machine currently used to execute such programs. More precisely, we prove that under acceptable conditions, the unification process is no longer required and can be replaced by a simple pattern-matching mechanism. From this proof method, we deduce a functional implementation of Typol programs. We also propose a language construct called CondMatch, that makes it easier to automatically translate a Typol program into a Lisp function.