1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 SIMU = <http://www.simantics.org/Simulation-1.1>
4 ISSUE = <http://www.simantics.org/Issue-1.2>
5 DATATYPE = <http://www.simantics.org/Datatypes-1.1>
7 STR = <http://www.simantics.org/Structural-1.2> : L0.Ontology
9 L0.HasResourceClass "org.simantics.structural.stubs.StructuralResource2"
11 //// Components and types
13 STR.Component <T L0.Entity : STR.ComponentType
15 @L0.property STR.IsConnectedTo
16 @L0.property STR.BelongsTo
17 @L0.property STR.GroupBelongsTo
18 L0.HasDescription "Defines a structure by instantiating some Type."
20 STR.ComponentType <T L0.Type
21 //[IsDefinedBy card "0..1"]
22 L0.HasDescription "Parametric structure that can be instantiated."
23 >-- STR.ComponentType.HasDefaultPropertyRelationType <R L0.IsRelatedTo
24 >-- STR.ComponentType.HasDefaultPropertyValueType <R L0.IsRelatedTo
25 >-- STR.ComponentType.HasDefaultMonitorValueType --> STR.MonitorValueType <R L0.IsRelatedTo
26 @L0.assert L0X.HasGeneratedNamePrefix ""
28 STR.MonitorValueType <T L0.Entity
29 STR.MonitorValue <T L0.SCLValue : STR.MonitorValueType
31 STR.IsDefinedBy <R L0.IsComposedOf : L0.FunctionalRelation
32 L0.HasRange STR.Component
33 L0.InverseOf STR.Defines
35 STR.AbstractDefinedComponentType <T STR.ComponentType
37 STR.DefinedComponentType <T STR.AbstractDefinedComponentType
39 STR.ReplaceableDefinedComponentType <T STR.AbstractDefinedComponentType
41 STR.ProceduralComponentType <T STR.AbstractDefinedComponentType
42 >-- STR.ProceduralComponentType.code --> STR.ProceduralComponentTypeCode <R L0.HasProperty : L0.TotalFunction
43 >-- STR.ProceduralComponentType.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.FunctionalRelation
45 STR.ProceduralComponentTypeCode <T L0.String
48 //STR.proceduralConnectionPointPath --> L0.String <R L0.HasProperty : L0.FunctionalRelation
51 STR.HasParameter <R L0.IsRelatedTo
52 L0.HasDomain STR.ComponentType
53 L0.HasRange STR.Variable
54 L0.HasDescription "Denotes that the given relation is a parameter to the Type."
55 L0.InverseOf STR.IsParameterOf <R L0.IsWeaklyRelatedTo
57 STR.ConnectionPointDefinition <T L0.PropertyDefinition
59 //// Specific structures
61 STR.Composite <T STR.Component
62 // [L0.ConsistsOf all Component]
63 L0.HasDescription "A structure defined as a set of other structures."
64 >-- STR.Composite.namingFunction ==> "ComponentNamingStrategy" <R L0.HasProperty : L0.TotalFunction
65 >-- STR.Composite.instantiationFunction ==> "Resource -> String -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
66 L0.HasDescription "Returns a function (Resource -> String -> Resource -> Resource) that takes the composite type, default name and target container as input and returns the created diagram."
68 STR.OrderedComposite <T STR.Component <T L0.OrderedSet
69 // Requirements are not currently expressible
73 STR.Variable <T L0.Entity
75 @L0.singleProperty STR.Binds
77 STR.Binds <R L0.IsRelatedTo
78 L0.HasRange L0.Relation
79 L0.InverseOf STR.IsBoundBy <R L0.IsWeaklyRelatedTo
81 //// Literal properties
83 // Find better name!!!
85 STR.LiteralVariable <T STR.Variable
86 //[Binds all VariableRelation]
88 STR.VariableRelation <T L0.Relation
90 STR.HasVariable <R L0.DependsOn : STR.VariableRelation
92 L0.InverseOf STR.VariableOf
94 STR.Expression <T L0.Entity
96 L0.HasDescription "Supertype of all value types that are not simple constant values or variables."
98 STR.ValueRelation <T L0.FunctionalRelation
100 STR.HasValue <R L0.HasProperty : STR.ValueRelation
101 @L0.tag L0.Abstract // can we use the tag for relations?
102 L0.HasDescription "Assigns a value to some parameter."
106 STR.Connection <T L0.Entity
107 @L0.property STR.Connects
108 @L0.property STR.IsJoinedBy
110 STR.ConnectionVariable <T STR.Variable <T STR.Connection
111 //[STR.Binds all STR.ConnectionRelation]
114 STR.Functions.connectionValueAccessor : L0.ExternalValue
115 L0.HasValueType "ValueAccessor"
117 STR.ConnectionRelation <T L0.Relation
118 @L0.assert L0.SharedRange STR.ConnectionRelation
119 >-- STR.ConnectionRelation.connectionRequired --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
120 >-- STR.ConnectionRelation.equivalentConnectionPoint --> STR.ConnectionRelation <R L0.IsRelatedTo
121 L0.InverseOf STR.ConnectionRelation.equivalentConnectionPoint
122 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
123 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
124 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
126 STR.SynchronizedRelation <T L0.Relation
127 STR.SynchronizedConnectionRelation <T STR.ConnectionRelation
128 STR.ProvidingConnectionRelation <T STR.ConnectionRelation
130 STR.InComposite <R L0X.HasTemplate
134 //IsConnected <R L0.DependsOn : ConnectionRelation
135 // @L0.tag L0.Abstract
136 // L0.InverseOf IsConnected
138 STR.DirectedConnectionRelation <T STR.ConnectionRelation
139 L0.Asserts _ : L0.Assertion
140 L0.HasPredicate L0.SharedRange
141 L0.HasObject STR.DirectedConnectionRelation
143 STR.IsConnectedTo <R L0.DependsOn : STR.ConnectionRelation
145 L0.InverseOf STR.Connects
147 //// Connection types
150 STR.SupportsConnectionType <R L0.IsRelatedTo
151 L0.HasRange STR.ConnectionType
153 STR.HasConnectionType <R L0.IsRelatedTo : L0.FunctionalRelation
154 L0.HasRange STR.ConnectionType
156 STR.ConnectionType <T L0.Entity
157 >-- STR.ConnectionType.isUserSelectable --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
158 @L0.assert STR.ConnectionType.isUserSelectable false
159 //[STR.HasCardinalityRestriction all STR.CardinalityRestriction]
161 STR.SupportsDirection <R L0.IsRelatedTo
162 L0.HasRange STR.ConnectionDirection
164 STR.ConnectionDirection <T L0.Entity
166 STR.InputDirection : STR.ConnectionDirection
167 STR.OutputDirection : STR.ConnectionDirection
169 STR.HasCardinalityRestriction <R L0.IsRelatedTo
171 STR.CardinalityRestriction <T L0.Entity
172 //[STR.HasLowerBound card "0..1"]
173 //[STR.HasUpperBound card "0..1"]
174 //[STR.HasConnectionDirection card "0..1"]
176 STR.HasLowerBound <R L0.HasProperty
177 STR.HasUpperBound <R L0.HasProperty
178 STR.HasConnectionDirection <R L0.IsRelatedTo
180 STR.ConnectionJoin <T L0.Entity
181 @L0.property STR.Joins
182 STR.Joins <R L0.DependsOn
183 L0.InverseOf STR.IsJoinedBy <R L0.DependsOn
184 L0.HasDomain STR.Connection
185 L0.HasRange STR.ConnectionJoin
186 STR.HasConnectionJoin <R L0.DependsOn
187 L0.HasDomain STR.Composite
188 L0.HasRange STR.ConnectionJoin
189 L0.InverseOf STR.JoinsComposite <R L0.IsWeaklyRelatedTo
193 STR.ModelingRules <T L0.Entity
194 L0.HasDescription """Defines what can be populated to a composite
195 and what can be connected.
196 See <https://www.simantics.org/wiki/index.php/Diagram_ontology>."""
198 STR.HasModelingRules <R L0.IsRelatedTo : L0.FunctionalRelation
199 L0.HasDomain STR.Composite
200 L0.HasDomain STR.OrderedComposite
201 L0.HasRange STR.ModelingRules
203 STR.SimpleModelingRules <T STR.ModelingRules
204 @L0.singleProperty STR.HasConnectionType
205 @L0.singleProperty STR.HasAttachmentRelation
206 L0.HasDescription """Modeling rules that allow all connections."""
207 STR.HasAttachmentRelation <R L0.IsRelatedTo : L0.FunctionalRelation
208 L0.HasRange L0.Relation
210 STR.DefaultConnectionType : STR.ConnectionType
211 STR.DefaultModelingRules : STR.SimpleModelingRules
212 STR.HasConnectionType STR.DefaultConnectionType
213 STR.StandardModelingRules : STR.ModelingRules
214 STR.AllowsConnectionType <R L0.DependsOn
215 L0.HasDomain L0.Relation
216 L0.HasRange STR.ConnectionType
217 L0.InverseOf STR.AllowsConnectionType.Inverse <R L0.IsWeaklyRelatedTo
218 STR.OverridesConnectionType <R L0.DependsOn
219 L0.HasDomain STR.ConnectionType
220 L0.HasRange STR.ConnectionType
221 STR.IsIncludedInConnectionType <R L0.DependsOn
222 L0.HasDomain STR.ConnectionType
223 L0.HasRange STR.ConnectionType
224 STR.DefaultsToConnectionType <R L0.DependsOn : L0.FunctionalRelation
226 --> STR.ConnectionType
227 L0.InverseOf STR.DefaultsToConnectionType.Inverse <R L0.IsWeaklyRelatedTo
228 STR.ConnectionConstraint <T L0.Entity
229 STR.HasConnectionConstraint <R L0.IsRelatedTo
230 L0.HasDomain STR.ConnectionType
231 L0.HasRange STR.ConnectionConstraint
235 STR.BelongsTo <R L0.IsRelatedTo
236 L0.HasRange STR.ComponentGroup
237 L0.InverseOf STR.BelongsToInverse <R L0.IsWeaklyRelatedTo
238 STR.GroupBelongsTo <R L0.IsRelatedTo
239 L0.HasRange STR.GroupSubsumption
240 L0.InverseOf STR.GroupBelongsToInverse <R L0.IsWeaklyRelatedTo
241 STR.ComponentGroup <T L0.Entity
242 STR.GroupSubsumption <T L0.Entity
243 @L0.property STR.HasSubgroup
244 @L0.property STR.BelongsTo
245 STR.HasSubgroup <R L0.IsRelatedTo
246 L0.HasRange STR.ComponentGroup
248 // Support for expressions
249 STR.HasExpression <R L0.HasProperty
252 L0.valueAccessor STR.Functions.expressionValueAccessor : L0.ExternalValue
254 STR.Functions : L0.Library
258 // Removed these changes after r25103 since they cause ManyObjectsForFunctionalRelationException: Functional relation has assertions from multiple inherited types.
259 // problems for domainProperties and possibly valueAccessor too when simply viewing the properties of an instance whose type uses multi-inheritance.
260 // Need a solution for this before enabling.
262 @L0.assert L0.domainProperties
263 STR.Functions.structuralChildDomainProperties : L0.ExternalValue
264 L0.HasValueType "VariableMap"
265 @L0.assert L0.domainChildren
266 STR.Functions.structuralChildDomainChildren : L0.ExternalValue
267 L0.HasValueType "VariableMap"
268 @L0.sclAssertion L0.typeResource "structuralTypeResource" "Variable -> Resource -> <ReadGraph> Resource"
271 @L0.assert L0.domainChildren
272 STR.Functions.structuralRunDomainChildren : L0.ExternalValue
273 L0.HasValueType "VariableMap"
276 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
277 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
278 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
280 STR.SCLValue <T L0.SCLValue
281 @L0.assert L0.ConvertsToValueWith STR.Functions.computeExpression
282 @L0.assert L0.SCLValue.environment
283 _ : L0.SCLValue.Environment
284 L0.SCLValue.Environment.moduleName "Simantics/All"
285 L0.SCLValue.Environment.namespace ""
287 STR.scl : L0.Template
288 @template %subject %property %expression %valueType
290 %property _ : STR.SCLValue
291 L0.SCLValue.expression %expression
292 L0.HasValueType %valueType
294 STR.sclValue : L0.Template
295 @template %subject %expression %valueType
296 %subject : STR.SCLValue
297 L0.SCLValue.expression %expression
298 L0.HasValueType %valueType
300 STR.InvalidSCLExpressionIssue <T ISSUE.Issue
302 STR.Property <T L0.FunctionalRelation <T L0.PropertyRelation
303 @L0.assert STR.HasExpression
304 _ /* dummy */ : L0.Value
305 L0.HasValueType "String"
308 L0.HasConstraint STR.ConnectionConstraint : L0.Constraint
309 L0.Constraint.Validator
310 STR.Functions.connectionValidator : L0.Function
312 STR.ConnectionConstraint.ErrorIssue
313 @ISSUE.issue ISSUE.Severity.Error
314 STR.Functions.connectionIssueDescription : L0.Function
315 L0.HasValueType "String"
317 STR.ConnectionConstraint.Source <T ISSUE.Sources.DependencyTracker
318 L0.HasLabel "Structural connection validity"
319 @L0.assert ISSUE.Sources.DependencyTracker.HasType STR.Component
320 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.Connection
321 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.ConnectionJoin
322 @L0.assert ISSUE.Sources.DependencyTracker.HasExtension STR.Functions.connectionExtension
323 @L0.assert ISSUE.Sources.DependencyTracker.HasConstraint STR.ConnectionConstraint
325 STR.HasJoinClusterSet <R L0.IsComposedOf
328 STR.structuralRevision <R L0.HasProperty : L0.FunctionalRelation
331 STR.synchronizedRevision <R L0.HasProperty : L0.FunctionalRelation
334 STR.input <R L0.HasProperty : L0.FunctionalRelation
337 STR.UserDefinedProperty <T L0.Entity
339 STR.TypeOverride <T L0.Entity
340 >-- STR.TypeOverride.HasOriginalType --> STR.ComponentType <R L0.IsRelatedTo : L0.TotalFunction
341 >-- STR.TypeOverride.HasReplacementType --> STR.ComponentType <R L0.IsRelatedTo : L0.TotalFunction
342 STR.HasTypeOverride --> STR.TypeOverride <R L0.IsRelatedTo
346 // This relation is inherited from L0.IsComposedOf because changes in the code
347 // need to be propagated to the component type
348 >-- STR.ComponentType.hasScript --> STR.ComponentTypeScript <R L0.IsComposedOf
349 STR.ComponentTypeScript <T L0.Entity
350 >-- STR.ComponentTypeScript.type --> L0.String <R L0.HasProperty : L0.FunctionalRelation
351 >-- STR.ComponentTypeScript.code --> L0.String <R L0.HasProperty : L0.FunctionalRelation
353 STR.ComponentType.Locked
355 L0.HasDomain STR.ComponentType
356 L0.HasDescription "Indicates that the component type is locked and cannot be opened for editing."