[augeas-devel] httpd.conf and beyond

Francis Giraldeau francis.giraldeau at usherbrooke.ca
Wed Mar 17 19:02:54 UTC 2010


Le vendredi 19 février 2010 à 15:19 -0800, David Lutterkort a écrit :
> 
>         let directives = (directive1|directive2|...|directiveN)*
> 
> Because there are so many directives, the typechecker runs out of
> memory, even if you give it a lot of memory. This is particularly
> annoying since it's perfectly fine to _use_ the lens, i.e. even though
> you can't typecheck the lens, you can use them for parsing without a
> noticeable performance problem (if you're willing to assume you have no
> type errors ;).

If I understand correctly, typechecking union involves computing the
intersection of two automaton, which has complexity of n^4 and each lens
have to be tested against each other, that is n^2, the total runtime
complexity is n^6, is that right?

> I've been trying to address that by playing various tricks with reguar
> expressions inside libfa (the OOM happens in fa_ambig_example) - the
> next thing to try, when I get some time, is to convert regular
> expressions to finite automata using a derivative-based approach[1] I've
> got some patches to do the canonization of regular expressions their
> construction requires, I just haven't had a chance to implement their
> DFA construction.

As I understand, we could get smaller automaton from building them from
a derivative-base approach. Do you think that this method will generate
significantly smaller automaton? 

It seems that this check is almost the same as the vertical ambiguity
analyse in xsugar. There is a feature to assign a priority to production
rules. Hence, the ambiguity check is done only on productions that have
the same priority, since only those can be in conflict.

Would it be possible to assign priority to lenses? The order in which
lenses are written could be their priority order. 

Shame on me, I'm looking at the augeas code since a while, and I still
don't catch what those types stands for : { "ctype", "atype", "ktype",
"vtype" }; Maybe other people may also be interested to know.

Sincerly, 

Francis 




More information about the augeas-devel mailing list