Skip to content

Commit 460ccc1

Browse files
author
Nikolas Rank
committed
Squash commits
1 parent 715f139 commit 460ccc1

99 files changed

Lines changed: 8239 additions & 0 deletions

File tree

Some content is hidden

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

.github/workflows/main.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
env:
17+
Z3_VER: 4.15.5
18+
Z3_ARCH: x64
19+
Z3_GLIBC: 2.39
20+
Z3_JAR_DEST: bundles/dev.arcovia.mitigation.smt/lib/com.microsoft.z3.jar
21+
Z3_NATIVE_DIR: /opt/z3/bin
1622
steps:
1723
- name: Checkout
1824
uses: actions/checkout@v4
@@ -29,6 +35,47 @@ jobs:
2935
run: |
3036
python3 -m pip install --upgrade pip
3137
pip install -r tests/dev.arcovia.mitigation.ranking.tests/scripts/uncertaintyRanking/requirements.txt
38+
- name: Download Z3 and copy jar and natives
39+
shell: bash
40+
run: |
41+
# Fail if any step fails
42+
set -euo pipefail
43+
44+
Z3_URL="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VER}/z3-${Z3_VER}-${Z3_ARCH}-glibc-${Z3_GLIBC}.zip"
45+
46+
echo "Downloading $Z3_URL"
47+
mkdir -p .z3
48+
curl -L -o .z3/z3.zip "$Z3_URL"
49+
unzip -q .z3/z3.zip -d .z3
50+
51+
# Locate extracted bin directory
52+
BIN_DIR="$(find .z3 -type d -name bin -print -quit)"
53+
if [ -z "$BIN_DIR" ]; then
54+
echo "ERROR: Could not find bin directory"
55+
exit 1
56+
fi
57+
58+
# Copy Java jar
59+
if [ ! -f "$BIN_DIR/com.microsoft.z3.jar" ]; then
60+
echo "ERROR: com.microsoft.z3.jar not found"
61+
exit 1
62+
fi
63+
64+
mkdir -p "$(dirname "$Z3_JAR_DEST")"
65+
cp -f "$BIN_DIR/com.microsoft.z3.jar" "$Z3_JAR_DEST"
66+
67+
# Copy Linux native libraries
68+
sudo mkdir -p "$Z3_NATIVE_DIR"
69+
70+
if ls "$BIN_DIR"/*.so* >/dev/null 2>&1; then
71+
cp "$BIN_DIR"/*.so* "$Z3_NATIVE_DIR/"
72+
else
73+
echo "ERROR: No native .so libraries found"
74+
exit 1
75+
fi
76+
77+
echo "LD_LIBRARY_PATH=$Z3_NATIVE_DIR" >> "$GITHUB_ENV"
78+
3279
- name: Build and Verify
3380
run: mvn clean verify
3481

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ xtend-gen/
7474
tests/dev.arcovia.mitigation.sat.tests/testresults/*.json
7575
tests/dev.arcovia.mitigation.sat.tests/efficencyTest/*.json
7676
!*literalMapping.json
77+
78+
tests/dev.arcovia.mitigation.smt.tests/testresults/
79+
bundles/dev.arcovia.mitigation.smt/lib/*.jar
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry exported="true" kind="lib" path="lib/com.microsoft.z3.jar"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>dev.arcovia.mitigation.smt</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
</projectDescription>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
3+
org.eclipse.jdt.core.compiler.compliance=17
4+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
5+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
8+
org.eclipse.jdt.core.compiler.release=enabled
9+
org.eclipse.jdt.core.compiler.source=17
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Smt
4+
Bundle-SymbolicName: dev.arcovia.mitigation.smt
5+
Bundle-Version: 1.0.0.qualifier
6+
Export-Package: com.microsoft.z3,
7+
dev.arcovia.mitigation.smt,
8+
dev.arcovia.mitigation.smt.config,
9+
dev.arcovia.mitigation.smt.constraints,
10+
dev.arcovia.mitigation.smt.cost,
11+
dev.arcovia.mitigation.smt.operations,
12+
dev.arcovia.mitigation.smt.preprocess,
13+
dev.arcovia.mitigation.smt.util
14+
Automatic-Module-Name: dev.arcovia.mitigation.smt
15+
Bundle-RequiredExecutionEnvironment: JavaSE-17
16+
Bundle-ClassPath: ., lib/com.microsoft.z3.jar
17+
Require-Bundle:
18+
dev.arcovia.mitigation.sat,
19+
org.dataflowanalysis.dfd.datadictionary,
20+
org.dataflowanalysis.dfd.dataflowdiagram,
21+
org.dataflowanalysis.converter,
22+
org.apache.log4j,
23+
org.dataflowanalysis.analysis.dfd,
24+
org.dataflowanalysis.analysis,
25+
org.dataflowanalysis.examplemodels,
26+
org.eclipse.emf.ecore.xmi,
27+
com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.13.2";visibility:=reexport,
28+
com.fasterxml.jackson.core.jackson-core;bundle-version="2.13.2";visibility:=reexport,
29+
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.13.2";visibility:=reexport,
30+
tools.mdsd.library.standalone.initialization,
31+
org.dataflowanalysis.analysis,
32+
org.dataflowanalysis.analysis.dfd

0 commit comments

Comments
 (0)