Book section Open Access

The Correctness of a Code Generator for a Functional Language

Courant, Nathanaël; Séré, Antoine; Shankar, Natarajan

DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="" xmlns="" xsi:schemaLocation="">
  <identifier identifierType="URL"></identifier>
      <creatorName>Courant, Nathanaël</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="">0000-0002-8736-3060</nameIdentifier>
      <creatorName>Séré, Antoine</creatorName>
      <creatorName>Shankar, Natarajan</creatorName>
    <title>The Correctness of a Code Generator for a Functional Language</title>
    <date dateType="Issued">2020-01-01</date>
  <resourceType resourceTypeGeneral="Text">Book section</resourceType>
    <alternateIdentifier alternateIdentifierType="url"></alternateIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsIdenticalTo">10.1007/978-3-030-39322-9_4</relatedIdentifier>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
    <description descriptionType="Abstract">Code generation is gaining popularity as a technique to bridge the gap between high-level models and executable code. We describe the theory underlying the PVS2C code generator that translates functional programs written using the PVS specification language to standalone, efficiently executable C code. We outline a correctness argument for the code generator. The techniques used are quite generic and can be applied to transform programs written in functional languages into imperative code. We use a formal model of reference counting to capture memory management and safe destructive updates for a simple first-order functional language with arrays. We exhibit a bisimulation between the functional execution and the imperative execution. This bisimulation shows that the generated imperative program returns the same result as the functional program.</description>
Views 17
Downloads 3
Data volume 1.1 MB
Unique views 17
Unique downloads 3


Cite as