-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.xml
537 lines (531 loc) · 33.2 KB
/
build.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
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="all" name="Create Project SMTInterpol" xmlns:jacoco="antlib:org.jacoco.ant" xmlns:resolver="antlib:org.apache.maven.resolver.ant" xmlns:sonar="antlib:org.sonar.ant">
<property name="java.target" value="8"/>
<property name="javacup.jar" value="jh-javacup-1.2.jar"/>
<target name="help">
<echo>
Run with, e.g., `ant smtinterpol.jar`. Useful targets:
runtests: Run unit tests
smtinterpol.jar: Create main jar file (in dist)
starexec: Create starexec package
deltadebugger.jar: Create delta debugger
dist: Create all jar files
web: Build website
stage: Upload new version to Maven Central (owner only)
</echo>
</target>
<import file="smtinterpol2-publicapi.xml"/>
<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml"
classpath="libs/maven-resolver-ant-tasks-1.3.1-uber.jar" />
<property name="artifactId" value="smtinterpol"/>
<!-- Build everything -->
<target name="all" depends="dist"/>
<property file="buildjar.properties"/>
<available file="${dir.jacoco}" type="dir" property="jacoco.present"/>
<target name="jacoco-setup" if="jacoco.present">
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="${dir.jacoco}/lib/jacocoant.jar"/>
</taskdef>
</target>
<target name="get-version">
<!-- get a new version string using git describe if possible -->
<exec executable="git" outputproperty="version">
<arg value="describe"/>
</exec>
<echo>Version is ${version}</echo>
<property name="jar.basename" value="${artifactId}-${version}"/>
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd"/>
<format property="build.year" pattern="yyyy"/>
</tstamp>
</target>
<!-- <target name="cobertura-setup" if="cobertura.present"> -->
<!-- <taskdef classpathref="cobertura.classpath" resource="tasks.properties" onerror="ignore"/> -->
<!-- </target> -->
<!-- Build smtlib1 parser and lexer -->
<target name="check_smtlib1.cup_current">
<uptodate property="smtlib1.cup.current">
<srcfiles dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib" includes="*.cup,*.flex"/>
<srcfiles file="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<mapper>
<globmapper from="smtlib.cup" to="Parser.java"/>
<globmapper from="smtlib.cup" to="LexerSymbols.java"/>
<globmapper from="smtlib.flex" to="Lexer.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Parser.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}LexerSymbols.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Lexer.java"/>
</mapper>
</uptodate>
</target>
<target name="smtlib1.cup" depends="check_smtlib1.cup_current" unless="smtlib1.cup.current">
<property name="workspacedir" value="${dir.workspace}"/>
<ant antfile="build-parser.xml" dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib"/>
</target>
<!-- Build smtlib2 parser and lexer -->
<target name="check_smtlib2.cup_current">
<uptodate property="smtlib2.cup.current">
<srcfiles dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib2" includes="*.cup,*.flex"/>
<srcfiles file="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<mapper>
<globmapper from="smtlib.cup" to="Parser.java"/>
<globmapper from="smtlib.cup" to="LexerSymbols.java"/>
<globmapper from="smtlib.flex" to="Lexer.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Parser.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}LexerSymbols.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Lexer.java"/>
</mapper>
</uptodate>
</target>
<target name="smtlib2.cup" depends="check_smtlib2.cup_current" unless="smtlib2.cup.current">
<property name="workspacedir" value="${dir.workspace}"/>
<ant antfile="build-parser.xml" dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib2"/>
</target>
<!-- Build proof checker parser and lexer -->
<target name="check_proofchecker.cup_current">
<uptodate property="proofchecker.cup.current">
<srcfiles dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/proof/checker" includes="*.cup,*.flex"/>
<srcfiles file="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<mapper>
<globmapper from="proofs.cup" to="ProofParser.java"/>
<globmapper from="proofs.cup" to="ProofSymbols.java"/>
<globmapper from="proofs.flex" to="ProofLexer.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}proof${file.separator}checker${file.separator}ProofParser.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}proof${file.separator}checker${file.separator}ProofSymbols.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}proof${file.separator}checker${file.separator}ProofLexer.java"/>
</mapper>
</uptodate>
</target>
<target name="proofchecker.cup" depends="check_proofchecker.cup_current" unless="proofchecker.cup.current">
<property name="workspacedir" value="${dir.workspace}"/>
<ant antfile="build-parser.xml" dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/proof/checker"/>
</target>
<!-- Build dimacs parser and lexer -->
<target name="check_dimacs.cup_current">
<uptodate property="dimacs.cup.current">
<srcfiles dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/dimacs" includes="*.cup,*.flex"/>
<srcfiles file="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<mapper>
<globmapper from="dimacs.cup" to="Parser.java"/>
<globmapper from="dimacs.cup" to="LexerSymbols.java"/>
<globmapper from="dimacs.flex" to="Lexer.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Parser.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}LexerSymbols.java"/>
<globmapper from="${javacup.jar}" to="${dir.workspace}${file.separator}SMTInterpol${file.separator}src${file.separator}de${file.separator}uni_freiburg${file.separator}informatik${file.separator}ultimate${file.separator}smtinterpol${file.separator}smtlib2${file.separator}Lexer.java"/>
</mapper>
</uptodate>
</target>
<target name="dimacs.cup" depends="check_dimacs.cup_current" unless="dimacs.cup.current">
<property name="workspacedir" value="${dir.workspace}"/>
<ant antfile="build-parser.xml" dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/dimacs"/>
</target>
<!-- Compile SMTInterpol -->
<target name="prepare" depends="get-version,smtlib1.cup,smtlib2.cup,proofchecker.cup,dimacs.cup">
<copy file="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/Version.template" overwrite="true" tofile="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/Version.java">
<filterchain>
<expandproperties/>
</filterchain>
</copy>
</target>
<target name="compile" depends="prepare">
<mkdir dir="${dir.workspace}/Library-SMTLIB/release"/>
<mkdir dir="${dir.workspace}/SMTInterpol/release"/>
<javac srcdir="${dir.workspace}/Library-SMTLIB/src" destdir="${dir.workspace}/Library-SMTLIB/release" optimize="${optimize}" includeAntRuntime="false" debug="${debug}" source="${java.target}" target="${java.target}">
</javac>
<echo message="Build SMTLIB library finished"/>
<javac srcdir="${dir.workspace}/SMTInterpol/src" destdir="${dir.workspace}/SMTInterpol/release" optimize="${optimize}" includeAntRuntime="false" debug="${debug}" source="${java.target}" target="${java.target}">
<exclude name="de/uni_freiburg/informatik/ultimate/smtinterpol/test_generator/**"/>
<exclude name="de/uni_freiburg/informatik/ultimate/smtinterpol/smtcomp/**"/>
<classpath>
<pathelement location="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
</classpath>
</javac>
</target>
<!-- Compile Deltadebugger -->
<target name="compiledd" depends="compile">
<mkdir dir="${dir.workspace}/DeltaDebugger/release"/>
<javac srcdir="${dir.workspace}/DeltaDebugger/src" destdir="${dir.workspace}/DeltaDebugger/release" optimize="${optimize}" includeAntRuntime="false" debug="${debug}" source="${java.target}" target="${java.target}">
<classpath>
<pathelement location="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
<pathelement path="${dir.workspace}/SMTInterpol/release"/>
</classpath>
</javac>
</target>
<!-- Create an executable jar -->
<target name="smtinterpol.jar" depends="compile">
<mkdir dir="${jar.outdir}"/>
<jar destfile="${jar.outdir}/${jar.basename}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="de.uni_freiburg.informatik.ultimate.smtinterpol.Main"/>
</manifest>
<zipfileset dir="${dir.workspace}/SMTInterpol/release"/>
<zipfileset dir="${dir.workspace}/Library-SMTLIB/release"/>
<zipfileset includes="com/github/jhoenicke/javacup/runtime/**" src="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<zipfileset file="${dir.workspace}/LICENSE" prefix=""/>
<zipfileset file="${dir.workspace}/COPYING" prefix=""/>
<zipfileset file="${dir.workspace}/COPYING.LESSER" prefix=""/>
<zipfileset file="${dir.workspace}/AUTHORS" prefix=""/>
<zipfileset file="${dir.workspace}/README.md" prefix=""/>
</jar>
</target>
<!-- Create deltadebugger jar -->
<target name="deltadebugger.jar" depends="clean,compiledd">
<mkdir dir="${jar.outdir}"/>
<jar destfile="${jar.outdir}/deltadebugger.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="de.uni_freiburg.informatik.ultimate.smtinterpol.delta.Minimizer"/>
</manifest>
<zipfileset dir="${dir.workspace}/DeltaDebugger/release"/>
<zipfileset dir="${dir.workspace}/SMTInterpol/release"/>
<zipfileset dir="${dir.workspace}/Library-SMTLIB/release"/>
<zipfileset includes="com/github/jhoenicke/javacup/runtime/**" src="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<zipfileset file="${dir.workspace}/LICENSE" prefix=""/>
<zipfileset file="${dir.workspace}/COPYING" prefix=""/>
<zipfileset file="${dir.workspace}/COPYING.LESSER" prefix=""/>
<zipfileset file="${dir.workspace}/AUTHORS" prefix=""/>
<zipfileset file="${dir.workspace}/README.md" prefix=""/>
</jar>
</target>
<target name="javadoc-jar" depends="javadoc, get-version">
<mkdir dir="${jar.outdir}"/>
<jar jarfile="${jar.outdir}/${jar.basename}-javadoc.jar">
<fileset dir="doc-smtinterpol"/>
</jar>
</target>
<!-- Create a source jar -->
<target name="create_src_jar" depends="prepare">
<mkdir dir="${jar.outdir}"/>
<jar destfile="${jar.outdir}/${jar.basename}-sources.jar">
<zipfileset dir="${dir.workspace}" prefix="smtinterpol">
<include name="**/src/**"/>
<exclude name="**/test_generator/**"/>
<exclude name="**/smtcomp/**"/>
<include name="SMTInterpol*/lib/**"/>
<exclude name="SMTInterpol/web/**"/>
<exclude name="SMTInterpolSamples/src/de/uni_freiburg/informatik/ultimate/smtinterpol/samples/FlipDecisions.java"/>
<include name="LICENSE"/>
<include name="COPYING"/>
<Include name="COPYING.LESSER"/>
<include name="AUTHORS"/>
<include name="README.md"/>
</zipfileset>
</jar>
</target>
<!-- Create a new distribution -->
<target name="web" depends="smtinterpol.jar,create_src_jar">
<exec executable="make" dir="SMTInterpol/web/html">
<arg line="distribution"/>
</exec>
<exec executable="mvn" dir="Webinterface">
<arg line="clean"/>
<arg line="install"/>
</exec>
<echo>
Now copy the files:
scp SMTInterpol/web/html/gen/* webserver:/export/server/httpd/ultimate/smtinterpol
scp Webinterface/target/smtinterpol-web-1.0-SNAPSHOT.war webserver:.
ssh webserver 'umask 022 && unzip -o -q -d /export/server/httpd/ultimate/smtinterpol/online/ ~/smtinterpol-web-1.0-SNAPSHOT.war'
</echo>
</target>
<!-- Create the starexec solver zip file -->
<target name="starexec" depends="get-version,smtinterpol.jar">
<property name="tmpdir" value="buildtmp"/>
<mkdir dir="${tmpdir}/bin"/>
<echo file="${tmpdir}/bin/starexec_run_default" append="false">#!/bin/bash
# Run script for SMTInterpol for the STAREXEC cluster
java -Xms1536m -Xmx50g -da -dsa -jar smtinterpol.jar -w -o continue-on-error=false -o proof-check-mode -o model-check-mode "$$1" 2>"$$2"/error.log
</echo>
<echo file="${tmpdir}/bin/starexec_run_bitvector" append="false">#!/bin/bash
# Run script for SMTInterpol for the STAREXEC cluster
java -Xms1536m -Xmx50g -da -dsa -jar smtinterpol.jar -w -o continue-on-error=false -o model-check-mode "$$1" 2>"$$2"/error.log
</echo>
<echo file="${tmpdir}/bin/smtcomp_run_incremental" append="false">#!/bin/bash
java -Xms1536m -Xmx50g -da -dsa -jar smtinterpol.jar -w -o continue-on-error=false -o proof-check-mode -o model-check-mode "$$@" 2>/dev/null
</echo>
<echo file="${tmpdir}/bin/smtcomp_solver" append="false">#!/bin/bash
java -Xms1536m -Xmx50g -da -dsa -jar smtinterpol.jar -w -o continue-on-error=false "$$@"
</echo>
<echo file="${tmpdir}/bin/smtcomp_checker" append="false">#!/bin/bash
java -Xms1536m -Xmx50g -da -dsa -cp smtinterpol.jar de.uni_freiburg.informatik.ultimate.smtinterpol.proof.checker.Main "$$@"
</echo>
<chmod file="${tmpdir}/bin/starexec_run_default" perm="ugo+rx"/>
<chmod file="${tmpdir}/bin/smtcomp_run_incremental" perm="ugo+rx"/>
<chmod file="${tmpdir}/bin/smtcomp_solver" perm="ugo+rx"/>
<chmod file="${tmpdir}/bin/smtcomp_checker" perm="ugo+rx"/>
<echo file="${tmpdir}/starexec_description.txt" append="false">SMTInterpol ${version}</echo>
<!-- stupid starexec does not like - characters in description -->
<replace file="${tmpdir}/starexec_description.txt" token="-" value="_"/>
<untar src="libs/smtcomp-wrappers.tar.gz" compression="gzip" dest="${tmpdir}/bin" />
<copy file="${jar.outdir}/${jar.basename}.jar" tofile="${tmpdir}/bin/smtinterpol.jar"/>
<zip destfile="${jar.outdir}/smtinterpol-${version}.zip" basedir="${tmpdir}"/>
<delete failonerror="false" includeemptydirs="true" dir="${tmpdir}"/>
<echo>created ${jar.outdir}/smtinterpol-${version}.zip</echo>
</target>
<!-- Create the smtcomp solver zip file -->
<target name="smtcomp" depends="get-version,smtinterpol.jar">
<property name="tmpdir" value="buildtmp"/>
<mkdir dir="${tmpdir}"/>
<echo file="${tmpdir}/smtinterpol" append="false">#!/bin/bash
# Run script for SMTInterpol for SMT-COMP 2024+
SCRIPTDIR=`dirname $$0`
java -da -dsa -jar $$SCRIPTDIR/smtinterpol.jar -w -o continue-on-error=false -o proof-check-mode -o model-check-mode "$$@" 2>error.log
</echo>
<echo file="${tmpdir}/smtinterpol-bv" append="false">#!/bin/bash
# Run script for SMTInterpol for SMT-COMP 2024+ for bitvector theories
SCRIPTDIR=`dirname $$0`
java -da -dsa -jar $$SCRIPTDIR/smtinterpol.jar -w -o continue-on-error=false -o proof-check-mode -o model-check-mode "$$@" 2>error.log
</echo>
<copy file="${jar.outdir}/${jar.basename}.jar" tofile="${tmpdir}/smtinterpol.jar"/>
<tar destfile="${jar.outdir}/smtinterpol-${version}.tar.gz" compression="gzip">
<tarfileset dir="${tmpdir}">
<include name="smtinterpol.jar"/>
</tarfileset>
<tarfileset dir="${tmpdir}" defaultexcludes="yes" filemode="755">
<include name="smtinterpol"/>
<include name="smtinterpol-bv"/>
</tarfileset>
</tar>
<delete failonerror="false" includeemptydirs="true" dir="${tmpdir}"/>
<echo>created ${jar.outdir}/smtinterpol-${version}.tar.gz</echo>
</target>
<!-- Delete compiled class files -->
<target name="clean" description="Cleans a previous build">
<echo message="Deleting release trees"/>
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${dir.workspace}/SMTInterpol/release"/>
<fileset dir="${dir.workspace}/Library-SMTLIB/release"/>
<fileset dir="${dir.workspace}/DeltaDebugger/release"/>
<fileset dir="${dir.workspace}/Library-SMTLIBTest/release"/>
<fileset dir="${dir.workspace}/SMTInterpolTest/release"/>
<filelist dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib" files="Parser.java,Lexer.java,LexerSymbols.java"/>
<filelist dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/smtlib2" files="Parser.java,Lexer.java,LexerSymbols.java"/>
<filelist dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/proof/checker" files="ProofParser.java,ProofLexer.java,ProofSymbols.java"/>
<filelist dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/dimacs" files="Parser.java,Lexer.java,LexerSymbols.java"/>
<filelist dir="${dir.workspace}/SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/" files="Version.java"/>
<fileset dir="${dir.workspace}/Webinterface/target"/>
</delete>
<exec executable="make" dir="SMTInterpol/web/html">
<arg line="clean"/>
</exec>
</target>
<!-- Delete the executable jar and the source zip -->
<target name="distclean" description="Cleans a previously build including dist files" depends="clean">
<delete dir="${jar.outdir}"/>
</target>
<!-- Clean before creating an executable jar -->
<target name="cleanbuild" description="Clean and rebuild jar" depends="clean,smtinterpol.jar"/>
<!-- Compile SMTInterpolTest -->
<target name="compile_tests" depends="compile">
<mkdir dir="${dir.workspace}/Library-SMTLIBTest/release"/>
<javac srcdir="${dir.workspace}/Library-SMTLIBTest/src" destdir="${dir.workspace}/Library-SMTLIBTest/release" optimize="${optimize}" includeAntRuntime="false" debug="${debug}">
<classpath>
<pathelement location="${dir.workspace}/libs/junit-4.12.jar"/>
<pathelement location="${dir.workspace}/libs/hamcrest-core-1.3.jar"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
</classpath>
</javac>
<mkdir dir="${dir.workspace}/SMTInterpolTest/release"/>
<javac srcdir="${dir.workspace}/SMTInterpolTest/src" destdir="${dir.workspace}/SMTInterpolTest/release" optimize="${optimize}" includeAntRuntime="false" debug="${debug}">
<classpath>
<pathelement location="${dir.workspace}/libs/junit-4.12.jar"/>
<pathelement location="${dir.workspace}/libs/hamcrest-core-1.3.jar"/>
<pathelement path="${dir.workspace}/SMTInterpol/release"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
</classpath>
</javac>
</target>
<!-- Run tests without coverage analysis -->
<target name="runtests" description="Run junit tests" depends="compile_tests">
<delete dir="${dir.workspace}/testreports" quiet="true"/>
<mkdir dir="${dir.workspace}/testreports"/>
<path id="classpath.test">
<fileset file="${dir.workspace}/libs/ant-junit.jar"/>
</path>
<pathconvert property="testoutput" refid="classpath.test"/>
<echo>Using additional libs: ${testoutput}</echo>
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath refid="classpath.test"/>
</taskdef>
<junit fork="true" forkmode="once" dir="${dir.workspace}/testreports" failureProperty="test.failed">
<assertions>
<enable/>
</assertions>
<classpath>
<pathelement location="${dir.workspace}/libs/junit-4.12.jar"/>
<pathelement location="${dir.workspace}/libs/hamcrest-core-1.3.jar"/>
<pathelement location="${dir.workspace}/libs/ant-junit4.jar"/>
<pathelement location="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
<pathelement path="${dir.workspace}/SMTInterpol/release"/>
<pathelement path="${dir.tests}/Library-SMTLIBTest/release"/>
<pathelement path="${dir.tests}/SMTInterpolTest/release"/>
</classpath>
<formatter type="xml"/>
<batchtest todir="${dir.workspace}/testreports" unless="testcase">
<fileset dir="${dir.tests}/Library-SMTLIBTest/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="${dir.tests}/SMTInterpolTest/src">
<include name="**/*.java"/>
<exclude name="**/EprTestHelpers.java"/>
<!-- This is just an utility class -->
<exclude name="**/TestCaseWithLogger.java"/>
<!-- This is just an utility class -->
<exclude name="**/CompilerTest.java"/>
<!-- This is more a main class -->
</fileset>
</batchtest>
</junit>
</target>
<!-- Run junit tests under code coverage -->
<target name="runtests-coverage" description="Run junit tests using a coverage analyzer" depends="jacoco-setup,compile_tests" if="jacoco.present">
<delete dir="${dir.workspace}/testreports" quiet="true"/>
<mkdir dir="${dir.workspace}/testreports"/>
<path id="classpath.test">
<fileset file="${dir.workspace}/libs/ant-junit.jar"/>
</path>
<pathconvert property="testoutput" refid="classpath.test"/>
<echo>Using additional libs: ${testoutput}</echo>
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath refid="classpath.test"/>
</taskdef>
<jacoco:coverage destfile="${dir.workspace}/testreports/jacoco.exec">
<junit fork="true" forkmode="once" dir="${dir.workspace}/testreports" failureProperty="test.failed">
<assertions>
<enable/>
</assertions>
<classpath>
<pathelement location="${dir.workspace}/libs/junit-4.12.jar"/>
<pathelement location="${dir.workspace}/libs/hamcrest-core-1.3.jar"/>
<pathelement location="${dir.workspace}/libs/ant-junit4.jar"/>
<pathelement location="${dir.workspace}/SMTInterpol/lib/${javacup.jar}"/>
<pathelement path="${dir.workspace}/Library-SMTLIB/release"/>
<pathelement path="${dir.workspace}/SMTInterpol/release"/>
<pathelement path="${dir.tests}/Library-SMTLIBTest/release"/>
<pathelement path="${dir.tests}/SMTInterpolTest/release"/>
</classpath>
<formatter type="xml"/>
<batchtest todir="${dir.workspace}/testreports" unless="testcase">
<fileset dir="${dir.tests}/Library-SMTLIBTest/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="${dir.tests}/SMTInterpolTest/src">
<include name="**/*.java"/>
<exclude name="**/EprTestHelpers.java"/>
<!-- This is just an utility class -->
<exclude name="**/TestCaseWithLogger.java"/>
<!-- This is just an utility class -->
<exclude name="**/CompilerTest.java"/>
<!-- This is more a main class -->
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<delete dir="${dir.workspace}/coverage" quiet="true"/>
<jacoco:report>
<executiondata>
<file file="${dir.workspace}/testreports/jacoco.exec"/>
</executiondata>
<structure name="SMTInterpol">
<group name="Library-SMTLIB">
<classfiles>
<fileset dir="${dir.workspace}/Library-SMTLIB/release"/>
</classfiles>
<sourcefiles>
<fileset dir="${dir.workspace}/Library-SMTLIB/src"/>
</sourcefiles>
</group>
<group name="SMTInterpol">
<classfiles>
<fileset dir="${dir.workspace}/SMTInterpol/release"/>
</classfiles>
<sourcefiles>
<fileset dir="${dir.workspace}/SMTInterpol/src"/>
</sourcefiles>
</group>
</structure>
<html destdir="${dir.workspace}/coverage"/>
<xml destfile="${dir.workspace}/testreports/jacoco.xml"/>
</jacoco:report>
<echo message="See coverage results in ${dir.workspace}/coverage/index.html"/>
</target>
<!-- Defined maven snapshots and staging repository id and url -->
<resolver:remoterepo id="ossrh" url="https://oss.sonatype.org/service/local/staging/deploy/maven2" type="default" releases="true" snapshots="false" updates="always" checksums="fail"/>
<target name="dist" depends="clean,create_src_jar, smtinterpol.jar, javadoc-jar" description="Generate the distribution">
</target>
<target name="stage" depends="dist" description="stage release version for deploying to Maven staging repository">
<copy file="pom_template.xml" overwrite="true" tofile="${jar.outdir}/${jar.basename}-pom.xml">
<filterchain>
<expandproperties/>
</filterchain>
</copy>
<echo>
Now sign all jar files and pom.xml in ${dist}:
for i in ${jar.outdir}/${jar.basename}*; do gpg --detach-sig -a --sign -u 5ef57534 $$i; done
Then run `ant deploy`.
</echo>
</target>
<target name="deploy" description="Deploy maven release (you need to stage and sign first)" depends="get-version">
<echo>
Uploading artifacts using ~/.m2/settings.xml. I hope you have the
permissions to do this.
</echo>
<resolver:pom file="${jar.outdir}/${jar.basename}-pom.xml" id="pom"/>
<resolver:artifacts id="output">
<artifact file="${jar.outdir}/${jar.basename}.jar" />
<artifact type="jar.asc" file="${jar.outdir}/${jar.basename}.jar.asc" />
<artifact classifier="sources" file="${jar.outdir}/${jar.basename}-sources.jar" />
<artifact classifier="sources" type="jar.asc" file="${jar.outdir}/${jar.basename}-sources.jar.asc" />
<artifact classifier="javadoc" file="${jar.outdir}/${jar.basename}-javadoc.jar" />
<artifact classifier="javadoc" type="jar.asc" file="${jar.outdir}/${jar.basename}-javadoc.jar.asc" />
<artifact type="pom.asc" file="${jar.outdir}/${jar.basename}-pom.xml.asc" />
</resolver:artifacts>
<resolver:deploy artifactsref="output">
<remoterepo refid="ossrh"/>
</resolver:deploy>
<echo>
Log into https://oss.sonatype.org as jhoenicke.
Click "Staging Repository", scroll down to de.uni-freiburg...
Select it, check contents.
Click Close above the list of reppositories.
Click Refresh (after a few seconds).
Click Release.
</echo>
</target>
<!-- Define the SonarQube target -->
<target name="sonar" depends="compile,get-version,runtests-coverage">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<!-- Update from https://mvnrepository.com/artifact/org.sonarsource.scanner.ant/sonarqube-ant-task -->
<classpath path="${dir.workspace}/sonar/lib/sonarqube-ant-task-2.7.0.1612.jar"/>
</taskdef>
<!-- Various properties for the sonar target -->
<property name="sonar.host.url" value="http://localhost:9000/sonar"/>
<property name="sonar.projectKey" value="de.uni_freiburg.informatik.ultimate.smtinterpol"/>
<property name="sonar.projectName" value="SMTInterpol"/>
<property name="sonar.projectVersion" value="${version}"/>
<property name="sonar.sources" value="${dir.workspace}/SMTInterpol/src,${dir.workspace}/Library-SMTLIB/src"/>
<property name="sonar.java.binaries" value="${dir.workspace}/SMTInterpol/release,${dir.workspace}/Library-SMTLIB/release"/>
<property name="sonar.java.libraries" value="${dir.workspace}/SMTInterpol/lib/*.jar"/>
<property name="sonar.java.test.libraries" value="${dir.workspace}/SMTInterpol/lib/*.jar"/>
<property name="sonar.java.coveragePlugin" value="jacoco"/>
<property name="sonar.coverage.jacoco.xmlReportPaths" value="${dir.workspace}/testreports/jacoco.xml"/>
<property name="sonar.exclusions" value="
**/dimacs/Lexer.java,
**/dimacs/LexerSymbols.java,
**/dimacs/Parser.java,
**/smtlib/Lexer.java,
**/smtlib/LexerSymbols.java,
**/smtlib/Parser.java,
**/smtlib2/Lexer.java,
**/smtlib2/LexerSymbols.java,
**/smtlib2/Parser.java
**/proof/checker/ProofParser.java
**/proof/checker/ProofLexer.java
**/proof/checker/ProofSymbols.java
"/>
<echo>Excluding the following auto-generated files from analysis: ${sonar.exclusions}</echo>
<!-- Execute the SonarQube analysis -->
<sonar:sonar/>
</target>
</project>