Minor spec fix.

This commit is contained in:
Yury Gribov
2025-01-23 16:37:24 +03:00
parent 3cff3c2892
commit 34ac3fd3c5
2 changed files with 8 additions and 3 deletions
+6
View File
@@ -18,8 +18,14 @@ PROPERTIES
NoShimResets
CONSTANTS
\* Concurrent threads
THREADS = {1, 2}
NoThread = 0
\* Library functions
FUNS = {"foo", "bar"}
\* Number of calls in each thread and in library ctor
CALLS = 2
\* Max callstack size
DEPTH = 2
\* Max number of recursive mutex locks
MAX_LOCK = 3
+2 -3
View File
@@ -9,7 +9,7 @@ EXTENDS
Integers, FiniteSets, Sequences, TLC
CONSTANTS
THREADS, FUNS, CALLS, DEPTH
THREADS, FUNS, CALLS, DEPTH, MAX_LOCK
ASSUME
/\ Cardinality(FUNS) > 0
@@ -46,7 +46,6 @@ StackFrame == [pc : PC, calls : 0..CALLS, callee : Callees]
CallStack == UNION {[1..len -> StackFrame] : len \in 0..DEPTH}
MaxLock == 3
\* HELPERS
@@ -65,7 +64,7 @@ TypeInvariant ==
/\ shim_table \in [FUNS -> BOOLEAN]
/\ lib_handle_set \in BOOLEAN
/\ lib_state \in LibraryState
/\ rec_lock \in [owner : THREADS \union {NoThread}, count : 0..MaxLock]
/\ rec_lock \in [owner : THREADS \union {NoThread}, count : 0..MAX_LOCK]
LockInvariant ==
/\