In this post I'll discuss recent new ideas arising from my study of mypy. 
You could call this an Engineering Notebook post, but it should interest 
many Leonistas. The topics discussed here will likely keep me busy for 
years.


*Executive summary*

Text traces and python's pdb have been my main tools for studying mypy. But 
text traces, no matter how well designed, can't easily be analyzed further. 
Instead, an *enhanced debugger* could gather persistent *python *data 
structures.

Leo's existing clone-find commands represent relations between outline 
nodes. We can extend this idea! User-defined *clone-find-by-relation* (*cfr*) 
scripts can create outlines (relationships) using those python data 
structures.
*An enhanced (Leo aware!) python debugger*

Leo's g.SherlockTracer class is a python debugger that produces text 
traces. A similar debugger could create persistent python data structures.

User-defined scripts (in the debugger?) could then "mine" those data. Those 
scripts could even create  Leo outlines representing the data.

*Representing data relationships in Leo outlines*

clone-find-by-relation is a *framework for invention*, not single command. 
User-defined scripts will have the following general form:

- A *data-gathering prepass* gathers data from* outside *Leo, creating an 
*input 
outline*. 

- User-defined cfr scripts call c.cloneFindByPredicate one or more times to 
create *relationship outlines* from the input outline. The predicates 
passed to c.cloneFindByPredicate can define *any* desired relationship! 

- An optional* postpass* can beautify and simplify the relationship 
outlines.

*Summary*

clone-find-by-relation is a *framework for invention*, not a Leo command. 

clone-find-by-relation can readily represent *any* mathematical 
relationship. Relationships are not confined to be points, strings, nodes, 
or anything else.

An enhanced debugger will gather *dynamic* data. In contrast, Leo's 
clone-find commands represent *static *relations between nodes.

I'll use the tools described here to study mypy. This will be an iterative 
process that will further refine the tools.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/03348320-d18a-4aed-bceb-e15c1d737a58n%40googlegroups.com.

Reply via email to