src/Tools/isac/MathEngBasic/rewrite.sml
changeset 59867 bb153a08645b
parent 59865 75a9d629ea53
child 59868 d77aa0992e0f
     1.1 --- a/src/Tools/isac/MathEngBasic/rewrite.sml	Fri Apr 10 15:02:50 2020 +0200
     1.2 +++ b/src/Tools/isac/MathEngBasic/rewrite.sml	Fri Apr 10 16:16:09 2020 +0200
     1.3 @@ -127,7 +127,7 @@
     1.4      error ("rewrite__set_ called with 'Erls' for '" ^ UnparseC.t2str thy t ^ "'")
     1.5    | rewrite__set_ thy i _ _ (rrls as Rule_Set.Rrls _) t =      (* rewrite with a 'reverse rule set' *)
     1.6      let
     1.7 -      val _= trace i (" rls: " ^ Rule_Set.rls2str rrls ^ " on: " ^ UnparseC.t2str thy t)
     1.8 +      val _= trace i (" rls: " ^ Rule_Set.id rrls ^ " on: " ^ UnparseC.t2str thy t)
     1.9  	    val (t', asm, rew) = app_rev thy (i + 1) rrls t                   
    1.10      in if rew then SOME (t', distinct asm) else NONE end
    1.11    | rewrite__set_ thy i put_asm bdv rls ct =          (* Rls, Seq containing Thms or Num_Calc, Cal1 *)
    1.12 @@ -138,7 +138,7 @@
    1.13          | rew_once ruls asm ct Appl [] = 
    1.14            (case rls of Rule_Def.Repeat _ => rew_once ruls asm ct Noap ruls
    1.15            | Rule_Set.Seqence _ => (ct, asm)
    1.16 -          | rls => raise ERROR ("rew_once not appl. to \"" ^ Rule_Set.rls2str rls ^ "\""))
    1.17 +          | rls => raise ERROR ("rew_once not appl. to \"" ^ Rule_Set.id rls ^ "\""))
    1.18          | rew_once ruls asm ct apno (rul :: thms) =
    1.19            case rul of
    1.20              Rule.Thm (thmid, thm) =>
    1.21 @@ -182,9 +182,9 @@
    1.22              (case rewrite__set_ thy (i + 1) put_asm bdv rls' ct of
    1.23                SOME (t', asm') => rew_once ruls (union (op =) asm asm') t' Appl thms
    1.24              | NONE => rew_once ruls asm ct apno thms)
    1.25 -          | r => raise ERROR ("rew_once not appl. to \"" ^ Rule.rule2str r ^ "\"");
    1.26 +          | r => raise ERROR ("rew_once not appl. to \"" ^ Rule.to_string r ^ "\"");
    1.27        val ruls = (#rules o Rule_Set.rep) rls;
    1.28 -      val _ = trace i (" rls: " ^ Rule_Set.rls2str rls ^ " on: " ^ UnparseC.t2str thy ct)
    1.29 +      val _ = trace i (" rls: " ^ Rule_Set.id rls ^ " on: " ^ UnparseC.t2str thy ct)
    1.30        val (ct', asm') = rew_once ruls [] ct Noap ruls;
    1.31  	  in if ct = ct' then NONE else SOME (ct', distinct asm') end
    1.32  (*-------------------------------------------------------------*)
    1.33 @@ -207,7 +207,7 @@
    1.34      (* apply the normal_form of a rev-set *)
    1.35      fun app_rev' thy (Rule_Set.Rrls {erls, prepat, scr = Rule.Rfuns {normal_form, ...}, ...}) t =
    1.36        if chk_prepat thy erls prepat t then normal_form t else NONE
    1.37 -      | app_rev' _ r _ = raise ERROR ("app_rev' not appl. to \"" ^ Rule_Set.rls2str r ^ "\"");
    1.38 +      | app_rev' _ r _ = raise ERROR ("app_rev' not appl. to \"" ^ Rule_Set.id r ^ "\"");
    1.39      val opt = app_rev' thy rrls t
    1.40    in
    1.41      case opt of