Type-Directed Program Synthesis for RESTful APIs

03/30/2022
by   Zheng Guo, et al.
0

With the rise of software-as-a-service and microservice architectures, RESTful APIs are now ubiquitous in mobile and web applications. A service can have tens or hundreds of API methods, making it a challenge for programmers to find the right combination of methods to solve their task. We present APIphany, a component-based synthesizer for programs that compose calls to RESTful APIs. The main innovation behind APIphany is the use of precise semantic types, both to specify user intent and to direct the search. APIphany contributes three novel mechanisms to overcome challenges in adapting component-based synthesis to the REST domain: (1) a type inference algorithm for augmenting REST specifications with semantic types; (2) an efficient synthesis technique for "wrangling" semi-structured data, which is commonly required in working with RESTful APIs; and (3) a new form of simulated execution to avoid executing APIs calls during synthesis. We evaluate APIphany on three real-world APIs and 32 tasks extracted from GitHub repositories and StackOverflow. In our experiments, APIphany found correct solutions to 29 tasks, with 23 of them reported among top ten synthesis results.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/16/2020

SafeRESTScript: Statically Checking REST API Consumers

Consumption of REST services has become a popular means of invoking code...
research
04/16/2019

Resource-Guided Program Synthesis

This article presents resource-guided synthesis, a technique for synthes...
research
07/13/2021

Bottom-up Synthesis of Recursive Functional Programs using Angelic Execution

We present a novel bottom-up method for the synthesis of functional recu...
research
03/31/2018

Synthesis of Differentiable Functional Programs for Lifelong Learning

We present a neurosymbolic approach to the lifelong learning of algorith...
research
02/25/2021

RbSyn: Type- and Effect-Guided Program Synthesis

In recent years, researchers have explored component-based synthesis, wh...
research
05/20/2019

Efficient Synthesis with Probabilistic Constraints

We consider the problem of synthesizing a program given a probabilistic ...
research
06/20/2022

Semantic preservation for a type directed translation scheme of Featherweight Go

Featherweight Go (FG) is a minimal core calculus that includes essential...

Please sign up or login with your details

Forgot password? Click here to reset