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.ProceduralComponentType <T STR.AbstractDefinedComponentType
40 >-- STR.ProceduralComponentType.code --> STR.ProceduralComponentTypeCode <R L0.HasProperty : L0.TotalFunction
41 >-- STR.ProceduralComponentType.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.FunctionalRelation
43 STR.ProceduralComponentTypeCode <T L0.String
45 //STR.proceduralConnectionPointPath --> L0.String <R L0.HasProperty : L0.FunctionalRelation
48 STR.HasParameter <R L0.IsRelatedTo
49 L0.HasDomain STR.ComponentType
50 L0.HasRange STR.Variable
51 L0.HasDescription "Denotes that the given relation is a parameter to the Type."
52 L0.InverseOf STR.IsParameterOf <R L0.IsWeaklyRelatedTo
54 STR.ConnectionPointDefinition <T L0.PropertyDefinition
56 //// Specific structures
58 STR.Composite <T STR.Component
59 // [L0.ConsistsOf all Component]
60 L0.HasDescription "A structure defined as a set of other structures."
61 >-- STR.Composite.namingFunction ==> "ComponentNamingStrategy" <R L0.HasProperty : L0.TotalFunction
62 >-- STR.Composite.instantiationFunction ==> "Resource -> String -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
63 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."
65 STR.OrderedComposite <T STR.Component <T L0.OrderedSet
66 // Requirements are not currently expressible
70 STR.Variable <T L0.Entity
72 @L0.singleProperty STR.Binds
74 STR.Binds <R L0.IsRelatedTo
75 L0.HasRange L0.Relation
76 L0.InverseOf STR.IsBoundBy <R L0.IsWeaklyRelatedTo
78 //// Literal properties
80 // Find better name!!!
82 STR.LiteralVariable <T STR.Variable
83 //[Binds all VariableRelation]
85 STR.VariableRelation <T L0.Relation
87 STR.HasVariable <R L0.DependsOn : STR.VariableRelation
89 L0.InverseOf STR.VariableOf
91 STR.Expression <T L0.Entity
93 L0.HasDescription "Supertype of all value types that are not simple constant values or variables."
95 STR.ValueRelation <T L0.FunctionalRelation
97 STR.HasValue <R L0.HasProperty : STR.ValueRelation
98 @L0.tag L0.Abstract // can we use the tag for relations?
99 L0.HasDescription "Assigns a value to some parameter."
103 STR.Connection <T L0.Entity
104 @L0.property STR.Connects
105 @L0.property STR.IsJoinedBy
107 STR.ConnectionVariable <T STR.Variable <T STR.Connection
108 //[STR.Binds all STR.ConnectionRelation]
111 STR.Functions.connectionValueAccessor : L0.ExternalValue
112 L0.HasValueType "ValueAccessor"
114 STR.ConnectionRelation <T L0.Relation
115 @L0.assert L0.SharedRange STR.ConnectionRelation
116 >-- STR.ConnectionRelation.connectionRequired --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
117 >-- STR.ConnectionRelation.equivalentConnectionPoint --> STR.ConnectionRelation <R L0.IsRelatedTo
118 L0.InverseOf STR.ConnectionRelation.equivalentConnectionPoint
119 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
120 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
121 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
123 STR.SynchronizedRelation <T L0.Relation
124 STR.SynchronizedConnectionRelation <T STR.ConnectionRelation
125 STR.ProvidingConnectionRelation <T STR.ConnectionRelation
127 STR.InComposite <R L0X.HasTemplate
131 //IsConnected <R L0.DependsOn : ConnectionRelation
132 // @L0.tag L0.Abstract
133 // L0.InverseOf IsConnected
135 STR.DirectedConnectionRelation <T STR.ConnectionRelation
136 L0.Asserts _ : L0.Assertion
137 L0.HasPredicate L0.SharedRange
138 L0.HasObject STR.DirectedConnectionRelation
140 STR.IsConnectedTo <R L0.DependsOn : STR.ConnectionRelation
142 L0.InverseOf STR.Connects
144 //// Connection types
147 STR.SupportsConnectionType <R L0.IsRelatedTo
148 L0.HasRange STR.ConnectionType
150 STR.HasConnectionType <R L0.IsRelatedTo : L0.FunctionalRelation
151 L0.HasRange STR.ConnectionType
153 STR.ConnectionType <T L0.Entity
154 >-- STR.ConnectionType.isUserSelectable --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
155 @L0.assert STR.ConnectionType.isUserSelectable false
156 //[STR.HasCardinalityRestriction all STR.CardinalityRestriction]
158 STR.SupportsDirection <R L0.IsRelatedTo
159 L0.HasRange STR.ConnectionDirection
161 STR.ConnectionDirection <T L0.Entity
163 STR.InputDirection : STR.ConnectionDirection
164 STR.OutputDirection : STR.ConnectionDirection
166 STR.HasCardinalityRestriction <R L0.IsRelatedTo
168 STR.CardinalityRestriction <T L0.Entity
169 //[STR.HasLowerBound card "0..1"]
170 //[STR.HasUpperBound card "0..1"]
171 //[STR.HasConnectionDirection card "0..1"]
173 STR.HasLowerBound <R L0.HasProperty
174 STR.HasUpperBound <R L0.HasProperty
175 STR.HasConnectionDirection <R L0.IsRelatedTo
177 STR.ConnectionJoin <T L0.Entity
178 @L0.property STR.Joins
179 STR.Joins <R L0.DependsOn
180 L0.InverseOf STR.IsJoinedBy <R L0.DependsOn
181 L0.HasDomain STR.Connection
182 L0.HasRange STR.ConnectionJoin
183 STR.HasConnectionJoin <R L0.DependsOn
184 L0.HasDomain STR.Composite
185 L0.HasRange STR.ConnectionJoin
186 L0.InverseOf STR.JoinsComposite <R L0.IsWeaklyRelatedTo
190 STR.ModelingRules <T L0.Entity
191 L0.HasDescription """Defines what can be populated to a composite
192 and what can be connected.
193 See <https://www.simantics.org/wiki/index.php/Diagram_ontology>."""
195 STR.HasModelingRules <R L0.IsRelatedTo : L0.FunctionalRelation
196 L0.HasDomain STR.Composite
197 L0.HasDomain STR.OrderedComposite
198 L0.HasRange STR.ModelingRules
200 STR.SimpleModelingRules <T STR.ModelingRules
201 @L0.singleProperty STR.HasConnectionType
202 @L0.singleProperty STR.HasAttachmentRelation
203 L0.HasDescription """Modeling rules that allow all connections."""
204 STR.HasAttachmentRelation <R L0.IsRelatedTo : L0.FunctionalRelation
205 L0.HasRange L0.Relation
207 STR.DefaultConnectionType : STR.ConnectionType
208 STR.DefaultModelingRules : STR.SimpleModelingRules
209 STR.HasConnectionType STR.DefaultConnectionType
210 STR.StandardModelingRules : STR.ModelingRules
211 STR.AllowsConnectionType <R L0.DependsOn
212 L0.HasDomain L0.Relation
213 L0.HasRange STR.ConnectionType
214 L0.InverseOf STR.AllowsConnectionType.Inverse <R L0.IsWeaklyRelatedTo
215 STR.OverridesConnectionType <R L0.DependsOn
216 L0.HasDomain STR.ConnectionType
217 L0.HasRange STR.ConnectionType
218 STR.IsIncludedInConnectionType <R L0.DependsOn
219 L0.HasDomain STR.ConnectionType
220 L0.HasRange STR.ConnectionType
221 STR.DefaultsToConnectionType <R L0.DependsOn : L0.FunctionalRelation
223 --> STR.ConnectionType
224 L0.InverseOf STR.DefaultsToConnectionType.Inverse <R L0.IsWeaklyRelatedTo
225 STR.ConnectionConstraint <T L0.Entity
226 STR.HasConnectionConstraint <R L0.IsRelatedTo
227 L0.HasDomain STR.ConnectionType
228 L0.HasRange STR.ConnectionConstraint
232 STR.BelongsTo <R L0.IsRelatedTo
233 L0.HasRange STR.ComponentGroup
234 L0.InverseOf STR.BelongsToInverse <R L0.IsWeaklyRelatedTo
235 STR.GroupBelongsTo <R L0.IsRelatedTo
236 L0.HasRange STR.GroupSubsumption
237 L0.InverseOf STR.GroupBelongsToInverse <R L0.IsWeaklyRelatedTo
238 STR.ComponentGroup <T L0.Entity
239 STR.GroupSubsumption <T L0.Entity
240 @L0.property STR.HasSubgroup
241 @L0.property STR.BelongsTo
242 STR.HasSubgroup <R L0.IsRelatedTo
243 L0.HasRange STR.ComponentGroup
245 // Support for expressions
246 STR.HasExpression <R L0.HasProperty
249 L0.valueAccessor STR.Functions.expressionValueAccessor : L0.ExternalValue
251 STR.Functions : L0.Library
255 // Removed these changes after r25103 since they cause ManyObjectsForFunctionalRelationException: Functional relation has assertions from multiple inherited types.
256 // problems for domainProperties and possibly valueAccessor too when simply viewing the properties of an instance whose type uses multi-inheritance.
257 // Need a solution for this before enabling.
259 @L0.assert L0.domainProperties
260 STR.Functions.structuralChildDomainProperties : L0.ExternalValue
261 L0.HasValueType "VariableMap"
262 @L0.assert L0.domainChildren
263 STR.Functions.structuralChildDomainChildren : L0.ExternalValue
264 L0.HasValueType "VariableMap"
267 @L0.assert L0.domainChildren
268 STR.Functions.structuralRunDomainChildren : L0.ExternalValue
269 L0.HasValueType "VariableMap"
272 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
273 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
274 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
276 STR.SCLValue <T L0.SCLValue
277 @L0.assert L0.ConvertsToValueWith STR.Functions.computeExpression
278 @L0.assert L0.SCLValue.environment
279 _ : L0.SCLValue.Environment
280 L0.SCLValue.Environment.moduleName "Simantics/All"
281 L0.SCLValue.Environment.namespace ""
283 STR.scl : L0.Template
284 @template %subject %property %expression %valueType
286 %property _ : STR.SCLValue
287 L0.SCLValue.expression %expression
288 L0.HasValueType %valueType
290 STR.sclValue : L0.Template
291 @template %subject %expression %valueType
292 %subject : STR.SCLValue
293 L0.SCLValue.expression %expression
294 L0.HasValueType %valueType
296 STR.InvalidSCLExpressionIssue <T ISSUE.Issue
298 STR.Property <T L0.FunctionalRelation <T L0.PropertyRelation
299 @L0.assert STR.HasExpression
300 _ /* dummy */ : L0.Value
301 L0.HasValueType "String"
304 L0.HasConstraint STR.ConnectionConstraint : L0.Constraint
305 L0.Constraint.Validator
306 STR.Functions.connectionValidator : L0.Function
308 STR.ConnectionConstraint.ErrorIssue
309 @ISSUE.issue ISSUE.Severity.Error
310 STR.Functions.connectionIssueDescription : L0.Function
311 L0.HasValueType "String"
313 STR.ConnectionConstraint.Source <T ISSUE.Sources.DependencyTracker
314 L0.HasLabel "Structural connection validity"
315 @L0.assert ISSUE.Sources.DependencyTracker.HasType STR.Component
316 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.Connection
317 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.ConnectionJoin
318 @L0.assert ISSUE.Sources.DependencyTracker.HasExtension STR.Functions.connectionExtension
319 @L0.assert ISSUE.Sources.DependencyTracker.HasConstraint STR.ConnectionConstraint
321 STR.HasJoinClusterSet <R L0.IsComposedOf
324 STR.structuralRevision <R L0.HasProperty : L0.FunctionalRelation
327 STR.synchronizedRevision <R L0.HasProperty : L0.FunctionalRelation
330 STR.input <R L0.HasProperty : L0.FunctionalRelation
333 STR.UserDefinedProperty <T L0.Entity
336 // This relation is inherited from L0.IsComposedOf because changes in the code
337 // need to be propagated to the component type
338 >-- STR.ComponentType.hasScript --> STR.ComponentTypeScript <R L0.IsComposedOf
339 STR.ComponentTypeScript <T L0.Entity
340 >-- STR.ComponentTypeScript.type --> L0.String <R L0.HasProperty : L0.FunctionalRelation
341 >-- STR.ComponentTypeScript.code --> L0.String <R L0.HasProperty : L0.FunctionalRelation
343 STR.ComponentType.Locked
345 L0.HasDomain STR.ComponentType
346 L0.HasDescription "Indicates that the component type is locked and cannot be opened for editing."