[lextypes] Reconciling DTLL and Holus Bolus parameters

John Cowan cowan at mercury.ccil.org
Tue Jul 29 21:52:27 BST 2003


Bob Foster scripsit:

> (To keep from having to distinguish between this and that kind of
> parameters, I will refer to Holus Bolus (and all like sets of intrinsic as
> opposed to user-defined) parameters as properties, reserving the word
> parameters to its usage in RELAX NG datatypes and DTLL.)

Well, okay.  But RELAX NG parameters can be anything, semantically.
One could write a hard-coded implementation of Holus Bolus with no
problems; it would even be possible to start from an implementation of
WXS2 and streamline it.  It's true that HB properties can't be mapped
simply into DTLL parameters, though.

> In DTLL, subtypes are defined based on validity. T1<=T2 (T1 is a subtype of
> T2) iff for all values v, valid(v,T1) -> valid(v,T2). (-> is implication)

Part of the design of HB is that it's possible to determine for any two
subtypes of a basic type, whether they are subtypes of one another.  THis
is achieved by defining the subordination relation for each facet.

> I'm not equally enthusiastic about all facets. "length", for example, is
> just syntactic sugar. 

Which is why HB does not have it.

> Also, it should be possible for the developer to declare values for all
> facets, which it is not in WXS, where some are merely an explanitory gloss
> for the set of built-in types. For example, it must be possible to declare
> that a type is unordered and/or incomparable.

In HB, parameters are constraints, not fundamental facts, and there are
no truly novel types: everything is a string, number, date, etc. etc.

-- 
John Cowan  jcowan at reutershealth.com  www.reutershealth.com  www.ccil.org/~cowan
Original line from _The Warrior's Apprentice_ by Lois McMaster Bujold:
"Only on Barrayar would pulling a loaded needler start a stampede toward one."
English-to-Russian-to-English mangling thereof: "Only on Barrayar you risk to
lose support instead of finding it when you threat with the charged weapon."



More information about the lextypes mailing list