Skip to content
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

NullPointerException when profiling actions with nested LET/IN expression #377

Closed
lemmy opened this issue Oct 14, 2019 · 1 comment
Closed
Labels
bug error, glitch, fault, flaw, ... Tools The command line tools - TLC, SANY, ...
Projects
Milestone

Comments

@lemmy
Copy link
Member

lemmy commented Oct 14, 2019

http://discuss.tlapl.us/msg03181.html

Current workaround is to turn off profiling:

DisableProfiler


CountInvariant ==
  LET totalSwitched ==
        LET sum[S \in SUBSET OtherPrisoner] ==
              IF S = {} THEN 0
                        ELSE LET p == CHOOSE pr \in S : TRUE
                             IN  timesSwitched[p] + sum[S \ {p}]
        IN  sum[OtherPrisoner]
      oneIfUp == IF switchAUp THEN 1 ELSE 0
IN count \in {totalSwitched - oneIfUp, totalSwitched - oneIfUp + 1}

Reproducible with simplified spec:

---- MODULE Github377 ----
VARIABLES x

Spec == x = TRUE /\ [][UNCHANGED x]_x

Inv ==
  LET outer ==
        LET inner == x = TRUE
        IN  inner
  IN  outer
====
Thread [main] (Suspended (exception NullPointerException))	
	LazyValue.<init>(SemanticNode, Context, boolean, CostModel) line: 59	
	LazyValue.<init>(SemanticNode, Context, CostModel) line: 53	
	Tool.evalImplLetInKind(LetInNode, Context, TLCState, TLCState, int, CostModel) line: 1524	
	Tool.evalImpl(SemanticNode, Context, TLCState, TLCState, int, CostModel) line: 1483	
	Tool.eval(SemanticNode, Context, TLCState, TLCState, int, CostModel) line: 1447	
	Tool.isValid(Action, TLCState, TLCState) line: 3202	
	Tool.isValid(Action, TLCState) line: 3212	
	ModelChecker$DoInitFunctor.addElement(TLCState) line: 1132	
	Tool.getInitStates(ActionItemList, TLCState, IStateFunctor, CostModel) line: 439	
	Tool.getInitStatesAppl(OpApplNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 683	
	Tool.getInitStates(SemanticNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 374	
	Tool.getInitStates(ActionItemList, TLCState, IStateFunctor, CostModel) line: 474	
	Tool.getInitStatesAppl(OpApplNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 683	
	Tool.getInitStates(SemanticNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 374	
	Tool.getInitStates(ActionItemList, TLCState, IStateFunctor, CostModel) line: 474	
	Tool.getInitStatesAppl(OpApplNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 718	
	Tool.getInitStates(SemanticNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 374	
	Tool.getInitStates(ActionItemList, TLCState, IStateFunctor, CostModel) line: 474	
	Tool.getInitStatesAppl(OpApplNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 718	
	Tool.getInitStates(SemanticNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 374	
	Tool.getInitStatesAppl(OpApplNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 567	
	Tool.getInitStates(SemanticNode, ActionItemList, Context, TLCState, IStateFunctor, CostModel) line: 374	
	Tool.getInitStates(IStateFunctor) line: 345	
	ModelChecker.doInit(boolean) line: 362	
	ModelChecker.modelCheckImpl() line: 143	
	ModelChecker(AbstractChecker).modelCheck() line: 512	
	TLC.process() line: 937	
	TLC.main(String[]) line: 247	
@lemmy lemmy added bug error, glitch, fault, flaw, ... Tools The command line tools - TLC, SANY, ... labels Oct 14, 2019
@lemmy lemmy added this to the 1.6.1 milestone Oct 14, 2019
@lemmy lemmy changed the title NullPointerException with LazyValue and invariant NullPointerException when profiling invariant with nested LET/IN expression Oct 14, 2019
@lemmy lemmy changed the title NullPointerException when profiling invariant with nested LET/IN expression NullPointerException when profiling actions with nested LET/IN expression Oct 15, 2019
@lemmy lemmy added this to TODO (Engineering) in mku via automation Oct 16, 2019
@lemmy lemmy moved this from TODO (Engineering) to Doing (Engineering) in mku Oct 16, 2019
lemmy added a commit that referenced this issue Oct 16, 2019
@lemmy lemmy moved this from Doing (Engineering) to Done in mku Oct 18, 2019
@lemmy
Copy link
Member Author

lemmy commented Apr 20, 2020

It seems I forgot to close this.

@lemmy lemmy closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error, glitch, fault, flaw, ... Tools The command line tools - TLC, SANY, ...
Projects
No open projects
mku
  
Done
Development

No branches or pull requests

1 participant