Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on jvm-verifier repository #1060

Merged
merged 4 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ setup_dist_bins() {
if $IS_WIN; then
is_exe "dist/bin" "saw" && is_exe "dist/bin" "saw-remote-api" && return
else
is_exe "dist/bin" "saw" && is_exe "dist/bin" "saw-remote-api" && is_exe "dist/bin" "jss" && return
extract_exe "jss" "dist/bin"
is_exe "dist/bin" "saw" && is_exe "dist/bin" "saw-remote-api" && return
fi
extract_exe "saw" "dist/bin"
extract_exe "saw-remote-api" "dist/bin"
export PATH=$PWD/dist/bin:$PATH
echo "$PWD/dist/bin" >> "$GITHUB_PATH"
strip dist/bin/saw* || echo "Strip failed: Ignoring harmless error"
strip dist/bin/jss* || echo "Strip failed: Ignoring harmless error"
}

install_z3() {
Expand Down Expand Up @@ -126,9 +124,7 @@ build() {
pkgs=(saw saw-remote-api)
if $IS_WIN; then
echo "flags: -builtin-abc" >> cabal.project.local
echo "constraints: jvm-verifier -builtin-abc, cryptol-saw-core -build-css" >> cabal.project.local
else
pkgs+=(jss)
echo "constraints: cryptol-saw-core -build-css" >> cabal.project.local
fi
echo "allow-newer: all" >> cabal.project.local
tee -a cabal.project > /dev/null < cabal.project.ci
Expand Down Expand Up @@ -195,7 +191,7 @@ bundle_files() {
cp doc/tutorial/sawScriptTutorial.pdf dist/doc/tutorial.pdf
cp doc/manual/manual.pdf dist/doc/manual.pdf
cp -r doc/tutorial/code dist/doc
cp deps/jvm-verifier/support/galois.jar dist/lib
cp intTests/jars/galois.jar dist/lib
cp -r deps/cryptol/lib/* dist/lib
cp -r examples/* dist/examples
}
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
[submodule "deps/jvm-parser"]
path = deps/jvm-parser
url = https://github.com/GaloisInc/jvm-parser.git
[submodule "deps/jvm-verifier"]
path = deps/jvm-verifier
url = https://github.com/GaloisInc/jvm-verifier.git
[submodule "deps/llvm-pretty"]
path = deps/llvm-pretty
url = https://github.com/elliottt/llvm-pretty.git
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ downloaded dependencies include:
* `deps/abcBridge/`: [Haskell bindings for ABC](https://github.com/GaloisInc/abcBridge)
* `deps/crucible/`: [Crucible symbolic execution engine](https://github.com/GaloisInc/crucible)
* `deps/cryptol/`: [Cryptol](https://github.com/GaloisInc/cryptol)
* `deps/jvm-verifier/`: [Java Symbolic Simulator (JSS)](https://github.com/GaloisInc/jvm-verifier)
* `deps/saw-core/`: [SAWCore intermediate language](https://github.com/GaloisInc/saw-core), used by CSS, JSS, and SAWScript

## For SAW developers
Expand Down
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ function install() {
cp $(find dist-newstyle -type f -name $1 | sort -g | tail -1) bin/
}

cabal build exe:cryptol exe:jss exe:saw exe:saw-remote-api
cabal build exe:cryptol exe:saw exe:saw-remote-api

rm -rf bin && mkdir bin
install cryptol
install jss
install saw
install saw-remote-api

Expand Down
1 change: 0 additions & 1 deletion cabal.GHC-8.10.2.config
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ constraints: any.Cabal ==3.2.0.0,
any.js-chart ==2.9.4.1,
any.json ==0.10,
json +generic -mapdict +parsec +pretty +split-base,
jvm-verifier +build-benchmarks -build-examples +build-jss -build-jvmgraph +build-library +builtin-abc,
any.kan-extensions ==5.2.1,
any.language-c ==0.8.3,
language-c -allwarnings +iecfpextension +separatesyb +usebytestrings,
Expand Down
1 change: 0 additions & 1 deletion cabal.GHC-8.6.5.config
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ constraints: any.Cabal ==2.4.0.1,
any.js-jquery ==3.3.1,
any.json ==0.10,
json +generic -mapdict +parsec +pretty +split-base,
jvm-verifier +build-benchmarks -build-examples +build-jss -build-jvmgraph +build-library,
any.kan-extensions ==5.2,
any.language-c ==0.8.3,
language-c -allwarnings +iecfpextension +separatesyb +usebytestrings,
Expand Down
1 change: 0 additions & 1 deletion cabal.GHC-8.8.3.config
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ constraints: any.Cabal ==3.0.1.0,
any.js-jquery ==3.3.1,
any.json ==0.10,
json +generic -mapdict +parsec +pretty +split-base,
jvm-verifier +build-benchmarks -build-examples +build-jss -build-jvmgraph +build-library,
any.kan-extensions ==5.2,
any.language-c ==0.8.3,
language-c -allwarnings +iecfpextension +separatesyb +usebytestrings,
Expand Down
1 change: 0 additions & 1 deletion cabal.GHC-8.8.4.config
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ constraints: any.Cabal ==3.0.1.0,
any.js-jquery ==3.3.1,
any.json ==0.10,
json +generic -mapdict +parsec +pretty +split-base,
jvm-verifier +build-benchmarks -build-examples +build-jss -build-jvmgraph +build-library,
any.kan-extensions ==5.2,
any.language-c ==0.8.3,
language-c -allwarnings +iecfpextension +separatesyb +usebytestrings,
Expand Down
1 change: 0 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ packages:
deps/saw-core/saw-core-sbv
deps/saw-core/saw-core-what4
deps/saw-core/saw-core-coq
deps/jvm-verifier
deps/what4/what4
deps/crucible/crucible
deps/crucible/crucible-jvm
Expand Down
2 changes: 1 addition & 1 deletion coverage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cabal build --enable-coverage exe:jss exe:saw
cabal build --enable-coverage exe:saw

# This conflicts with GitRev.mix in `saw-script`. Yuck.
rm -f ./dist-newstyle/build/*/ghc-*/cryptol-*/**/GitRev.mix
Expand Down
1 change: 0 additions & 1 deletion deps/jvm-verifier
Submodule jvm-verifier deleted from 3905dd
2 changes: 1 addition & 1 deletion intTests/README
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ works.

Tests generally consist of a SAW script that is expected to succeed
together with the artifacts that are needed. The "runtests.sh" script
defines environment variables "JAVA", "SAW", and "JSS", pointing to the
defines environment variables "JAVA" and "SAW", pointing to the
corresponding executables, and with appropriate Java classpaths
included. It's a good idea to include a README in each test directory.

Expand Down
8 changes: 8 additions & 0 deletions intTests/jars/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ DIMACS format SAT solver from http://www.sat4j.org. Released under
open source license LICENSE.sat4j, copied from
http://www.eclipse.org/legal/epl-v10.html. See usage in ../sat.sh for
usage info.


bcprov-jdk16-145.jar
--------------------

Crypto library from https://www.bouncycastle.org. Released under open
source license LICENSE.bcprov, copied from
https://www.bouncycastle.org/licence.html.
Binary file added intTests/jars/bcprov-jdk16-145.jar
Binary file not shown.
Binary file added intTests/jars/galois.jar
Binary file not shown.
7 changes: 2 additions & 5 deletions intTests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ if [ -z "$TESTBASE" ]; then
export TESTBASE
fi

JSS_BASE=$TESTBASE/../deps/jvm-verifier

if [ "${OS}" == "Windows_NT" ]; then
export CPSEP=";"
export DIRSEP="\\"
Expand All @@ -41,10 +39,10 @@ fi
#
# Locate rt.jar. This is already a Windows path on windows, so no need
# to 'cygpath' it.
JDK=$("$JSS_BASE"/find-java-rt-jar.sh)
JDK=$(support/find-java-rt-jar.sh)
CP="$JDK"
# Add our bundled .jars to the class path.
for i in "$TESTBASE"/jars/*.jar "$JSS_BASE"/jars/*.jar; do
for i in "$TESTBASE"/jars/*.jar; do
if [ "$OS" == "Windows_NT" ]; then
i=$(cygpath -w "$i")
fi
Expand All @@ -55,7 +53,6 @@ export CP
# We need the 'eval's here to interpret the single quotes protecting
# the spaces and semi-colons in the Windows class path.
export SAW="eval cabal run ${CABAL_FLAGS} saw -- -j '$CP'"
export JSS="eval cabal run ${CABAL_FLAGS} jss -- -j '$CP' -c ."

# Figure out what tests to run
if [[ -z "$*" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion intTests/support/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CP=.:../../deps/jvm-verifier/support/galois.jar
CP=.:../jars/galois.jar

%.ll: %.c
clang -S -emit-llvm $< -o $(shell basename $< .c).ll
Expand Down
17 changes: 17 additions & 0 deletions intTests/support/find-java-rt-jar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash

# Find the Java core classes JAR, 'rt.jar' (called 'classes.jar' on OS
RyanGlScott marked this conversation as resolved.
Show resolved Hide resolved
# X for JDKs prior to 1.7).

if [ -z "$RT_JAR" ]; then
JDK=$(java -verbose 2>&1 | sed -n -e '1 s/\[Opened \(.*\)\]/\1/p')
else
JDK="$RT_JAR"
fi
if [ -z "$JDK" ]; then
echo "Failed to locate Java core classes (rt.jar / classes.jar)!" >&2
echo "The trick used by this script is only known to work with" >&2
echo "Sun-based JDKs." >&2
exit 1
fi
echo -n $JDK
2 changes: 1 addition & 1 deletion intTests/test0001/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
JavaMD5.class: JavaMD5.java
javac -g -cp ../../deps/jvm-verifier/jars/bcprov-jdk16-145.jar:../../deps/jvm-verifier/jars/galois.jar JavaMD5.java
javac -g -cp ../jars/bcprov-jdk16-145.jar:../jars/galois.jar JavaMD5.java
3 changes: 0 additions & 3 deletions intTests/test0008_jss_cnf/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion intTests/test0008_jss_cnf/README

This file was deleted.

Binary file removed intTests/test0008_jss_cnf/Test.class
Binary file not shown.
12 changes: 0 additions & 12 deletions intTests/test0008_jss_cnf/Test.java

This file was deleted.

19 changes: 0 additions & 19 deletions intTests/test0008_jss_cnf/test.sh

This file was deleted.

3 changes: 0 additions & 3 deletions intTests/test0010_jss_cnf_exp/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions intTests/test0010_jss_cnf_exp/README

This file was deleted.

Binary file removed intTests/test0010_jss_cnf_exp/Test.class
Binary file not shown.
47 changes: 0 additions & 47 deletions intTests/test0010_jss_cnf_exp/Test.java

This file was deleted.

11 changes: 0 additions & 11 deletions intTests/test0010_jss_cnf_exp/test.sh

This file was deleted.

3 changes: 0 additions & 3 deletions intTests/test0012_jss_aig/Makefile

This file was deleted.

20 changes: 0 additions & 20 deletions intTests/test0012_jss_aig/README

This file was deleted.

Binary file removed intTests/test0012_jss_aig/Test.class
Binary file not shown.
14 changes: 0 additions & 14 deletions intTests/test0012_jss_aig/Test.java

This file was deleted.

Loading