question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Verifying a parameterized property yields Runtime Exception

See original GitHub issue

Hello

I have a model and I want to check some properties (model attached).

NeverZone(z) == [] (sigma[varloc["PId"]] # { z  }
NeverZ3 == [] (sigma[varloc["PId"]] # {"f3”})

In the toolbox, when I check NeverZ3 (in properties) it works (the model verifies the property). However, when I check NeverZone(“f3”) I get:

TLC threw an unexpected exception.
This was probably caused by an error in the spec or model.
See the User Output or TLC Console for clues to what happened.
The exception was a java.lang.RuntimeException
: 
In evaluation, the identifier sigma is either undefined or not an operator.
line 15, col 43 to line 15, col 47 of module PWSSemantics

(I ended up with this error trying to find the cause of another same message on sigma being erroneous)

e001ClientSupplier4Mai.WOk3U.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lemmycommented, May 7, 2021

With #317 fixed, TLC now reports the following for this spec:

TLC2 Version 2.16 of Day Month 20??
Running breadth-first search Model-Checking with fp 1 and seed 1 with 1 worker on 4 cores with 5952MB heap and 64MB offheap memory [pid: 571299] (Linux 5.4.0-72-generic amd64, Ubuntu 11.0.11 x86_64, MSBDiskFPSet, DiskStateQueue).
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/MC.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/e001ClientSupplier.tla
Parsing file /home/markus/src/TLA/tla/tlatools/org.lamport.tlatools/class/tla2sany/StandardModules/TLC.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/PWSTypes.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/PWSWellFormed.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/PWSDefs.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/PWSConstraints.tla
Parsing file /home/markus/src/TLA/tla/tlatools/org.lamport.tlatools/class/tla2sany/StandardModules/Naturals.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/PWSSemantics.tla
Parsing file /home/markus/src/TLA/tla/tlatools/org.lamport.tlatools/class/tla2sany/StandardModules/FiniteSets.tla
Parsing file /home/markus/src/TLA/tla/tlatools/org.lamport.tlatools/class/tla2sany/StandardModules/Sequences.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/Network.tla
Parsing file /home/markus/src/TLA/_specs/models/tlcbugs/Github618/e001ClientSupplier.toolbox/Model_2/NetworkRSC.tla
Semantic processing of module Naturals
Semantic processing of module Sequences
Semantic processing of module FiniteSets
Semantic processing of module TLC
Semantic processing of module PWSTypes
Semantic processing of module PWSDefs
Semantic processing of module PWSWellFormed
Semantic processing of module PWSConstraints
Semantic processing of module NetworkRSC
Semantic processing of module Network
Semantic processing of module PWSSemantics
Semantic processing of module e001ClientSupplier
Semantic processing of module MC
Starting... (2021-05-06 20:17:09)
Implied-temporal checking--satisfiability problem has 1 branches.
Computing initial states...
Finished computing initial states: 1 distinct state generated at 2021-05-06 20:17:09.
Error: The error occurred when TLC was evaluating the nested
expressions at the following positions:
0. Line 327, column 49 to line 327, column 72 in PWSSemantics
1. Line 278, column 3 to line 283, column 24 in PWSSemantics
2. Line 278, column 6 to line 280, column 75 in PWSSemantics
3. Line 279, column 8 to line 280, column 75 in PWSSemantics
4. Line 279, column 11 to line 279, column 29 in PWSSemantics
5. Line 280, column 11 to line 280, column 75 in PWSSemantics
6. Line 281, column 6 to line 281, column 24 in PWSSemantics
7. Line 281, column 16 to line 281, column 24 in PWSSemantics
8. Line 282, column 6 to line 282, column 22 in PWSSemantics
9. Line 17, column 1 to line 17, column 33 in PWSSemantics
10. Line 19, column 14 to line 19, column 34 in Network
11. Line 9, column 1 to line 9, column 40 in Network
12. Line 25, column 14 to line 25, column 26 in NetworkRSC
13. Line 25, column 24 to line 25, column 26 in NetworkRSC
14. Line 283, column 6 to line 283, column 24 in PWSSemantics
15. Line 58, column 21 to line 58, column 26 in PWSDefs
16. Line 327, column 45 to line 327, column 47 in PWSSemantics
17. Line 15, column 8 to line 15, column 49 in PWSSemantics
18. Line 15, column 43 to line 15, column 47 in PWSSemantics


Error: TLC threw an unexpected exception.
This was probably caused by an error in the spec or model.
See the User Output or TLC Console for clues to what happened.
The exception was a java.lang.RuntimeException
: The action formula A appearing in a WF_v(A) or SF_v(A) operator does not specify the primed value of the variable sigma occurring in the state formula v.

Error: The behavior up to this point is:
State 1: <Initial predicate>
/\ net = {}
/\ edgemarks = [Flow_09a8um7 |-> 0, Flow_0llicsy |-> 0, Flow_18ptpdh |-> 0, Flow_14b309w |-> 0]
/\ subs = [toPlant |-> {"f2", "f3"}, planted |-> {}, toSpray |-> {}, sprayed |-> {}]
/\ sigma = ("_" :> {} @@ "z" :> {} @@ "here" :> {} @@ "locPId" :> {"f1"})
/\ nodemarks = [PId |-> 0, StartEvent_1 |-> 1, Event_0fkborc |-> 0, Gateway_0bb8o1z |-> 0, Event_1hpd68d |-> 0, Activity_0z782bb |-> 0]

State 2: <Action line 181, col 1 to line 181, col 21 of module e001ClientSupplier>
/\ net = {}
/\ edgemarks = [Flow_09a8um7 |-> 1, Flow_0llicsy |-> 0, Flow_18ptpdh |-> 0, Flow_14b309w |-> 0]
/\ subs = [toPlant |-> {"f2", "f3"}, planted |-> {}, toSpray |-> {}, sprayed |-> {}]
/\ sigma = ("_" :> {} @@ "z" :> {} @@ "here" :> {} @@ "locPId" :> {"f1"})
/\ nodemarks = [PId |-> 1, StartEvent_1 |-> 0, Event_0fkborc |-> 0, Gateway_0bb8o1z |-> 0, Event_1hpd68d |-> 0, Activity_0z782bb |-> 0]

3 states generated, 3 distinct states found, 1 states left on queue.
The depth of the complete state graph search is 3.
The average outdegree of the complete state graph is 1 (minimum is 1, the maximum 1 and the 95th percentile is 1).
Finished in 01s at (2021-05-06 20:17:09)
0reactions
lemmycommented, May 6, 2021

Better error reporting will be added as part of #317

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Resolving a parameter name at runtime - Stack Overflow
Basically the code works by defining a new Anonymous Type with a single Property consisting of the parameter who's name you want.
Read more >
Creating and Throwing Exceptions | Microsoft Learn
Learn about creating and throwing exceptions. Exceptions are used to indicate that an error has occurred while running a program.
Read more >
Resolve template validation or template format errors in ...
This returns the following error: "Template validation error: Invalid template property or properties [Bucket]." This error is caused because ...
Read more >
Fixing common type problems - Dart
These errors typically occur when a subclass tightens up a method's parameter types by specifying a subclass of the original class. Note: This...
Read more >
Error - JavaScript - MDN Web Docs - Mozilla
Custom error types can also use the cause property, provided the subclasses' constructor passes the options parameter when calling super() . The Error()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found