MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: record intermediate steps


If the list of expressions returned by TracePrint TraceInteral->True
is relatively complete, here is a method that will return a list of
symbols called from the System` context during the simplification.

This code could easily be modified to assign the list of expressions
encountered during the evaluation to a variable, from which the
aforementioned list of symbols could be cross referenced (to see how
they were called)

Block[{$Output=List@OpenWrite["C:\\msgStream.m"]},
TracePrint[FullSimplify[Cos[2*Pi/7]*Cos[4*Pi/7]*Cos[8*Pi/7]],TraceInternal->True];
Close/@$Output];

Thread[Union@Cases[ReadList["C:\\msgStream.m",
HoldComplete[Expression]],symb_Symbol/;AtomQ@Unevaluated@symb&&
Context@Unevaluated@symb==="System`":>HoldComplete@symb,{0,Infinity},Heads->True],
HoldComplete]


-- 
http://chris.chiasson.name/


  • Prev by Date: RE: Re: Quick integral.
  • Next by Date: Re: Re: Re: record intermediate steps
  • Previous by thread: Re: Re: record intermediate steps
  • Next by thread: Re: Re: Re: record intermediate steps