forked from sosy-lab/java-smt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
487 lines (458 loc) · 18.8 KB
/
pom.xml
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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<?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: 2023 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>1.9</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:[email protected]:sosy-lab/java-smt.git</developerConnection>
</scm>
<developers>
<developer>
<name>Karlheinz Friedberger</name>
<email>[email protected]</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>[email protected]</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>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<project.dependency.relativepath>dependency</project.dependency.relativepath>
<project.dependency.path>${project.build.directory}/${project.dependency.relativepath}</project.dependency.path>
<javasmt.version>4.1.0</javasmt.version>
<boolector.version>3.2.2-g1a89c229</boolector.version>
<cvc4.version>1.8-prerelease-2020-06-24-g7825d8f28</cvc4.version>
<cvc5.version>1.0.5-g4cb2ab9eb</cvc5.version>
<mathsat.version>5.6.10</mathsat.version>
<opensmt.version>2.5.2-g7f502169</opensmt.version>
<javasmt-yices.version>4.1.0-1-gc58fe5b4</javasmt-yices.version>
<yices.version>2.6.2-396-g194350c1</yices.version>
<z3.version>4.12.2</z3.version>
</properties>
<dependencies>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>java-smt</artifactId>
<version>${javasmt.version}</version>
</dependency>
<!-- MathSAT5 has one dependency (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-mathsat5</artifactId>
<version>${mathsat.version}</version>
<classifier>libmathsat5j</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>
<type>jar</type>
<classifier>com.microsoft.z3</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3java</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>
<type>jar</type>
<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 six dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>jar</type>
<classifier>cvc5</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libcvc5</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libcvc5jni</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libcvc5parser</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libpoly</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<version>${cvc5.version}</version>
<type>so</type>
<classifier>libpolyxx</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 -->
<type>jar</type>
</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 three dependencies (on Linux) -->
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<version>${opensmt.version}</version>
<type>jar</type>
<classifier>opensmt</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<version>${opensmt.version}</version>
<type>so</type>
<classifier>libopensmt</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<version>${opensmt.version}</version>
<type>so</type>
<classifier>libopensmtjava</classifier>
</dependency>
<!-- JUnit for testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- This step starts its own JVM that ignores system properties set by the user,
because why would those ever be important?! -->
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<!-- 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. -->
<argLine>-Djava.library.path=${project.dependency.path}</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</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>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<!-- The dependency plugin allows us to copy or delete files. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<!-- The goal "copy" is used to change the name of the solver libraries (i.e. Z3)
from the name that is used internally in Maven to the normal name. -->
<id>copy</id>
<phase>initialize</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
<execution>
<!-- This copies all dependencies to ${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.
Default search locations for sosy-lab.commons:
(1) in its own folder (by far the easiest, just copy everything together) or
(2) in the "native library path" as returned by getNativeLibraryPath() in Java,
which is the directory ../native/<arch>-<os>/ relative to the JAR file of sosy-lab.commons,
with the following values depending on your system (arch=x86_64|x86; os=linux|windows|macosx). -->
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.dependency.path}</outputDirectory>
<artifactItems>
<!-- Here we specify what we want to use for the goal "copy".
In our case we copy the solver dependencies (binaries) to change their names.
groupId/artifactId/version/type/classifier have to match the dependency!
We copy them to ${project.dependency.path} as this is the location
that copy-dependencies uses by default. destFileName specifies the final name.
You may only need some of the artifacts below, depending on what solver(s) you want.
Important: you NEED to set the classpath to ${project.dependency.path} or
wherever you have your sosy-lab.commons + solver binaries! -->
<!-- MathSAT5 has one native library -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-mathsat5</artifactId>
<type>so</type>
<classifier>libmathsat5j</classifier>
<destFileName>libmathsat5j.so</destFileName>
</artifactItem>
<!-- Z3 has two native libraries -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<type>so</type>
<classifier>libz3java</classifier>
<destFileName>libz3java.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<type>so</type>
<classifier>libz3</classifier>
<destFileName>libz3.so</destFileName>
</artifactItem>
<!-- Boolector has three dependencies (on Linux) -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<type>so</type>
<classifier>libboolector</classifier>
<destFileName>libboolector.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<type>so</type>
<classifier>libminisat</classifier>
<destFileName>libminisat.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-boolector</artifactId>
<type>so</type>
<classifier>libpicosat</classifier>
<destFileName>libpicosat.so</destFileName>
</artifactItem>
<!-- CVC4 has four dependencies (on Linux),
and renaming the JAR file is not required -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<type>so</type>
<classifier>libcvc4</classifier>
<destFileName>libcvc4.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<type>so</type>
<classifier>libcvc4jni</classifier>
<destFileName>libcvc4jni.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc4</artifactId>
<type>so</type>
<classifier>libcvc4parser</classifier>
<destFileName>libcvc4parser.so</destFileName>
</artifactItem>
<!-- CVC5 has six dependencies (on Linux),
and renaming the JAR file is not required -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<type>so</type>
<classifier>libcvc5</classifier>
<destFileName>libcvc5.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<type>so</type>
<classifier>libcvc5jni</classifier>
<destFileName>libcvc5jni.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<type>so</type>
<classifier>libcvc5parser</classifier>
<destFileName>libcvc5parser.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<type>so</type>
<classifier>libpoly</classifier>
<destFileName>libpoly.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-cvc5</artifactId>
<type>so</type>
<classifier>libpolyxx</classifier>
<destFileName>libpolyxx.so</destFileName>
</artifactItem>
<!-- Yices2 has two dependencies (on Linux),
and renaming the JAR file is not required to be copied.-->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-yices2</artifactId>
<type>so</type>
<classifier>libyices2j</classifier>
<destFileName>libyices2j.so</destFileName>
</artifactItem>
<!-- OpenSMT has two dependencies (on Linux),
and renaming the JAR file is not required to be copied.-->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<type>so</type>
<classifier>libopensmtjava</classifier>
<destFileName>libopensmtjava.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-opensmt</artifactId>
<type>so</type>
<classifier>libopensmt</classifier>
<destFileName>libopensmt.so</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
</plugins>
</build>
</project>