One Down, 699 to Go: or, synthesising compositional desugarings

09/13/2021
by   Sándor Bartha, et al.
0

Programming or scripting languages used in real-world systems are seldom designed with a formal semantics in mind from the outset. Therefore, developing well-founded analysis tools for these systems requires reverse-engineering a formal semantics as a first step. This can take months or years of effort. Can we (at least partially) automate this process? Though desirable, automatically reverse-engineering semantics rules from an implementation is very challenging, as found by Krishnamurthi et al. [2019]. In this paper, we highlight that scaling methods with the size of the language is very difficult due to state space explosion, so we propose to learn semantics incrementally. We give a formalisation of Krishnamurthi et al.'s desugaring learning framework in order to clarify the assumptions necessary for an incremental learning algorithm to be feasible. We show that this reformulation allows us to extend the search space and express rules that Krishnamurthi et al. described as challenging, while still retaining feasibility. We evaluate enumerative synthesis as a baseline algorithm, and demonstrate that, with our reformulation of the problem, it is possible to learn correct desugaring rules for the example source and core languages proposed by Krishnamurthi et al., in most cases identical to the intended rules. In addition, with user guidance, our system was able to synthesize rules for desugaring list comprehensions and try/catch/finally constructs.

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
09/23/2022

Formal Semantics of the CDL Language

We reverse-engineer a formal semantics of the Component Definition Langu...
research
09/11/2017

Mining relevant interval rules

This article extends the method of Garriga et al. for mining relevant ru...
research
05/06/2019

Errata Note: Discovering Order Dependencies through Order Compatibility

A number of extensions to the classical notion of functional dependencie...
research
07/18/2017

Fixpoint Semantics and Optimization of Recursive Datalog Programs with Aggregates

A very desirable Datalog extension investigated by many researchers in t...
research
10/15/2020

Comment: Individualized Treatment Rules Under Endogeneity

This note discusses two recent studies on identification of individualiz...
research
07/04/2019

Revisiting local time semantics for networks of timed automata

We investigate a zone based approach for the reachability problem in tim...

Please sign up or login with your details

Forgot password? Click here to reset