Giter VIP home page Giter VIP logo

grisette's People

Contributors

lsrcz avatar rbodik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grisette's Issues

When will the tutorials on Grisette be made available?

Hello @lsrcz , I am a Rosette user who would like to move to Grisette as soon as possible, but I think I will need tutorials on Grisette to get started initially. So I was wondering when will the tutorials on it will be made available? Thanks.

Add QuickCheck generator instances for bit vectors

QuickCheck-based fuzzer could be useful for quickly testing an implementation and generating counter-examples. Grisette introduced the bit-vector types, but not yet have Arbitrary instances for them.

Add a more general CEGIS interface

Currently, the CEGIS interface in Grisette is provided by using a single ExceptT ... UnionM container and translate the errors differently for synthesizer and verifier. A more general interface should accept a symbolic semantics (which could be angelic), and a verifier/fuzzer (which is an IO action generates counter-examples, can even be calling an external program and do not have to rely on solvers).

Add a template haskell procedure to unify the construction of values and values in UnionM

Suppose we have a type:

data AST
  = Add (UnionM AST) (UnionM AST)
  | Mul (UnionM AST) (UnionM AST)
  | Lit SymInteger
   deriving (Show, Generic)
   deriving (Mergeable) via (Default AST)

Consider how to construct a value of this type. To construct the value (a + b) * (c + d), we may have to write:

Mul
  (mrgReturn $ Add (mrgReturn $ Lit "a") (mrgReturn $ Lit "b"))
  (mrgReturn $ Add (mrgReturn $ Lit "c") (mrgReturn $ Lit "d"))

This is ridiculously verbose.

A better way to construct this is to provide a type class that constructs an AST or a UnionM AST in a unified way:

class ASTBuilder ast where
  add :: UnionM AST -> UnionM AST -> ast
  mul :: UnionM AST -> UnionM AST -> ast
  lit :: SymInteger -> ast

and implement the following two instances:

instance ASTBuilder AST where
  add = Add
  mul = Mul
  lit = Lit

instance ASTBuilder (UnionM AST) where
  add l r = mrgReturn $ Add l r
  mul l r = mrgReturn $ Mul l r
  lit v = mrgReturn $ Lit v

Then we can construct (a + b) * (c + d) by

Mul (add (lit "a") (lit "b")) (add (lit "c") (lit "d"))

as expected.

This can be done with Template Haskell. It may be a good idea to have a way to configure the function names to avoid name clash.

Add SymReal Type

looking at sbv it has support for both floats of arbitrary precision and rational numbers could grisette add support for them?

Support creating SomeBV from runtime bit-widths.

The current interface to the SomeIntN and SomeWordN are hard to use. We should provide interface to allow creation of these non-bit-width-tagged types from runtime bit-widths.

Possible interface may be added to the BV type class:

bv :: Natural -> Integer -> bv
> bv 12 20
0x014

add vanilla cabal/ghc build matrix too?

Hello!

  1. whats the current intended ghc version / cabal version build range?
  2. if its already reflected into the setup-haskell style CI, where am i overlooking it
  3. would you be open to adding that otherwise?
    (i guess one sub yak is making sure that the environment has some SMT solver installed for testing?)

happy to help poke at this if needed. I'm keen to use this library, but some use cases need me poking at making sure i can target at least 9.0.x - 9.6.x ghc flavors.

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.