Request for comment: adding EXPECT statements to model files
19 views
Skip to first unread message
Andrew Helwer
unread,
Apr 6, 2026, 12:56:56 PM (yesterday) Apr 6
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tla...@googlegroups.com
Hi all,
I've implemented a feature in TLC to accept an EXPECT statement in model files. This lets you assert that a given model file is expected to produce a violation. You can see the PR here; please leave feedback if you have any! https://github.com/tlaplus/tlaplus/pull/1269
Currently all this does is make TLC exit with code 0 if the expected violation is generated. It exits with a nonzero code if a different violation was generated, or if no violation was generated. You can assert one of the following in your model file:
EXPECT NO_VIOLATION
EXPECT ASSUMPTION_VIOLATION
EXPECT DEADLOCK_VIOLATION
EXPECT SAFETY_VIOLATION
EXPECT LIVENESS_VIOLATION
EXPECT ASSERT_VIOLATION
If feedback all seems positive I will write some tests for the feature.