[augeas-devel] Re: [Interfaces] Draft lense

Nate Foster jnfoster at cis.upenn.edu
Mon Aug 25 21:52:03 UTC 2008


>> Yes, lens debugging messages are quite hard to understand. I banged my
>> head with them too, and I think they are definitely something that
>> could be improved.

I've been swamped with other stuff and haven't been following this
discussion closely so apologies if this is off-topic.

Two debugging things we have found helpful in Boomerang:

* If you are trying to debug to make the type checker happy, having
counterexamples when typing conditions (like unambiguous concatenation
and iteration, and disjointness) fail is essential.

* If you are debugging the transformation itself, we've found a little
"probe" primitive is helpful. It takes a string n and a lens l as
arguments and wraps the GET/PUT/CREATE functions of the lens with code
to prints a message to stdout with n and the string value flowing
through the functions at that point. Of course, if you use too many
probes, you get inundated with messages, but one or two can be very
helpful to zoom in on a small part of a transformation.

Nate




More information about the augeas-devel mailing list