MathGroup Archive 2007

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

Search the Archive

Re: Re: Re: record intermediate steps

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73484] Re: [mg73446] Re: [mg73126] Re: [mg73095] record intermediate steps
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Mon, 19 Feb 2007 06:33:24 -0500 (EST)
  • References: <200702161021.FAA09937@smc.vnet.net>

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