avoid infinite recursion in peephole optimizer function -- this had a debilitating effect on rationals and reals
--- a/NEWS Mon Nov 07 22:21:57 2011 +0100
+++ b/NEWS Mon Nov 07 22:22:01 2011 +0100
@@ -76,6 +76,11 @@
a list and a nat.
+* Nitpick:
+ - Fixed infinite loop caused by the 'peephole_optim' option and affecting
+ 'rat' and 'real'.
+
+
*** FOL ***
* New "case_product" attribute (see HOL).
--- a/src/HOL/Tools/Nitpick/nitpick_peephole.ML Mon Nov 07 22:21:57 2011 +0100
+++ b/src/HOL/Tools/Nitpick/nitpick_peephole.ML Mon Nov 07 22:22:01 2011 +0100
@@ -358,8 +358,6 @@
(case (r1, r2) of
(Join (r11, Rel x), _) =>
if x = not3_rel then s_rel_eq r11 (s_not3 r2) else raise SAME ()
- | (_, Join (r21, Rel x)) =>
- if x = not3_rel then s_rel_eq r21 (s_not3 r1) else raise SAME ()
| (RelIf (f, r11, r12), _) =>
if inline_rel_expr r2 then
s_formula_if f (s_rel_eq r11 r2) (s_rel_eq r12 r2)