Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
92b8777
add eldarica to classpath
Bixilon Mar 4, 2026
0d749c9
Cmdline: Added `JavaSMTMain` class, main entry point for the cmdline …
gcarpio21 Mar 14, 2026
6d2edd4
Cmdline: Added `CmdLineArgument` class.
gcarpio21 Mar 14, 2026
fcb24db
Cmdline: Added `CmdLineArguments` class.
gcarpio21 Mar 14, 2026
b2f8b28
Cmdline: Added `InvalidCmdlineArgumentException` class.
gcarpio21 Mar 14, 2026
6af7ff8
Cmdline: Added `Output` class.
gcarpio21 Mar 14, 2026
df6dd0c
Cmdline: Added `JavaSMTMainTest` test class.
gcarpio21 Mar 14, 2026
685ecfd
Cmdline: Added package info to `cmdline`.
gcarpio21 Mar 14, 2026
9f678f0
refaster.
gcarpio21 Mar 19, 2026
b4a89b6
checkstyle.
gcarpio21 Mar 19, 2026
aba6237
Cmdline: removed unused argument in a helper function from `CmdLineAr…
gcarpio21 Mar 19, 2026
e90044b
format.
gcarpio21 Mar 19, 2026
7e5485a
Cmdline: removed preconditions check that the (set-logic) command sho…
gcarpio21 Mar 31, 2026
2fbab21
boolean formular manager: horn api
Bixilon Apr 25, 2026
2bee1ac
boolean formular manager: horn api
Bixilon Apr 25, 2026
1bfacde
boolean formular manager: horn api
Bixilon Apr 28, 2026
62dda73
add eldarica to classpath
Bixilon Mar 4, 2026
8889ec5
eldarica: boolean -> horn converter
Bixilon Apr 26, 2026
cb3b195
HornProverEnvironment
Bixilon May 5, 2026
8cd2f12
princess: add eldarica as horn prover environment
Bixilon May 5, 2026
7625b0a
solver context: add eldarica as parser
Bixilon May 5, 2026
6b2e514
Merge remote-tracking branch 'origin/adding_eldarica' into adding_eld…
Bixilon May 11, 2026
4f4ead6
Merge branch 'master' into adding_eldarica
Bixilon May 14, 2026
2bb4808
eldarica horn prover: support for quantifiers, improvements
Bixilon May 14, 2026
3518963
intellij classpath fixes
Bixilon May 14, 2026
7aaf6a9
eldarica: split horn converter from horn prover, deduplicate predicates
Bixilon May 19, 2026
813f5d6
various eldarica converter fixes
Bixilon May 26, 2026
bcba11a
horn sample test
Bixilon May 26, 2026
3d1c0b5
more smt tests
Bixilon May 31, 2026
8d7d0e8
eldarica horn converter: fix parameter as constraint rewriting
Bixilon May 31, 2026
8e3ab2c
fix all the conversion errors
Bixilon May 31, 2026
079154f
Merge remote-tracking branch 'refs/remotes/origin/provide_javasmt_mai…
Bixilon Jun 6, 2026
0e6ef01
cmdline: Allow specifying prover environment, fixes
Bixilon Jun 6, 2026
32eefc0
remove unused imports
Bixilon Jun 9, 2026
a10c9e5
eldarica converter: convert body to constraint instead of crashing
Bixilon Jun 9, 2026
b676efd
another set of robustness/error handling
Bixilon Jun 9, 2026
9b871cd
main class in manifest
Bixilon Jun 9, 2026
7350c89
fix bad import :)
Bixilon Jun 15, 2026
ff7a6ce
eldarica: horn: ITermITE
Bixilon Jun 19, 2026
2a5e5d3
fix all the code warnings
Bixilon Jun 19, 2026
ed0ee53
bump princess
Bixilon Jun 19, 2026
1d8449a
bump eldarica
Bixilon Jun 19, 2026
9c75aa6
eldarica debug logging
Bixilon Jun 19, 2026
d975012
git: ignore CPALog.txt*
Bixilon Jun 19, 2026
acfdb5e
horn converter: crash more agressively
Bixilon Jun 22, 2026
ae7fd42
fix more conversion issues
Bixilon Jun 22, 2026
f940d0f
smt2 tokenizer: allow declare-datatypes
Bixilon Jun 22, 2026
9eba9ee
princess: map custom sorts to types
Bixilon Jun 22, 2026
b2b0d1b
more conversion fixes
Bixilon Jun 23, 2026
2b83399
horn converter: fix if then else
Bixilon Jun 24, 2026
5f03487
fix double simplification
Bixilon Jun 25, 2026
67e58d5
fix ite conversion
Bixilon Jun 25, 2026
967bfd4
various horn conversion fixes
Bixilon Jun 29, 2026
64d8c65
eldarica horn converter: don't create temporary variables
Bixilon Jun 29, 2026
7141871
eldarica: horn converter: don't visit twice
Bixilon Jun 29, 2026
1454c3e
eldarica horn: add all the chc comp test files
Bixilon Jun 29, 2026
2c277f9
eldarica: add support for interval and int array sorts
Bixilon Jun 29, 2026
fef85df
readme: add eldarica horn solver
Bixilon Jun 30, 2026
b72bca1
Merge remote-tracking branch 'origin/master' into eldarica-benchexec
Bixilon Jul 6, 2026
9540ef4
web example: fix wrong princess version
Bixilon Jul 6, 2026
6b52461
horn tests: use parameterized test
Bixilon Jul 6, 2026
2f5fd8e
eldarica: wip model generation
Bixilon Jul 7, 2026
47555e7
apply some suggestions
Bixilon Jul 9, 2026
75d01ad
document EldaricaHornProver::solve
Bixilon Jul 11, 2026
729b52d
eldarica: avoid using this. and parameter shadowing
Bixilon Jul 11, 2026
cb11e42
eldarica: model retrieving
Bixilon Jul 11, 2026
c2faa77
eldarica: handle bool models properly
Bixilon Jul 11, 2026
2746273
eldarica horn prover: don't use var model
Bixilon Jul 11, 2026
ac16790
eldarica: rewrite epsilon terms and quantifier
Bixilon Jul 19, 2026
c9b9ef4
eldarica: fix rewriting of simple ite terms
Bixilon Jul 20, 2026
59d3aa8
horn: test for epsilon rewriting and quation ite rewriting
Bixilon Jul 20, 2026
8628f95
only temporary disable some tests for eldarica, not horn in general
Bixilon Jul 20, 2026
53a8821
eldarica: explain better why ite is not supported
Bixilon Jul 20, 2026
11d5b1b
eldarica: properly rewrite ite terms
Bixilon Jul 20, 2026
3fb9749
properly rewrite epsilon terms
Bixilon Jul 20, 2026
df6ec6a
eldarica: don't support quantifiers inside formula
Bixilon Jul 20, 2026
0ff8cd2
eldarica: fix crash when head is null
Bixilon Jul 21, 2026
c58db08
eldarica: various conversion fixes
Bixilon Jul 21, 2026
8ea5da1
more horn tests
Bixilon Jul 21, 2026
0fbaad7
Merge remote-tracking branch 'origin/master' into eldarica-benchexec
Bixilon Jul 21, 2026
b5717c8
properly exclude CPALog.txt files
Bixilon Jul 22, 2026
c07065d
eldarica: properly rewrite (nested) epsilon terms
Bixilon Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SPDX-License-Identifier: Apache-2.0
<classpathentry kind="lib" path="lib/java/build/error_prone_annotations.jar" sourcepath="lib/java-contrib/error_prone_annotations-sources.jar"/>
<classpathentry kind="lib" path="lib/java/core/common.jar" sourcepath="lib/java-contrib/common-sources.jar"/>
<classpathentry kind="lib" path="lib/java/runtime-smtinterpol/smtinterpol.jar" sourcepath="lib/java-contrib/smtinterpol-sources.jar"/>
<classpathentry kind="lib" path="lib/java/runtime-eldarica/eldarica_2.13.jar" sourcepath="lib/java-contrib/eldarica_2.13-sources.jar"/>
<classpathentry kind="lib" path="lib/java/runtime-princess/princess_2.13.jar" sourcepath="lib/java-contrib/princess_2.13-sources.jar"/>
<classpathentry kind="lib" path="lib/java/runtime-princess/scala-library.jar"/>
<classpathentry kind="lib" path="lib/java/runtime-princess/princess-smt-parser_2.13.jar"/>
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,8 @@ pom.xml


hs_err_*.log

CPALog.txt
CPALog.txt.lck
CPALog.txt.*
CPALog.txt.*.lck
3 changes: 2 additions & 1 deletion .idea/JavaSMT.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ JavaSMT supports several SMT solvers (see [Getting Started](doc/Getting-started.
| [Yices2](https://yices.csl.sri.com/) | :heavy_check_mark: | | :heavy_check_mark: | | [maybe](https://github.com/sosy-lab/java-smt/pull/400)⁴ | | |
| [Z3](https://github.com/Z3Prover/z3) | :heavy_check_mark:³ | :heavy_check_mark:³ | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | mature and well-known solver |
| [Z3_WITH_INTERPOLATION](https://github.com/Z3Prover/z3) | :heavy_check_mark: | :heavy_check_mark: | | | | | an older version of Z3 that still provides interpolation support |
| [Eldarica](https://github.com/uuverifiers/eldarica) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java/Scala-based Horn solver |

We support a reasonable list of operating systems and versions.
- Our main target is Linux (mainly Ubuntu or comparable Linux distributions).
Expand Down
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SPDX-License-Identifier: Apache-2.0
runtime-boolector,
runtime-cvc4,
runtime-cvc5,
runtime-eldarica,
runtime-mathsat,
runtime-opensmt,
runtime-optimathsat,
Expand All @@ -49,7 +50,7 @@ SPDX-License-Identifier: Apache-2.0
<property name="errorprone.options" value="-Xep:Finally:OFF -Xep:MissingSummary:OFF -Xep:UnescapedEntity:OFF"/>

<!-- Maven Central metadata -->
<property name="ivy.pom.description" value="Unified acccess layer to SMT solvers"/>
<property name="ivy.pom.description" value="Unified access layer to SMT solvers"/>
<property name="ivy.pom.url" value="https://github.com/sosy-lab/java-smt"/>
<property name="ivy.pom.name" value="java-smt"/>
<property name="ivy.pom.groupId" value="org.sosy-lab"/>
Expand Down
17 changes: 11 additions & 6 deletions build/ivysettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ SPDX-License-Identifier: Apache-2.0
Keep this file synchronized with
https://gitlab.com/sosy-lab/software/java-project-template
-->
<settings defaultResolver="Sosy-Lab"/>
<settings defaultResolver="chain"/>
<property name="repo.dir" value="${basedir}/repository"/>
<resolvers>
<!-- Resolver for downloading dependencies -->
<url name="Sosy-Lab" descriptor="required">
<ivy pattern="${ivy.repo.url}/[organisation]/[module]/ivy-[revision].xml" />
<artifact pattern="${ivy.repo.url}/[organisation]/[module]/([arch]/)[artifact]-[revision](-[classifier]).[ext]" />
</url>
<chain name="chain">
<!-- Resolver for downloading dependencies -->
<url name="Sosy-Lab" descriptor="required">
<ivy pattern="${ivy.repo.url}/[organisation]/[module]/ivy-[revision].xml" />
<artifact pattern="${ivy.repo.url}/[organisation]/[module]/([arch]/)[artifact]-[revision](-[classifier]).[ext]" />
</url>

<ibiblio name="local" m2compatible="true" root="https://eldarica.org/maven/"/>
<ibiblio name="local" m2compatible="true" root="https://repo1.maven.org/maven2/"/>
</chain>

<!-- Resolver for publishing this project -->
<filesystem name="Sosy-Lab-Publish">
Expand Down
2 changes: 1 addition & 1 deletion doc/Example-Maven-Project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ SPDX-License-Identifier: Apache-2.0
<mathsat.version>5.6.15</mathsat.version>
<opensmt.version>2.9.0-gef441e1c</opensmt.version>
<smtinterpol.version>2.5-1242-g5c50fb6d</smtinterpol.version>
<princess.version>2025-11-17</princess.version>
<princess.version>2026-05-20</princess.version>
<ostrich.version>2.0</ostrich.version>
<javasmt-yices.version>5.0.1-1258-gdad634a69</javasmt-yices.version>
<yices.version>2.6.4-264-g553897f5</yices.version>
Expand Down
2 changes: 1 addition & 1 deletion doc/Example-Maven-Web-Project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ SPDX-License-Identifier: Apache-2.0
<mathsat.version>5.6.15</mathsat.version>
<opensmt.version>2.9.0-gef441e1c</opensmt.version>
<smtinterpol.version>2.5-1242-g5c50fb6d</smtinterpol.version>
<princess.version>2025-11-17</princess.version>
<princess.version>2026-05-20</princess.version>
<ostrich.version>2.0</ostrich.version>
<javasmt-yices.version>5.0.1-1258-gdad634a69</javasmt-yices.version>
<yices.version>2.6.4-264-g553897f5</yices.version>
Expand Down
11 changes: 9 additions & 2 deletions lib/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ SPDX-License-Identifier: Apache-2.0
<conf name="runtime-optimathsat" extends="core" description="only one solver included"/>
<conf name="runtime-smtinterpol" extends="core" description="only one solver included"/>
<conf name="runtime-princess" extends="core" description="only one solver included"/>
<conf name="runtime-eldarica" extends="core" description="only one solver included"/>
<conf name="runtime-princess-with-javacup" extends="core" description="only one solver included"/>
<conf name="runtime-z3" extends="runtime-z3-x64,runtime-z3-arm64" description="only one solver included"/>
<conf name="runtime-z3-x64" extends="core" description="only one solver included"/>
Expand Down Expand Up @@ -171,11 +172,17 @@ SPDX-License-Identifier: Apache-2.0
<!-- SmtInterpol -->
<dependency org="de.uni-freiburg.informatik.ultimate" name="smtinterpol" rev="2.5-1242-g5c50fb6d" conf="runtime-smtinterpol->master; contrib->sources,javadoc"/>

<!-- Eldarica -->
<dependency org="uuverifiers" name="eldarica_2.13" rev="2.3"
conf="runtime-eldarica->master; contrib->sources"/>

<!-- Princess and Ostrich for our Maven release -->
<dependency org="io.github.uuverifiers" name="princess_2.13" rev="2025-11-17" conf="runtime-princess-with-javacup->default; contrib->sources,javadoc"/>
<dependency org="io.github.uuverifiers" name="princess_2.13" rev="2025-05-20"
conf="runtime-princess-with-javacup->default; contrib->sources,javadoc"/>
<dependency org="io.github.uuverifiers" name="ostrich_2.13" rev="2.0" conf="runtime-princess-with-javacup->default; contrib->sources,javadoc"/>
<!-- Princess and Ostrich for our Ivy release -->
<dependency org="io.github.uuverifiers" name="princess_2.13" rev="2025-11-17" conf="runtime-princess->default; contrib->sources,javadoc">
<dependency org="io.github.uuverifiers" name="princess_2.13" rev="2026-05-20"
conf="runtime-princess->default; contrib->sources,javadoc">
<!-- Exclude dependency on java-cup and replace it with java-cup-runtime, which is enough.
We use the JAR that is published by us instead of the one from net.sf.squirrel-sql.thirdparty-non-maven
because the latter does not provide a separate JAR for java-cup-runtime. -->
Expand Down
3 changes: 3 additions & 0 deletions src/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.sosy_lab.java_smt.cmdline.JavaSMTMain

5 changes: 3 additions & 2 deletions src/org/sosy_lab/java_smt/SolverContextFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public enum Solvers {
CVC4,
CVC5,
YICES2,
BITWUZLA
BITWUZLA,
ELDARICA,
}

@Option(secure = true, description = "Export solver queries in SmtLib format into a file.")
Expand Down Expand Up @@ -310,7 +311,7 @@ private SolverContext generateContext0(Solvers solverToCreate)
nonLinearArithmetic,
loader);

case PRINCESS ->
case PRINCESS, ELDARICA ->
PrincessSolverContext.create(
config, shutdownNotifier, logfile, (int) randomSeed, nonLinearArithmetic);

Expand Down
84 changes: 75 additions & 9 deletions src/org/sosy_lab/java_smt/api/BooleanFormulaManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import org.sosy_lab.java_smt.api.visitors.BooleanFormulaVisitor;
import org.sosy_lab.java_smt.api.visitors.TraversalProcess;

/** Manager for dealing with boolean formulas. */
/**
* Manager for dealing with boolean formulas.
*/
public interface BooleanFormulaManager {

/**
Expand All @@ -30,10 +32,14 @@ default BooleanFormula makeBoolean(boolean value) {
return value ? makeTrue() : makeFalse();
}

/** Shortcut for {@code makeBoolean(true)}. */
/**
* Shortcut for {@code makeBoolean(true)}.
*/
BooleanFormula makeTrue();

/** Shortcut for {@code makeBoolean(false)}. */
/**
* Shortcut for {@code makeBoolean(false)}.
*/
BooleanFormula makeFalse();

/**
Expand Down Expand Up @@ -81,8 +87,8 @@ default BooleanFormula makeBoolean(boolean value) {
* Creates a formula representing {@code IF cond THEN f1 ELSE f2}.
*
* @param cond a Formula
* @param f1 a Formula
* @param f2 a Formula
* @param f1 a Formula
* @param f2 a Formula
* @return (IF cond THEN f1 ELSE f2)
*/
<T extends Formula> T ifThenElse(BooleanFormula cond, T f1, T f2);
Expand Down Expand Up @@ -116,7 +122,9 @@ default BooleanFormula and(BooleanFormula... bits) {
return and(ImmutableList.copyOf(bits));
}

/** Return a stream {@link Collector} that creates a conjunction of all elements in the stream. */
/**
* Return a stream {@link Collector} that creates a conjunction of all elements in the stream.
*/
Collector<BooleanFormula, ?, BooleanFormula> toConjunction();

/**
Expand All @@ -140,13 +148,19 @@ default BooleanFormula or(BooleanFormula... bits) {
return or(ImmutableList.copyOf(bits));
}

/** Return a stream {@link Collector} that creates a disjunction of all elements in the stream. */
/**
* Return a stream {@link Collector} that creates a disjunction of all elements in the stream.
*/
Collector<BooleanFormula, ?, BooleanFormula> toDisjunction();

/** Creates a formula representing XOR of the two arguments. */
/**
* Creates a formula representing XOR of the two arguments.
*/
BooleanFormula xor(BooleanFormula bits1, BooleanFormula bits2);

/** Visit the formula with the given visitor. */
/**
* Visit the formula with the given visitor.
*/
@CanIgnoreReturnValue
<R> R visit(BooleanFormula pFormula, BooleanFormulaVisitor<R> visitor);

Expand Down Expand Up @@ -203,4 +217,56 @@ BooleanFormula transformRecursively(
* @param flatten If {@code true}, flatten recursively.
*/
Set<BooleanFormula> toDisjunctionArgs(BooleanFormula f, boolean flatten);

/**
* Creates a constrained horn clause.
* {@code (constraint \/ body) => head}
*
* @param head Head of horn clause
* @param body Body of horn clause
* @param constraint Constraint of horn clause
* @return boolean formula representation of horn clause
*/
BooleanFormula makeHornClause(
BooleanFormula head,
Collection<BooleanFormula> body, BooleanFormula constraint);

/**
* Creates a constrained horn clause.
* {@code body => head}
*
* @param head Head of horn clause
* @param body Body of horn clause
* @return boolean formula representation of horn clause
*/
default BooleanFormula makeHornClause(
BooleanFormula head,
Collection<BooleanFormula> body) {
return makeHornClause(head, body, makeTrue());
}

/**
* Creates a horn clause.
* {@code body => true}
*
* @param body Body of horn clause
* @return boolean formula representation of horn clause
*/
default BooleanFormula makeHornClause(Collection<BooleanFormula> body) {
return makeHornClause(makeTrue(), body);
}

/**
* Creates a constrained horn clause.
* {@code (constraint \/ body) => true}
*
* @param body Body of horn clause
* @param constraint Constraint of horn clause
* @return boolean formula representation of horn clause
*/
default BooleanFormula makeHornClause(
Collection<BooleanFormula> body,
BooleanFormula constraint) {
return makeHornClause(makeTrue(), body, constraint);
}
}
14 changes: 14 additions & 0 deletions src/org/sosy_lab/java_smt/api/HornProverEnvironment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file is part of JavaSMT,
// an API wrapper for a collection of SMT solvers:
// https://github.com/sosy-lab/java-smt
//
// SPDX-FileCopyrightText: 2020 Dirk Beyer <https://www.sosy-lab.org>
//
// SPDX-License-Identifier: Apache-2.0

package org.sosy_lab.java_smt.api;


public interface HornProverEnvironment extends BasicProverEnvironment<Void>, AutoCloseable {

}
8 changes: 8 additions & 0 deletions src/org/sosy_lab/java_smt/api/SolverContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ enum ProverOptions {
*/
OptimizationProverEnvironment newOptimizationProverEnvironment(ProverOptions... options);

/**
* Create a fresh new {@link HornProverEnvironment} for solving horn clauses.
*
* @param options Options specified for the prover environment. All the options specified in
* {@link ProverOptions} are turned off by default.
*/
HornProverEnvironment newHornProverEnvironment(ProverOptions... options);

/**
* Get version information out of the solver.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,11 @@ public Set<BooleanFormula> visitFunction(
return visitDefault(f);
}
};

@Override
public BooleanFormula makeHornClause(BooleanFormula head, Collection<BooleanFormula> body,
BooleanFormula constraint) {

return implication(and(constraint, and(body)), head);
}
}
2 changes: 1 addition & 1 deletion src/org/sosy_lab/java_smt/basicimpl/AbstractProver.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected final void checkEnableSeparationLogic() {

protected abstract boolean hasPersistentModel();

private void setChanged() {
protected void setChanged() {
wasLastSatCheckSatisfiable = false;
if (!changedSinceLastSatQuery) {
changedSinceLastSatQuery = true;
Expand Down
13 changes: 13 additions & 0 deletions src/org/sosy_lab/java_smt/basicimpl/AbstractSolverContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.Set;
import java.util.function.Consumer;
import org.sosy_lab.java_smt.api.FormulaManager;
import org.sosy_lab.java_smt.api.HornProverEnvironment;
import org.sosy_lab.java_smt.api.InterpolatingProverEnvironment;
import org.sosy_lab.java_smt.api.OptimizationProverEnvironment;
import org.sosy_lab.java_smt.api.ProverEnvironment;
Expand Down Expand Up @@ -78,6 +79,18 @@ public final OptimizationProverEnvironment newOptimizationProverEnvironment(
protected abstract OptimizationProverEnvironment newOptimizationProverEnvironment0(
Set<ProverOptions> pSet);

@Override
public final HornProverEnvironment newHornProverEnvironment(
ProverOptions... options) {
return newHornProverEnvironment0(toSet(options));
}

protected HornProverEnvironment newHornProverEnvironment0(
Set<ProverOptions> pSet) {
// TODO: Fallback to normal ProverEnvironment?
throw new UnsupportedOperationException("Solver does not support horn clauses");
}

/**
* Whether the solver supports solving under some given assumptions (with all corresponding
* features) by itself, i.e., whether {@link
Expand Down
2 changes: 1 addition & 1 deletion src/org/sosy_lab/java_smt/basicimpl/SMTLibTokenizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static boolean isSetInfoToken(String token) {
* #toImmutableList()}.
*/
public static boolean isDeclarationToken(String token) {
return matchesOneOf(token, "declare-const", "declare-fun");
return matchesOneOf(token, "declare-const", "declare-fun", "declare-datatypes");
}

/**
Expand Down
Loading
Loading