All Projects → perses-project → perses

perses-project / perses

Licence: GPL-3.0 license
Language-agnostic program reducer.

Programming Languages

rust
11053 projects
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
go
31211 projects - #10 most used programming language
java
68154 projects - #9 most used programming language
solidity
1140 projects

Projects that are alternatives of or similar to perses

Libosmscout
Libosmscout is a C++ library for offline map rendering, routing and location lookup based on OpenStreetMap data
Stars: ✭ 159 (+178.95%)
Mutual labels:  gcc, clang
Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+254.39%)
Mutual labels:  gcc, clang
xcross
"Zero Setup" cross-compilation for C/C++. Supports numerous architectures, build systems, C standard libraries, vcpkg, and Conan.
Stars: ✭ 29 (-49.12%)
Mutual labels:  gcc, clang
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+203.51%)
Mutual labels:  gcc, clang
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (+91.23%)
Mutual labels:  gcc, clang
Ccache
ccache – a fast compiler cache
Stars: ✭ 1,128 (+1878.95%)
Mutual labels:  gcc, clang
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (+159.65%)
Mutual labels:  gcc, clang
Croaring
Roaring bitmaps in C (and C++)
Stars: ✭ 735 (+1189.47%)
Mutual labels:  gcc, clang
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (+249.12%)
Mutual labels:  gcc, clang
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (+84.21%)
Mutual labels:  gcc, clang
Avalonstudio
Cross platform IDE and Shell
Stars: ✭ 1,132 (+1885.96%)
Mutual labels:  gcc, clang
Embedded Ide
IDE for C embedded development centered on bare-metal ARM systems
Stars: ✭ 127 (+122.81%)
Mutual labels:  gcc, clang
C2goasm
C to Go Assembly
Stars: ✭ 1,072 (+1780.7%)
Mutual labels:  gcc, clang
FrameOfReference
C++ library to pack and unpack vectors of integers having a small range of values using a technique called Frame of Reference
Stars: ✭ 36 (-36.84%)
Mutual labels:  gcc, clang
Pfr
std::tuple like methods for user defined types without any macro or boilerplate code
Stars: ✭ 896 (+1471.93%)
Mutual labels:  gcc, clang
C
Compile and execute C "scripts" in one go!
Stars: ✭ 1,920 (+3268.42%)
Mutual labels:  gcc, clang
Ci helloworld
A simple example of how to setup a complete CI environment for C and C++
Stars: ✭ 357 (+526.32%)
Mutual labels:  gcc, clang
Gcovr
generate code coverage reports with gcc/gcov
Stars: ✭ 482 (+745.61%)
Mutual labels:  gcc, clang
Cvise
Super-parallel Python port of the C-Reduce
Stars: ✭ 77 (+35.09%)
Mutual labels:  gcc, clang
Vector
➿ A supercharged std::vector implementation (minus Allocator)
Stars: ✭ 118 (+107.02%)
Mutual labels:  gcc, clang

Perses: Syntax-Directed Program Reduction

Perses is a language-agnostic program reducer to minimize a program with respect to a set of constraints. It takes as input a program to reduce, and a test script which specifies the constraints. It outputs a minimized program which still satisfies the constraints specified in the test script. Compared to Delta Debugging and Hierarchical Delta Debugging, Perses leverages the syntax information in the Antlr grammar, and prunes the search space by avoiding generating syntactically invalid programs.

Supported Languages

Currently, Perses supports reduction for the following programming languages:

  • C
  • Rust
  • Java 8
  • Go
  • System Verilog

Support for other languages is comming soon.

Obtain and Run

There are three ways to obtain Perses.

  • Download a prebuilt release JAR file from our release page, for example,

    wget https://github.com/perses-project/perses/releases/download/v1.4/perses_deploy.jar
    java -jar perses_deploy.jar [options]? --test-script <test-script.sh> --input-file <program file>
    
  • Clone the repo and build Perses from the source.

    git clone https://github.com/perses-project/perses.git
    cd perses
    bazel build //src/org/perses:perses_deploy.jar
    java -jar bazel-bin/src/org/perses/perses_deploy.jar [options]? --test-script <test-script.sh> --input-file <program file>
    
  • If you want to always use the trunk version of Perses, perses-trunk automatically downloads and builds the latest version. NOTE: Bazel is the prerequisite to run perses-trunk successfully.

    wget https://raw.githubusercontent.com/perses-project/perses/master/scripts/perses-trunk
    chmod +x perses-trunk
    ./perses-trunk [options]? --test-script <test-script.sh> --input-file <program file>
    

Important Flags

  • --test-script <test-script.sh>: The script encodes the constraints that both of the original program file and the reduced version should satisfy. It should return 0 if the constraints are satisfied.

  • --input-file : the program needs to be reduced. Currently, Perses supports C, Rust, Java and Go. Note that we can easily support any other languages, if the specific language can be parsed by an Antlr parser.

Check all available command line arguments

java -jar perses_deploy.jar  --help

License

GNU General Public License 3.

Reference

Perse was first published at International Conference on Software Engineering 2018 as a full research paper.

@inproceedings{perses,
  author = {Sun, Chengnian and Li, Yuanbo and Zhang, Qirun and Gu, Tianxiao and Su, Zhendong},
  title = {Perses: Syntax-Guided Program Reduction},
  year = {2018},
  publisher = {Association for Computing Machinery},
  doi = {10.1145/3180155.3180236},
  booktitle = {Proceedings of the 40th International Conference on Software Engineering},
  pages = {361–371},
}
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].