AST Node Labeling

  • Nov 16, 2012
  • 0 Comments

Taking into account our meeting from last week, I added an "UNKNOWN" state to the OriginProperty. Every node is initialized with the OriginProperty set to UNKNOWN. This brought up a variety of issues because now we have to ensure that the proper things are being labeled as system generated vs. user generated. Looking through the various classes, most of the set-up for a blank world seems to occur in BootstrapUtilities, so I was working through that to try and label every single node in a blank world. I ended up changing the CrawlPolicy to ensure that all nodes were being looked at because the JavaTypes/JavaMethods/JavaConstructors, etc. were not being crawled for some reason. Once the CrawlPolicy was changed, everything was labeled as SYSTEM generated instead of unknown, which was the intent in the beginning. 

Unfortunately, I started adding USER crawlers to label things that are dragged in by the user. I accidentally saved twice, and I found that the second save overwrites some of the system generated things as being unknown again or it generates new items that are not labeled as SYSTEM or as USER. I intend on looking into that more carefully.

Talking with Michelle about mentoring and labeling the nodes, it seems she's looking for something to label the nodes altered by the mentor without actually drastically affecting the code. One possibility was an idea mentioned by Dennis of saving a copy of the original code and a copy of the final code, running a comparison and labeling the nodes from the changes. Also, Michelle mentioned crawling the code to check if the appropriate items are being labeled instead of looking at it physically. I plan on trying to figure out how to do that.

I feel like once the nodes are all properly labeled in every situation, the adding of new properties won't be quite as difficult. Theoretically all it would require is a crawler to go through and check the OriginProperty for whether or not something is REMIXED. If it is, then it pulls the appropriate information and stores it with the node. If not, then nothing else really needs to happen.

Comments

  • No comments yet

Log In or Sign Up to leave a comment.