diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-11-30 23:07:19 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-11-30 23:07:19 +0000 |
commit | 45229fd903afa592deb0499027375bc1d5562cbc (patch) | |
tree | 67b54b4841b1d084b90226cc5670c4c18173d06c /examples/api/java/HelloWorld.java | |
parent | 2bd85df6be705aed37a5d5eba082fbb9a38ab7c5 (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.java | 29 |
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)); + } +} |