summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2014-06-21 21:10:12 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2014-06-21 23:41:54 -0400
commit4ba5382a32cb80aacbff11178f0da7b6493c8d48 (patch)
tree2a6bf514d4f62dca1e80cb77e5db581f8d030e7a /doc
parent3264f3bb76944129074c2a3204a94f0b02740e23 (diff)
API documentation improvements.
Diffstat (limited to 'doc')
-rw-r--r--doc/mainpage.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/mainpage.md b/doc/mainpage.md
new file mode 100644
index 000000000..1fc04ab3c
--- /dev/null
+++ b/doc/mainpage.md
@@ -0,0 +1,26 @@
+Getting started with the CVC4 API
+
+The main classes of the CVC4 API are:
+- CVC4::Expr - an expression (a formula, term, variable, constant, etc.)
+- CVC4::Type - a type (every Expr has a Type)
+- CVC4::ExprManager - a factory class for Exprs and Types (create one of these for your application)
+- CVC4::SmtEngine - the SMT interface, permits making assertions and checking satisfiability (create one of these for your application)
+
+There are numerous examples of the use of the C++ API in the examples/api directory of the CVC4 source distribution. There is also a discussion on our CVC4 Wiki at
+http://cvc4.cs.nyu.edu/wiki/Tutorials#C.2B.2B_API
+
+Using the CVC4 API from Java
+
+While these API documentation resources explicitly refer to the C++ interface, the Java interface is generated automatically from the C++ sources by SWIG, and thus the interface is almost line-by-line identical in Java. It is possible, then, to use these C++ resources to help with the Java API. There are three main ways in which the Java API differs from the C++ API. First, the CVC4 API makes moderate use of C++ operator overloading, which is not possible in Java. We have provided standard renamings for the Java methods associated to these C++ overloaded operators---for instance, "plus" replaces operator+, "equals" replaces operator==, etc.
+
+Secondly, C++ iterators are replaced by Java iterators. Instead of begin() and end() on classes like CVC4::Expr, you'll notice in the Java interface that there is an iterator() method that returns a java.util.Iterator<Expr>. This allows Java developers to more naturally work with our (ultimately C++) objects through a more Java-like interface.
+
+Third, I/O streams are wrapped so that some functions requiring C++ input and output streams will accept Java InputStreams and OutputStreams.
+
+Our intent is to make the C++ API as useful and functional for Java developers as possible, while still retaining the flexibility of our original C++ design. If we can make your life as a Java user of our libraries easier, please let us know by requesting an enhancement or reporting a bug at our bug-tracking service, http://cvc4.cs.nyu.edu/bugs.
+
+For examples of Java programs using the CVC4 API, look in the directory examples/api/java in the CVC4 source distribution.
+
+Thank you for your interest in CVC4!
+
+The CVC4 Development team
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback