summaryrefslogtreecommitdiff
path: root/examples/api/cpp/helloworld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/api/cpp/helloworld.cpp')
-rw-r--r--examples/api/cpp/helloworld.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/api/cpp/helloworld.cpp b/examples/api/cpp/helloworld.cpp
new file mode 100644
index 000000000..21eb8e8fc
--- /dev/null
+++ b/examples/api/cpp/helloworld.cpp
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * 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;
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback