The code blocks in this file use mdx to run integration tests of the Apalache CLI interface.
To run these tests, execute the ../mdx-test.py script with no arguments.
Any sh
code block will be run as a test.
The test executes the command following a $
. The command is expected to
produce the output on the subsequent lines of the code block.
Some tips:
- Use
...
to omit irrelevant lines in output. This is useful for nondeterministic output or to hide noise. - Specify a non-zero return code
n
by adding[n]
on a line by itself after the output. - Pipe into filters to get arbitrary control of the expected output.
The usual flow is:
- Write a failing test that executes the command to be run.
- Run the test (see below).
- Check that the corrected output is what you expect, then run
make promote
, to copy the output back into this file. - Replace any non-essential lines with
...
.
See the documentation on mdx
for more features and flexibility.
(From the project root.)
test/mdx-test.py
Each section, demarcated by headings, can be run selectively by supplying an argument that matches the heading.
E.g., to run just the test for the version
command, run
test/mdx-test.py "executable prints version"
NOTE: This only runs code blocks directly in the named section, and will not include execution of blocks in nested subsections.
The matching is based on (perl) pattern matching. E.g., you can run all the
tests in sections that include the string "executable"
in their headings with
test/mdx-test.py executable
$ pwd | grep -o test/tla
test/tla
$ apalache-mc version
...
$ apalache-mc help
...
We can set some JVM args and still have the default max heap size supplied.
$ JVM_ARGS="-Xms1m -XX:+UseSerialGC" apalache-mc version --debug
...
# JVM args: -Xms1m -XX:+UseSerialGC -Xmx4096m
...
If we set the max heap size (with -Xmx
) it will override the default max heap size:
$ JVM_ARGS="-Xmx16m" apalache-mc version --debug
...
# JVM args: -Xmx16m
...
Enable statistics collection.
Test that it is possible to turn on the statistics. Before and after calling this command, we turn the stats off, so tla2tools do not call home.
$ mkdir -p $HOME/.tlaplus && echo NO_STATISTICS >$HOME/.tlaplus/esc.txt
$ apalache-mc config --enable-stats=true | sed 's/[IEW]@.*//'
...
Statistics collection is ON.
...
EXITCODE: OK
$ apalache-mc parse Empty.tla | grep '# Usage statistics'
...
# Usage statistics is ON. Thank you!
...
$ grep -q -v NO_STATISTICS $HOME/.tlaplus/esc.txt
$ echo NO_STATISTICS >$HOME/.tlaplus/esc.txt
Disable statistics collection. We fix the installation id, so we can distinguish it from normal users. After executing the command, we turn the statistics off again.
$ mkdir -p $HOME/.tlaplus
$ echo c1cd000000000000000000000000c1cd >$HOME/.tlaplus/esc.txt
$ apalache-mc config --enable-stats=false | sed 's/[IEW]@.*//'
...
Statistics collection is OFF.
...
EXITCODE: OK
$ apalache-mc parse Empty.tla | grep '# Usage statistics'
...
# Usage statistics is OFF. We care about your privacy.
...
$ head -n 1 $HOME/.tlaplus/esc.txt
NO_STATISTICS
Ensure that we exit gracefully when commands are called on nonexistent files.
NOTE: We truncate the output to avoid printing the file, making the test indifferent to the execution environment (including in docker).
$ for cmd in check parse typecheck transpile; do apalache-mc $cmd nonexistent-file.tla 2>&1 | grep -o -e "EXITCODE: ERROR (255)" -e "Cannot find source file for module"; done
Cannot find source file for module
EXITCODE: ERROR (255)
Cannot find source file for module
EXITCODE: ERROR (255)
Cannot find source file for module
EXITCODE: ERROR (255)
Cannot find source file for module
EXITCODE: ERROR (255)
Ensure we give a proper user error if invalid file format extension is given in input. See #2175 .
$ for cmd in check parse typecheck transpile; do apalache-mc $cmd f.badext 2>&1 | grep -o -e "EXITCODE: ERROR (255)" -e "Configuration error: Unsupported file format badext"; done
Configuration error: Unsupported file format badext
EXITCODE: ERROR (255)
Configuration error: Unsupported file format badext
EXITCODE: ERROR (255)
Configuration error: Unsupported file format badext
EXITCODE: ERROR (255)
Configuration error: Unsupported file format badext
EXITCODE: ERROR (255)
This command parses a TLA+ specification with the SANY parser.
Create an empty file
$ touch blank.tla
Try to parse a blank file
$ apalache-mc parse blank.tla | sed 's/E@.*//'
...
Parsing error: No root module defined in file
...
EXITCODE: ERROR (255)
Cleanup
$ rm blank.tla
$ apalache-mc parse Empty.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc parse --features=rows Empty.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc parse --features=no-rows Empty.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc parse --features=feature.unsupported Empty.tla 2>&1 | grep 'Failed to parse'
Failed to parse command parse: Incorrect value for option features, got 'feature.unsupported', expected a feature: rows, no-rows
$ apalache-mc parse LocalDefClash576.tla | sed 's/I@.*//'
...
EXITCODE: OK
...
$ apalache-mc parse LocalInstanceClash576.tla | sed 's/I@.*//'
...
EXITCODE: OK
...
$ apalache-mc parse Select575.tla | sed 's/I@.*//'
...
EXITCODE: OK
...
$ apalache-mc parse Rec12.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc parse Annotations.tla | sed 's/I@.*//'
...
EXITCODE: OK
...
$ apalache-mc parse Test1254.tla | sed 's/I@.*//'
...
EXITCODE: OK
...
We have decided to display a warning instead of exiting with an error, because TLA+ Toolbox generates comments that look like malformed annotations.
$ apalache-mc parse Test1275.tla | sed 's/W@.*//'
...
[Test1275:5:1-5:12]: Syntax error in annotation -- ';' expected but end of source found
...
EXITCODE: OK
...
Long lines caused an issue with Apalache's source position handling (see #2429).
$ apalache-mc parse Bug2429.tla | sed 's/W@.*//'
...
EXITCODE: OK
...
And also check that it actually parses into TLA (see #1079)
$ apalache-mc parse --output=output.tla Annotations.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ cat output.tla | head
-------------------------------- MODULE output --------------------------------
EXTENDS Integers, Sequences, FiniteSets, TLC, Apalache, Variants
CONSTANT
(*
@type: Int;
*)
N
$ rm output.tla
And also check that it actually parses into JSON (see #1079)
$ apalache-mc parse --output=output.json Annotations.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ cat output.json | head
{
"name": "ApalacheIR",
"version": "1.0",
"description": "https://apalache-mc.org/docs/adr/005adr-json.html",
"modules": [
{
"kind": "TlaModule",
"name": "output",
"declarations": [
{
$ rm output.json
Check that we give an informative error if a user tries to invoke parse
on a
itf.json
file.
$ touch foo.itf.json
$ apalache-mc parse foo.itf.json | sed -e 's/I@.*//' -e 's/E@.*//'
...
Parsing error: Parsing the ITF format is not supported
...
EXITCODE: ERROR (255)
$ rm foo.itf.json
A round-trip test for our JSON serialization and deserialization.
$ apalache-mc typecheck --output=megaspec1.json MegaSpec1.tla
...
EXITCODE: OK
$ apalache-mc check --length=0 --cinit=CInit megaspec1.json
...
EXITCODE: OK
$ rm megaspec1.json
Check that it actually parses into TLA (see #1284)
$ apalache-mc typecheck --output=output.tla Annotations.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ cat output.tla | head
-------------------------------- MODULE output --------------------------------
EXTENDS Integers, Sequences, FiniteSets, TLC, Apalache, Variants
CONSTANT
(*
@type: Int;
*)
N
$ rm output.tla
And also check that it actually parses into JSON (see #1284)
$ apalache-mc typecheck --output=output.json Annotations.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ cat output.json | head
{
"name": "ApalacheIR",
"version": "1.0",
"description": "https://apalache-mc.org/docs/adr/005adr-json.html",
"modules": [
{
"kind": "TlaModule",
"name": "output",
"declarations": [
{
$ rm output.json
Check that a file produced with --output
is valid input (see #1281)
$ apalache-mc typecheck --output=output.json Annotations.tla ; apalache-mc typecheck output.json | sed 's/I@.*//'
...
EXITCODE: OK
$ rm output.json
$ apalache-mc parse FormulaRefs.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
...
This simple test demonstrates how to test a spec by isolating the input with generators.
$ apalache-mc test TestGen.tla Prepare Test Assertion | sed 's/I@.*//'
...
The outcome is: Error
Found a violation of the postcondition. Check violation.tla.
...
EXITCODE: ERROR (12)
$ apalache-mc check y2k_instance.tla | sed 's/I@.*//'
...
The outcome is: NoError
Checker reports no error up to computation length 10
...
EXITCODE: OK
$ apalache-mc check --length=2 --inv=Inv factorization.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=1 Fix531.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --cinit=ConstInit --length=1 UnchangedExpr471.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=1 ExistTuple476.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=1 --inv=InvSub SafeMath.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=1 --inv=InvAdd SafeMath.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=10 Fix365_ExistsSubset.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=10 Fix365_ExistsSubset2.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=10 Fix365_ExistsSubset3.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=10 --init=Init --next=Next --inv=Inv Bug20201118.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=2 --init=Init --next=Next --inv=Inv Fix333.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --cinit=CInit Bug540.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check Bug593.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc check --length=1 --init=Init --next=Next --inv=Inv Bug20190118.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --cinit=AvoidBug --length=5 --inv=IsIndependent mis.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --cinit=IntroBug --length=5 --inv=IsIndependent mis.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=5 ast.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=2 pr.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv EWD840.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv Paxos.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=1 Bug20190118.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=5 --cinit=CInit Bug20190921.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --cinit=CInit --inv=Inv --length=1 RangeWithConst.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 SelectSeqTests.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 Folds.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 LocalFold.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 LocalFold2.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSetSeq.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSetSeqBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --length=1 FoldSetSet.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSetSetBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --length=1 FoldSetFun.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSetFunBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --length=1 FoldSeqSeq.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSeqSeqBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --length=1 FoldSeqSet.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSeqSetBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --length=1 FoldSeqFun.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 FoldSeqFunBad.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv FoldSetInInit.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=0 Repeat.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=0 RepeatBad.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc check --length=10 --inv=Inv Counter.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=20 --inv=Safety --cinit=ConstInit y2k_cinit.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=19 --inv=Safety y2k_instance.tla | sed 's/I@.*//'
...
The outcome is: NoError
Checker reports no error up to computation length 19
...
EXITCODE: OK
$ apalache-mc check --length=30 --inv=Safety y2k_instance.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=10 --inv=Inv Counter.tla | sed 's/I@.*//'
...
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=10 --inv=Inv NatCounter.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=10 --cinit=ConstInit --inv=Inv NeedForTypesWithTypes.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=4 --inv=Inv HandshakeWithTypes.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv HandshakeWithTypes.tla | sed 's/I@.*//'
...
The outcome is: Deadlock
...
EXITCODE: ERROR (12)
The option --no-deadlock
forces the model checker to pass, even if it cannot
extend an execution prefix. See a discussion in
#1640.
$ apalache-mc check --length=5 --no-deadlock=1 --inv=Inv HandshakeWithTypes.tla | sed 's/I@.*//'
...
The outcome is: ExecutionsTooShort
...
EXITCODE: OK
$ apalache-mc check --length=2 --inv=Inv Bug20200306.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=1 --inv=Inv Assignments20200309.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check --length=5 Inline.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc typecheck Rec1.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv Rec1.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec2.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv Rec2.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec3.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=10 --inv=Inv Rec3.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec4.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
Unfolding Fibonacci numbers
$ apalache-mc check --length=10 --inv=Inv Rec4.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec5.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv Rec5.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec6.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=Inv Rec6.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec8.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=10 --inv=Inv Rec8.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec9.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --length=3 --inv=Inv Rec9.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec10.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check Rec10.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec11.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check Rec11.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck Rec12.tla | sed 's/I@.*//'
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc check --inv=Inv Rec12.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc check --inv=Inv Rec13.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv ExistsAsValue.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --next=MayFail --tuning-options-file=reorderTest.properties reorderTest.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --next=MustFail reorderTest.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check Empty.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check --inv=Inv --length=1 NoVars.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --init=NonExistantInit HourClock.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check --next=NonExistantNext HourClock.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check --inv=NonExistantInv HourClock.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check NonNullaryLet.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check CaseNoOther.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check CaseNoOtherBool.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
Callback.tla
demonstrates that one can implement non-determinism with the existential operator and use a callback to
do an assignment to a variable. As it requires tricky operator inlining, here is the test.
$ apalache-mc check Callback.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check Selections.tla | sed 's/I@.*//'
...
Selections.tla:16:18-16:27: Missing assignments to: z
...
EXITCODE: ERROR (255)
$ apalache-mc check test1.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check ITE_CASE.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (255)
This test shows that Apalache may miss a deadlock, as discussed in issue 712. Once this is fixed, Apalache should find a deadlock.
$ apalache-mc check Deadlock712.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
Regression test for #1446
$ apalache-mc check --inv=Inv SimpleLambda.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for embedding recursion
$ apalache-mc check --inv=Inv NestedCallByName.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #914 In the earlier version, we expected the model checker to complain about mismatching record types. The new type checker with row typing is reporting a type error, and this is what we expect.
$ apalache-mc typecheck Bug914.tla | sed 's/[IE]@.*//'
...
[Bug914.tla:21:9-21:26]: Arguments to = should have the same type. For arguments m, ["foo" ↦ TRUE] with types { }, { foo: Bool }, in expression m = (["foo" ↦ TRUE])
[Bug914.tla:21:1-21:26]: Error when computing the type of Init
...
EXITCODE: ERROR (120)
Regression test for #987 We should always use sorted keys on record types.
$ apalache-mc check RecordExcept987.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #985 Skolemization should be sound.
$ apalache-mc check Bug985.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #1126
An occurence of Seq(S)
should point to an explanation.
$ apalache-mc check Bug1126.tla | sed 's/[IE]@.*//'
...
Bug1126.tla:15:14-15:27: unsupported expression: Seq(_) produces an infinite set of unbounded sequences. See: https://apalache-mc.org/docs/apalache/known-issues.html#using-seqs
...
EXITCODE: ERROR (75)
$ apalache-mc check --inv=FalseLiveness LongPrefix.tla
...
EXITCODE: ERROR (255)
[255]
$ apalache-mc check --temporal=FalseLiveness LongPrefix.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness LongPrefix.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=Liveness LongLoops.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness LongLoops.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness NoLoopsNoProblems.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness NoLoopsNoProblems.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=Liveness ManyBoxes.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness ManyBoxes.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness ManyDiamonds.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness ManyDiamonds.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness DiamondBox.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness DiamondBox.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness BoxDiamond.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness BoxDiamond.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness NestedTemporalInBool.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness NestedTemporalInBool.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Property NoTemporalOperatorsInTemporalProp.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=PropertyWithTemporal NoTemporalOperatorsInTemporalProp.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=ExplicitInvariant NoTemporalOperatorsInTemporalProp.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness TemporalPropsOverActions.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness TemporalPropsOverActions.tla
...
EXITCODE: ERROR (12)
[12]
$ apalache-mc check --temporal=Liveness LetIn.tla
...
EXITCODE: OK
$ apalache-mc check --temporal=FalseLiveness LetIn.tla
...
EXITCODE: ERROR (12)
[12]
Regression test for #1152 Sets should not become unconstrained when choosing an element in a set minus operation.
$ apalache-mc check --inv=Inv --length=6 --cinit=CInit SetSndRcv.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #1162 Sets should not become unconstrained when union is performed.
$ apalache-mc check --inv=Inv --length=6 --cinit=CInit SetAddDel.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc check --cinit=ConstInit --inv=NoDoubleDelivery PizzaOrder.tla | sed 's/I@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
Regression test for #1680 Function sets themselves should be able to be set elements.
$ apalache-mc check OracleFunSet.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #1811 Comparisons with functions with empty domains should be sound (as should everything else)
$ apalache-mc check Verifier_functionComparison.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (12)
A performance test.
$ apalache-mc check --discard-disabled=0 --tuning-options=search.invariant.mode=after PickPerf.tla | sed 's/I@.*//'
...
EXITCODE: OK
A performance test.
$ apalache-mc check --discard-disabled=0 --tuning-options=search.invariant.mode=after PickPerf2.tla | sed 's/I@.*//'
...
EXITCODE: OK
Regression test for #2158
$ apalache-mc check --inv=Inv --discard-disabled=false TrivialFail.tla | sed 's/I@.*//'
...
EXITCODE: ERROR (12)
Test that model checking properly handles first-order CONSTANTS
.
Regression test for #2388
$ apalache-mc check --length=0 --inv=Inv ConstantOperatorImpl.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
While we cannot rely on an actual timeout happening or not, we can make sure that the option is properly parsed.
$ apalache-mc simulate --timeout-smt=1 --length=10 --inv=Inv Paxos.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc simulate --out-dir=./test-out-dir --length=10 --max-run=5 --output-traces --inv=Safety y2k_instance.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ find ./test-out-dir/y2k_instance.tla/* -type f -exec basename {} \; | ./sort.sh
detailed.log
example1.itf.json
example1.json
example1.tla
example2.itf.json
example2.json
example2.tla
example3.itf.json
example3.json
example3.tla
example4.itf.json
example4.json
example4.tla
example5.itf.json
example5.json
example5.tla
example.itf.json
example.json
example.tla
log0.smt
MCexample1.out
MCexample2.out
MCexample3.out
MCexample4.out
MCexample5.out
MCexample.out
run.txt
$ rm -rf ./test-out-dir
Testing various flags that are set via command-line options and the TLC configuration file. The CLI has priority over the TLC config. So we have to test that it all works together.
$ apalache-mc check Config.tla | sed 's/I@.*//'
...
> Set the initialization predicate to Init
> Set the transition predicate to Next
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=Inv Config.tla | sed 's/I@.*//'
...
> Set an invariant to Inv
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --init=Init1 --next=Next1 --inv=Inv Config.tla | sed 's/I@.*//'
...
> Set the initialization predicate to Init1
> Set the transition predicate to Next1
> Set an invariant to Inv
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --config=Config1.cfg Config.tla | sed 's/[IEW]@.*//'
...
> Config1.cfg: Loading TLC configuration
...
> Set the initialization predicate to Init1
> Set the transition predicate to Next1
> Set an invariant to Inv1
> Set a temporal property to AwesomeLiveness
...
EXITCODE: OK
$ apalache-mc check --config=Config1.cfg --init=Init2 --next=Next2 Config.tla | sed 's/[IEW]@.*//'
...
> Config1.cfg: Loading TLC configuration
...
> Set the initialization predicate to Init2
> Set the transition predicate to Next2
> Set an invariant to Inv1
...
...
State 7: state invariant 0 violated.
Found 1 error(s)
The outcome is: Error
Checker has found an error
...
EXITCODE: ERROR (12)
$ apalache-mc check --config=Config3.cfg Config.tla | sed 's/[IE]@.*//'
...
> Config3.cfg: Loading TLC configuration
...
Configuration error (see the manual): Operator NoLiveness not found (used as a temporal property)
...
EXITCODE: ERROR (255)
$ apalache-mc check --config=Config2.cfg Config.tla | sed 's/[IEW]@.*//'
...
> Config2.cfg: Loading TLC configuration
...
> Config2.cfg: Using SPECIFICATION Spec2
...
> Set the initialization predicate to Init2
> Set the transition predicate to Next2
> Set an invariant to Inv2
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --config=Config4.cfg Config.tla | sed 's/[IEW]@.*//'
...
> Config4.cfg: Loading TLC configuration
...
> Config4.cfg: Using SPECIFICATION Spec4
...
> Set the initialization predicate to Init2
> Set the transition predicate to Next2
> Set an invariant to Inv2
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --config=Config5.cfg Config.tla | sed 's/[IEW]@.*//'
...
> Config5.cfg: Loading TLC configuration
...
> Config5.cfg: Using SPECIFICATION Spec5
...
> Set the initialization predicate to Init2
> Set the transition predicate to Next2
> Set an invariant to Inv2
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check ConfigUnsorted.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc check --config=ConfigParams.cfg ConfigParams.tla | sed 's/[IEW]@.*//'
...
> ConfigParams.cfg: Loading TLC configuration
> Using init predicate(s) Init from the TLC config
> Using next predicate(s) Next from the TLC config
> Using inv predicate(s) Inv from the TLC config
...
> ConfigParams.cfg: found INVARIANTS: Inv
> Set the initialization predicate to Init
> Set the transition predicate to Next
> Set the constant initialization predicate to CInit
> Set an invariant to Inv
...
The outcome is: NoError
...
EXITCODE: OK
The replacements make the invariant hold true.
$ apalache-mc check --config=ConfigReplacements2.cfg ConfigReplacements.tla | sed 's/[IEW]@.*//'
...
> ConfigReplacements2.cfg: Loading TLC configuration
> Using init predicate(s) Init from the TLC config
> Using next predicate(s) Next from the TLC config
> Using inv predicate(s) Inv from the TLC config
...
> ConfigReplacements2.cfg: found INVARIANTS: Inv
> Set the initialization predicate to Init
> Set the transition predicate to Next
> Set an invariant to Inv
> Replaced operator Value with OVERRIDE_Value
...
The outcome is: NoError
...
EXITCODE: OK
When a configuration file does not exist, the tool should error.
NOTE: We truncate the output to avoid printing the file name, making the test indifferent to the execution environment (including in docker). This is required since the error message includes an absolute file name, and this differs depending on which computer it is running on.
$ apalache-mc check --inv=Inv --config=ThisConfigDoesNotExist.cfg ConfigReplacements.tla 2>&1 | grep -o -e "Specified TLC config file not found" -e "EXITCODE: ERROR (255)"
Specified TLC config file not found
EXITCODE: ERROR (255)
When a configuration file is not specified, the invariant should fail.
$ apalache-mc check --inv=Inv ConfigReplacements.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --out-dir=./test-out-dir --length=0 --debug Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ find ./test-out-dir/Counter.tla/* -type f -exec basename {} \; | ./sort.sh
application-configs.cfg
detailed.log
log0.smt
run.txt
$ find ./test-out-dir/Counter.tla/* -type f -name log0.smt -exec cat {} \;
;; fp.spacer.random_seed = 0
;; nlsat.seed = 0
;; sat.random_seed = 0
;; sls.random_seed = 0
;; smt.random_seed = 0
;; (params random_seed 0)
...
$ rm -rf ./test-out-dir
$ apalache-mc check --out-dir=./test-out-dir --length=0 --debug --tuning-options=smt.randomSeed=4242 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ find ./test-out-dir/Counter.tla/* -type f -name log0.smt -exec cat {} \;
;; fp.spacer.random_seed = 4242
;; nlsat.seed = 4242
;; sat.random_seed = 4242
;; sls.random_seed = 4242
;; smt.random_seed = 4242
;; (params random_seed 4242)
...
$ rm -rf ./test-out-dir
$ apalache-mc check --inv=Inv Slicer1.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv Slicer2.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv Slicer3.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv Slicer4.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv Slicer5.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=IncreaseInv ActionInv.tla | sed 's/[IEW]@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=KeepInv ActionInv.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=StateInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=BuggyStateInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=ActionInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=BuggyActionInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=TraceInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc check --inv=BuggyTraceInv Invariants.tla | sed 's/[IEW]@.*//'
...
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --max-error=50 --view=View1 View.tla | sed 's/[IEW]@.*//'
...
Found 37 error(s)
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --max-error=50 --view=View1 View2.tla | sed 's/[IEW]@.*//'
...
Found 20 error(s)
The outcome is: Error
...
EXITCODE: ERROR (12)
$ apalache-mc check --inv=Inv --max-error=10 View2.tla | sed 's/[IEW]@.*//'
...
Option maxError = 10 requires a view. None specified.
...
EXITCODE: ERROR (255)
Unhandled IllegalArgumentException
when accessing a non-existent field on a
record. With the old records, this spec was failing during model checking.
With the new records, this spec is failing at type checking.
See #874
$ apalache-mc typecheck Bug874.tla | sed 's/[IEW]@.*//'
...
[Bug874.tla:4:17-4:27]: Cannot apply ["a" ↦ 2] to the argument "b" in (["a" ↦ 2])["b"].
...
EXITCODE: ERROR (120)
Test that the model checker supports let-polymorphism.
$ apalache-mc check letpoly.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that the model checker supports let-polymorphism.
$ apalache-mc check letpoly_inst.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that --cinit
propagates constraints.
$ apalache-mc check --cinit=ConstInit --inv=Inv Bug1023.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that ASSUME
propagates constraints.
$ apalache-mc check --cinit=ConstInit --inv=Inv Bug880.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that the model checker nicely complains about unresolved polymorphism.
$ apalache-mc check --inv=Inv Bug931.tla | sed 's/[IEW]@.*//'
...
Bug931.tla:6:20-6:21: unexpected expression: Expected a non-polymorphic type, found: Set(b)
...
EXITCODE: ERROR (255)
$ apalache-mc check --init=Inv --inv=Inv --length=1 Bug1682.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 Bug1735.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=1 Bug1794.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=1 Bug1880.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=1 Bug1903.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=1 --cinit=CInit Bug2268.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --config=Bug2750.cfg Bug2750.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
$ apalache-mc check --config=Test2750.cfg Test2750.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
It should not be possible to pass input, which would require function set expansion without triggering an exception.
$ apalache-mc check --inv=ErrInv --length=1 Bug2772.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (255)
However, if one uses a semantically equivalent (syntactically different) expression, where the function set is not forced to expand, it should pass.
$ apalache-mc check --inv=OkInv --length=1 Bug2772.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Check that the profiler output is produced as explained in Profiling.
$ apalache-mc check --run-dir=./profile-run-dir --smtprof schroedinger_cat.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ head -n 1 ./profile-run-dir/profile.csv
# weight,nCells,nConsts,nSmtExprs,location
$ rm -rf ./profile-run-dir
$ apalache-mc check --out-dir=./test-out-dir --length=10 --output-traces --inv=Safety y2k_instance.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ find ./test-out-dir/y2k_instance.tla/* -type f -exec basename {} \; | ./sort.sh
detailed.log
example0.itf.json
example0.json
example0.tla
example.itf.json
example.json
example.tla
log0.smt
MCexample0.out
MCexample.out
run.txt
$ rm -rf ./test-out-dir
Test that model values are handled correctly.
$ apalache-mc check --cinit=CInit --inv=Inv ModelVal.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that model values of different sorts are incomparable
$ apalache-mc check --cinit=CInit --inv=Inv ModelValFail.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (120)
Test that advanced use of model values is working.
$ apalache-mc check --inv=TCConsistent MC3_TwoPhaseUFO.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that variants are working as expected.
$ apalache-mc check --inv=TCConsistent --length=3 MC3_TwoPhaseTyped.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
These tests check that the operators defined in Option.tla
work as expected.
$ apalache-mc check --length=0 OptionTests.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=Inv --length=1 PolyFold.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check Test669.tla | sed 's/[IEW]@.*//'
...
This error may show up when CONSTANTS are not initialized.
Check the manual: https://apalache-mc.org/docs/apalache/parameters.html
Input error (see the manual): SubstRule: Variable N is not assigned a value
...
EXITCODE: ERROR (255)
$ apalache-mc check Bug1058.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=Inv Bug1136.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=NoFail --length=1 Test928.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=Fail --length=1 Test928.tla | sed 's/[IEW]@.*//'
...
Test928.tla:20:10-20:30: unexpected expression: Expected a non-polymorphic type, found: a
...
EXITCODE: ERROR (255)
$ apalache-mc check --inv=Inv Test1182.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --inv=Inv Test951.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check Test1259.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=1 --inv=Inv Test1226.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --debug --cinit=CInit MegaSpec1.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Regression test for #1305.
$ apalache-mc check --inv=Inv --view=View --max-error=10 Test1305.tla | sed 's/[IEW]@.*//'
...
Found 10 error(s)
...
EXITCODE: ERROR (12)
$ apalache-mc check --length=0 --inv=AllTests TestSequences.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestSequencesExt.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=Inv TestBags.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestBagsExt.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestInlining.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestFolds.tla | sed 's/[IEW]@.*//'
...
TestFolds.tla:21:5-21:50: unsupported expression: Not supported: MapThenFoldSet. Use FoldSet, FoldSeq, FoldFunction.
...
EXITCODE: ERROR (75)
Regression test for #1343
$ apalache-mc check --length=2 Test1343.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestSets.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=FailExpandLargePowerset TestSets.tla | sed 's/[IEW]@.*//'
...
<unknown>: known limitation: Attempted to expand a SUBSET of size 2^30, whereas the built-in limit is 2^20
...
EXITCODE: ERROR (255)
$ apalache-mc check --length=0 --inv=AllTests TestCommunityFunctions.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestFiniteSetsExt.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Disabled because fixing #2338 causes this to stack-overflow Revisit once pointers are implemented.
$ apalache-mc check --length=0 --inv=AllTests TestFunctions.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=0 --inv=AllTests TestBuiltinAsArg1626.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for using --cinit
and hashes.
$ apalache-mc check --inv=Inv --cinit=ConstInit TestHash2.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for assignments under quantification over empty sets.
$ apalache-mc check --length=1 Test1425.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for #1623 (Instantiation with .cfg + ASSUME)
$ apalache-mc check --length=3 --config=Test1623.cfg --inv=Inv Test1623.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A test for folds with excepts, the slow case.
$ apalache-mc check --inv=DriftInv --next=NextSlow antipatterns/fold-except/MC_FoldExcept3.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A test for folds with excepts, the fast case.
$ apalache-mc check --inv=DriftInv --next=NextFast antipatterns/fold-except/MC_FoldExcept3.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A test for folds with excepts, the fast case.
$ apalache-mc check --inv=TypeOK --length=1 RecMem1627.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A test UNCHANGED
in an invariant.
$ apalache-mc check --inv=Inv --length=1 UnchangedAsInv1663.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Check row-based records support row typing.
$ apalache-mc check TestRecordsNew.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Check the mutex algorithm with new records.
$ apalache-mc check --length=4 MC_LamportMutexTyped.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Variant operators work in the model checker.
$ apalache-mc check --inv=AllTests TestVariants.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check TestReqAckVariants.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for functions with infinite domain.
$ apalache-mc check --inv=Inv InfDomFun.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (12)
A regression test for function operations.
$ apalache-mc check --inv=Safety Consensus_epr.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for EXCEPT.
$ apalache-mc check --inv=Sanity FunExcept1.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for EXCEPT.
$ apalache-mc check --inv=Sanity FunExcept2.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for EXCEPT.
$ apalache-mc check --inv=Sanity FunExcept3.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
A regression test for function membership in the presence of infinite sets.
See #2810
$ apalache-mc check --init=TypeOkay_ --inv=TypeOkay --length=1 FunInInfiniteSubset.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc check --length=5 --inv=NoNegativeBalances MC_ERC20.tla | sed 's/I@.*//'
...
The outcome is: NoError
...
EXITCODE: OK
$ apalache-mc typecheck Empty.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck Empty.tla | sed 's/I@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck ExistTuple476.tla | sed 's/I@.*//'
...
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck CarTalkPuzzleTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck CigaretteSmokersTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck GameOfLifeTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck MissionariesAndCannibalsTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck PrisonersTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
We use FunAsSeq
to convert a function to a sequence.
This test should now pass.
$ apalache-mc typecheck QueensTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck SlidingPuzzlesTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck TwoPhaseTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck FunctionsTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck FiniteSetsExtTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck HourClockTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck Channel.tla | sed 's/[IEW]@.*//'
...
Typing input error: Expected a type annotation for VARIABLE chan
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck ChannelTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck PascalTriangle.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck ChangRobertsTyped.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck ChangRobertsTyped_Test.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck AnnotationsAndInstances592.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck AnnotationsAndSubstitutions596.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck Except617.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck Unchanged660.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck UntypedConst.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
Typing input error: Expected a type annotation for CONSTANT N
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck UntypedVar.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
Typing input error: Expected a type annotation for VARIABLE x
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck TestAnnotations.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
$ apalache-mc typecheck schroedinger_cat.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Unhandled exception thrown when type-checking a spec that uses the wrong annotation syntax for operators.
See #860
$ apalache-mc typecheck Bug860.tla | sed 's/[IEW]@.*//'
...
Parsing error in the type annotation: (Int, Int) -> Bool
Typing input error: Parser error in type annotation of Op: '=>' expected but -> found
...
EXITCODE: ERROR (255)
Unhandled exception thrown due to incorrect annotation of a tuple return type.
See #832
$ apalache-mc typecheck Bug832.tla | sed 's/[IEW]@.*//'
...
Parsing error in the type annotation: () => (Bool, Bool)
Typing input error: Parser error in type annotation of Example: '->' expected but ) found
...
EXITCODE: ERROR (255)
Type unification should not recurse infinitely.
See: #925
$ apalache-mc typecheck Bug925.tla | sed 's/[IEW]@.*//'
...
[Bug925.tla:7:1-7:24]: Error when computing the type of Optional
...
EXITCODE: ERROR (120)
Test the Snowcat support let-polymorphism.
$ apalache-mc typecheck letpoly.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Test the Snowcat support let-polymorphism.
$ apalache-mc typecheck letpoly_inst.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Regression test for principal types in let definitions.
$ apalache-mc typecheck Poly1084.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Regression test for principal types in let definitions.
$ apalache-mc typecheck Poly1085.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Regression test for principal types in let definitions.
$ apalache-mc typecheck Poly1085.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Regression test for principal types in let definitions.
$ apalache-mc typecheck Poly1107.tla | sed 's/[IEW]@.*//'
...
PASS #1: TypeCheckerSnowcat
> Running Snowcat .::.
> Your types are purrfect!
> All expressions are typed
...
Type checker [OK]
...
EXITCODE: OK
Typecheck a real spec by Leslie Lamport.
$ apalache-mc typecheck LamportMutexTyped.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Typecheck a model checking instance.
$ apalache-mc typecheck MC_LamportMutexTyped.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Typecheck the test for Folds.tla.
$ apalache-mc typecheck TestFolds.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Typecheck new records that support row typing.
$ apalache-mc typecheck TestRecordsNew.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
No ill-typed record access.
$ apalache-mc typecheck TestRecordsNewIll1.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (120)
No ill-typed record access.
$ apalache-mc typecheck TestRecordsNewIll2.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (120)
No ill-typed record access.
$ apalache-mc typecheck TestRecordsNewIll3.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (120)
No ill-typed record access.
$ apalache-mc typecheck TestRecordsNewIll4.tla | sed 's/[IEW]@.*//'
...
EXITCODE: ERROR (120)
Variant operators are type correct.
$ apalache-mc typecheck TestVariants.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck TestReqAckVariants.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck TestAliasOld.tla | sed 's/[IEW]@.*//'
...
Operator TestAlias_aliases: Deprecated syntax in type alias OLD_ALIAS. Use camelCase of Type System 1.2.
...
EXITCODE: OK
$ apalache-mc typecheck TestAliasNew.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck TestAliasNewMissing.tla | sed 's/[IEW]@.*//'
...
Typing input error: Missing @typeAlias: newAlias = <type>;
...
EXITCODE: ERROR (255)
$ apalache-mc typecheck TestUnsafeRecord.tla | sed 's/[IEW]@.*//'
...
[TestUnsafeRecord.tla:6:17-6:19]: Cannot apply R() to the argument "b" in R()["b"].
...
EXITCODE: ERROR (120)
$ apalache-mc typecheck TestGetX.tla | sed 's/[IEW]@.*//'
...
[TestGetX.tla:2:12-2:14]: Cannot apply r to the argument "x" in r["x"].
...
EXITCODE: ERROR (120)
$ apalache-mc typecheck TestGetXWithRows.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ apalache-mc typecheck PolyTooGeneral.tla | sed 's/[IEW]@.*//'
...
[PolyTooGeneral.tla:6:1-6:10]: Id's type annotation ((c) => b) is too general, inferred: ((a) => a)
...
EXITCODE: ERROR (120)
$ apalache-mc typecheck PrintTypes.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Regression test for #2163
$ apalache-mc typecheck CommentedTypeAnnotation.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that typechecker supports first-order CONSTANTS
.
Regression test for #2388
$ apalache-mc typecheck ConstantOperator.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Test that typechecker supports substituting a first-order CONSTANT
via
INSTANCE
.
Regression test for #2388
$ apalache-mc typecheck ConstantOperatorImpl.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
If we run with the --out-dir
flag
$ apalache-mc check --out-dir=./test-out-dir --write-intermediate=0 --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ find ./test-out-dir/Counter.tla/* -type f -exec basename {} \; | ./sort.sh
detailed.log
log0.smt
run.txt
Be sure to clean up
$ rm -rf ./test-out-dir
$ OUT_DIR=./test-out-dir apalache-mc check --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ test -d test-out-dir
$ rm -rf ./test-out-dir
$ OUT_DIR=./not-here apalache-mc check --out-dir=./test-out-dir --length=0 Counter.tla
...
EXITCODE: OK
$ test -d test-out-dir
$ !(test -d not-here)
$ rm -rf ./test-out-dir
$ apalache-mc check --out-dir=./test-out-dir --write-intermediate=true --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ find ./test-out-dir/Counter.tla/* -type f -exec basename {} \; | ./sort.sh
00_OutSanyParser.json
00_OutSanyParser.tla
01_OutTypeCheckerSnowcat.json
01_OutTypeCheckerSnowcat.tla
02_OutConfigurationPass.json
02_OutConfigurationPass.tla
03_OutDesugarerPass.json
03_OutDesugarerPass.tla
04_OutInlinePass.json
04_OutInlinePass.tla
05_OutTemporalPass.json
05_OutTemporalPass.tla
06_OutInlinePass.json
06_OutInlinePass.tla
07_OutPrimingPass.json
07_OutPrimingPass.tla
08_OutVCGen.json
08_OutVCGen.tla
09_OutPreprocessingPass.json
09_OutPreprocessingPass.tla
10_OutTransitionFinderPass.json
10_OutTransitionFinderPass.tla
11_OutOptimizationPass.json
11_OutOptimizationPass.tla
12_OutAnalysisPass.json
12_OutAnalysisPass.tla
detailed.log
log0.smt
run.txt
$ rm -rf ./test-out-dir
$ apalache-mc check --out-dir=./test-out-dir --profiling=true --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ test -s ./test-out-dir/Counter.tla/*/profile-rules.txt
$ rm -rf ./test-out-dir
$ apalache-mc check --out-dir=./test-out-dir --write-intermediate=0 --length=2 --inv=Inv factorization.tla | sed -e 's/[IEW]@.*//'
...
EXITCODE: ERROR (12)
$ ls ./test-out-dir/factorization.tla/* | ./sort.sh
detailed.log
log0.smt
MCviolation1.out
MCviolation.out
run.txt
violation1.itf.json
violation1.json
violation1.tla
violation.itf.json
violation.json
violation.tla
$ rm -rf ./test-out-dir
$ apalache-mc check --out-dir=./test-out-dir --run-dir=./test-run-dir --write-intermediate=true --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ find ./test-run-dir -type f -exec basename {} \; | ./sort.sh
00_OutSanyParser.json
00_OutSanyParser.tla
01_OutTypeCheckerSnowcat.json
01_OutTypeCheckerSnowcat.tla
02_OutConfigurationPass.json
02_OutConfigurationPass.tla
03_OutDesugarerPass.json
03_OutDesugarerPass.tla
04_OutInlinePass.json
04_OutInlinePass.tla
05_OutTemporalPass.json
05_OutTemporalPass.tla
06_OutInlinePass.json
06_OutInlinePass.tla
07_OutPrimingPass.json
07_OutPrimingPass.tla
08_OutVCGen.json
08_OutVCGen.tla
09_OutPreprocessingPass.json
09_OutPreprocessingPass.tla
10_OutTransitionFinderPass.json
10_OutTransitionFinderPass.tla
11_OutOptimizationPass.json
11_OutOptimizationPass.tla
12_OutAnalysisPass.json
12_OutAnalysisPass.tla
detailed.log
log0.smt
run.txt
$ rm -rf ./test-out-dir ./test-run-dir
$ apalache-mc check --out-dir=./test-out-dir --write-intermediate=0 --length=2 --inv=Inv --run-dir=./test-run-dir factorization.tla | sed -e 's/[IEW]@.*//'
...
EXITCODE: ERROR (12)
$ ls ./test-run-dir | ./sort.sh
detailed.log
log0.smt
MCviolation1.out
MCviolation.out
run.txt
violation1.itf.json
violation1.json
violation1.tla
violation.itf.json
violation.json
violation.tla
$ rm -rf ./test-out-dir ./test-run-dir
$ echo "common.run-dir: ./configured-run-dir" > .apalache.cfg
$ apalache-mc check --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ ls ./configured-run-dir | ./sort.sh
detailed.log
log0.smt
run.txt
$ rm -rf ./configured-run-dir ./.apalache.cfg
$ echo "common.run-dir: ./to-override-dir" > .apalache.cfg
$ echo "common.run-dir: ./configured-run-dir" > cli-config.cfg
$ apalache-mc check --config-file=cli-config.cfg --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ ! test -d ./to-override-dir
$ test -d ./configured-run-dir
$ rm -rf ./configured-run-dir ./.apalache.cfg ./cli-config.cfg
$ echo "common.run-dir: ./to-override-dir" > cli-config.cfg
$ apalache-mc check --config-file=cli-config.cfg --run-dir=./configured-run-dir --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ ! test -d ./to-override-dir
$ test -d ./configured-run-dir
$ rm -rf ./configured-run-dir ./cli-config.cfg
We set user.home
to the current working directly, so we can test tilde
expansion in the path without writing outside of the test directory.
NOTE: We need to set the home to a relative path to the cwd in order to ensure the tests also works in the docker container.
$ echo "common.run-dir: ~/run-dir" > .apalache.cfg
$ JVM_ARGS="-Duser.home=." apalache-mc check --length=0 Counter.tla | sed 's/[IEW]@.*//'
...
EXITCODE: OK
$ test -d ./run-dir
$ rm -rf ./run-dir ./.apalache.cfg
$ echo "common.features: [ invalid-feature ]" > .apalache.cfg
$ apalache-mc check --length=0 Counter.tla | grep -o "Configuration error: .*'"
...
Configuration error: at 'common.features.0'
$ rm -rf ./.apalache.cfg
$ echo "invalid.key: foo" > .apalache.cfg
$ apalache-mc check --length=0 Counter.tla | grep -o -e "Configuration error:.*" -e ".apalache.cfg:.*" -e "EXITCODE:.*"
...
Configuration error: at 'invalid':
.apalache.cfg: 1) Unknown key.
EXITCODE: ERROR (255)
$ rm -rf ./.apalache.cfg
First, set some custom config options, to ensure they'll be merged into the derived config:
$ printf "checker={length=0,inv=[Inv]}, common{out-dir=./cfg-out, features=[rows]}" > demo-config.cfg
Then, run a trivial checking command with --debug
so the derived config will
be saved into to the --run-dir
:
$ apalache-mc check --config-file=demo-config.cfg --run-dir=configdump-dir --debug Counter.tla
...
Finally, confirm that the dumped config looks as expected, and clean up:
$ cat ./configdump-dir/application-configs.cfg
checker {
algo=incremental
discard-disabled=true
inv=[
Inv
]
length=0
max-error=1
no-deadlocks=false
smt-encoding {
type=oopsla-19
}
timeout-smt-sec=0
tuning {
"search.outputTraces"="false"
}
}
common {
command=check
config-file="demo-config.cfg"
debug=true
features=[
rows
]
out-dir="./cfg-out"
profiling=false
run-dir=configdump-dir
smtprof=false
write-intermediate=false
}
input {
source {
file="Counter.tla"
format=tla
type=file
}
}
output {}
server {
port=8822
}
tracee {}
typechecker {
inferpoly=true
}
$ rm -rf ./configdump-dir ./demo-config.cfg ./cfg-out
$ cd module-lookup/subdir-no-dummy && apalache-mc parse --output=output.tla Including.tla
...
EXITCODE: OK
$ cat module-lookup/subdir-no-dummy/output.tla
-------------------------------- MODULE output --------------------------------
EXTENDS Integers, Sequences, FiniteSets, TLC, Apalache, Variants
Init == TRUE
Next == TRUE
================================================================================
$ rm module-lookup/subdir-no-dummy/output.tla
Regression test for #426
Look up files in the same directory as the file supplied on commandline.
Files in that directory take precedence over the Apalache standard library.
$ apalache-mc parse --output=output.tla module-lookup/subdir/Including.tla
...
EXITCODE: OK
$ cat output.tla | grep VARIABLE
VARIABLE same_dir
$ rm output.tla
Files in current working directory take precedence over
- files in the same directory as the supplied file
- the Apalache standard library
$ cd module-lookup && apalache-mc parse --output=output.tla subdir/Including.tla
...
EXITCODE: OK
$ cat module-lookup/output.tla | grep VARIABLE
VARIABLE parent_dir
$ rm module-lookup/output.tla
Test relative paths without prefixed directories
$ cd module-lookup/subdir && apalache-mc parse --output=output.tla Including.tla
...
EXITCODE: OK
$ cat module-lookup/subdir/output.tla | grep VARIABLE
VARIABLE same_dir
$ rm module-lookup/subdir/output.tla
We start the server, save its process id, then wait long enough for it to spin up and output its welcome message, before killing it:
$ apalache-mc server & pid=$! && sleep 3 && kill $pid
...
The Apalache server is running on port 8822. Press Ctrl-C to stop.
...
$ apalache-mc server --port=8888 & pid=$! && sleep 3 && kill $pid
...
The Apalache server is running on port 8888. Press Ctrl-C to stop.
...
NOTE: These tests are skipped because the would complicate our CI process
more than is warranted by the functionality they test. To enable these tests,
remove the $MDX skip
annotations.
Start socat in the background to occupy the port, save its pid and wait a second to let binding happen
$ socat TCP-L:8888,fork,reuseaddr - & echo $! > pid.pid && sleep 1
Try to start the Apalache server on the occupied port, redirect its output to the file, save its exit code, strip logger prompt and exit with status code of the server
$ apalache-mc server --port=8888 1>out 2>out; ext=$? && cat out | sed -E 's/E@.*$//' && exit $ext
...
Error while starting Apalache server: Failed to bind to address 0.0.0.0/0.0.0.0:8888: Address already in use
[1]
Cleanup: kill socat and delete temporary files
$ cat pid.pid | xargs kill -9
$ rm pid.pid out
booleans.qnt.json
updated via make quint-fixtures
$ apalache-mc check --init=init --next=step booleans.qnt.json | sed 's/[IEW]@.*//'
...
EXITCODE: OK
Regression test for informalsystems/quint#1055
$ apalache-mc check --out-dir=./test-out-dir --init=init --next=step --inv=inv bigint.qnt.json
...
EXITCODE: ERROR (12)
[12]
$ grep State0 test-out-dir/bigint.qnt.json/*/violation.tla
State0 == balance = 100000000000
$ rm -rf ./test-out-dir