TY - JOUR T1 - Implementing Structural Operational Semantics in Python AU - Ji, Suhwan AU - Im, Hyeonseung JO - Journal of KIISE, JOK PY - 2018 DA - 2018/1/14 DO - 10.5626/JOK.2018.45.11.1176 KW - operational semantics KW - small-step semantics KW - visitor pattern KW - exception handling KW - Python AB - Operational semantics is the most commonly used technique to formally define the semantics of a programming language. It defines the meaning of a program in terms of how it is executed or interpreted as a sequence of computational steps. This paper introduces an implementation technique for small-step structural operational semantics for a simple ML-style functional language using visitor patterns and exception handling in Python. The secondary objective of this paper is to explain the core concepts of programming language theory and the techniques for implementing these concepts using Python, instead of traditional functional languages such as ML, Haskell, and Scheme. Since Python has a wide abundant user base due to its rich library and flexibility, it is more suitable to explain operational semantics for common users than functional languages, which are relatively less known and have a high learning curve.