All Projects → jfeser → L2

jfeser / L2

Licence: Apache-2.0 license
λ² is a tool for synthesizing functional programs from input-output examples.

Programming Languages

ocaml
1615 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to L2

suslik
Synthesis of Heap-Manipulating Programs from Separation Logic
Stars: ✭ 107 (+81.36%)
Mutual labels:  program-synthesis
plur
PLUR (Programming-Language Understanding and Repair) is a collection of source code datasets suitable for graph-based machine learning. We provide scripts for downloading, processing, and loading the datasets. This is done by offering a unified API and data structures for all datasets.
Stars: ✭ 67 (+13.56%)
Mutual labels:  program-synthesis
Popper
Popper is an inductive logic programming (ILP) system.
Stars: ✭ 95 (+61.02%)
Mutual labels:  program-synthesis
GAS
Generative Art Synthesizer - a python program that generates python programs that generates generative art
Stars: ✭ 42 (-28.81%)
Mutual labels:  program-synthesis
neural inverse knitting
Code for Neural Inverse Knitting: From Images to Manufacturing Instructions
Stars: ✭ 30 (-49.15%)
Mutual labels:  program-synthesis
PythonProgrammingPuzzles
A Dataset of Python Challenges for AI Research
Stars: ✭ 858 (+1354.24%)
Mutual labels:  program-synthesis
deepcoder
Deepcoder paper implementation
Stars: ✭ 96 (+62.71%)
Mutual labels:  program-synthesis
neuro-symbolic-ai-soc
Neuro-Symbolic Visual Question Answering on Sort-of-CLEVR using PyTorch
Stars: ✭ 41 (-30.51%)
Mutual labels:  program-synthesis
Arc
The Abstraction and Reasoning Corpus
Stars: ✭ 1,598 (+2608.47%)
Mutual labels:  program-synthesis
autogoal
A Python framework for program synthesis with a focus on Automated Machine Learning.
Stars: ✭ 153 (+159.32%)
Mutual labels:  program-synthesis
apps
APPS: Automated Programming Progress Standard (NeurIPS 2021)
Stars: ✭ 174 (+194.92%)
Mutual labels:  program-synthesis
awesome-program-synthesis
An curated list of papers on program synthesis.
Stars: ✭ 56 (-5.08%)
Mutual labels:  program-synthesis

λ² Build Status

λ² is a tool for synthesizing functional programs from input-output examples.

There are two versions of λ²:

  • PLDI: This is a slightly improved version of the code that we benchmarked for the PLDI 2015 paper. Use this if you want to reproduce our benchmarks.
  • Development: This version has significantly diverged and no longer performs similarly. However, it has many more features and the code is cleaner. Use this if you want to extend λ².

Building

  1. Clone the repository:
git clone [email protected]:jfeser/L2.git; cd L2
  1. Install dependencies.
opam install --deps-only ./l2.opam.locked

PLDI version

  1. Check out the pldi-modernize branch.
git checkout pldi-modernize
  1. Try λ² on a benchmark problem by running:
dune exec src/l2.exe -- benchmarks/concat.json

You should see output like:

Solved concat in 39ms. Solutions:
(let concat (let a (lambda (c b) (foldr c (lambda (e d) (cons d e)) b)) _) _)

Development version

  1. Try λ² on a benchmark problem by running:
dune exec src/l2-cli/l2_cli.exe -- synth -l components/stdlib.ml -dd higher_order,input_ctx specs/largest_n.json

You should see output like:

                            .lkO0K0xc.
                          'kk;.  .;kWXc    Synthesizing..
                         .NN,       kMMo
                         'WMWx      kMMk   Hypotheses verified: 48458
                          ;dkc     lWMX,      Hypotheses saved: 0
         .:loc.                  .OMWx.
       .okcdWMN,               .oXOc.      Memoization table hit rate: 98.16
      .0o   kMM0             .xNk'    ';
      .'    lMMN.          .cOl.     .KO   Hashcons table equals calls: 1139934 (718173 t, 421761 f)
            ;MMM,         lXWOddddddx0Md   Hashcons table hash calls: 891626, hashcons calls: 891626
            oMMM:        ;kkkkkkkkkkkkk,   Hashcons table len: 73738, num entries: 69923
          .ONWMMl                          Hashcons bucket sum: 160341, min: 0, med: 3, max: 21
         'XO.0MMo
        ,Ko  OMMx                          Signatures: 2785 none, 25306 checked, 18420 dups, 0 fails
      .xNc   xMMO
     ;NK,    dMM0
   .dNd.     lMMX.   ..
  ;XMo       :MMM'  ,O.
 dWNl        .NMMOlxd.
lKO:          ;KMNx.
Runtime: 5.4s
Found solution:
fun b a -> take (reverse (sort (concat a))) b

Running benchmarks

Benchmark problems are in the bench/ directory.

Questions?

Send email to [email protected].

Publications

Feser, J. K., Chaudhuri, S., & Dillig, I. (2015, June). Synthesizing data structure transformations from input-output examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (pp. 229-239). ACM.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].