Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cvc5/cvc5
Browse files Browse the repository at this point in the history
  • Loading branch information
yoni206 committed Oct 5, 2023
2 parents b653863 + 26308eb commit c926d61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/theories/bags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ a `cvc5::Solver solver` object.
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Sort | ``(Bag <Sort>)`` | ``solver.mkBagSort(cvc5::Sort elementSort);`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Constants | ``(declare-const X (Bag String))`` | ``Sort s = solver.mkBagSort(solver.getStringSort());`` |
| Constants | ``(declare-const X (Bag String))`` | ``Sort s = solver.mkBagSort(solver.getStringSort());`` |
| | | |
| | | ``Term X = solver.mkConst(s, "X");`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
Expand Down
8 changes: 7 additions & 1 deletion examples/api/cpp/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ int main()
ss << "(declare-fun b () Int)" << std::endl;
ss << "(declare-fun c () Int)" << std::endl;
ss << "(assert (> a (+ b c)))" << std::endl;
ss << "(check-sat)" << std::endl;
ss << "(assert (< a b))" << std::endl;
ss << "(assert (> c 0))" << std::endl;
parser.setStreamInput(modes::InputLanguage::SMT_LIB_2_6, ss, "MyStream");

// get the symbol manager of the parser, used when invoking commands below
Expand All @@ -58,4 +59,9 @@ int main()
cmd.invoke(&slv, sm, std::cout);
}
std::cout << "Finished parsing commands" << std::endl;

// now, check sat with the solver
Result r = slv.checkSat();
std::cout << "expected: unsat" << std::endl;
std::cout << "result: " << r << std::endl;
}

0 comments on commit c926d61

Please sign in to comment.