ParseTree: October 2006 Archives

Heckle: Another Rubyconf Hack

| | Comments (4)

Jester is a java test tool that finds code that is not covered by tests. It does this via bytecode mutation to modify code paths of the class under test. First it runs your tests and they should all pass (ass usual). Then it will modify conditionals for branching, change literals, and generally wreck havok, making one change at a time. By rerunning the tests per change, if they don't fail, then you've missed a test case. All in all this is pretty damn cool.

It turns out that getting a simple prototype up and running with 'if' node flipping takes about 100 lines of code. The meat of it is:

def process_defn(exp)
  self.method = exp.shift
  result = [:defn, method]

  result << process(exp.shift) until exp.empty?

  heckle(result) if should_heckle?

  return result
end

def process_if(exp)
  cond = process(exp.shift)
  t = process(exp.shift)
  f = process(exp.shift)

  if should_heckle? then
    [:if, cond, f, t]
  else
    [:if, cond, t, f]
  end
end

I've named it heckle and released it on rubyforge and Kevin Clark went insane last night and poured through it, ruby2ruby, and ParseTree to dig deeper. I haven't seen him this morning yet so I don't know if he's succeeded extending it yet. We'll see. There will be a more official release soon.

RubyInline 3.6.2 Released

| | Comments (0)

RubyInline version 3.6.2 has been released! This is a quick patch for weird versions of GCC and/or linux and makes ParseTree work again on (hopefully) everything under the sun.

Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly. By writing simple builder classes, you can teach how to cope with new languages (fortran, perl, whatever). The code is compiled and run on the fly when needed.

% sudo gem update RubyInline

Changes:

3.6.2 / 2006-10-12

  • 2 bug fixes
    • comment stripper much more sane to fix problems on certain linux distros
    • fixed a nit with older C compilers.

4 releases went out the door

| | Comments (0)

I just finished releasing:

  • hoe 1.1.1
  • RubyInline 3.6.1
  • ParseTree 1.6.0
  • and new to the (official) family: ruby2ruby 1.1.0!
% sudo gem update hoe RubyInline ParseTree
% sudo gem install ruby2ruby

The biggies are:

  • ParseTree just got a major enema. 2k lines o' diff with an overall net loss of 800 loc. Awesome
  • ParseTree's new testing infrastructure is solid as all hell.
  • and it is circularly validated via ruby2ruby's tests.
  • We flushed out a bunch of completely unknown bugs by this process. About 6 nodes were broken in one way or another.

Also of note:

  • mingw32 patches for RubyInline
  • lots and lots of nice little bug fixes and enhancements all over.

About this Archive

This page is a archive of entries in the ParseTree category from October 2006.

ParseTree: September 2006 is the previous archive.

ParseTree: November 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1