{ * File: 04-queries-c3a-to-c3c.sml.txt * Author: Manfred Jeusfeld, Thomas Kuehne * Created: 2023-03-01/M.Jeusfeld (2024-03-17/M.Jeusfeld) * ------------------------------------------------------ * Queries for constraints c3a to c3c * The ame queries are also in 02-constraints.sml.txt * * License: Creative Commons license Attribution-NonCommercial 4.0 International http://creativecommons.org/licenses/by-nc/4.0/ http://creativecommons.org/licenses/by-nc/4.0/legalcode * } {* Query C3a previously was constraint C3a, but the latter became obsolete with the introduction of constraint C4c. *} {* C3a: An element must not have more than one classifier in one dimension (no multiple classification). *} C3a_MultipleClassification in QueryClass isA Element with constraint multipleClassifiers: $ exists lab/Label c1,c2/Element (this instanceOf/lab c1) and (this instanceOf/lab c2) and (c1 <> c2) $ end {* C3b: An element must not have more than one supertype in one dimension (no multiple generalization). *} C3b_MultipleGeneralization in QueryClass isA Element with constraint multipleSupertypes: $ exists lab/Label s1,s2/Element (this specializationOf/lab s1) and (this specializationOf/lab s2) and (s1 <> s2) $ end {* C3c: Within a dimension, all classification relationships must form a single cluster. *} C3c_DisjointClusterRoots in GenericQueryClass isA Element with parameter,computed_attribute dim: Dimension constraint disjointRoots: $ exists lab/Label (this in TopInDimension[~dim/dim]) and Label(dim,lab) and exists x0/Element (x0 instanceOf/lab this) and (not exists c/Element (forall x,y/Element (x instanceOf/lab y) ==> (x instanceOf_trans/lab c))) $ end