Skip to content

Commit 2ec4fce

Browse files
committed
Merge remote-tracking branch 'origin/master' into use_solver_native_bv_to_ieee-fp_CVC4_CVC5
2 parents f6e8248 + c6d2ca7 commit 2ec4fce

File tree

93 files changed

+1449
-662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1449
-662
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
2121
<classpathentry kind="lib" path="lib/java/core/spotbugs-annotations.jar" sourcepath="lib/java-contrib/spotbugs-annotations-sources.jar"/>
2222
<classpathentry kind="lib" path="lib/java/core/jsr305.jar" sourcepath="lib/java-contrib/jsr305-sources.jar"/>
2323
<classpathentry kind="lib" path="lib/java/build/auto-value-annotations.jar"/>
24-
<classpathentry kind="lib" path="lib/java/core/error_prone_annotations.jar" sourcepath="lib/java-contrib/error_prone_annotations-sources.jar"/>
24+
<classpathentry kind="lib" path="lib/java/build/error_prone_annotations.jar" sourcepath="lib/java-contrib/error_prone_annotations-sources.jar"/>
2525
<classpathentry kind="lib" path="lib/java/core/common.jar" sourcepath="lib/java-contrib/common-sources.jar"/>
2626
<classpathentry kind="lib" path="lib/java/runtime-smtinterpol/smtinterpol.jar" sourcepath="lib/java-contrib/smtinterpol-sources.jar"/>
2727
<classpathentry kind="lib" path="lib/java/runtime-princess/princess_2.13.jar" sourcepath="lib/java-contrib/princess_2.13-sources.jar"/>

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ variables:
1212
PROJECT_PATH: "sosy-lab/software/java-smt"
1313
GH_REF: "github.com/sosy-lab/java-smt"
1414
# Version of https://gitlab.com/sosy-lab/software/refaster/ to use
15-
REFASTER_REPO_REVISION: 31cd8ffc4966957e156665dbba76679ade5bb5c9
15+
REFASTER_REPO_REVISION: 26c8309d1023e4dfcb0e8d24dcf7ec12e621314e
1616
# Needs to be synchronized with Error Prone version in lib/ivy.xml
17-
REFASTER_VERSION: 2.21.1
17+
REFASTER_VERSION: 2.41.0

.settings/org.eclipse.jdt.core.prefs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# an API wrapper for a collection of SMT solvers:
33
# https://github.com/sosy-lab/java-smt
44
#
5-
# SPDX-FileCopyrightText: 2020 Dirk Beyer <https://www.sosy-lab.org>
5+
# SPDX-FileCopyrightText: 2025 Dirk Beyer <https://www.sosy-lab.org>
66
#
77
# SPDX-License-Identifier: Apache-2.0
88

99
eclipse.preferences.version=1
10+
org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled
1011
org.eclipse.jdt.core.codeComplete.argumentPrefixes=p
1112
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
1213
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
@@ -23,9 +24,12 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull
2324
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
2425
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.sosy_lab.common.annotations.FieldsAreNonnullByDefault
2526
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
27+
org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning
2628
org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
2729
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
2830
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
31+
org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning
32+
org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled
2933
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3034
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
3135
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
@@ -36,6 +40,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
3640
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
3741
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
3842
org.eclipse.jdt.core.compiler.problem.APILeak=warning
43+
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
3944
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
4045
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
4146
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -57,8 +62,10 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
5762
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
5863
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
5964
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
65+
org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning
6066
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
6167
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
68+
org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning
6269
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
6370
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
6471
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
@@ -88,14 +95,14 @@ org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
8895
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
8996
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
9097
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
91-
org.eclipse.jdt.core.compiler.problem.nullReference=warning
98+
org.eclipse.jdt.core.compiler.problem.nullReference=error
9299
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
93100
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
94101
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
95102
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
96103
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
97104
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
98-
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
105+
org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
99106
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
100107
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
101108
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
@@ -108,14 +115,15 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
108115
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
109116
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
110117
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
118+
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=ignore
111119
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
112120
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
113121
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
114122
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
115123
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
116124
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
117125
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
118-
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
126+
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info
119127
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
120128
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
121129
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
@@ -128,9 +136,10 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
128136
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
129137
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
130138
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
131-
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
139+
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=info
132140
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
133141
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
142+
org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter=warning
134143
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
135144
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
136145
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
@@ -139,7 +148,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
139148
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
140149
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
141150
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
142-
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
151+
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=info
143152
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
144153
org.eclipse.jdt.core.compiler.processAnnotations=enabled
145154
org.eclipse.jdt.core.compiler.release=enabled

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ Only a few SMT solvers provide support for theories like Arrays, Floating Point,
6060

6161
JavaSMT supports several SMT solvers (see [Getting Started](doc/Getting-started.md) for installation):
6262

63-
| SMT Solver | Linux x64 | Linux arm64 | Windows x64 | Windows arm64 | MacOS x64 | MacOS arm64 | Description |
64-
| --- |:---------------------:|:-------------------:|:---:|:---:|:------------------------------------------------------:|:---:|:--- |
65-
| [Bitwuzla](https://bitwuzla.github.io/) | :heavy_check_mark:² | :heavy_check_mark:² | :heavy_check_mark: | | | | a fast solver for bitvector logic |
66-
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: | | | | | | a fast solver for bitvector logic, misses formula introspection, deprecated |
67-
| [CVC4](https://cvc4.github.io/) | :heavy_check_mark: | | | | | | |
68-
| [CVC5](https://cvc5.github.io/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | |
69-
| [MathSAT5](http://mathsat.fbk.eu/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | [maybe](https://github.com/sosy-lab/java-smt/pull/430)³ | | |
70-
| [OpenSMT](https://verify.inf.usi.ch/opensmt) | :heavy_check_mark:² | :heavy_check_mark:² | | | | | |
71-
| [OptiMathSAT](http://optimathsat.disi.unitn.it/) | :heavy_check_mark: | | | | | | based on MathSAT5, with support for optimization queries |
72-
| [Princess](http://www.philipp.ruemmer.org/princess.shtml) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
73-
| [SMTInterpol](https://ultimate.informatik.uni-freiburg.de/smtinterpol/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
74-
| [Yices2](https://yices.csl.sri.com/) | :heavy_check_mark: | | [maybe](https://github.com/sosy-lab/java-smt/pull/215) | | [maybe](https://github.com/sosy-lab/java-smt/pull/400)³ | | |
75-
| [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 |
63+
| SMT Solver | Linux x64 | Linux arm64 | Windows x64 | Windows arm64 | MacOS x64 | MacOS arm64 | Description |
64+
| --- |:---:|:---:|:---:|:---:|:---:|:---:|:--- |
65+
| [Bitwuzla](https://bitwuzla.github.io/) | :heavy_check_mark:² | :heavy_check_mark:² | :heavy_check_mark: | | | | a fast solver for bitvector logic |
66+
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: | | | | | | a fast solver for bitvector logic, misses formula introspection, deprecated |
67+
| [CVC4](https://cvc4.github.io/) | :heavy_check_mark: | | | | | | |
68+
| [CVC5](https://cvc5.github.io/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | |
69+
| [MathSAT5](http://mathsat.fbk.eu/) | :heavy_check_mark:³ | :heavy_check_mark:³ | :heavy_check_mark: | | [maybe](https://github.com/sosy-lab/java-smt/pull/430) | | |
70+
| [OpenSMT](https://verify.inf.usi.ch/opensmt) | :heavy_check_mark:² | :heavy_check_mark:² | | | | | |
71+
| [OptiMathSAT](http://optimathsat.disi.unitn.it/) | :heavy_check_mark: | | | | | | based on MathSAT5, with support for optimization queries |
72+
| [Princess](http://www.philipp.ruemmer.org/princess.shtml) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
73+
| [SMTInterpol](https://ultimate.informatik.uni-freiburg.de/smtinterpol/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
74+
| [Yices2](https://yices.csl.sri.com/) | :heavy_check_mark: | | [maybe](https://github.com/sosy-lab/java-smt/pull/215) | | [maybe](https://github.com/sosy-lab/java-smt/pull/400) | | |
75+
| [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 |
7676

7777
We support a reasonable list of operating systems and versions.
7878
- Our main target is Linux (mainly Ubuntu or comparable Linux distributions).
@@ -88,7 +88,9 @@ available with Ubuntu 18.04 or later.
8888

8989
² Solver requires at least `GLIBC_2.29`/`GLIBCXX_3.4.26` or `GLIBC_2.34`/`GLIBCXX_3.4.29`,
9090
available with Ubuntu 22.04 or later.
91-
³ We do not provide a signed solver library for macOS. The user needs to compile and sign it.
91+
³ Solver requires at least `GLIBC_2.38`/`GLIBCXX_3.4.31`,
92+
available with Ubuntu 24.04 or later.
93+
⁴ We do not provide a signed solver library for macOS. The user needs to compile and sign it.
9294

9395
#### Solver Features
9496

@@ -109,7 +111,7 @@ If something specific is missing, please [look for or file an issue](https://git
109111

110112
#### Multithreading Support
111113

112-
| SMT Solver | Concurrent context usage | Concurrent prover usage |
114+
| SMT Solver | Concurrent context usage | Concurrent prover usage |
113115
| --- |:---:|:---:|
114116
| [Bitwuzla](https://bitwuzla.github.io/) | :heavy_check_mark: | |
115117
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: | |
@@ -126,13 +128,13 @@ If something specific is missing, please [look for or file an issue](https://git
126128
Interruption using a [ShutdownNotifier][] may be used to interrupt a solver from any thread.
127129
Formulas are translatable in between contexts/provers/threads using _FormulaManager.translateFrom()_.
128130

129-
Multiple contexts, but all operations on each context only from a single thread.
130-
Multiple provers on one or more contexts, with each prover using its own thread.
131+
Multiple contexts, but all operations on each context only from a single thread.
132+
Multiple provers on one or more contexts, with each prover using its own thread.
131133

132134
#### Garbage Collection in Native Solvers
133135

134136
JavaSMT exposes an API for performing garbage collection on solvers implemented in a native language.
135-
As a native solver has no way of knowing whether the created formula object is still referenced
137+
As a native solver has no way of knowing whether the created formula object is still referenced
136138
by the client application, this API is necessary to avoid leaking memory.
137139
Note that several solvers already support _hash consing_ and thus,
138140
there is never more than one copy of an identical formula object in memory.
@@ -141,9 +143,9 @@ in the application, it is not necessary to perform any garbage collection at all
141143
Additionally, the memory for formulas created on user-side (i.e., via JavaSMT) is negligible
142144
compared to solver-internal memory-consumption when solving a hard SMT query.
143145

144-
- **Z3**: The parameter `solver.z3.usePhantomReferences` may be used to control
145-
whether JavaSMT will attempt to decrease references on Z3 formula
146-
objects once they are no longer referenced.
146+
- **Z3**: The parameter `solver.z3.usePhantomReferences` may be used to control
147+
whether JavaSMT will attempt to decrease references on Z3 formula objects
148+
once they are no longer referenced.
147149
- **MathSAT5**: Currently we do not support performing garbage collection for MathSAT5.
148150
- **CVC4, CVC5, Bitwuzla, OpenSMT**: Solvers using SWIG bindings do perform garbage collection.
149151
- **Other native SMT solvers**: we do not perform garbage collection.

build/build-compile.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ SPDX-License-Identifier: Apache-2.0
3636
<exclude name="**/*.java" />
3737
</patternset>
3838

39-
<!-- error-prone config from https://errorprone.info/docs/installation#jdk-16 -->
39+
<!-- error-prone config from https://errorprone.info/docs/installation#ant -->
4040
<property name="errorprone.options.required" value="
4141
-XDcompilePolicy=simple
42+
--should-stop=ifError=FLOW
4243
-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
4344
-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
4445
-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
@@ -55,6 +56,11 @@ SPDX-License-Identifier: Apache-2.0
5556
<javaversion atleast="21"/>
5657
</condition>
5758

59+
<!-- Current versions of Error Prone do not support running on Java 11 anymore. -->
60+
<condition property="errorprone.disable">
61+
<javaversion exactly="11"/>
62+
</condition>
63+
5864
<!-- We use error-prone as the compiler, cf. http://errorprone.info/ -->
5965
<target name="build-project" unless="skipBuild" depends="build-dependencies">
6066
<depend srcdir="${source.dir}" destdir="${class.dir}"/>
@@ -74,7 +80,7 @@ SPDX-License-Identifier: Apache-2.0
7480
<src path="${source.dir}"/>
7581
<classpath refid="classpath"/>
7682
<compilerarg value="-Xlint"/>
77-
<compilerarg value="-Xlint:-fallthrough"/> <!-- checked by error-prone, too, and javac does not recognize $FALL-THROUGH$ -->
83+
<compilerarg value="-Xlint:-fallthrough"/> <!-- checked by error-prone, too, and javac does not recognized $FALL-THROUGH$ -->
7884
<compilerarg value="-Xlint:-processing"/>
7985
<compilerarg value="-Xlint:-options"/> <!-- suppress warning about bootclasspath on newer JDK -->
8086
<compilerarg value="-Xlint:-this-escape" if:set="java21"/> <!-- false alarm for every use of configuration injection -->
@@ -130,11 +136,14 @@ SPDX-License-Identifier: Apache-2.0
130136
<mkdir dir="${source.generated.dir}"/>
131137

132138
<copy file=".settings/org.eclipse.jdt.core.prefs" tofile="${ivy.lib.dir}/build/org.eclipse.jdt.core.prefs">
133-
<!-- Convert all compiler warnings to errors. -->
139+
<!-- Convert all compiler warnings to errors and ignore info messages to not clutter the output. -->
134140
<filterchain>
135141
<replacetokens begintoken="=" endtoken="g">
136142
<token key="warnin" value="=error"/>
137143
</replacetokens>
144+
<replacetokens begintoken="=" endtoken="o">
145+
<token key="inf" value="=ignore"/>
146+
</replacetokens>
138147
</filterchain>
139148
</copy>
140149

build/build-documentation.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ SPDX-License-Identifier: Apache-2.0
3737

3838
<classpath refid="classpath"/>
3939

40-
<!-- "-v" is an optional param for verbose output of OptionCollector -->
40+
<!-- "-v" is a optional param for verbose output of OptionCollector -->
4141
<!-- <arg value="-v"/> -->
4242
</java>
4343
<echo message="Options collected." level="info"/>

build/build-ivy.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SPDX-License-Identifier: Apache-2.0
4646
</condition>
4747
<property name="ivy.cache.dir" location="${tmp.ivy.cache.dir}" />
4848

49-
<!-- If necessary, download Ivy from website so that it does not need to be installed. -->
49+
<!-- If necessary, download Ivy from web site so that it does not need to be installed. -->
5050
<target name="bootstrap-ivy" unless="ivy.jar.present">
5151
<mkdir dir="${ivy.jar.dir}"/>
5252
<echo message="Downloading ivy..."/>

0 commit comments

Comments
 (0)