when compiling the trivial XDuce-program:
type X = email[],X | ()
I get the error
File "../test.q", line 1, characters 0-26:
This type definition is not right-linear.
Although the type definition is right-linear (according
to my understanding of right-linearity).
I've looked at wf.ml (althought I'm not that familiar
with O'Caml) and I noticed that the Ill_Formed
exception only gets thrown out of the wf_type function.
Now I've also noticed that in the "Regular Expression
Types for XML" paper you define a type to be
well-formed if it is right-linear. A check to see if a
type is right-linear might involve checking that a
subpart of a concatenation is disconnected. However, as
far as I can see, you only check if a type is
disconnected and not if it is really linear.
Is this a bug or do you only really want to check on
disconnectiveness and not on right-linearity?
Logged In: YES
user_id=274756
We actually changed (from version 0.2.2) the well-formed
restriction from what is written in the paper.
We now require that any recursive use of variables must be
enclosed by labels. So the fact that the system rejected
your example was right. But the error message was wrong.
It shouldn't say "right-linear".
I'll fix it in the next version.
Sorry about the confusion.