Skip to content

Commit a11f8df

Browse files
KJ-22 Symbolic execution - tools support. Full support implemented for kjrun and kjtest. Added kjtest output files for symbolic execution examples. ready to be integrated into jenkins. Untested.
1 parent a853143 commit a11f8df

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11

tools/aux-kjtest.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# If only four arguments are provided, test directory is assumed to be ../programs
88

99
if (( "$#" < 10 )); then
10-
echo "Usage: `basename $0` -mode <run/search> -threads <num_threads> -timeout <timeout in s> /
10+
echo "Usage: `basename $0` -mode <run|search|symbolic|jdk> -threads <num_threads> -timeout <timeout in s> /
1111
-encodeXML <true/false> -clean <true/false> [target files/dirs]"
1212
exit
1313
fi
@@ -38,12 +38,19 @@ GEN_CMD="$(cross-sh.sh ${TOOLS_DIR}/jdk-run.sh) --keep-temp"
3838
case "$MODE" in
3939
"run")
4040
RUN_CMD="$(cross-sh.sh ${TOOLS_DIR}/kjrun.sh) --cached"
41+
EXPECTED_OUT_EXT=out
4142
;;
4243
"search")
4344
RUN_CMD="$(cross-sh.sh ${TOOLS_DIR}/kjrun.sh) --search-cached"
45+
EXPECTED_OUT_EXT=out
46+
;;
47+
"symbolic")
48+
RUN_CMD="$(cross-sh.sh ${TOOLS_DIR}/kjrun.sh) --symbolic-cached"
49+
EXPECTED_OUT_EXT=search.out
4450
;;
4551
"jdk")
4652
RUN_CMD=$(cross-sh.sh ${TOOLS_DIR}/aux-echo.sh)
53+
EXPECTED_OUT_EXT=out
4754
;;
4855
*)
4956
echo "Invalid MODE: ${MODE}"
@@ -63,6 +70,7 @@ java -jar ${TEST_RUNNER_JAR} \
6370
-gen \"${GEN_CMD}\" \
6471
-run \"${RUN_CMD}\" \
6572
-taskExt java \
73+
-expectedOutExt \"${EXPECTED_OUT_EXT}\" \
6674
-testsuiteName java-semantics \
6775
-classnameStyle simple \
6876
-threads ${THREADS} \

tools/kjrun.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (( "$#" < 1 )) || (( "$#" > 2 )); then
66
echo "Your command:"
77
echo `basename $0` $@
88
echo "Usage: `basename $0` <javaFile>"
9-
echo "Or: `basename $0` <--pretty|--raw|--none|--search|--cached|--search-cached|--debug|--symbolic> <javaFile>"
9+
echo "Or: `basename $0` <--pretty|--raw|--none|--search|--cached|--search-cached|--debug|--symbolic|--symbolic-cached> <javaFile>"
1010
echo "For more options use aux-kjrun.sh"
1111
exit 1
1212
fi
@@ -64,10 +64,13 @@ case "$OPTION" in
6464
aux-kjrun.sh --time true --timeout ${SYMBOLIC_TIMEOUT} --mode symbolic \
6565
--output pretty --kast-cache false ${JAVA_FILE}
6666
;;
67+
"--symbolic-cached")
68+
aux-kjrun.sh --time false --timeout 0 --mode symbolic-count --output raw --kast-cache true ${JAVA_FILE}
69+
;;
6770
*)
6871
echo "Invalid option: $OPTION"
6972
echo "Usage: `basename $0` <javaFile>"
70-
echo "Or: `basename $0` <--pretty|--raw|--none|--search|--cached|--search-cached|--debug|--symbolic> <javaFile>"
73+
echo "Or: `basename $0` <--pretty|--raw|--none|--search|--cached|--search-cached|--debug|--symbolic|--symbolic-cached> <javaFile>"
7174
echo "For more options use aux-kjrun.sh"
7275
exit 1
7376
;;

tools/kjtest.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ fi
2121

2222
case "$OPTION" in
2323
"--run")
24-
aux-kjtest.sh -mode run -threads 12 -timeout 120 -encodeXML false -clean false ${@}
24+
aux-kjtest.sh -mode run -threads 12 -timeout 120 -encodeXML false -clean false ${@}
2525
;;
2626
"--search")
27-
aux-kjtest.sh -mode search -threads 6 -timeout 600 -encodeXML false -clean false ${@}
27+
aux-kjtest.sh -mode search -threads 6 -timeout 600 -encodeXML false -clean false ${@}
28+
;;
29+
"--symbolic")
30+
aux-kjtest.sh -mode symbolic -threads 6 -timeout 600 -encodeXML false -clean false ${@}
2831
;;
2932
"--jdk")
30-
aux-kjtest.sh -mode jdk -threads 12 -timeout 10 -encodeXML false -clean true ${@}
33+
aux-kjtest.sh -mode jdk -threads 12 -timeout 10 -encodeXML false -clean true ${@}
3134
;;
3235
"--t1")
3336
aux-kjtest.sh -mode run -threads 1 -timeout 120 -encodeXML false -clean false ${@}

0 commit comments

Comments
 (0)