Skip to content

Comments

[Do not merge] Verify safety properties with Apalache#8

Draft
lemmy wants to merge 11 commits intomainfrom
mku-apalache
Draft

[Do not merge] Verify safety properties with Apalache#8
lemmy wants to merge 11 commits intomainfrom
mku-apalache

Conversation

@lemmy
Copy link
Collaborator

@lemmy lemmy commented Nov 13, 2024

This PR aims to verify safety properties using Apalache. However, Apalache currently cannot check this specification because modeling the log and network with (ordered) sequences is a no-go. The commit message for 5b42a6b indicates that excessive SMT constraint explosion still occurs, even after eliminating Apalache antipatterns as recommended in https://apalache-mc.org/docs/apalache/antipatterns.html.

Background reading:

lemmy added 10 commits November 11, 2024 16:01
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
…type system because all four messages are structurely idential.

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
that Apalache has to generate.

```shell
~/apalache/apalache-0.47.0/bin/apalache-mc --debug --smtprof --profiling check --length=1 APApirateship.tla
~/apalache/apalache-0.47.0/bin/apalache-mc --debug --smtprof --profiling check --length=2 APApirateship.tla
~/apalache/apalache-0.47.0/bin/apalache-mc --debug --smtprof --profiling check --length=3 APApirateship.tla
```

The original version of the model has the following
performance numbers:

--length=1,--length=2,--length=3

```shell
-> % ls -lah _apalache-out/APApirateship.tla/2024-11-13T*/log0.smt
-rw-r--r--@ 1 markus  staff   4.3M Nov 13 11:44 _apalache-out/APApirateship.tla/2024-11-13T11-44-34_2659809425790680493/log0.smt
-rw-r--r--@ 1 markus  staff    23M Nov 13 11:44 _apalache-out/APApirateship.tla/2024-11-13T11-44-43_6113641899789826029/log0.smt
-rw-r--r--@ 1 markus  staff    86M Nov 13 11:45 _apalache-out/APApirateship.tla/2024-11-13T11-44-58_17093659918975460327/log0.smt

-> % for p in _apalache-out/APApirateship.tla/2024-11-13T*/profile.csv; do awk -F, '{sum += $1} END {print sum}' $p; done
91172
990065
4416763
```
With the various rewrites, we see a modest improvement:

--length=1,--length=2,--length=3

```shell
-> % ls -lah _apalache-out/APApirateship.tla/2024-11-13T*/log0.smt
-rw-r--r--@ 1 markus  staff   3.6M Nov 13 11:37 _apalache-out/APApirateship.tla/2024-11-13T11-36-56_9321311001194045755/log0.smt
-rw-r--r--@ 1 markus  staff    15M Nov 13 11:37 _apalache-out/APApirateship.tla/2024-11-13T11-37-05_4783214633623108253/log0.smt
-rw-r--r--@ 1 markus  staff    41M Nov 13 11:37 _apalache-out/APApirateship.tla/2024-11-13T11-37-17_1888017297233515155/log0.smt

-> % for p in _apalache-out/APApirateship.tla/2024-11-13T11-3*/profile.csv; do awk -F, '{sum += $1} END {print sum}' $p; done
65685
465158
1404713
```

(compare "weight" in https://apalache-mc.org/docs/apalache/profiling.html)

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@lemmy lemmy added the enhancement New feature or request label Nov 13, 2024
@lemmy
Copy link
Collaborator Author

lemmy commented Nov 13, 2024

FWIW, I believe they are, but I haven't verified that all my rewrites are equivalent with original definition. The main goal was to identify the root cause of the SMT constraint explosion.

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant