DeepAI
Log In Sign Up

Semantic preservation for a type directed translation scheme of Featherweight Go

06/20/2022
by   Martin Sulzmann, et al.
0

Featherweight Go (FG) is a minimal core calculus that includes essential Go features such as overloaded methods and interface types. The most straightforward semantic description of the dynamic behavior of FG programs is to resolve method calls based on run-time type information. A more efficient approach is to apply a type-directed translation scheme where interface-values are replaced by dictionaries that contain concrete method definitions. Thus, method calls can be resolved by a simple lookup of the method definition in the dictionary. Establishing that the target program obtained via the type-directed translation scheme preserves the semantics of the original FG program is an important task. To establish this property we employ logical relations that are indexed by types to relate source and target programs. We provide rigorous proofs and give a detailed discussion of the many subtle corners that we have encountered including the need for a step index due to recursive interfaces and method definitions.

READ FULL TEXT

page 1

page 2

page 3

page 4

09/18/2022

A Type-Directed, Dictionary-Passing Translation of Featherweight Generic Go

Featherweight Generic Go (FGG) is a minimal core calculus modeling the e...
10/24/2019

A Polymorphic RPC Calculus

The RPC calculus is a simple semantic foundation for multi-tier programm...
08/30/2022

Program Equivalence in an Untyped, Call-by-value Lambda Calculus with Uncurried Recursive Functions

We aim to reason about the correctness of behaviour-preserving transform...
06/28/2021

A Dictionary-Passing Translation of Featherweight Go

The Go programming language is an increasingly popular language but some...
05/22/2021

Normalising Lustre Preserves Security

The synchronous reactive data flow language LUSTRE is an expressive lang...
11/20/2018

A right-to-left type system for mutually-recursive value definitions

In call-by-value languages, some mutually-recursive value definitions ca...
03/30/2022

Type-Directed Program Synthesis for RESTful APIs

With the rise of software-as-a-service and microservice architectures, R...