Abstract

We consider the task of generating operational semantics, defined as axiomatizations of relations such as e → v, from an equality theory, given as a set of equations {e1 = e2}. We generate these semantics by constructing derived rules based on equations provable in this equality theory and constrained by a simple correctness criteria. This criteria, which we have previously used in verifying compiler correctness, states that the generated semantics correctly implements a given source language. We use Elf, a logic programming language, to axiomatize source language semantics, equality theories for target languages, and translations between source and target languages, and to construct the derived rules, based on these axiomatizations, for the target languages. During the process of constructing derived rules we simultaneously construct a correctness proof, relating these new rules to a given source language and the translation between languages. Previous uses of Elf (in compiler construction and language manipulation) have focused on the language's type system to express statements of correctness. We focus here on Elf's search paradigm, exploiting it in a crucial way to construct objects representing semantic specifications. We have only considered operational semantics for simple functional languages, but we expect that our results can be generalized to a wider class of languages.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.