Log In Sign Up

Semantic preservation for a type directed translation scheme of Featherweight Go

by   Martin Sulzmann, et al.

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.


page 1

page 2

page 3

page 4


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

Featherweight Generic Go (FGG) is a minimal core calculus modeling the e...

A Polymorphic RPC Calculus

The RPC calculus is a simple semantic foundation for multi-tier programm...

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...

A Dictionary-Passing Translation of Featherweight Go

The Go programming language is an increasingly popular language but some...

Normalising Lustre Preserves Security

The synchronous reactive data flow language LUSTRE is an expressive lang...

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

In call-by-value languages, some mutually-recursive value definitions ca...

Type-Directed Program Synthesis for RESTful APIs

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