speed up Biegelinie with filter_sameFunId
authorwneuper
Thu, 10 May 2007 11:06:34 +0200
changeset 3878bca45fb46f11
parent 3877 a709cff3229b
child 3879 fc168b595149
speed up Biegelinie with filter_sameFunId
src/smltest/IsacKnowledge/atools.sml
     1.1 --- a/src/smltest/IsacKnowledge/atools.sml	Thu May 10 11:06:34 2007 +0200
     1.2 +++ b/src/smltest/IsacKnowledge/atools.sml	Thu May 10 11:06:34 2007 +0200
     1.3 @@ -13,6 +13,7 @@
     1.4  "----------- occurs_in -------------------------------------------";
     1.5  "----------- argument_of -----------------------------------------";
     1.6  "----------- sameFunId -------------------------------------------";
     1.7 +"----------- filter_sameFunId ------------------------------------";
     1.8  "----------- boollist2sum ----------------------------------------";
     1.9  "-----------------------------------------------------------------";
    1.10  
    1.11 @@ -80,6 +81,18 @@
    1.12  eval_sameFunId "" "Atools.sameFunId" 
    1.13  		 (str2term "sameFunId (  y L) (  y x = c + L*x)")""(*true*);
    1.14  
    1.15 +"----------- filter_sameFunId ------------------------------------";
    1.16 +"----------- filter_sameFunId ------------------------------------";
    1.17 +"----------- filter_sameFunId ------------------------------------";
    1.18 +val flhs as (fid $ _) = str2term "y' L";
    1.19 +val fs = str2term "[M_b x = c + L*x, y' x = c + L*x, y x = c + L*x]";
    1.20 +val (p as Const ("Atools.filter'_sameFunId",_) $ (fid $ _) $ fs) = 
    1.21 +    str2term "filter_sameFunId (y' L) \
    1.22 +	     \[M_b x = c + L*x, y' x = c + L*x, y x = c + L*x]";
    1.23 +val Some (str, es) = eval_filter_sameFunId "" "Atools.filter'_sameFunId" p "";
    1.24 +if term2str es = "(filter_sameFunId y' L [M_b x = c + L * x, y' x = c + L * x,\n                        y x = c + L * x]) =\n[y' x = c + L * x]" then ()
    1.25 +else raise error "atools.slm diff.behav. in filter_sameFunId";
    1.26 +
    1.27  
    1.28  "----------- boollist2sum ----------------------------------------";
    1.29  "----------- boollist2sum ----------------------------------------";