Skip to content

Commit

Permalink
Fix after switch to cmdliner
Browse files Browse the repository at this point in the history
- "--toolbox A B" becomes "--toolbox A,B"
- "--isaprove" is deprecated and no longer supported
  • Loading branch information
Stephane Glondu committed Nov 21, 2024
1 parent 489c31c commit b0d1606
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 20 deletions.
5 changes: 3 additions & 2 deletions lsp/lib/prover/prover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ let start_async_with_exec st doc_uri doc_text range paths events_adder
(* First arg s ignored, if executable is specified. *)
executable;
"--toolbox";
string_of_int (Range.line_from range);
string_of_int (Range.line_till range);
Printf.sprintf "%d,%d"
(Range.line_from range)
(Range.line_till range);
"--toolbox-vsn";
"2";
(* "--verbose"; *)
Expand Down
4 changes: 2 additions & 2 deletions lsp/test/tlapm_mock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Empty() {
cat << EOF
\* TLAPM version 1.5.0
\* launched at 2023-09-30 23:39:35 with command line:
\* tlapm --toolbox 0 0 Empty.tla
\* tlapm --toolbox 0,0 Empty.tla
@!!BEGIN
@!!type:obligationsnumber
Expand All @@ -64,7 +64,7 @@ function Some() {
cat << EOF
\* TLAPM version 1.5.0
\* launched at 2023-09-30 23:43:15 with command line:
\* tlapm --toolbox 0 0 Some.tla
\* tlapm --toolbox 0,0 Some.tla
(* loading fingerprints in ".tlacache/Some.tlaps/fingerprints" *)
@!!BEGIN
Expand Down
2 changes: 1 addition & 1 deletion src/tlapm.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Test the --stdin option
$ cat <<EOF | (tlapm --toolbox 0 0 --stdin A.tla 2>&1 | grep -e '^@!!' | grep -v 'time-used')
$ cat <<EOF | (tlapm --toolbox 0,0 --stdin A.tla 2>&1 | grep -e '^@!!' | grep -v 'time-used')
> ---- MODULE A ----
> THEOREM
> ASSUME
Expand Down
2 changes: 1 addition & 1 deletion test/README
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ line of ==== are the commands for the test harness:
with the "results" clause. The standard outputs and standard error
outputs of the commands are all concatenated in execution order.
If this clause is omitted, the default command is executed:
${TLAPM} --toolbox 0 0 --nofp ${FILE} --stretch ${STRETCH}
${TLAPM} --toolbox 0,0 --nofp ${FILE} --stretch ${STRETCH}

- stretch: <n>
Changes the STRETCH parameter to <n>. This should only be used for
Expand Down
2 changes: 1 addition & 1 deletion test/TOOLS/do_junit_tests
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ outf=/var/tmp/ju$$.txt
FILE="`basename $f`"
DIR="`dirname $f`"

cmd="cd $DIR; ${TLAPM} --toolbox 0 0 --nofp $FILE"
cmd="cd $DIR; ${TLAPM} --toolbox 0,0 --nofp $FILE"
echo "" | tee -a $outf
echo "+++ Running case: $FILE " | tee -a $outf
echo "+++ working dir: "`pwd` | tee -a $outf
Expand Down
2 changes: 1 addition & 1 deletion test/TOOLS/do_one_test
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ phase == 1 && FILENAME ~ /.*\/separator$/ {
result = system (check_command);
if (result != 0){ fail("explicit check failed"); }
}else if (!command_done){
run_command("${TLAPM} --toolbox 0 0 --nofp ${FILE} --stretch ${STRETCH} --debug=tempfiles ");
run_command("${TLAPM} --toolbox 0,0 --nofp ${FILE} --stretch ${STRETCH} --debug=tempfiles ");
}
if (result_code != expected_result){
fail("wrong result code");
Expand Down
2 changes: 1 addition & 1 deletion test/TOOLS/do_soundness_tests
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ outf=/var/tmp/ju$$.txt
FILE="`basename $f`"
DIR="`dirname $f`"

cmd="cd $DIR; ${TLAPM} --toolbox 0 0 --nofp $FILE"
cmd="cd $DIR; ${TLAPM} --toolbox 0,0 --nofp $FILE"
echo "" | tee -a $outf
echo "+++ Running case: $FILE " | tee -a $outf
echo "+++ working dir: "`pwd` | tee -a $outf
Expand Down
2 changes: 1 addition & 1 deletion test/fast/basic/nonexistent_test.tla
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ to the filename (filepath).
THEOREM FALSE
OBVIOUS
=================================
command: ${TLAPM} --toolbox 0 0 nonexistent_test
command: ${TLAPM} --toolbox 0,0 nonexistent_test
stderr: obligation failed.

Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ THEOREM TRUE
<1> QED

==================================================
command: ${TLAPM} --nofp --toolbox 0 0 ${FILE}
command: ${TLAPM} --nofp --toolbox 0,0 ${FILE}
nostderr: ending abnormally
4 changes: 2 additions & 2 deletions test/fast/fingerprint/FingerprintVariablesParameters_test.tla
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ THEOREM \E y: y # y
OBVIOUS

====================================
command: ${TLAPM} --toolbox 0 0 ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
stderr: 1/2 obligations failed
command: ${TLAPM} --toolbox 0 0 ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
stderr: 1/2 obligations failed
2 changes: 1 addition & 1 deletion test/fast/fingerprint/load_v8_test.tla.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THEOREM cantor ==
===============================================
command: rm -rf load_v8_test.tlaps
command: cp -r load_v8_test.tlaps.testbase load_v8_test.tlaps
command: ${TLAPM} --toolbox 0 0 --isaprove ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
stdout: fingerprints written
stderr: Translating fingerprints from version 8
stderr: already:true
2 changes: 1 addition & 1 deletion test/fast/fingerprint/load_v8old_test.tla.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ OBVIOUS
command: rm -rf .tlacache
command: mkdir .tlacache
command: cp -r load_v8old_test.tlaps.testbase .tlacache/load_v8old_test.tlaps
command: ${TLAPM} --toolbox 0 0 --isaprove ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
stdout: fingerprints written
stderr: Translating fingerprints from version 8
stderr: already:true
Expand Down
2 changes: 1 addition & 1 deletion test/fast/fingerprint/load_v9_test.tla.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THEOREM cantor ==
===============================================
command: rm -rf load_v9_test.tlaps
command: cp -r load_v9_test.tlaps.testbase load_v9_test.tlaps
command: ${TLAPM} --toolbox 0 0 --isaprove ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
stdout: fingerprints written
stderr: Translating fingerprints from version 9
stderr: already:true
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ OBVIOUS


============================================================
command: ${TLAPM} --toolbox 0 0 ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
nostderr: Assertion failed
4 changes: 2 additions & 2 deletions test/fast/regression/z3_fingerprint_test.tla
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ EXTENDS TLAPS, Naturals
THEOREM foo == 2 + 2 = 4 BY Z3

====
command: ${TLAPM} --toolbox 0 0 --isaprove ${FILE} 2>/dev/null
command: ${TLAPM} --toolbox 0 0 --noproving ${FILE}
command: ${TLAPM} --toolbox 0,0 ${FILE}
command: ${TLAPM} --toolbox 0,0 --noproving ${FILE}
stderr: already:true
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ OBVIOUS
THEOREM S # {} OBVIOUS

====
command: ${TLAPM} --toolbox 0 0 --threads 1 --cleanfp ${FILE}
command: ${TLAPM} --toolbox 0,0 --threads 1 --cleanfp ${FILE}
stderr: status:failed

0 comments on commit b0d1606

Please sign in to comment.