# HG changeset patch # User blanchet # Date 1320700921 -3600 # Node ID 7dbb7b044a11b0bb2ff57e1bfd21f83a76be357e # Parent 20128348e9b95ab3a7872457973f497edab599cf avoid infinite recursion in peephole optimizer function -- this had a debilitating effect on rationals and reals diff -r 20128348e9b9 -r 7dbb7b044a11 NEWS --- 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). diff -r 20128348e9b9 -r 7dbb7b044a11 src/HOL/Tools/Nitpick/nitpick_peephole.ML --- 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)