Class & Property Querying
- Which classes can appear as domain and range of property creates
select $X, $Y from {:$X}creates{:$Y} or
select X, Y from Class{X}, Class{Y}, {:X}creates{:Y}
- Find all properties defined on class Painting and its superclasses
select @P, range(@P) from {:Painting}@P or
select P, range(P) from Property{P} where domain(P)>=Painting
Find the domain and range of the property creates
seq ( domain(creates), range(creates) )
while thanks to functional composition we can express
subclassof ( seq ( domain(creates), range(creates) ) [0] ) or
subclassof(seq(domain(creates), range(creates))[0]) {X}