summaryrefslogtreecommitdiff
path: root/examples/api/java/HelloWorld.java
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-11-30 23:07:19 +0000
committerMorgan Deters <mdeters@gmail.com>2012-11-30 23:07:19 +0000
commit45229fd903afa592deb0499027375bc1d5562cbc (patch)
tree67b54b4841b1d084b90226cc5670c4c18173d06c /examples/api/java/HelloWorld.java
parent2bd85df6be705aed37a5d5eba082fbb9a38ab7c5 (diff)
all API examples now have java versions too; bitvectors gets built; also updated old-style copyrights in the examples
Diffstat (limited to 'examples/api/java/HelloWorld.java')
-rw-r--r--examples/api/java/HelloWorld.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/api/java/HelloWorld.java b/examples/api/java/HelloWorld.java
new file mode 100644
index 000000000..33f6740c8
--- /dev/null
+++ b/examples/api/java/HelloWorld.java
@@ -0,0 +1,29 @@
+/********************* */
+/*! \file HelloWorld.java
+ ** \verbatim
+ ** Original author: mdeters
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** 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.
+ **/
+
+import edu.nyu.acsys.CVC4.*;
+
+public class HelloWorld {
+ public static void main(String[] args) {
+ System.loadLibrary("cvc4jni");
+
+ ExprManager em = new ExprManager();
+ Expr helloworld = em.mkVar("Hello World!", em.booleanType());
+ SmtEngine smt = new SmtEngine(em);
+
+ System.out.println(helloworld + " is " + smt.query(helloworld));
+ }
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback