Files
cvc5/examples/api/cpp/helloworld.cpp
Gereon Kremer 7440f0568b Add more examples to the documentation (#6569)
This PR adds (most of) the existing examples to the documentation, and does some other minor updates on the documentation. Some details:
- for consistency, all cpp examples are moved from examples/api to examples/api/cpp
- add capabilities for SMT-LIB examples, and two simple smt2 examples
- more docs/examples/*.rst files
- two new documentation categories: installation (how to obtain, compile and install cvc5) and binary (about the cvc5 binary)
2021-05-26 06:30:45 +00:00

30 lines
849 B
C++

/******************************************************************************
* Top contributors (to current version):
* Aina Niemetz, Tim King
*
* This file is part of the cvc5 project.
*
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
* in the top-level source directory and their institutional affiliations.
* All rights reserved. See the file COPYING in the top-level source
* directory for licensing information.
* ****************************************************************************
*
* A very simple CVC4 example.
*/
#include <cvc5/cvc5.h>
#include <iostream>
using namespace cvc5::api;
int main()
{
Solver slv;
Term helloworld = slv.mkVar(slv.getBooleanSort(), "Hello World!");
std::cout << helloworld << " is " << slv.checkEntailed(helloworld)
<< std::endl;
return 0;
}