-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from bruderj15/develop
Develop
- Loading branch information
Showing
13 changed files
with
483 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
cabal-version: 3.0 | ||
|
||
name: hasmtlib | ||
version: 2.2.0 | ||
version: 2.3.0 | ||
synopsis: A monad for interfacing with external SMT solvers | ||
description: Hasmtlib is a library for generating SMTLib2-problems using a monad. | ||
It takes care of encoding your problem, marshaling the data to an external solver and parsing and interpreting the result into Haskell types. | ||
|
@@ -14,7 +14,7 @@ license-file: LICENSE | |
author: Julian Bruder | ||
maintainer: [email protected] | ||
copyright: © 2024 Julian Bruder | ||
category: SMT | ||
category: SMT, Logic | ||
build-type: Simple | ||
extra-source-files: README.md | ||
extra-doc-files: CHANGELOG.md | ||
|
@@ -26,6 +26,7 @@ library | |
default-extensions: DataKinds, GADTs, TypeFamilies, OverloadedStrings | ||
|
||
exposed-modules: Language.Hasmtlib | ||
, Language.Hasmtlib.Lens | ||
, Language.Hasmtlib.Codec | ||
, Language.Hasmtlib.Iteable | ||
, Language.Hasmtlib.Boolean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Language.Hasmtlib.Example.Arith where | ||
|
||
import Prelude hiding ((&&)) | ||
import Language.Hasmtlib | ||
import Control.Lens | ||
|
||
main :: IO () | ||
main = do | ||
res <- solveWith @SMT (solver cvc5) $ do | ||
setLogic "QF_S" | ||
|
||
x <- var @StringSort | ||
y <- var @StringSort | ||
z <- var @StringSort | ||
|
||
assert $ x === "H" <> "e" <> "llo" | ||
assert $ y === "World" | ||
assert $ z === x <> " " <> y | ||
|
||
p <- var @StringSort | ||
let argh :: Expr StringSort = "Argh!" | ||
assert $ p === "_Cons: " <| z <> argh^.ix 4 | ||
|
||
return p | ||
|
||
print res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.