On Tuesday, December 12, 2017 at 1:06:50 PM UTC-6, Edward K. Ream wrote:

As you can see from my lack of comments on other matters, this project 
requires my undivided attention.

Recent work:

1. The "kind" switch in checker.check is one of those small things that 
makes a surprisingly big difference.  It replaces several switches, and is 
mostly self documenting.

2. The prototype can report many useful data.  You could call it another 
version of the ShowData class.

3. Early this morning I failed in the first attempt to generalize 
do_assn_to_c.  I'll try again today.

4. It's still unclear how useful this tool will be.  Two details relate to 
this question:

- The code now suppresses the creation of entries for "special" classes, 
those classes for which the use has supplied type information.  The idea is 
that the user has specified the public interfaces for those classes, so 
inferences should use no other data. This suppression also simplifies dumps 
of symbol tables.

- Otoh, the code *must *handle *injected ivars*, that is, ivars that are 
set from outside the class. Handling injected ivars is essential for 
handling the original bug.  Without this kind of knowledge the user would 
have to supply way too much information. Furthermore, reporting injected 
ivars is likely to be useful, if for no other reason that it would suggest 
other knowledge that the user could supply automatically.

5. Recent changes work around parsing errors in the regex's.  There is no 
way that regex can do a full, accurate job of parsing python.

I am considering creating a version of the prototype that uses the ast in a 
more traditional way.  It will be interesting see how big an impact this 
switchover will have. Otoh, the switchover is considerably less important 
than inference-related work, so I may restrain myself a little longer.

6. There is a weird bug in the rewritten ProjectUtils.project_files method. 
When first reloading Leo it can fail to find any files in the 'leo' 
project. As I write this, I see that the present code is brain dead.  For 
leo, it imports leo.core and uses leo.core.__file__ to find the base 
directory.  But Doh, that's just g.app.loadDir!

*Summary*

- assn_to_c should be generalized.  That will allow the prototype to report 
injected ivars.
- The resolve code should be simplified.
- It's nearing time to transition to ast-based code.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to