-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathpom.xml
More file actions
400 lines (372 loc) · 14.3 KB
/
Copy pathpom.xml
File metadata and controls
400 lines (372 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of JavaSMT,
an API wrapper for a collection of SMT solvers:
https://github.com/sosy-lab/java-smt
SPDX-FileCopyrightText: 2025 Dirk Beyer <https://www.sosy-lab.org>
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sosy_lab.java_smt_example</groupId>
<artifactId>java-smt-maven-example</artifactId>
<version>2.0</version>
<name>java-smt-maven-example</name>
<description>Example Maven project to show how to use JavaSMT with native solver libraries.</description>
<url>https://github.com/sosy-lab/java-smt</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<organization>
<name>Software Systems Lab</name>
<url>https://www.sosy-lab.org/</url>
</organization>
<scm>
<url>https://github.com/sosy-lab/java-smt/</url>
<connection>scm:git:git://github.com/sosy-lab/java-smt.git</connection>
<developerConnection>scm:git:git@github.com:sosy-lab/java-smt.git</developerConnection>
</scm>
<developers>
<developer>
<name>Karlheinz Friedberger</name>
<email>kfriedberger@gmail.com</email>
<organization>Software Systems Lab</organization>
<url>https://www.sosy-lab.org/people/friedberger/</url>
<roles>
<role>project maintainer</role>
</roles>
</developer>
<developer>
<name>Dirk Beyer</name>
<email>dirk.beyer@sosy-lab.org</email>
<url>https://www.sosy-lab.org/people/beyer/</url>
<organization>Software Systems Lab</organization>
<organizationUrl>http://www.sosy-lab.org/</organizationUrl>
<roles>
<role>project manager</role>
</roles>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<project.dependency.relativepath>dependency</project.dependency.relativepath>
<project.dependency.path>${project.build.directory}/${project.dependency.relativepath}</project.dependency.path>
<!-- Some solvers are provided for more than x64, e.g., also for arm64. -->
<system.arch>x64</system.arch>
<!-- versions of dependencies -->
<javasmt.version>6.0.0</javasmt.version>
<bitwuzla.version>0.8.2-339-g550ed911</bitwuzla.version>
<boolector.version>3.2.2-g1a89c229</boolector.version>
<cvc4.version>1.8-prerelease-2020-06-24-g7825d8f28</cvc4.version>
<cvc5.version>2026-02-26-d22638a</cvc5.version>
<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>
<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>
<z3.version>4.15.4</z3.version>
<z3-legacy.version>4.5.0-gd57a2a6dc</z3-legacy.version>
</properties>
<dependencies>
<!-- JavaSMT Dependencies -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>java-smt</artifactId>
<version>${javasmt.version}</version>
</dependency>
<!-- Java-based Solvers - plain JAR dependencies are listed here -->
<dependency>
<groupId>de.uni-freiburg.informatik.ultimate</groupId>
<artifactId>smtinterpol</artifactId>
<version>${smtinterpol.version}</version>
</dependency>
<dependency>
<groupId>io.github.uuverifiers</groupId>
<artifactId>princess_2.13</artifactId>
<version>${princess.version}</version>
</dependency>
<dependency>
<groupId>io.github.uuverifiers</groupId>
<artifactId>ostrich_2.13</artifactId>
<version>${ostrich.version}</version>
</dependency>
<!-- MathSAT5 has one dependency (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-mathsat</artifactId>
<version>${mathsat.version}</version>
<classifier>libmathsat5j-${system.arch}</classifier>
<type>so</type>
</dependency>
<!-- Z3 has three dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3-${system.arch}</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3java-${system.arch}</classifier>
</dependency>
<!-- Z3-Legacy has three dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3-legacy</artifactId>
<version>${z3-legacy.version}</version>
<classifier>com.microsoft.z3legacy</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3-legacy</artifactId>
<version>${z3-legacy.version}</version>
<type>so</type>
<classifier>libz3legacy-${system.arch}</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3-legacy</artifactId>
<version>${z3-legacy.version}</version>
<type>so</type>
<classifier>libz3javalegacy-${system.arch}</classifier>
</dependency>
<!-- Bitwuzla has two dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-bitwuzla</artifactId>
<version>${bitwuzla.version}</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-bitwuzla</artifactId>
<version>${bitwuzla.version}</version>
<type>so</type>
<classifier>libbitwuzlaj-${system.arch}</classifier>
</dependency>
<!-- Boolector has three dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<version>${boolector.version}</version>
<type>so</type>
<classifier>libboolector</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<version>${boolector.version}</version>
<type>so</type>
<classifier>libminisat</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<version>${boolector.version}</version>
<type>so</type>
<classifier>libpicosat</classifier>
</dependency>
<!-- CVC4 has four dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<version>${cvc4.version}</version>
<classifier>CVC4</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<version>${cvc4.version}</version>
<type>so</type>
<classifier>libcvc4</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<version>${cvc4.version}</version>
<type>so</type>
<classifier>libcvc4jni</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<version>${cvc4.version}</version>
<type>so</type>
<classifier>libcvc4parser</classifier>
</dependency>
<!-- CVC5 has two dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libcvc5jni-${system.arch}</classifier>
</dependency>
<!-- Yices2 has two dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-yices2</artifactId>
<version>${javasmt-yices.version}</version> <!-- version of Yices2 bindings in JavaSMT -->
<exclusions>
<exclusion>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-yices2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-yices2</artifactId>
<version>${yices.version}</version> <!-- version of Yices2 release -->
<type>so</type>
<classifier>libyices2j</classifier>
</dependency>
<!-- OpenSMT has two dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<version>${opensmt.version}</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<version>${opensmt.version}</version>
<type>so</type>
<classifier>libopensmtj-${system.arch}</classifier>
</dependency>
<!-- JUnit for testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Executes unit tests and provides the native library path for solvers. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
<configuration>
<argLine>-Djava.library.path=${project.dependency.path}</argLine>
</configuration>
</plugin>
<!-- Allows running the application via 'mvn exec:exec' with the correct native library path. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.library.path=${project.dependency.path}</argument>
<argument>-classpath</argument>
<classpath/>
<argument>org.sosy_lab.java_smt_example.SolverOverviewTable</argument>
</arguments>
</configuration>
</plugin>
<!-- Packages the application and configures the manifest to look for JARs in the 'dependency/' folder. -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<!-- For solvers with native binaries, you need to add the classpath to test properly.
This path needs to be the location of the sosy-lab.commons.jar and the solver binaries.
See maven-dependency-plugin below for more information. -->
<addClasspath>true</addClasspath>
<classpathPrefix>${project.dependency.relativepath}/</classpathPrefix>
<mainClass>org.sosy_lab.java_smt_example.SolverOverviewTable</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- The next two plugins copy and rename the solver dependencies for ${project.dependency.path}.
We do this, because the sosy-lab.commons dependency (in JavaSMT) searches the
native solver binaries (i.e. MathSAT or Z3) at specific locations and with specific names.
So we just copy the dependencies and set the classpath to this location.
You may of course change this if you know how to. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-natives-temp</id>
<phase>initialize</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/temp-natives</outputDirectory>
<includeTypes>so,dll,dylib</includeTypes>
<stripVersion>true</stripVersion>
</configuration>
</execution>
<execution>
<id>copy-all-jars</id>
<phase>initialize</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.dependency.path}</outputDirectory>
<includeTypes>jar</includeTypes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>rename-natives</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${project.dependency.path}">
<fileset dir="${project.build.directory}/temp-natives" includes="**/*"/>
<!-- example mapping: from javasmt-solver-z3-libz3java-x64.so to libz3.so, version got already removed above.
"\1" is the library name, "\2" is the file extension. -->
<regexpmapper from="^javasmt-solver-(?:bitwuzla|boolector|cvc4|cvc5|mathsat|opensmt|yices2|z3-legacy|z3)-(.*?)(?:-${system.arch})?\.(so|dll|dylib)$" to="\1.\2" />
</copy>
<delete dir="${project.build.directory}/temp-natives"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>