Commit Graph

3 Commits

Author SHA1 Message Date
Aina Niemetz
e37d0c385d Update copyright headers. 2020-06-16 13:48:05 -07:00
Andres Noetzli
3ba75ef701 Rename Java package to edu.stanford.CVC4 (#3752) 2020-02-12 16:48:10 -06:00
Andres Noetzli
62d361071e Fix iterators in Java API (#3000)
Fixes #2989. SWIG 3 seems to have an issue properly resolving
`T::const_iterator::value_type` if that type itself is a `typedef`.
This is for example the case in the `UnsatCore` class, which `typedef`s
`const_iterator` to `std::vector<Expr>::const_iterator`. As a
workaround, this commit changes the `JavaIteratorAdapter` class to take
two template parameters, one of which is the `value_type`. The commit
also adds a compile-time assertion that `T::const_iterator::value_type`
can be converted to `value_type` to avoid nasty surprises. A nice
side-effect of this solution is that explicit `typemap`s are not
necessary anymore, so they are removed. Additionally, the commit adds a
`toString()` method for the Java API of `UnsatCore` and adds examples
that show and test the iteration over the unsat core and the statistics.
Iterating over `Statistics` now returns instances of `Statistic` instead
of `Object[]`, which is a bit cleaner and requires less glue code.
2019-05-15 17:18:48 -07:00