Multiple Crawler Types Up & Running

  • Oct 17, 2012
  • 1 Comment

Although I didn't get a lot of time to work in the LG Lab this week, since I'm going home for Fall Break, I am pleased with the milestone I reached. The code test editor no longer has the ConstructCrawler hard-coded as the only available crawler--the user can now choose between multiple crawler types. 

To get to this point, my work involved two tasks: first, I coded up the ExpressionCrawler and ExpressionCrawlerDescriptor classes. An ExpressionCrawler is similar to a ConstructCrawler, except it looks for expression nodes and returns their encasing statement (for example, it might be looking for any uses of a BooleanLiteral value, then return the statement that makes use of that boolean).

Second, I had to modify the GUI for the code tests. Just like for the crawlers, this also involved adding in a level of abstraction to the interface. Each crawler has a corresponding CrawlerPanel class that describes the customizations that are available in the GUI for that crawler. When a test is to be run, the CrawlerPanel also creates the CrawlerDescriptor that is used to instantiate the CodeTestCrawler for the actual test (phew...that's a lot of crawler classes!)

With this in place, it should be fairly straightforward to begin implementing the rest of the new crawler types that need to be supported. This is where I'll be focusing my effort in the upcoming week, along with a slight redesign to the overall code tests GUI to make it cleaner and better laid out. In addition, over the summer it appears that the functionality to highlight a result returned by code tests has been disrupted. Eventually, I'd like to fix that, although I'm not sure yet how much effort that will require.


  • caitlin

    caitlin said:

    <p>That's awesome! I'm going to be really interested to see how the mentors tests all translate and what else we find in looking at the shared worlds through this lens.</p>

    Posted on Oct 18, 2012

Log In or Sign Up to leave a comment.