-
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 #35 from bruderj15/develop
Develop
- Loading branch information
Showing
14 changed files
with
523 additions
and
254 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Language.Hasmtlib.Example.Array where | ||
|
||
import Language.Hasmtlib | ||
|
||
main :: IO () | ||
main = do | ||
res <- solveWith (solver cvc5) $ do | ||
setLogic "QF_AUFLIA" | ||
|
||
x <- var @(ArraySort IntSort BoolSort) | ||
let y = constant $ asConst false | ||
|
||
assert $ store y 1 true === x | ||
|
||
let x1 = select x 1 | ||
|
||
return (x, x1, select x 100) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{-# LANGUAGE BlockArguments #-} | ||
|
||
module Language.Hasmtlib.Example.McCarthyArrayAxioms where | ||
|
||
import Language.Hasmtlib | ||
|
||
main :: IO () | ||
main = do | ||
res <- solveWith (solver cvc5) $ do | ||
setLogic "AUFLIRA" | ||
|
||
assert $ | ||
for_all @(ArraySort RealSort RealSort) \arr -> | ||
for_all \i -> | ||
for_all \x -> | ||
select (store arr i x) i === x | ||
|
||
assert $ | ||
for_all @(ArraySort IntSort BoolSort) \arr -> | ||
for_all \i -> | ||
for_all \j -> | ||
for_all \x -> | ||
i /== j ==> (select (store arr i x) j === select arr j) | ||
|
||
return () | ||
|
||
print res |
Oops, something went wrong.