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

Adding annotation reuse results in non-termination of that lemma #558

Open
hxenia opened this issue Jun 27, 2023 · 4 comments
Open

Adding annotation reuse results in non-termination of that lemma #558

hxenia opened this issue Jun 27, 2023 · 4 comments

Comments

@hxenia
Copy link

hxenia commented Jun 27, 2023

I noticed, that adding the lemma annotation "reuse" to a lemma resulted in non-termination of that lemma.
Here is a minimal theory:

`theory test

begin

rule Start:
[ Fr(~n)]
--[ Begin(~n)
, End(~n) ]->
[ End(~n) ]

lemma NonTerminationWithReuse[reuse]:
"All #i a. End(a)@i ==> Ex #j. End(a)@j"

lemma false:
"All a #i. End(a)@i ==> F"

end`

When the lemma annotation "reuse" is omitted, the lemma NonTerminationWithReuse is proven automatically. With the annotation "reuse", the simplification step results in an infinite loop.

An observation: The non-termination does not occur when the second lemma is removed or it is trivially true.

I tested this with the latest develop version, compiled today.

@cascremers
Copy link
Member

cascremers commented Jun 27, 2023 via email

@hxenia
Copy link
Author

hxenia commented Jun 27, 2023

Hi Cas,

Thanks for your quick response.

Yes, that is the behaviour that I would also expect. However, the non-termination occurs for the first lemma. Here step by step what I did:

  1. Start Tamarin in interactive mode and open theory
  2. click on sorry of first lemma (NonTerminationWithReuse): I immediately get the proof methods on the right side.
  3. click simplify: the UI is loading, the terminal seems to be looping over splitEqs and End

However, I can also produce the behaviour that you describe: when I click on sorry on the second lemma (false) I get the same looping behaviour during the precomputation, so the proof methods on the right do not load in the UI.

When removing the reuse form the first lemma, the first lemma can be proven with auto and the second one can be disproven as well.

In the process of creating a minimal example, I also encountered this loop later in the proof process of the first lemma.

Best,
Xenia

@cascremers
Copy link
Member

Ok, this needs a bit more investigation then. Nevertheless, it seems to depend on the presence of the second lemma, so the issue is not just local to the specific lemma.

@hxenia
Copy link
Author

hxenia commented Jun 29, 2023

Here is a longer example theory, where this looping occures in the 4th proof step. Maybe that provides some more insights.

theory test

begin

builtins: multiset

rule Start:
    [ Fr(~n), Fr(~id)]
  --[ Begin(~n, ~id)
    , Loop(~n, ~id) ]->
    [ Loop(~n, ~id) ]

rule Loop:
    [ Loop(a, id), Fr(~n) ]
  --[ Loop(~n, id) ]->
    [ Loop(~n + a, id) ]

lemma LoophasToStart[use_induction,reuse]:
  "All #i a id. Loop(a, id)@i ==> Ex #j b. Begin(b, id)@j"

 lemma dummy:
   "All a id #i. Loop(a, id)@i ==> F"

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants