summaryrefslogtreecommitdiff
path: root/examples/api/helloworld-new.cpp
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2018-06-27 14:00:58 -0700
committerGitHub <noreply@github.com>2018-06-27 14:00:58 -0700
commitbf40a0811328e294d98c07cf137f557aea68bdc8 (patch)
tree05305105f107a30867a5144da651dcd313a7767a /examples/api/helloworld-new.cpp
parentd6c7967cfc7a9f8530f0de50f12f99bfc5f93da7 (diff)
Header for new C++ API. (#1697)
Diffstat (limited to 'examples/api/helloworld-new.cpp')
-rw-r--r--examples/api/helloworld-new.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/api/helloworld-new.cpp b/examples/api/helloworld-new.cpp
new file mode 100644
index 000000000..7957741e5
--- /dev/null
+++ b/examples/api/helloworld-new.cpp
@@ -0,0 +1,30 @@
+/********************* */
+/*! \file helloworld.cpp
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Aina Niemetz, Tim King, Kshitij Bansal
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2018 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.\endverbatim
+ **
+ ** \brief A very simple CVC4 example
+ **
+ ** A very simple CVC4 tutorial example.
+ **/
+
+#include <iostream>
+
+#include "api/cvc4cpp.h"
+
+using namespace CVC4::api;
+
+int main()
+{
+ Solver slv;
+ Term helloworld = slv.mkVar("Hello World!", slv.getBooleanSort());
+ std::cout << helloworld << " is " << slv.checkValidAssuming(helloworld)
+ << std::endl;
+ return 0;
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback