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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.