[augeas-devel] Typecheck for multipart key
Francis Giraldeau
francis.giraldeau at usherbrooke.ca
Tue Oct 26 20:59:01 UTC 2010
> > I adjusted the typecheck to allow multiple keys and labels inside a
> > subtree. We have to check that concat keys doesn't overlap, and that
> > union is disjoint. Hence:
> >
> > let lns = key /[a]*/ . key /[a]*/ => concat.get ambiguity
> > let lns = key "a" | label "a" => union.put ambiguity
> Is it really necessary to introduce the atype_complete flag ? Doesn't
> the fact whether the atype is NULL tell us that ?
I tried to set atype to NULL, but it was cumbersome because the number
of groups in the regexp was not matching anymore the lens hierarchy, and
not was creating a lot of corner cases. It was necessary, because the
atype is really important at subtree and above, inside a subtree, only
ktype and vtype should be taken into account for typechecking.
> The abstract type of a lens is really a tree language; but since dealing
> with those is a little involved, we used as the atype the regular
> language describing possible key/value pairs of the children of a node,
> i.e. we disregarded the key and value of the node. Let's continue
> calling that the atype, as it is in the code. One effect of this
> simplification is that the typechecker would trip over false positives.
Yeah, for example : dels "x" | dels "y" was reported as union.put
ambiguous, because both have atype=()
Francis
More information about the augeas-devel
mailing list