GithubHelp home page GithubHelp logo

bennn / rosette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emina/rosette

0.0 3.0 0.0 6.15 MB

The Rosette solver-aided host language, sample solver-aided DSLs, and demos

License: Other

Racket 66.35% Python 0.69% HTML 32.96%

rosette's Introduction

rosette

This repository includes the source code and default solver binaries for the Rosette solver-aided host language, as well as several example solver-aided DSLs.

Installing Rosette

  • Download and install Racket 6.1 from http://racket-lang.org

  • Make sure that the default Java installation on your system is a 64-bit server VM, version 1.7x:

    $ java -version
    java version "1.7.0_25"
    Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

  • Clone the rosette repository:

    $ git clone [email protected]:emina/rosette.git

  • Use Racket's raco tool to install Rosette as one of your Racket collections:

    $ cd rosette
    $ raco link rosette
    $ raco setup -l rosette

  • Rosette ships with the Kodkod solver binaries, but it also supports Z3 and CVC4. To use Z3 or CVC4, download (or build) the binaries for your system and put them in the rosette/bin directory.

Executing Rosette programs

  • Open the target program in DrRacket (e.g., rosette/sdsl/fsm/demo.rkt) and hit run!

  • DrRacket is the preferred way to execute Rosette programs. If you need to use the command line, make sure to first compile the program:

    $ raco make <your program>
    $ racket -r <your program>

Available languages

  • Rosette ships with two languages: #lang s-exp rosette/safe and #lang s-exp rosette.

  • The rosette/safe language includes only constructs that are safe to use with symbolic values. This (for now) excludes some nice Racket features, such as iteration constructs. The semantics of these constructs can be expressed in the core language, however, so no expressiveness is lost (just convenience). It is recommended for new users of Rosette to start with the rosette/safe language. To see the list of syntactic forms and procedures provided by rosette/safe, type the following into the Rosette REPL:

    > (rosette)
    '(define assert let let* ...)

  • The rosette language includes all of Racket. This places the burden on the programmer to decide whether a given Racket construct (which is not overriden by Rosette) is safe to use in a given context. Rosette provides no guarantees or checks for programs that use unsafe constructs. In the best case, such a program will fail with an exception if a symbolic value flows to a construct that does not support it. In the worst case, it will continue executing with incorrect semantics or cause more serious problems (e.g., data loss if it writes to a file).

  • For more on Rosette, see:

rosette's People

Contributors

emina avatar

Watchers

James Cloos avatar Ben Greenman avatar  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.