• DocumentCode
    1594174
  • Title

    Label-Based Programming Language Semantics in K Framework with SDF

  • Author

    Bogdanas, D.

  • Author_Institution
    Fac. of Comput. Sci., Alexandru Ioan Cuza Univ., Iasi, Romania
  • fYear
    2012
  • Firstpage
    160
  • Lastpage
    167
  • Abstract
    A programming language definition consists of two parts: syntax and semantics. K Framework is an actively developed formalism aimed to address the semantics part. While K has its own capabilities to define syntax and to perform parsing, those are often not expressive enough to handle real world programming languages. Therefore K Framework was designed to be connected to an external parser. In this case the semantics is defined over the representation of programs as AST (Abstract Syntax Tree), and is called label-based. This technique was successfully used to define C language. In this paper we present a parser generator which accepts as input a grammar in SDF format, and produces a parser ready to be integrated with K. We illustrate the methodology of defining a language using the generated parser based on an example. The example definition emphasizes distinctive features of the integration of SDF syntax and K semantics. It also illustrates syntax constructs which are difficult to handle with K Framework alone, but are straightforward to express in SDF + K combination.
  • Keywords
    C language; context-free grammars; programming language semantics; AST; C language; K framework; SDF syntax; SDF-K combination; abstract syntax tree; context free grammars; external parser; label-based programming language semantics; parser generator; parsing; syntax constructs; syntax definition formalism; Generators; Grammar; Java; Production; Semantics; Syntactics; K Framework; SDF; parser generator; rewriting logic; semantics; syntax;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium on
  • Conference_Location
    Timisoara
  • Print_ISBN
    978-1-4673-5026-6
  • Type

    conf

  • DOI
    10.1109/SYNASC.2012.23
  • Filename
    6481025