Skip to content

Commit 49d0d73

Browse files
committed
Merge remote-tracking branch 'origin/master' into cvc5
2 parents ec29639 + 91d5bc6 commit 49d0d73

File tree

64 files changed

+1248
-363
lines changed

Some content is hidden

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

64 files changed

+1248
-363
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ lib/native/*/*.asc
2525
doc/Example-Maven-Project/target*
2626
doc/Example-Maven-Web-Project/target*
2727
doc/Example-Gradle-Project/.gradle
28+
doc/Example-Gradle-Project/.settings
29+
doc/Example-Gradle-Project/.project
2830
doc/Example-Gradle-Project/dependencies
2931
doc/Example-Gradle-Project/build
32+
doc/Example-Gradle-Project-Kotlin/.gradle
33+
doc/Example-Gradle-Project-Kotlin/.settings
34+
doc/Example-Gradle-Project-Kotlin/.project
35+
doc/Example-Gradle-Project-Kotlin/build
3036

3137
solvers_maven_conf/*.asc
3238

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ variables:
1414
# Version of https://gitlab.com/sosy-lab/software/refaster/ to use
1515
REFASTER_REPO_REVISION: 8b7f38e2afedf64b3cfa9592bbb8790b88f58352
1616
# Needs to be synchronized with Error Prone version in lib/ivy.xml
17-
REFASTER_VERSION: 2.11.0
17+
REFASTER_VERSION: 2.14.0
1818

19-
build:jdk-14:
19+
build:jdk-17:
2020
variables:
2121
# https://github.com/google/error-prone/issues/1106
2222
ANT_PROPS_BUILD: "-Divy.disable=true -Derrorprone.disable=true"

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,43 @@ This file is part of JavaSMT,
33
an API wrapper for a collection of SMT solvers:
44
https://github.com/sosy-lab/java-smt
55
6-
SPDX-FileCopyrightText: 2021 Dirk Beyer <https://www.sosy-lab.org>
6+
SPDX-FileCopyrightText: 2022 Dirk Beyer <https://www.sosy-lab.org>
77
88
SPDX-License-Identifier: Apache-2.0
99
-->
1010

1111
# JavaSMT ChangeLog
1212

13+
## JavaSMT 3.13.3
14+
15+
This patch release comes with a smaller bugfix for String-theory formulas in Z3.
16+
17+
## JavaSMT 3.13.2
18+
19+
This patch release comes with some updated solvers and some smaller bugfixes.
20+
21+
### Updated solvers:
22+
- JavaSMT 2.5-1147-g108647d8
23+
- Z3 4.10.1
24+
25+
## JavaSMT 3.13.1
26+
27+
This patch release contains with several smaller fixes for the integration of SMTInterpol and Princess.
28+
29+
## JavaSMT 3.13.0
30+
31+
This release comes with several bugfixes, e.g.,
32+
we improved DIV and MOD operations in Integer theory.
33+
34+
### Updated solvers:
35+
- MathSAT 5.6.8
36+
- Princess 2022-07-01
37+
- Z3 4.8.17
38+
39+
### Breaking change:
40+
The public API for FloatingPointManager was changed to support conversion
41+
of FloatingPoint to signed and unsigned Bitvectors.
42+
1343
## JavaSMT 3.12.0
1444

1545
This release comes with an initial support for String theory for SMT solvers like Z3 and CVC4.

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,23 @@ We aim for supporting more important features, more SMT solvers, and more system
8383
If something specific is missing, please [look for or file an issue](https://github.com/sosy-lab/java-smt/issues).
8484

8585
#### Multithreading Support
86-
The solvers Z3 (w and w/o Optimization), SMTInterpol, Princess, MathSAT5, Boolector and CVC4 support multithreading,
87-
provided that different threads use different contexts,
88-
and _all_ operations on a single context are performed from a single thread.
89-
Interruption using [ShutdownNotifier][] may be used to interrupt a
90-
a solver from any thread.
91-
CVC4 supports multithreading on a single context with multiple stacks(=provers).
86+
| SMT Solver | Concurrent context usage¹ | Concurrent prover usage² |
87+
| --- |:---:|:---:|
88+
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: | |
89+
| [CVC4](https://cvc4.github.io/) | :heavy_check_mark: | :heavy_check_mark: |
90+
| [MathSAT5](http://mathsat.fbk.eu/) | :heavy_check_mark: | |
91+
| [OptiMathSAT](http://optimathsat.disi.unitn.it/) | :heavy_check_mark: | |
92+
| [Princess](http://www.philipp.ruemmer.org/princess.shtml) | :heavy_check_mark: | |
93+
| [SMTInterpol](https://ultimate.informatik.uni-freiburg.de/smtinterpol/) | :heavy_check_mark: | |
94+
| [Yices2](https://yices.csl.sri.com/) | | |
95+
| [Z3](https://github.com/Z3Prover/z3) | :heavy_check_mark: | |
96+
97+
Interruption using a [ShutdownNotifier][] may be used to interrupt a
98+
a solver from any thread.
99+
Formulas are translatable in between contexts/provers/threads using _FormulaManager.translateFrom()_.
100+
101+
¹ Multiple contexts, but all operations on each context only from a single thread.
102+
² Multiple provers on one or more contexts, with each prover using its own thread.
92103

93104
#### Garbage Collection in Native Solvers
94105
JavaSMT exposes an API for performing garbage collection on solvers

build/build-compile.xml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,32 @@ SPDX-License-Identifier: Apache-2.0
3232
<fileset dir="${ivy.lib.dir}" includes="build/*.jar"/>
3333
</path>
3434

35+
<patternset id="source.additional">
36+
<exclude name="**/*.java" />
37+
</patternset>
38+
39+
<!-- error-prone config from https://errorprone.info/docs/installation#jdk-16 -->
40+
<property name="errorprone.options.required" value="
41+
-XDcompilePolicy=simple
42+
-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
43+
-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
44+
-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
45+
-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
46+
-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
47+
-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
48+
-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
49+
-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
50+
-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
51+
-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
52+
"/>
53+
3554
<!-- We use error-prone as the compiler, cf. http://errorprone.info/ -->
3655
<target name="build-project" unless="skipBuild" depends="build-dependencies">
3756
<depend srcdir="${source.dir}" destdir="${class.dir}"/>
3857
<mkdir dir="${source.generated.dir}"/>
3958
<copy todir="${class.dir}">
4059
<fileset dir="${source.dir}">
41-
<exclude name="**/*.java" />
42-
<exclude name="**/*.cup" />
43-
<exclude name="**/*.jflex" />
44-
<exclude name="**/*.nested" />
45-
<exclude name="**/*.xml" />
46-
<exclude name="**/*.dia" />
47-
<exclude name="**/*.pdf" />
60+
<patternset refid="source.additional" />
4861
</fileset>
4962
</copy>
5063
<javac debug="true"
@@ -61,9 +74,8 @@ SPDX-License-Identifier: Apache-2.0
6174
<compilerarg value="-Xlint:-processing"/>
6275
<compilerarg value="-Xlint:-options"/> <!-- suppress warning about bootclasspath on newer JDK -->
6376
<compilerarg value="-Werror" unless:set="compile.warn"/>
64-
<compilerarg value="-XDcompilePolicy=simple"/> <!-- necessary for error-prone -->
77+
<compilerarg line="${errorprone.options.required}" unless:set="errorprone.disable"/>
6578
<compilerarg value="-Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode ${errorprone.options}" unless:set="errorprone.disable"/>
66-
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" unless:set="errorprone.disable"/>
6779
<compilerarg value="-s"/><compilerarg value="${source.generated.dir}"/>
6880
<compilerarg value="-processorpath"/><compilerarg pathref="processorpath"/>
6981
</javac>
@@ -88,7 +100,7 @@ SPDX-License-Identifier: Apache-2.0
88100
encoding="UTF-8">
89101
<src path="${source.dir}"/>
90102
<classpath refid="classpath"/>
91-
<compilerarg value="-XDcompilePolicy=simple"/> <!-- necessary for error-prone -->
103+
<compilerarg line="${errorprone.options.required}" unless:set="errorprone.disable"/>
92104
<compilerarg value="-Xplugin:ErrorProne -XepPatchChecks:refaster:${refaster.rule.file} -XepPatchLocation:${basedir}" unless:set="errorprone.disable"/>
93105
<compilerarg value="-s"/><compilerarg value="${source.generated.dir}"/>
94106
<compilerarg value="-processorpath"/><compilerarg pathref="processorpath"/>

build/build-publish-solvers.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ SPDX-License-Identifier: Apache-2.0
6767
Please provide all releases (Linux64, MacOS, and Windows64) together in the same root directory,
6868
e.g., copy the releases (especially the content of their `bin` directories) together into one directory.
6969
The only overlap between those releases is the JAR file, which should be equal anyway.
70+
Additionally, make the Java sources available in this directory.
71+
This can be done by:
72+
- copying the content of sources-zip into the current directory (or vice versa)
73+
- executing `python scripts/mk_make.py --java` to generate all Java related files. Executing `make` is not required.
7074
</fail>
7175
<echo>Option -Dz3.version=... not specified. Trying to determine z3.version from git repository. This will fail if git repository is not available.</echo>
7276
<exec executable="git" dir="${z3.path}" outputproperty="z3.version" failonerror="true">

build/deploy-gh-pages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ git init
3232
git add .
3333
git commit -m "Deploy to GitHub Pages"
3434

35-
# Force push from the current repo's master branch to the remote
35+
# Force push from the current repo's HEAD to the remote
3636
# repo's gh-pages branch. (All previous history on the gh-pages branch
3737
# will be lost, since we are overwriting it.) We redirect any output to
3838
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
39-
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
39+
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" HEAD:gh-pages > /dev/null 2>&1

build/gitlab-ci.Dockerfile.jdk-14 renamed to build/gitlab-ci.Dockerfile.jdk-17

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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: 2022 Dirk Beyer <https://www.sosy-lab.org>
66
#
77
# SPDX-License-Identifier: Apache-2.0
88

@@ -11,9 +11,9 @@
1111
# and will be used by CI as declared in .gitlab-ci.yml.
1212
#
1313
# Commands for updating the image:
14-
# docker build --pull -t registry.gitlab.com/sosy-lab/software/java-smt/test:jdk-14 - < build/gitlab-ci.Dockerfile.jdk-14
14+
# docker build --pull -t registry.gitlab.com/sosy-lab/software/java-smt/test:jdk-17 - < build/gitlab-ci.Dockerfile.jdk-17
1515
# docker push registry.gitlab.com/sosy-lab/software/java-smt/test
1616

17-
FROM registry.gitlab.com/sosy-lab/software/java-project-template/test:jdk-14
17+
FROM registry.gitlab.com/sosy-lab/software/java-project-template/test:jdk-17
1818
RUN apt-get update && apt-get install -y \
1919
libgomp1

build/gitlab-ci.Dockerfile.jdk-8

Lines changed: 0 additions & 17 deletions
This file was deleted.

build/gitlab-ci.yml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ build:jdk-11:
5656
<<: *build
5757
image: ${CI_REGISTRY_IMAGE}/test:jdk-11
5858

59-
build:jdk-14:
59+
build:jdk-17:
6060
<<: *build
61-
image: ${CI_REGISTRY_IMAGE}/test:jdk-14
61+
image: ${CI_REGISTRY_IMAGE}/test:jdk-17
6262

6363

6464
# For checks that need the binaries
@@ -84,9 +84,9 @@ build-project-ecj:jdk-11:
8484
<<: *build-project-ecj
8585
image: ${CI_REGISTRY_IMAGE}/test:jdk-11
8686

87-
build-project-ecj:jdk-14:
87+
build-project-ecj:jdk-17:
8888
<<: *build-project-ecj
89-
image: ${CI_REGISTRY_IMAGE}/test:jdk-14
89+
image: ${CI_REGISTRY_IMAGE}/test:jdk-17
9090

9191

9292
check-format:
@@ -154,20 +154,20 @@ unit-tests:jdk-11:
154154
- build:jdk-11
155155
image: ${CI_REGISTRY_IMAGE}/test:jdk-11
156156

157-
unit-tests:jdk-14:
157+
unit-tests:jdk-17:
158158
<<: *unit-tests
159159
dependencies:
160160
- build-dependencies
161-
- build:jdk-14
161+
- build:jdk-17
162162
needs:
163163
- build-dependencies
164-
- build:jdk-14
165-
image: ${CI_REGISTRY_IMAGE}/test:jdk-14
164+
- build:jdk-17
165+
image: ${CI_REGISTRY_IMAGE}/test:jdk-17
166166

167167

168168
refaster:
169169
<<: *source_check
170-
image: ${CI_REGISTRY_IMAGE}/test:jdk-14
170+
image: ${CI_REGISTRY_IMAGE}/test:jdk-11
171171
before_script:
172172
- 'test -d refaster || git clone https://gitlab.com/sosy-lab/software/refaster.git'
173173
- 'cd refaster'
@@ -206,26 +206,6 @@ reuse:
206206
- reuse lint
207207

208208

209-
deploy-coverage:
210-
stage: deploy
211-
script: "build/deploy-coverage.sh"
212-
dependencies:
213-
- unit-tests:jdk-11
214-
needs:
215-
- unit-tests:jdk-11
216-
only:
217-
refs:
218-
- master
219-
variables:
220-
- $CI_PROJECT_PATH == $PROJECT_PATH # not on forks
221-
except:
222-
variables:
223-
- $CODACY_PROJECT_TOKEN == null # required for job
224-
- $GH_TOKEN == null # required for job
225-
cache:
226-
paths:
227-
- "codacy-coverage-reporter-assembly*.jar"
228-
229209
deploy-gh-pages:
230210
stage: deploy
231211
script: "build/deploy-gh-pages.sh"
@@ -236,9 +216,8 @@ deploy-gh-pages:
236216
- build:jdk-11
237217
- javadoc
238218
only:
239-
refs:
240-
- master
241219
variables:
220+
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # only on default branch
242221
- $CI_PROJECT_PATH == $PROJECT_PATH # not on forks
243222
except:
244223
variables:
@@ -268,8 +247,8 @@ build-docker:test:jdk-11:
268247
DOCKERFILE: build/gitlab-ci.Dockerfile.jdk-11
269248
IMAGE: /test:jdk-11
270249

271-
build-docker:test:jdk-14:
250+
build-docker:test:jdk-17:
272251
extends: .build-docker
273252
variables:
274-
DOCKERFILE: build/gitlab-ci.Dockerfile.jdk-14
275-
IMAGE: /test:jdk-14
253+
DOCKERFILE: build/gitlab-ci.Dockerfile.jdk-17
254+
IMAGE: /test:jdk-17

doc/Developers-How-to-Release-into-Ivy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ there are scripts for publishing available at the root of the [Ivy Repository](h
4646
We prefer to use the official Z3 binaries,
4747
please build from source only if necessary (e.g., in case of an important bugfix).
4848

49-
To publish Z3, download the **Ubuntu 16.04**, **Windows**, and **OSX** binary
49+
To publish Z3, download the **Ubuntu**, **Windows**, and **OSX** binary
5050
and the sources (for JavaDoc) for the [latest release](https://github.com/Z3Prover/z3/releases) and unzip them.
5151
In the unpacked sources directory, prepare Java sources via `python scripts/mk_make.py --java`.
5252
For simpler handling, we then copy the files from the three `bin` directories together into one directory,
@@ -145,12 +145,12 @@ and `$MATHSAT_VERSION` is the version number of MathSAT (all-in-one, runtime: le
145145
Concrete example (`$WD` is a working directory where all dependencies are located):
146146
```
147147
ant publish-mathsat \
148-
-Dmathsat.path=$WD/mathsat-5.6.4-linux-x86_64-reentrant \
148+
-Dmathsat.path=$WD/mathsat-5.6.7-linux-x86_64-reentrant \
149149
-Dgmp.path=$WD/gmp-6.1.2 \
150-
-Dmathsat-windows.path=$WD/mathsat-5.6.4-win64-msvc \
150+
-Dmathsat-windows.path=$WD/mathsat-5.6.7-win64-msvc \
151151
-Dmpir-windows.path=$WD/mpir-2.7.2-win \
152152
-Djdk-windows.path=$WD/jdk-11 \
153-
-Dmathsat.version=5.6.4-debug
153+
-Dmathsat.version=5.6.7
154154
```
155155
Finally follow the instructions shown in the message at the end.
156156

0 commit comments

Comments
 (0)