Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Parse/SMTLIB2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,19 @@ void SMTLIB2::readBenchmark(LExpr* bench)
continue;
}

if (ibRdr.tryAcceptAtom("define-const")) {

auto name = ibRdr.readAtom();
auto oSort = ibRdr.readExpr();
auto body = ibRdr.readExpr();
LExpr iArgs(LispParser::LIST); // dummy list to avoid passing null below
readDefineFun(name,&iArgs,oSort,body,/*recursive=*/false);

ibRdr.acceptEOL();

continue;
}

bool recursive = false;
if (ibRdr.tryAcceptAtom("define-fun") || (recursive = ibRdr.tryAcceptAtom("define-fun-rec"))) {

Expand Down
4 changes: 4 additions & 0 deletions checks/parse/define-const.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(define-const c Int 5)
(define-fun double ((x Int)) Int (* 2 x))
(assert (not (= (+ (double c) (double c)) (double (+ c c)))))
(check-sat)
1 change: 1 addition & 0 deletions checks/sanity
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ check_szs_status Unsatisfiable -newcnf on -t 1 parse/smtlib2-parametric-datatype
check_szs_status Unsatisfiable parse/smtlib2-mutual-recursion.smt2
check_szs_status Unsatisfiable -newcnf on parse/let-bind-variable.smt2
check_szs_status Unsatisfiable -qa synthesis parse/assert-synth-max5.smt2
check_szs_status Unsatisfiable parse/define-const.smt2

# Arithmetic
check_szs_status Theorem -t 1d -s 32 -tgt ground -sas z3 -tha some -nm 6 Problems/ANA/ANA135_1.p
Expand Down