-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tlapm ending abnormally with Invalid_argument("List.combine") in level or arity checking #151
Comments
Latest and greatest (6acb3cb) errors out right away: -> % ~/.opam/5.1.0/bin/tlapm --version
6acb3cb
-> % ~/.opam/5.1.0/bin/tlapm --cleanfp BlockingQueueFair.tla
File "./BlockingQueue.tla", line 126, characters 21-28:
Error: Invalid number of arguments
tlapm ending abnormally with Failure("Expr.Levels: ARITY")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Tlapm_lib__E_levels.level_computation#expr.apply_operator.f in file "src/expr/e_levels.ml", line 229, characters 20-49
Called from Tlapm_lib__E_levels.level_computation#expr.apply_operator in file "src/expr/e_levels.ml", line 236, characters 27-55
Called from Tlapm_lib__E_levels.level_computation#expr in file "src/expr/e_levels.ml", line 865, characters 21-36
Called from Tlapm_lib__E_levels.level_computation#expr in file "src/expr/e_levels.ml", line 622, characters 21-38
Called from Stdlib__List.rev_map.rmap_f in file "list.ml", line 105, characters 22-25
Called from Tlapm_lib__Ext.List.map in file "src/util/ext.ml", line 48, characters 22-37
Called from Tlapm_lib__E_levels.level_computation#expr.max_args_level in file "src/expr/e_levels.ml", line 148, characters 22-51
Called from Tlapm_lib__E_levels.level_computation#expr.level_info_from_args in file "src/expr/e_levels.ml", line 157, characters 43-66
Called from Tlapm_lib__E_levels.level_computation#expr in file "src/expr/e_levels.ml", line 606, characters 36-63
Called from Tlapm_lib__E_action.lambdify in file "src/expr/e_action.ml", line 1634, characters 12-39
Called from Tlapm_lib__M_elab.lambdify_expr in file "src/module/m_elab.ml" (inlined), line 228, characters 15-160
Called from Tlapm_lib__M_elab.lambdify_definition in file "src/module/m_elab.ml", line 243, characters 23-44
Called from Tlapm_lib__M_elab.lambdify_enabled_cdot.object#definition in file "src/module/m_elab.ml", line 272, characters 21-46
Called from Tlapm_lib__M_visit.map#module_unit in file "src/module/m_visit.ml", line 49, characters 12-47
Called from Tlapm_lib__M_visit.map#module_units.f in file "src/module/m_visit.ml", line 34, characters 27-49
Called from Stdlib__List.fold_left in file "list.ml", line 123, characters 24-34
Called from Tlapm_lib__M_visit.map#module_units in file "src/module/m_visit.ml", line 37, characters 31-75
Called from Tlapm_lib__M_elab.lambdify_enabled_cdot in file "src/module/m_elab.ml", line 301, characters 20-47
Called from Tlapm_lib__M_elab.instantiate in file "src/module/m_elab.ml", line 529, characters 15-44
Called from Tlapm_lib__M_elab.normalize.spin.create_instance in file "src/module/m_elab.ml", line 1166, characters 16-98
Called from Tlapm_lib__M_elab.normalize in file "src/module/m_elab.ml", line 1274, characters 12-66
Called from Tlapm_lib.process_module in file "src/tlapm_lib.ml", line 320, characters 29-68
Called from Tlapm_lib.main.f in file "src/tlapm_lib.ml", line 574, characters 23-43
Called from Stdlib__List.fold_left in file "list.ml", line 123, characters 24-34
Called from Tlapm_lib.main in file "src/tlapm_lib.ml", line 577, characters 13-40
Called from Tlapm_lib.init in file "src/tlapm_lib.ml", line 589, characters 8-33 |
That's the minimal example that fails similarly. B1 is parsed successfully, but when parsing B2, it fails at B1 on
and
Here, it is important to have an operator with an argument and USE of something before applying that operator. The errors:
|
Removing the -> % opam exec -- tlapm --nofp BlockingQueueFair.tla
File "./BlockingQueue.tla", line 116, characters 44-52:
[INFO]: Auto-expanding the definition of operator: Put
File "./BlockingQueue.tla", line 36, characters 10-31:
[INFO]: Auto-expanding the definition of operator: NotifyOther
File "./BlockingQueue.tla", line 38, characters 10-16:
[INFO]: Auto-expanding the definition of operator: Wait
<unknown location>:
Error: Operator "EnabledWrapper" not found
tlapm ending abnormally with Failure("Expr.Anon: 4")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Tlapm_lib__E_visit.map#expr in file "src/expr/e_visit.ml", line 273, characters 22-37
Called from Tlapm_lib__E_action.lambdify_action_operators#expand in file "src/expr/e_action.ml", line 941, characters 17-45
Called from Tlapm_lib__E_action.lambdify in file "src/expr/e_action.ml", line 1640, characters 12-142
Called from Tlapm_lib__M_elab.lambdify_expr in file "src/module/m_elab.ml" (inlined), line 228, characters 15-160
Called from Tlapm_lib__M_elab.lambdify_definition in file "src/module/m_elab.ml", line 243, characters 23-44
Called from Tlapm_lib__M_elab.lambdify_enabled_cdot.object#definition in file "src/module/m_elab.ml", line 272, characters 21-46
Called from Tlapm_lib__M_visit.map#module_unit in file "src/module/m_visit.ml", line 49, characters 12-47
Called from Tlapm_lib__M_visit.map#module_units.f in file "src/module/m_visit.ml", line 34, characters 27-49
Called from Stdlib__List.fold_left in file "list.ml", line 123, characters 24-34
Called from Tlapm_lib__M_visit.map#module_units in file "src/module/m_visit.ml", line 37, characters 31-75
Called from Tlapm_lib__M_elab.lambdify_enabled_cdot in file "src/module/m_elab.ml", line 301, characters 20-47
Called from Tlapm_lib__M_elab.instantiate in file "src/module/m_elab.ml", line 529, characters 15-44
Called from Tlapm_lib__M_elab.normalize.spin.create_instance in file "src/module/m_elab.ml", line 1166, characters 16-98
Called from Tlapm_lib__M_elab.normalize in file "src/module/m_elab.ml", line 1274, characters 12-66
Called from Tlapm_lib.process_module in file "src/tlapm_lib.ml", line 320, characters 29-68
Called from Tlapm_lib.main.f in file "src/tlapm_lib.ml", line 574, characters 23-43
Called from Stdlib__List.fold_left in file "list.ml", line 123, characters 24-34
Called from Tlapm_lib.main in file "src/tlapm_lib.ml", line 577, characters 13-40
Called from Tlapm_lib.init in file "src/tlapm_lib.ml", line 589, characters 8-33 |
The diff --git a/BlockingQueueFair.tla b/BlockingQueueFair.tla
index 4c6fc6e..60b9596 100644
--- a/BlockingQueueFair.tla
+++ b/BlockingQueueFair.tla
@@ -78,11 +78,11 @@ BQS == INSTANCE BlockingQueueSplit WITH waitSetC <- Range(waitSeqC),
BQSSpec == BQS!Spec
THEOREM Spec => BQSSpec
-BQSFairSpec == BQS!A!FairSpec
-THEOREM FairSpec => BQSFairSpec
+\* BQSFairSpec == BQS!A!FairSpec
+\* THEOREM FairSpec => BQSFairSpec
-BQSStarvation == BQS!A!Starvation
-THEOREM FairSpec => BQSStarvation
+\* BQSStarvation == BQS!A!Starvation
+\* THEOREM FairSpec => BQSStarvation
-----------------------------------------------------------------------------
TypeInv == /\ Len(buffer) \in 0..BufCapacity
@@ -92,7 +92,6 @@ TypeInv == /\ Len(buffer) \in 0..BufCapacity
\* Consumers
/\ waitSeqC \in Seq(Consumers)
/\ IsInjective(waitSeqC) \* no duplicates (thread is either asleep or not)!
-
INSTANCE TLAPS
(* Prove TypeInv inductive. *)
@@ -144,7 +143,7 @@ THEOREM ITypeInv == Spec => []TypeInv
<2>4. QED
BY <2>1, <2>2, <2>3 DEF Next
<1>3. QED BY <1>1, <1>2, PTL DEF Spec
-
+====
-----------------------------------------------------------------------------
diff --git a/BlockingQueueSplit.tla b/BlockingQueueSplit.tla
index afc10a0..ce224c9 100644
--- a/BlockingQueueSplit.tla
+++ b/BlockingQueueSplit.tla
@@ -73,8 +73,8 @@ Spec == Init /\ [][Next]_vars
(* BlockingQueueSplit refines BlockingQueue. The refinement mapping is *)
(* straight forward in this case. The union of waitSetC and waitSetP *)
(* maps to waitSet in the high-level spec BlockingQueue. *)
+====
A == INSTANCE BlockingQueue WITH waitSet <- (waitSetC \cup waitSetP)
-
(* A!Spec is not a valid value in the config BlockingQueueSplit.cfg. *)
ASpec == A!Spec
|
TLAPS has been terminating unexpectedly on an existing proof since the pre-release https://github.com/tlaplus/tlapm/releases/tag/202208050903. This issue appears to be linked to level checking.
For comparison, 1.4.6 accepts
BlockingQueue.tla
just fine:The text was updated successfully, but these errors were encountered: