-type r_obj = (uri * position * depth)
-type r_rel = (position * depth)
-type r_sort = (position * depth * sort)
+type spec = MustObj of uri list * position list * depth list
+ | MustSort of sort list * position list * depth list
+ | MustRel of position list * depth list
+ | OnlyObj of uri list * position list * depth list
+ | OnlySort of sort list * position list * depth list
+ | OnlyRel of position list * depth list
+ | Universe of position list
+
+val locate : string -> MathQL.query
+
+val compose : spec list -> MathQL.query
+
+val builtin : MathQL.vvar -> string
+
+(* interface for the old constraints ***************************************)
+
+type old_depth = int option
+
+type r_obj = uri * position * old_depth
+type r_rel = position * old_depth
+type r_sort = position * old_depth * sort