Giter VIP home page Giter VIP logo

dryadsynth's Introduction

DryadSynth

Dryad Synthesizer for SyGuS competition.

For a complete description on methods, please see docs/pldi2020.pdf for CLIA and docs/popl2024.ppsx for bitvector.

Publications

Installation and Running

Currently the synthesizer is not packaged, but you could compile and run it from the project directory.

This program is developed, tested and ran on Linux platform, it is recommended to run it in the same environment. However, testings on Mac OS have also passed.

It is theoretically possible to run the program on Windows platform given a working JVM and a properly installed Z3, however this is not encouraged.

Dependencies

  • JDK with version >= 17
  • Z3 with java bindings enabled
  • Nightly version rust toolchain

Steps to compile

  1. Install JDK on your system, you should refer to your system/distribution manuals to figure out how to complete this. Make sure that JDK version is no lower than 9.

  2. Configure and install Z3 with java bindings enabled

    1. First download Z3, git version is recommended, as some of the bug fixes that are required for this program to run may not have been released to a released version yet.
      • Here is the link to the project site of Z3.
      • For using the git version, run git clone https://github.com/Z3Prover/z3/
    2. Configure the z3 source codes, preparing for build
      • Note that if multiple versions of java have been installed on the system, before configuration, you'll need to set environment variables JAVA_HOME, JDK_HOME to the home path of the version that you would like to use, also you need to set JNI_HOME to ${JDK_HOME}/include
      • Change the argument --prefix according to your needs
    $ cd z3
    $ ./configure --prefix=/usr/local --java
    1. Build and install Z3
      • If the install prefix is not system-wide, omit the sudo for make install.
    $ cd build; make
    $ sudo make install
  3. Install rust from rustup, and set the current directory to use nightly rust by rustup override set nightly.

  4. Complile the program

    • cd into the source code directory of the program and run make would do the work.

Running the program

  1. Ensure libz3java.so is in java.library.path:
    • On Linux platforms, you can simply set environment variable LD_LIBRARY_PATH to include the path, it would be automatically added.
  2. Make sure z3 or bitwuzla commands are available in the PATH. We use bitwuzla for bit-vector theory, otherwise, we use z3.
  3. If you use ChatGPT for bit-vector, please make sure to set the OPENAI_API_KEY environment variable.
  4. Simply run $ ./exec.sh <path/to/sygus/file>
  5. Looking into $ ./exec.sh --help for further information.

Note: Some problems run in multithread by default. If you don't specify the number of threads, the CPU core count on your system would be used. This may cause unexpected behavior when the size of the CPU pool is large.

dryadsynth's People

Contributors

chaserhkj avatar yanjunw avatar wu1492 avatar yuantianding avatar xkqiu avatar yangdinglou 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.