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

Show type inference errors in Toolbox's obligation view #434

Open
lemmy opened this issue Mar 4, 2020 · 1 comment
Open

Show type inference errors in Toolbox's obligation view #434

lemmy opened this issue Mar 4, 2020 · 1 comment
Labels
enhancement Lets change things for the better TLAPS Toolbox functionality related to the TLA proof system/manager Toolbox The TLA Toolbox/IDE

Comments

@lemmy
Copy link
Member

lemmy commented Mar 4, 2020

The spec below causes the TLAPS 1.4.5 SMT back-end to fail to prove the obligation because of a type inference warning (CASE statement). The Toolbox should show type inference warnings not just on the console but also in the obligations view.

TypeInference

---------------------------- MODULE DummyProofs ----------------------------
LOCAL INSTANCE TLAPS
LOCAL INSTANCE Naturals
LOCAL INSTANCE Sequences

Range(f) == { f[x] : x \in DOMAIN f }

IsInjective(s) == \A i, j \in DOMAIN s: (s[i] = s[j]) => (i = j)

----------------------------------------------------------------------------

(* CASE fails to prove with 1.4.5 *)
TailCase(s) == CASE s # << >> -> [i \in 1..(Len(s)-1) |-> s[i+1]]
LEMMA RangeTailCase == 
  ASSUME NEW S, NEW ws \in Seq(S), IsInjective(ws)
         , ws # <<>>
  PROVE \E x \in Range(ws): Range(TailCase(ws)) = Range(ws) \ {x}
BY SMT DEF Range, IsInjective, TailCase

=============================================================================
@lemmy lemmy added enhancement Lets change things for the better Toolbox The TLA Toolbox/IDE TLAPS Toolbox functionality related to the TLA proof system/manager labels Mar 4, 2020
@lemmy
Copy link
Member Author

lemmy commented Jul 11, 2020

@ahelwer FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Lets change things for the better TLAPS Toolbox functionality related to the TLA proof system/manager Toolbox The TLA Toolbox/IDE
Development

No branches or pull requests

1 participant