New Approach to Categorical Semantics for Procedural Languages

Authors

  • William Steingartner Technical University of Košice
  • Valerie Novitzká Technical University of Košice
  • Michaela Bačíková Technical University of Košice
  • Štefan Korečko Technical University of Košice

Keywords:

Category theory, structural operational semantics, state, programming languages

Abstract

The semantics of programs written in some languages is concerned with the interpretation in various types of models. The purpose of structural operational semantics is to describe how a computation is performed. This method is one of the most popular semantic methods in the community of software engineers. It describes program behavior in the form of state changes caused by the execution of elementary steps. This feature predestinates the usage of the structural operational semantics for implementation of programming languages and also for verification purposes. Another semantic method, denotational semantics, defines changes of states by functions. In this paper a new approach to semantics is presented: behavior of programs, i.e., changes of states are modeled in the category of states. The morphisms category expresses elementary execution steps and the program execution is an oriented path in the category, i.e. composition of morphisms. Our categorical model is constructed for a simple procedural language that contains all basic van Dijkstra's constructs. We enriched our approach also with procedures forming a collection of categories interconnected by functors. This method enables the repeated call of procedures, nesting of procedure calls and recursive calls. Moreover, it allows to illustrate and accentuate dynamics of the program execution. The simplicity of this method does not exclude its mathematical exactness.

Downloads

Download data is not yet available.

Author Biographies

William Steingartner, Technical University of Košice

Department of Computers and Informatics Faculty of Electrical Engineering and Informatics Technical University of Košice

Valerie Novitzká, Technical University of Košice

Department of Computers and Informatics Faculty of Electrical Engineering and Informatics Technical University of Košice

Michaela Bačíková, Technical University of Košice

Department of Computers and Informatics Faculty of Electrical Engineering and Informatics Technical University of Košice

Štefan Korečko, Technical University of Košice

Department of Computers and Informatics Faculty of Electrical Engineering and Informatics Technical University of Košice

Downloads

Published

2018-02-09

How to Cite

Steingartner, W., Novitzká, V., Bačíková, M., & Korečko, Štefan. (2018). New Approach to Categorical Semantics for Procedural Languages. Computing and Informatics, 36(6), 1385–1414. Retrieved from http://147.213.75.17/ojs/index.php/cai/article/view/2017_6_1385