CASM: Implementing an Abstract State Machine based Programming Language

In this paper we present CASM, a general purpose programming language based on abstract state machines (ASMs). We describe the implementation of an interpreter and a compiler for the language. The demand for efficient execution forced us to modify the definition of ASM and we discuss the impact of those changes. A novel feature for ASM based languages is symbolic execution, which we briefly describe. CASM is used for instruction set simulator generation and for semantic description in a compiler verification project. We report on the experience of using the language in those two projects. Finally we position ASM based programming languages as an elegant combination of imperative and functional programming paradigms which may liberate us from the von Neumann style as demanded by John Backus.

[1]  Andreas Krall,et al.  A Unified Processor Model for Compiler Verification and Simulation Using ASM , 2012, ABZ.

[2]  Joachim Schmid,et al.  Compiling Abstract State Machines to C++ , 2001, J. Univers. Comput. Sci..

[3]  Andreas Krall,et al.  Using the CASM language for simulator synthesis and model verification , 2013, RAPIDO '13.

[4]  Sabine Glesner An ASM Semantics for SSA Intermediate Representations , 2004, Abstract State Machines.

[5]  Stuart Greenfield,et al.  Teaching parameter passing by example using thunks in C and C++ , 1993, SIGCSE '93.

[6]  Sarfraz Khurshid,et al.  Test input generation with java PathFinder , 2004, ISSTA '04.

[7]  Wolf Zimmermann,et al.  On the Construction of Correct Compiler Back-Ends: An ASM-Approach , 1997, J. Univers. Comput. Sci..

[8]  John W. Backus,et al.  Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs , 1978, CACM.

[9]  Joachim Schmid,et al.  Introduction to AsmGofeer , 2001 .

[10]  Yuri Gurevich,et al.  Evolving algebras 1993: Lipari guide , 1995, Specification and validation methods.

[11]  Matthias Anlauff,et al.  XASM - An Extensible, Component-Based ASM Language , 2000, Abstract State Machines.

[12]  Egon Börger,et al.  Remarks on Turbo ASMs for Functional Equations and Recursion Schemes , 2003, Abstract State Machines.

[13]  Egon Börger,et al.  Abstract State Machines. A Method for High-Level System Design and Analysis , 2003 .

[14]  James K. Huggins,et al.  The Static and Dynamic Semantics of C , 2000 .

[15]  Yuri Gurevich,et al.  The Semantics of the C Programming Language , 1992, CSL.

[16]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[17]  Simon L. Peyton Jones,et al.  A history of Haskell: being lazy with class , 2007, HOPL.

[18]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[19]  Thilo S. Gaul,et al.  An Abstract State Machine specification of the DEC-Alpha Processor Family , 1995 .

[20]  Egon Börger,et al.  Java and the Java Virtual Machine: Definition, Verification, Validation , 2001 .

[21]  Roozbeh Farahbod,et al.  CoreASM: An Extensible ASM Execution Engine , 2007, Fundam. Informaticae.

[22]  Giuseppe Del Castillo,et al.  The ASM Workbench - A Tool Environment for Computer-Aided Analysis and Validation of Abstract State Machine Models Tool Demonstration , 2001, TACAS.

[23]  R. Nigel Horspool,et al.  DSP Instruction Set Simulation , 2010, Handbook of Signal Processing Systems.

[24]  Alfonso Pierantonio,et al.  The Formal Specification of Oberon , 1997, J. Univers. Comput. Sci..