A Comparison of Big-step Semantics Definition Styles

11/20/2020
by   Péter Bereczky, et al.
0

Formal semantics provides rigorous, mathematically precise definitions of programming languages, with which we can argue about program behaviour and program equivalence by formal means; in particular, we can describe and verify our arguments with a proof assistant. There are various approaches to giving formal semantics to programming languages, at different abstraction levels and applying different mathematical machinery: the reason for using the semantics determines which approach to choose. In this paper we investigate some of the approaches that share their roots with traditional relational big-step semantics, such as (a) functional big-step semantics (or, equivalently, a definitional interpreter), (b) pretty-big-step semantics and (c) traditional natural semantics. We compare these approaches with respect to the following criteria: executability of the semantics definition, proof complexity for typical properties (e.g. determinism) and the conciseness of expression equivalence proofs in that approach. We also briefly discuss the complexity of these definitions and the coinductive big-step semantics, which enables reasoning about divergence. To enable the comparison in practice, we present an example language for comparing the semantics: a sequential subset of Core Erlang, a functional programming language, which is used in the intermediate steps of the Erlang/OTP compiler. We have already defined a relational big-step semantics for this language that includes treatment of exceptions and side effects. The aim of this current work is to compare our big-step definition for this language with a variety of other equivalent semantics in different styles from the point of view of testing and verifying code refactorings.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/04/2021

Reasoning about Iteration and Recursion Uniformly based on Big-step Semantics

A reliable technique for deductive program verification should be proven...
research
12/05/2022

Equivalence of eval-readback and eval-apply big-step evaluators by regimentation of the lambda-calculus's strategy space

We study the equivalence of eval-readback and eval-apply big-step evalua...
research
12/19/2011

What is an OS?

While the engineering of operating systems is well understood, their for...
research
02/05/2018

A Measurement Theory of Locality

Locality is a fundamental principle used extensively in program and syst...
research
10/15/2020

World Age in Julia: Optimizing Method Dispatch in the Presence of Eval (Extended Version)

Dynamic programming languages face semantic and performance challenges i...
research
04/12/2021

A meta-theory for big-step semantics

It is well-known that big-step semantics is not able to distinguish stuc...
research
06/02/2020

Effectful Programming in Declarative Languages with an Emphasis on Non-Determinism: Applications and Formal Reasoning

This thesis investigates effectful declarative programming with an empha...

Please sign up or login with your details

Forgot password? Click here to reset