Coalgebraic Operational Semantics for an Imperative Language

Authors

  • William Steingartner Department of Computers and Informatics, Faculty of Electrical Engineering and Informatics, Technical University of Košice
  • Valerie Novitzka Department of Computers and Informatics, Faculty of Electrical Engineering and Informatics, Technical University of Košice
  • Wolfgang Schreiner Research Institute for Symbolic Computation, Johannes Kepler University, Linz

Keywords:

Category theory, coalgebra, operational semantics, programming language

Abstract

Operational semantics is a known and popular semantic method for describing the execution of programs in detail. The traditional definition of this method defines each step of a program as a transition relation. We present a new approach on how to define operational semantics as a coalgebra over a category of configurations. Our approach enables us to deal with a program that is written in a small but real imperative language containing also the common program constructs as input and output statements, and declarations. A coalgebra enables to define operational semantics in a uniform way and it describes the behavior of the programs. The state space of our coalgebra consists of the configurations modeling the actual states; the morphisms in a base category of the coalgebra are the functions defining particular steps during the program's executions. Polynomial endofunctor determines this type of systems. Another advantage of our approach is its easy implementation and graphical representation, which we illustrate on a simple program.

Downloads

Download data is not yet available.

Downloads

Published

2020-02-11

How to Cite

Steingartner, W., Novitzka, V., & Schreiner, W. (2020). Coalgebraic Operational Semantics for an Imperative Language. COMPUTING AND INFORMATICS, 38(5), 1181–1209. Retrieved from http://www.cai.sk/ojs/index.php/cai/article/view/2019_5_1181