The Correctness of a Code Generator for a Functional Language

被引:1
|
作者
Courant, Nathanael [1 ,2 ]
Sere, Antoine [3 ]
Shankar, Natarajan [4 ]
机构
[1] Inria Paris, Paris, France
[2] Univ Paris Diderot, Paris, France
[3] Ecole Polytech, Palaiseau, France
[4] SRI Int, Comp Sci Lab, Menlo Pk, CA 94025 USA
关键词
D O I
10.1007/978-3-030-39322-9_4
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:68 / 89
页数:22
相关论文
共 50 条
  • [1] Checking Correctness of Code Generator Architecture Specifications
    Hasabnis, Niranjan
    Qiao, Rui
    Sekar, R.
    2015 IEEE/ACM INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION (CGO), 2015, : 167 - 178
  • [2] Verification of Functional Correctness of Code Diversification Techniques
    Jang, Jae-Won
    Verbeek, Freek
    Ravindran, Binoy
    NASA FORMAL METHODS (NFM 2021), 2021, 12673 : 160 - 179
  • [3] CONTROLH - AN ALGORITHM SPECIFICATION LANGUAGE AND CODE GENERATOR
    ENGLEHART, M
    JACKSON, M
    IEEE CONTROL SYSTEMS MAGAZINE, 1995, 15 (02): : 54 - 64
  • [4] FCG - A CODE GENERATOR FOR LAZY FUNCTIONAL LANGUAGES
    LANGENDOEN, K
    HARTEL, PH
    LECTURE NOTES IN COMPUTER SCIENCE, 1992, 641 : 278 - 296
  • [5] CORRECTNESS OF CODE GENERATION FROM A 2-LEVEL META-LANGUAGE
    NIELSON, F
    LECTURE NOTES IN COMPUTER SCIENCE, 1986, 213 : 30 - 40
  • [6] Unit test code generator for lua programming language
    School of Electrical Engineering and Informatics, Institut Teknologi Bandung, Bandung, Indonesia
    Proc. Int. Conf. Data Softw. Eng., ICODSE, (241-245):
  • [7] Unit Test Code Generator for Lua Programming Language
    Wibowo, Junno Tantra Pratama
    Hendradjaya, Bayu
    Widyani, Yani
    2015 INTERNATIONAL CONFERENCE ON DATA AND SOFTWARE ENGINEERING (ICODSE), 2015, : 241 - 245
  • [8] FLIC - A FUNCTIONAL LANGUAGE INTERMEDIATE CODE
    PEYTONJONES, SL
    SIGPLAN NOTICES, 1988, 23 (08): : 30 - 48
  • [9] CORRECTNESS PROOFS FOR META-IV WRITTEN CODE GENERATOR SPECIFICATIONS USING TERM REWRITING
    BUTH, B
    BUTH, KH
    LECTURE NOTES IN COMPUTER SCIENCE, 1988, 328 : 406 - 433
  • [10] On the correctness of code generators for PLCs
    Pollmaecher, Dirk
    Zimmermann, Wolf
    WMSCI 2005: 9TH WORLD MULTI-CONFERENCE ON SYSTEMICS, CYBERNETICS AND INFORMATICS, VOL 2, 2005, : 175 - 180