A Small-Step Operational Semantics for GP 2

12/21/2021
by   Brian Courtehoute, et al.
0

The operational semantics of a programming language is said to be small-step if each transition step is an atomic computation step in the language. A semantics with this property faithfully corresponds to the implementation of the language. The previous semantics of the graph programming language GP 2 is not fully small-step because the loop and branching commands are defined in big-step style. In this paper, we present a truly small-step operational semantics for GP 2 which, in particular, accurately models diverging computations. To obtain small-step definitions of all commands, we equip the transition relation with a stack of host graphs and associated operations. We prove that the new semantics is non-blocking in that every computation either diverges or eventually produces a result graph or the failure state. We also show the finite nondeterminism property, viz. that each configuration has only a finite number of direct successors. The previous semantics of GP 2 is neither non-blocking nor does it have the finite nondeterminism property. We also show that, for a program and a graph that terminate, both semantics are equivalent, and that the old semantics can be simulated with the new one.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/08/2018

A Program Logic for First-Order Encapsulated WebAssembly

WebAssembly (Wasm) is the first new programming language in over 20 year...
research
08/16/2018

Formalisation of a frame stack semantics for a Java-like language

We present a Coq formalisation of the small-step operational semantics o...
research
08/07/2020

From Big-Step to Small-Step Semantics and Back with Interpreter Specialisation

We investigate representations of imperative programs as constrained Hor...
research
05/07/2021

On Abstract Machine Semantics for Proto-Quipper-M

Quipper is a domain-specific programming language for the description of...
research
08/23/2023

A Frame Stack Semantics for Sequential Core Erlang

We present a small-step, frame stack style, semantics for sequential Cor...
research
02/20/2020

Soundness conditions for big-step semantics

We propose a general proof technique to show that a predicate is sound, ...
research
10/10/2020

Automatically Deriving Control-Flow Graph Generators from Operational Semantics

We develop the first theory of control-flow graphs from first principles...

Please sign up or login with your details

Forgot password? Click here to reset