type mqpt = string option (* PROTOCOL TOKENS *)
(* Some = constant string *)
- (* None = single star: '*' *)
+ (* None = single star: '*' *)
type mqbt = (* BODY TOKENS *)
| MQBC of string (* a constant string *)
type mqfunc =
| MQName (* NAME *)
+ | MQTheory
+ | MQTitle
+ | MQContributor
+ | MQCreator
+ | MQPublisher
+ | MQSubject
+ | MQDescription
+ | MQDate
+ | MQType
+ | MQFormat
+ | MQIdentifier
+ | MQLanguage
+ | MQRelation
+ | MQSource
+ | MQCoverage
+ | MQRights
+ | MQInstitution
+ | MQContact
+ | MQFirstVersion
+ | MQModified
type mqstring =
| MQCons of string (* constant *)
| MQMConclusion (* main conclusion *)
| MQConclusion (* inner conclusion *)
+type mqorder =
+ | MQAsc
+ | MQDesc
+
type mqbool =
| MQTrue
| MQFalse
| MQAnd of mqbool * mqbool
| MQOr of mqbool * mqbool
| MQNot of mqbool
- | MQIs of mqstring * mqstring (* operands *)
-
-type mqlist =
- | MQSelect of mqrvar * mqlist * mqbool (* rvar, list, boolean *)
- | MQUse of mqlist * mqsvar (* list, Position attribute *)
- | MQUsedBy of mqlist * mqsvar (* list, Position attribute *)
- | MQPattern of mqpattern (* pattern *)
- | MQUnion of mqlist * mqlist (* operands *)
- | MQIntersect of mqlist * mqlist (* operands *)
+ | MQIs of mqstring * mqstring (* operands *)
+ | MQSetEqual of mqlist * mqlist (* the two lists denote the *)
+ (* same set *)
+ | MQSubset of mqlist * mqlist (* the two lists denote two *)
+ (* sets, the first one *)
+ (* subsect of the second one. *)
+
+and mqlist =
+ | MQSelect of mqrvar * mqlist * mqbool (* rvar, list, boolean *)
+ | MQUse of mqlist * mqsvar (* list, Position attribute *)
+ | MQUsedBy of mqlist * mqsvar (* list, Position attribute *)
+ | MQPattern of mqpattern (* pattern *)
+ | MQUnion of mqlist * mqlist (* operands *)
+ | MQIntersect of mqlist * mqlist (* operands *)
+ | MQSortedBy of mqlist * mqorder * mqfunc (* *)
+ | MQRVarOccur of mqrvar
+ | MQDiff of mqlist * mqlist (* *)
type mquery =
| MQList of mqlist