# HG changeset patch # User wenzelm # Date 1120500819 -7200 # Node ID 7b58002668c07f3abe3c4268f9e683acd65628b2 # Parent f1ea17a4f22269112ddb9f8e036217eb92f59018 methods: added simp_flags argument, added "depth_limit" flag; diff -r f1ea17a4f222 -r 7b58002668c0 src/Pure/simplifier.ML --- a/src/Pure/simplifier.ML Mon Jul 04 17:09:15 2005 +0200 +++ b/src/Pure/simplifier.ML Mon Jul 04 20:13:39 2005 +0200 @@ -475,6 +475,11 @@ Args.parens (Args.$$$ asm_lrN) >> K asm_lr_simp_tac || Scan.succeed asm_full_simp_tac); +val simp_flags = Scan.repeat + (Args.parens (Args.$$$ "depth_limit" -- Args.colon |-- Args.nat) + >> setmp MetaSimplifier.simp_depth_limit) + >> curry (Library.foldl op o) I; + val cong_modifiers = [Args.$$$ congN -- Args.colon >> K ((I, cong_add_local):Method.modifier), Args.$$$ congN -- Args.add -- Args.colon >> K (I, cong_add_local), @@ -494,16 +499,16 @@ @ cong_modifiers; fun simp_args more_mods = - Method.sectioned_args (Args.bang_facts -- Scan.lift simp_options) (more_mods @ simp_modifiers'); + Method.sectioned_args (Args.bang_facts -- Scan.lift simp_options -- Scan.lift simp_flags) + (more_mods @ simp_modifiers'); - -fun simp_method (prems, tac) ctxt = Method.METHOD (fn facts => +fun simp_method ((prems, tac), FLAGS) ctxt = Method.METHOD (fn facts => ALLGOALS (Method.insert_tac (prems @ facts)) THEN - (CHANGED_PROP o ALLGOALS o tac) (local_simpset_of ctxt)); + (FLAGS o CHANGED_PROP o ALLGOALS o tac) (local_simpset_of ctxt)); -fun simp_method' (prems, tac) ctxt = Method.METHOD (fn facts => +fun simp_method' ((prems, tac), FLAGS) ctxt = Method.METHOD (fn facts => HEADGOAL (Method.insert_tac (prems @ facts) THEN' - (CHANGED_PROP oo tac) (local_simpset_of ctxt))); + ((FLAGS o CHANGED_PROP) oo tac) (local_simpset_of ctxt))); (* setup methods *)