Giter Site home page Giter Site logo

bayou-integration's Introduction

BSL Code Synthesizer

BSL Code Synthesizer project is a JVM implementation of the Bayesian Sketch Learning synthesizer based on the CaperGroup's paper and Bayou, their reference implementation of a such synthesizer.

BSL Code Synthesizer is implemented as an IntelliJ IDEA plugin capable of synthesizing Java STDlib and Android SDK code from a specification in a custom DSL.

Code Structure

BSL Code Synthesizer consists of two main modules:

  • bsl-implementation -- a JVM implementation of a BSL Code Synthesizer. It is highly configurable and currently supports two "metamodels": Java STDlib and Android SDK. Any other metamodel can be defined if all appropriate algorithms are implemented within this library.
  • bsl-plugin -- an IntelliJ IDEA plugin which acts as a UI frontend to the bsl-implementation library. It provides a DSL to define synthesizing queries and intention actions to call bsl-implementation.

The IntelliJ IDEA Plugin

The plugin could be installed from the Plugins Repository or build from scratch from this Github repository.

On the first synthesis command the plugin will download all needed models into a temporary folder depending on your OS.

To run the synthesis you need to create a Java method where the synthesized code will be placed. Create a multiline comment "/* ... /*" before this method, hit Alt+Enter, select Inject language or reference and select Bayou language from the drop-down list.

The DSL Language

The DSL language consists of a header and one or more of evidence blocks. The header (the first line of your comment) defines synthesizer type: STDLIB or ANDROID. Evidence blocks could be one of the following: One the next lines you need to add evidences:

  • API:=<VALUE> or TYPE:=<VALUE> for STDLIB synthesizer,
  • API:=<VALUE>, TYPE:=<VALUE> or CONTEXT:=<VALUE> for ANDROID synthesizer.

Syntactic errors are annotated for this DSL, so in case of a error just take a closer look at appearing annotations.

Examples

Let's consider a few examples.

Delete file:

Delete file synthesizing

Read file:

Read file synthesizing

Clear list:

Clear list synthesizing

bayou-integration's People

Contributors

tanvd avatar jzuken avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.