Skip to content
Snippets Groups Projects
Forked from Iris / Iris
5571 commits behind the upstream repository.
  • Robbert Krebbers's avatar
    766dbcd2
    Use different module structuring of uPred. · 766dbcd2
    Robbert Krebbers authored
    This fixes the following issue by JH Jourdan:
    
      The fact of including uPred_[...] in the module uPred (in base_logic.v),
      implies that typeclasses instances are declared twice. Once in module
      uPred and once in module uPred_[...]. This has the unfortunate
      consequence that it has to backtrack to both instances each time the
      first one fails, making failure of type class search for e.g.
      PersistentP potentially exponential.
    
      Goal ((□ ∀ (x1 x2 x3 x4 x5: nat), True -∗ True) -∗ True : iProp Σ).
        Time iIntros "#H".
        Undo.
        Remove Hints uPred_derived.forall_persistent : typeclass_instances.
        Time iIntros "#H".
    
    Thanks to Jason Gross @ Coq club for suggesting this fix.
    766dbcd2
    History
    Use different module structuring of uPred.
    Robbert Krebbers authored
    This fixes the following issue by JH Jourdan:
    
      The fact of including uPred_[...] in the module uPred (in base_logic.v),
      implies that typeclasses instances are declared twice. Once in module
      uPred and once in module uPred_[...]. This has the unfortunate
      consequence that it has to backtrack to both instances each time the
      first one fails, making failure of type class search for e.g.
      PersistentP potentially exponential.
    
      Goal ((□ ∀ (x1 x2 x3 x4 x5: nat), True -∗ True) -∗ True : iProp Σ).
        Time iIntros "#H".
        Undo.
        Remove Hints uPred_derived.forall_persistent : typeclass_instances.
        Time iIntros "#H".
    
    Thanks to Jason Gross @ Coq club for suggesting this fix.
base_logic.v 476 B
From iris.base_logic Require Export derived.

Module Import uPred.
  Export upred.uPred.
  Export primitive.uPred.
  Export derived.uPred.
End uPred.

(* Hint DB for the logic *)
Hint Resolve pure_intro.
Hint Resolve or_elim or_intro_l' or_intro_r' : I.
Hint Resolve and_intro and_elim_l' and_elim_r' : I.
Hint Resolve always_mono : I.
Hint Resolve sep_elim_l' sep_elim_r' sep_mono : I.
Hint Immediate True_intro False_elim : I.
Hint Immediate iff_refl internal_eq_refl' : I.