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

David Lutterkort lutter at redhat.com
Mon Aug 25 21:56:30 UTC 2008


On Mon, 2008-08-25 at 17:52 -0400, Nate Foster wrote:
> 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.

Yeah, AUgeas is doing that right now; some of the confusion comes from
the fact that it's not clear enough it seems whether the error talks
about the get or put direction (though it says that in the error
message ;)

> * 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.

That's a very nice idea .. typing wise I assume the result of probe is a
lens, i.e. probe is a function string -> lens -> lens ?

David





More information about the augeas-devel mailing list