GithubHelp home page GithubHelp logo

smt2c's Introduction

Smt2C

Transforming SMT2 files into equivalent C tasks

Benchmarking of software verifiers is difficult. Existing verification benchmarks are often too small to test every little detail of the verifier implementation and extended the benchmark often requires a significant manual effort. With Smt2C, we introduce an easy way to generate a C benchmark from an SMT2 benchmark.

Smt2C expects a SMT2 task and then creates a C task where an error location is reachable iff the SMT formula was satisfiable. As a result, Smt2C can be used to create new benchmarks for C verifiers that test a larger variety of C features.

Installation

The package is tested under Python 3.10. It can be installed by cloning this repository and installing all requirements via:

pip install -r requirements.txt

Quick start

Smt2C can transform one or ore files. To transform an existing benchmark (in the SMT-COMP format), you can run the following script:

$ python run_transformations.py [input_files] -o [output_dir] [--parallel]

The script transforms the input files and writes the result in the output folder. The input files may contain only .smt2 files. If you transform multiple files, it can be beneficial to run the transformation in parallel (via the --parallel option).

The following scripts generated the examples. They and their input files are a minimal example for how a benchmark might look like.

$ python src/run_transformations.py examples/test_sources/bvadd_char.smt2 examples/test_sources/bvadd_short.smt2 examples/test_sources/bvadd_int.smt2 examples/test_sources/bvadd_longlong.smt2 -o examples/bvadd_c
$ python src/run_transformations.py examples/test_sources/bvand_*.smt2 -o examples/bvand_c
$ python src/run_transformations.py examples/test_sources/*_short.smt2 -o examples/bvshort_c

Project Info

Distributed under the MIT license. See license.txt for more information.

smt2c's People

Stargazers

Florian Dyck avatar

Watchers

Florian Dyck 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.