From: Hannu V. <vu...@ms...> - 2013-04-19 23:53:31
|
> To: amf...@li... > From: ix...@ho... > Date: Fri, 19 Apr 2013 18:51:09 -0400 > Subject: Re: [Amforth] amforth-shell.py bugfix > I have two more developments planned for the shell, one easy -- one > tough... The tough one I mentioned already, which is, use a library like > PyUSB to control the popular JTAG Mk II ICE the Forth way. And here is one idea just for fun. I thought I'll tackle this but I don't have time to learn python. Take words and see them all. Produce dot file and make callgraph or wordgraph. Anyway to see what gets used where and in which order. #dot-tree for all and #dot-word for one word. It might be also useful for optimizing stuff. : bar blob urf xyz ; : baz asd = if blob then urf ; The diagram will show that you need refactoring. This is hand written to get a idea. digraph foo{ node [shape = record]; bar [label="bar|<f0> blob|<f1> urf|<f2> xyz"]; baz [label="baz|<f0>asd|<f1> if|<f2> blob|<f3> then|<f4> urf"]; blob; urf; xyz; asd; if; blob; then; urf; bar:f0 -> blob; bar:f1 -> urf; bar:f2 -> xyz; baz:f0 -> asd; baz:f1 -> if; baz:f2 -> blob; baz:f3 -> then; baz:f4 -> urf; } Yes. I like to visualize my data. Best regards, Hannu Vuolasaho |