@@ -713,13 +713,11 @@ Definitions
713
713
~~~~~~~~~~~
714
714
715
715
The generalized rewriting tactic is based on a set of strategies that can be
716
- combined to obtain custom rewriting procedures. Its set of strategies is based
716
+ combined to create custom rewriting procedures. Its set of strategies is based
717
717
on the programmable rewriting strategies with generic traversals by Visser et al.
718
718
:cite: `Luttik97specificationof ` :cite: `Visser98 `, which formed the core of
719
719
the Stratego transformation language :cite: `Visser01 `. Rewriting strategies
720
- are applied using the tactic :n: `rewrite_strat @rewstrategy ` where :n: `@rewstrategy ` is a
721
- strategy expression. Strategies are defined inductively as described by the
722
- following grammar:
720
+ are applied using the tactic :n: `rewrite_strat @rewstrategy `.
723
721
724
722
.. insertprodn rewstrategy rewstrategy
725
723
@@ -732,6 +730,7 @@ following grammar:
732
730
| progress @rewstrategy
733
731
| try @rewstrategy
734
732
| @rewstrategy ; @rewstrategy
733
+ | choice @rewstrategy @rewstrategy
735
734
| repeat @rewstrategy
736
735
| any @rewstrategy
737
736
| subterm @rewstrategy
@@ -745,10 +744,79 @@ following grammar:
745
744
| eval @red_expr
746
745
| fold @term1_extended
747
746
| ( @rewstrategy )
748
- | choice @rewstrategy @rewstrategy
749
747
| old_hints @ident
750
748
751
- Actually a few of these are defined in terms of the others using a
749
+ :n: `@term1_extended `
750
+ lemma, left to right
751
+
752
+ :n: `<- @term1_extended `
753
+ lemma, right to left
754
+
755
+ :n: `fail `
756
+ failure
757
+
758
+ :n: `id `
759
+ identity
760
+
761
+ :n: `refl `
762
+ reflexivity
763
+
764
+ :n: `progress rewstrategy `
765
+ progress
766
+
767
+ :n: `try rewstrategy `
768
+ try catch
769
+
770
+ :n: `rewstrategy ` ; `@rewstrategy `
771
+ composition
772
+
773
+ :n: `choice @rewstrategy @rewstrategy `
774
+ left_biased_choice
775
+
776
+ :n: `repeat @rewstrategy `
777
+ one or more
778
+
779
+ :n: `any @rewstrategy `
780
+ zero or more
781
+
782
+ :n: `subterm @rewstrategy `
783
+ one subterm
784
+
785
+ :n: `subterms @rewstrategy `
786
+ all subterms
787
+
788
+ :n: `innermost @rewstrategy `
789
+ innermost first
790
+
791
+ :n: `outermost @rewstrategy `
792
+ outermost first
793
+
794
+ :n: `bottomup @rewstrategy `
795
+ bottom-up
796
+
797
+ :n: `topdown @rewstrategy `
798
+ top-down
799
+
800
+ :n: `hints @ident `
801
+ apply hints from hint database
802
+
803
+ :n: `terms {* @term1_extended } `
804
+ any of the terms
805
+
806
+ :n: `eval @red_expr `
807
+ apply reduction
808
+
809
+ :n: `fold @term `
810
+ unify
811
+
812
+ :n: `( @rewstrategy ) `
813
+ to be documented
814
+
815
+ :n: `old_hints @ident `
816
+ to be documented
817
+
818
+
819
+ A few of these are defined in terms of the others using a
752
820
primitive fixpoint operator:
753
821
754
822
- :n: `try @rewstrategy := choice @rewstrategy id `
0 commit comments