Skip to content
Snippets Groups Projects

Stronger `iNext` that performs arithmetic cancelation

Merged Robbert Krebbers requested to merge robbert/iNext_nat_cancel into master

This is WIP that fixes issue #148 (closed). Some questions:

  • Where to put the canceler. Is this something more generic that should be moved to stdpp?
  • Move TCIf to stdpp.
  • How to name MakeIntoLaterN, it's like MakeLaterN, which is used for framing but slightly different, e.g. it does not turn ▷ True into True, but turns ▷^0 P into P and ▷^1 P into ▷ P.
Edited by Robbert Krebbers

Merge request reports

Approval is optional

Merged by Robbert KrebbersRobbert Krebbers 7 years ago (Feb 20, 2018 12:53am UTC)

Loading

Pipeline #6908 passed

Pipeline passed for eebe055b on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I think I am going to move NatCancel to std++.

    Makes sense.

    It makes little sense if framing would turn ▷^1 P into ▷ P, and vice versa, if iNext would turn ▷ True into just True.

    Of course iNext should turn a hypothesis \later X into X for any X, including True... I am confused.

    Where does framing have to turn things into LaterN anyway?

    I suggest the version that does some sort of simpl should have Simpl in its name. Also, both typeclasses should have documentation saying what they are supposed to do and what not, Other than that, if you feel two typeclasses are needed, sure, go for it. :)

  • Of course iNext should turn a hypothesis \later X into X for any X, including True... I am confused.

    My example was broken. iNext on a goal with a single should not turn ▷^(S n) True into True.

    However, framing P in ▷^n P ∗ Q should turn the goal into Q.

  • iNext on a goal with a single should not turn ▷^(S n) True into True.

    Ah. Well, I wouldn't mind that strongly.

    framing P in ▷^n P ∗ Q should turn the goal into Q.

    Why does this need anything smart? Just descent below later and later^n ?

    Edited by Ralf Jung
  • Robbert Krebbers added 16 commits

    added 16 commits

    Compare with previous version

  • Robbert Krebbers marked the checklist item Where to put the canceler. Is this something more generic that should be moved to stdpp? as completed

    marked the checklist item Where to put the canceler. Is this something more generic that should be moved to stdpp? as completed

  • framing P in ▷^n P ∗ Q should turn the goal into Q.

    Why does this need anything smart? Just descent below later and later^n ?

    The problem is that depending on whether framing in P succeeds, we need to get rid of the later ▷^n .

    That's why we don't have:

    Global Instance frame_laterN p n R R' P Q :
      NoBackTrack (IntoLaterN n R' R) 
      Frame p R P Q 
      Frame p R' (▷^n P) (▷^n Q).

    But rather this whole MakeLaterN business.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading