-
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 #68 from bruderj15/66-strings
66 strings
- Loading branch information
Showing
13 changed files
with
474 additions
and
173 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
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.