* directory for licensing information.
* ****************************************************************************
*
- * A simple demonstration of the solving capabilities of the CVC4
+ * A simple demonstration of the solving capabilities of the cvc5
* bit-vector solver.
*
*/
//
//(2) x = a + b - x;
//
- // We will use CVC4 to prove that the three pieces of code above are all
+ // We will use cvc5 to prove that the three pieces of code above are all
// equivalent by encoding the problem in the bit-vector theory.
// Creating a bit-vector type of width 32
Term assignment0 = slv.mkTerm(EQUAL, new_x, ite);
// Assert the encoding of code (0)
- cout << "Asserting " << assignment0 << " to CVC4 " << endl;
+ cout << "Asserting " << assignment0 << " to cvc5 " << endl;
slv.assertFormula(assignment0);
cout << "Pushing a new context." << endl;
slv.push();
Term a_xor_b_xor_x = slv.mkTerm(BITVECTOR_XOR, a, b, x);
Term assignment1 = slv.mkTerm(EQUAL, new_x_, a_xor_b_xor_x);
- // Assert encoding to CVC4 in current context;
- cout << "Asserting " << assignment1 << " to CVC4 " << endl;
+ // Assert encoding to cvc5 in current context;
+ cout << "Asserting " << assignment1 << " to cvc5 " << endl;
slv.assertFormula(assignment1);
Term new_x_eq_new_x_ = slv.mkTerm(EQUAL, new_x, new_x_);
cout << " Check entailment assuming: " << new_x_eq_new_x_ << endl;
cout << " Expect ENTAILED. " << endl;
- cout << " CVC4: " << slv.checkEntailed(new_x_eq_new_x_) << endl;
+ cout << " cvc5: " << slv.checkEntailed(new_x_eq_new_x_) << endl;
cout << " Popping context. " << endl;
slv.pop();
Term a_plus_b_minus_x = slv.mkTerm(BITVECTOR_SUB, a_plus_b, x);
Term assignment2 = slv.mkTerm(EQUAL, new_x_, a_plus_b_minus_x);
- // Assert encoding to CVC4 in current context;
- cout << "Asserting " << assignment2 << " to CVC4 " << endl;
+ // Assert encoding to cvc5 in current context;
+ cout << "Asserting " << assignment2 << " to cvc5 " << endl;
slv.assertFormula(assignment2);
cout << " Check entailment assuming: " << new_x_eq_new_x_ << endl;
cout << " Expect ENTAILED. " << endl;
- cout << " CVC4: " << slv.checkEntailed(new_x_eq_new_x_) << endl;
+ cout << " cvc5: " << slv.checkEntailed(new_x_eq_new_x_) << endl;
Term x_neq_x = slv.mkTerm(EQUAL, x, x).notTerm();
std::vector<Term> v{new_x_eq_new_x_, x_neq_x};
cout << " Check entailment assuming: " << v << endl;
cout << " Expect NOT_ENTAILED. " << endl;
- cout << " CVC4: " << slv.checkEntailed(v) << endl;
+ cout << " cvc5: " << slv.checkEntailed(v) << endl;
// Assert that a is odd
Op extract_op = slv.mkOp(BITVECTOR_EXTRACT, 0, 0);
cout << "Check satisfiability." << endl;
slv.assertFormula(a_odd);
cout << " Expect sat. " << endl;
- cout << " CVC4: " << slv.checkSat() << endl;
+ cout << " cvc5: " << slv.checkSat() << endl;
return 0;
}
* directory for licensing information.
* ****************************************************************************
*
- * A simple demonstration of the solving capabilities of the CVC4
+ * A simple demonstration of the solving capabilities of the cvc5
* bit-vector and array solvers.
*
*/
Term query = slv.mkTerm(NOT, slv.mkTerm(AND, assertions));
- cout << "Asserting " << query << " to CVC4 " << endl;
+ cout << "Asserting " << query << " to cvc5 " << endl;
slv.assertFormula(query);
cout << "Expect sat. " << endl;
- cout << "CVC4: " << slv.checkSatAssuming(slv.mkTrue()) << endl;
+ cout << "cvc5: " << slv.checkSatAssuming(slv.mkTrue()) << endl;
// Getting the model
cout << "The satisfying model is: " << endl;
* directory for licensing information.
* ****************************************************************************
*
- * An example of using inductive datatypes in CVC4.
+ * An example of using inductive datatypes in cvc5.
*/
#include <cvc5/cvc5.h>
std::cout << "Assert " << assertion << std::endl;
slv.assertFormula(assertion);
std::cout << "Expect sat." << std::endl;
- std::cout << "CVC4: " << slv.checkSat() << std::endl;
+ std::cout << "cvc5: " << slv.checkSat() << std::endl;
}
int main()
std::cout << "spec is:" << std::endl << consListSpec << std::endl;
// Keep in mind that "DatatypeDecl" is the specification class for
- // datatypes---"DatatypeDecl" is not itself a CVC4 Sort.
+ // datatypes---"DatatypeDecl" is not itself a cvc5 Sort.
// Now that our Datatype is fully specified, we can get a Sort for it.
// This step resolves the "SelfSort" reference and creates
// symbols for all the constructors, etc.
* directory for licensing information.
* ****************************************************************************
*
- * A simple demonstration of the solving capabilities of the CVC4
+ * A simple demonstration of the solving capabilities of the cvc5
* bit-vector solver.
*
*/
Term eq2 = slv.mkTerm(EQUAL, x_31_31, x_0_0);
cout << " Check entailment assuming: " << eq2 << endl;
cout << " Expect ENTAILED. " << endl;
- cout << " CVC4: " << slv.checkEntailed(eq2) << endl;
+ cout << " cvc5: " << slv.checkEntailed(eq2) << endl;
return 0;
}
* directory for licensing information.
* ****************************************************************************
*
- * A very simple CVC4 example.
+ * A very simple cvc5 example.
*/
#include <cvc5/cvc5.h>
* ****************************************************************************
*
* A simple demonstration of the linear arithmetic solving capabilities and
- * the push pop of CVC4. This also gives an example option.
+ * the push pop of cvc5. This also gives an example option.
*/
#include <iostream>
slv.push();
Term diff_leq_two_thirds = slv.mkTerm(LEQ, diff, two_thirds);
- cout << "Prove that " << diff_leq_two_thirds << " with CVC4." << endl;
- cout << "CVC4 should report ENTAILED." << endl;
- cout << "Result from CVC4 is: " << slv.checkEntailed(diff_leq_two_thirds)
+ cout << "Prove that " << diff_leq_two_thirds << " with cvc5." << endl;
+ cout << "cvc5 should report ENTAILED." << endl;
+ cout << "Result from cvc5 is: " << slv.checkEntailed(diff_leq_two_thirds)
<< endl;
slv.pop();
Term diff_is_two_thirds = slv.mkTerm(EQUAL, diff, two_thirds);
slv.assertFormula(diff_is_two_thirds);
cout << "Show that the assertions are consistent with " << endl;
- cout << diff_is_two_thirds << " with CVC4." << endl;
- cout << "CVC4 should report SAT." << endl;
- cout << "Result from CVC4 is: " << slv.checkSat() << endl;
+ cout << diff_is_two_thirds << " with cvc5." << endl;
+ cout << "cvc5 should report SAT." << endl;
+ cout << "Result from cvc5 is: " << slv.checkSat() << endl;
slv.pop();
cout << "Thus the maximum value of (y - x) is 2/3."<< endl;
* directory for licensing information.
* ****************************************************************************
*
- * A simple demonstration of reasoning about sequences with CVC4 via C++ API.
+ * A simple demonstration of reasoning about sequences with cvc5 via C++ API.
*/
#include <cvc5/cvc5.h>
// check sat
Result result = slv.checkSatAssuming(q);
- std::cout << "CVC4 reports: " << q << " is " << result << "." << std::endl;
+ std::cout << "cvc5 reports: " << q << " is " << result << "." << std::endl;
if (result.isSat())
{
Term theorem = slv.mkTerm(EQUAL, lhs, rhs);
- cout << "CVC4 reports: " << theorem << " is " << slv.checkEntailed(theorem)
+ cout << "cvc5 reports: " << theorem << " is " << slv.checkEntailed(theorem)
<< "." << endl;
}
Term theorem = slv.mkTerm(SUBSET, emptyset, A);
- cout << "CVC4 reports: " << theorem << " is " << slv.checkEntailed(theorem)
+ cout << "cvc5 reports: " << theorem << " is " << slv.checkEntailed(theorem)
<< "." << endl;
}
Term e = slv.mkTerm(MEMBER, x, intersection);
Result result = slv.checkSatAssuming(e);
- cout << "CVC4 reports: " << e << " is " << result << "." << endl;
+ cout << "cvc5 reports: " << e << " is " << result << "." << endl;
if (result.isSat())
{
* directory for licensing information.
* ****************************************************************************
*
- * A simple demonstration of reasoning about strings with CVC4 via C++ API.
+ * A simple demonstration of reasoning about strings with cvc5 via C++ API.
*/
#include <cvc5/cvc5.h>
// check sat
Result result = slv.checkSatAssuming(q);
- std::cout << "CVC4 reports: " << q << " is " << result << "." << std::endl;
+ std::cout << "cvc5 reports: " << q << " is " << result << "." << std::endl;
if(result.isSat())
{