Skip to the content.

LingLong Framework

I. Introduction

LingLong is an abstract framework that synthesizes codes under given specification, and also estimates the probabilities of codes. This repo contains two projects, i.e., Cond and Hanabi.

If you use LingLong, please cite our paper.

@article{xiong2022l2s,
  title={L2S: A framework for synthesizing the most probable program under a specification},
  author={Xiong, Yingfei and Wang, Bo},
  journal={ACM Transactions on Software Engineering and Methodology (TOSEM)},
  volume={31},
  number={3},
  year={2022},
  publisher = {Association for Computing Machinery},
  doi = {10.1145/3487570}
}

II. Cond

Training Stage

  1. Training data extraction. Given a Java project, LingLong collects all the conditional expressions and parses them into options by a specified order, after which LingLong generates training dataset.

  2. Traning Models. LingLong trains machine learning models against the training data.

Synthesizing Stage

  1. Code Location Selection. Select a certain code location, from which LingLong extracts Context Features and fires the generation step.

  2. Expression Generation. Under the given context, LingLong synthesizes K conditional expressions ranked by their estimated probabilities.

Environment

How to run

Cond is an Eclipse project, in which it can be directly imported and executed. The main entrence is the class edu.pku.sei.conditon.dedu.predall.PredAllExperiment, and the configuration file is config.ini which controls the rule set selection.

III. Hanabi

Environment

How to run

Hanabi is an Eclipse project, in which it can be directly imported and executed. The main class is cn.edu.pku.sei.plde.hanabi.main.Main.

Generated patches

The generated patches can be found in the folder Patch. The analysis of the correctness/incorrectness of the patches can be found in Readme.md.