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
27 STR.MonitorValueType <T L0.Entity
28 STR.MonitorValue <T L0.SCLValue : STR.MonitorValueType
30 STR.IsDefinedBy <R L0.IsComposedOf : L0.FunctionalRelation
31 L0.HasRange STR.Component
32 L0.InverseOf STR.Defines
34 STR.AbstractDefinedComponentType <T STR.ComponentType
36 STR.DefinedComponentType <T STR.AbstractDefinedComponentType
38 STR.ProceduralComponentType <T STR.AbstractDefinedComponentType
39 >-- STR.ProceduralComponentType.code --> STR.ProceduralComponentTypeCode <R L0.HasProperty : L0.TotalFunction
40 >-- STR.ProceduralComponentType.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.FunctionalRelation
42 STR.ProceduralComponentTypeCode <T L0.String
44 //STR.proceduralConnectionPointPath --> L0.String <R L0.HasProperty : L0.FunctionalRelation
47 STR.HasParameter <R L0.IsRelatedTo
48 L0.HasDomain STR.ComponentType
49 L0.HasRange STR.Variable
50 L0.HasDescription "Denotes that the given relation is a parameter to the Type."
51 L0.InverseOf STR.IsParameterOf <R L0.IsWeaklyRelatedTo
53 STR.ConnectionPointDefinition <T L0.PropertyDefinition
55 //// Specific structures
57 STR.Composite <T STR.Component
58 // [L0.ConsistsOf all Component]
59 L0.HasDescription "A structure defined as a set of other structures."
60 >-- STR.Composite.namingFunction ==> "ComponentNamingStrategy" <R L0.HasProperty : L0.TotalFunction
61 >-- STR.Composite.instantiationFunction ==> "Resource -> String -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
62 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."
64 STR.OrderedComposite <T STR.Component <T L0.OrderedSet
65 // Requirements are not currently expressible
69 STR.Variable <T L0.Entity
71 @L0.singleProperty STR.Binds
73 STR.Binds <R L0.IsRelatedTo
74 L0.HasRange L0.Relation
75 L0.InverseOf STR.IsBoundBy <R L0.IsWeaklyRelatedTo
77 //// Literal properties
79 // Find better name!!!
81 STR.LiteralVariable <T STR.Variable
82 //[Binds all VariableRelation]
84 STR.VariableRelation <T L0.Relation
86 STR.HasVariable <R L0.DependsOn : STR.VariableRelation
88 L0.InverseOf STR.VariableOf
90 STR.Expression <T L0.Entity
92 L0.HasDescription "Supertype of all value types that are not simple constant values or variables."
94 STR.ValueRelation <T L0.FunctionalRelation
96 STR.HasValue <R L0.HasProperty : STR.ValueRelation
97 @L0.tag L0.Abstract // can we use the tag for relations?
98 L0.HasDescription "Assigns a value to some parameter."
102 STR.Connection <T L0.Entity
103 @L0.property STR.Connects
104 @L0.property STR.IsJoinedBy
106 STR.ConnectionVariable <T STR.Variable <T STR.Connection
107 //[STR.Binds all STR.ConnectionRelation]
110 STR.Functions.connectionValueAccessor : L0.ExternalValue
111 L0.HasValueType "ValueAccessor"
113 STR.ConnectionRelation <T L0.Relation
114 @L0.assert L0.SharedRange STR.ConnectionRelation
115 >-- STR.ConnectionRelation.connectionRequired --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
116 >-- STR.ConnectionRelation.equivalentConnectionPoint --> STR.ConnectionRelation <R L0.IsRelatedTo
117 L0.InverseOf STR.ConnectionRelation.equivalentConnectionPoint
118 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
119 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
120 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
122 STR.SynchronizedRelation <T L0.Relation
123 STR.SynchronizedConnectionRelation <T STR.ConnectionRelation
124 STR.ProvidingConnectionRelation <T STR.ConnectionRelation
126 STR.InComposite <R L0X.HasTemplate
130 //IsConnected <R L0.DependsOn : ConnectionRelation
131 // @L0.tag L0.Abstract
132 // L0.InverseOf IsConnected
134 STR.DirectedConnectionRelation <T STR.ConnectionRelation
135 L0.Asserts _ : L0.Assertion
136 L0.HasPredicate L0.SharedRange
137 L0.HasObject STR.DirectedConnectionRelation
139 STR.IsConnectedTo <R L0.DependsOn : STR.ConnectionRelation
141 L0.InverseOf STR.Connects
143 //// Connection types
146 STR.SupportsConnectionType <R L0.IsRelatedTo
147 L0.HasRange STR.ConnectionType
149 STR.HasConnectionType <R L0.IsRelatedTo : L0.FunctionalRelation
150 L0.HasRange STR.ConnectionType
152 STR.ConnectionType <T L0.Entity
153 >-- STR.ConnectionType.isUserSelectable --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
154 @L0.assert STR.ConnectionType.isUserSelectable false
155 //[STR.HasCardinalityRestriction all STR.CardinalityRestriction]
157 STR.SupportsDirection <R L0.IsRelatedTo
158 L0.HasRange STR.ConnectionDirection
160 STR.ConnectionDirection <T L0.Entity
162 STR.InputDirection : STR.ConnectionDirection
163 STR.OutputDirection : STR.ConnectionDirection
165 STR.HasCardinalityRestriction <R L0.IsRelatedTo
167 STR.CardinalityRestriction <T L0.Entity
168 //[STR.HasLowerBound card "0..1"]
169 //[STR.HasUpperBound card "0..1"]
170 //[STR.HasConnectionDirection card "0..1"]
172 STR.HasLowerBound <R L0.HasProperty
173 STR.HasUpperBound <R L0.HasProperty
174 STR.HasConnectionDirection <R L0.IsRelatedTo
176 STR.ConnectionJoin <T L0.Entity
177 @L0.property STR.Joins
178 STR.Joins <R L0.DependsOn
179 L0.InverseOf STR.IsJoinedBy <R L0.DependsOn
180 L0.HasDomain STR.Connection
181 L0.HasRange STR.ConnectionJoin
182 STR.HasConnectionJoin <R L0.DependsOn
183 L0.HasDomain STR.Composite
184 L0.HasRange STR.ConnectionJoin
185 L0.InverseOf STR.JoinsComposite <R L0.IsWeaklyRelatedTo
189 STR.ModelingRules <T L0.Entity
190 L0.HasDescription """Defines what can be populated to a composite
191 and what can be connected.
192 See <https://www.simantics.org/wiki/index.php/Diagram_ontology>."""
194 STR.HasModelingRules <R L0.IsRelatedTo : L0.FunctionalRelation
195 L0.HasDomain STR.Composite
196 L0.HasDomain STR.OrderedComposite
197 L0.HasRange STR.ModelingRules
199 STR.SimpleModelingRules <T STR.ModelingRules
200 @L0.singleProperty STR.HasConnectionType
201 @L0.singleProperty STR.HasAttachmentRelation
202 L0.HasDescription """Modeling rules that allow all connections."""
203 STR.HasAttachmentRelation <R L0.IsRelatedTo : L0.FunctionalRelation
204 L0.HasRange L0.Relation
206 STR.DefaultConnectionType : STR.ConnectionType
207 STR.DefaultModelingRules : STR.SimpleModelingRules
208 STR.HasConnectionType STR.DefaultConnectionType
209 STR.StandardModelingRules : STR.ModelingRules
210 STR.AllowsConnectionType <R L0.DependsOn
211 L0.HasDomain L0.Relation
212 L0.HasRange STR.ConnectionType
213 L0.InverseOf STR.AllowsConnectionType.Inverse <R L0.IsWeaklyRelatedTo
214 STR.OverridesConnectionType <R L0.DependsOn
215 L0.HasDomain STR.ConnectionType
216 L0.HasRange STR.ConnectionType
217 STR.IsIncludedInConnectionType <R L0.DependsOn
218 L0.HasDomain STR.ConnectionType
219 L0.HasRange STR.ConnectionType
220 STR.DefaultsToConnectionType <R L0.DependsOn : L0.FunctionalRelation
222 --> STR.ConnectionType
223 L0.InverseOf STR.DefaultsToConnectionType.Inverse <R L0.IsWeaklyRelatedTo
224 STR.ConnectionConstraint <T L0.Entity
225 STR.HasConnectionConstraint <R L0.IsRelatedTo
226 L0.HasDomain STR.ConnectionType
227 L0.HasRange STR.ConnectionConstraint
231 STR.BelongsTo <R L0.IsRelatedTo
232 L0.HasRange STR.ComponentGroup
233 L0.InverseOf STR.BelongsToInverse <R L0.IsWeaklyRelatedTo
234 STR.GroupBelongsTo <R L0.IsRelatedTo
235 L0.HasRange STR.GroupSubsumption
236 L0.InverseOf STR.GroupBelongsToInverse <R L0.IsWeaklyRelatedTo
237 STR.ComponentGroup <T L0.Entity
238 STR.GroupSubsumption <T L0.Entity
239 @L0.property STR.HasSubgroup
240 @L0.property STR.BelongsTo
241 STR.HasSubgroup <R L0.IsRelatedTo
242 L0.HasRange STR.ComponentGroup
244 // Support for expressions
245 STR.HasExpression <R L0.HasProperty
248 L0.valueAccessor STR.Functions.expressionValueAccessor : L0.ExternalValue
250 STR.Functions : L0.Library
254 // Removed these changes after r25103 since they cause ManyObjectsForFunctionalRelationException: Functional relation has assertions from multiple inherited types.
255 // problems for domainProperties and possibly valueAccessor too when simply viewing the properties of an instance whose type uses multi-inheritance.
256 // Need a solution for this before enabling.
258 @L0.assert L0.domainProperties
259 STR.Functions.structuralChildDomainProperties : L0.ExternalValue
260 L0.HasValueType "VariableMap"
261 @L0.assert L0.domainChildren
262 STR.Functions.structuralChildDomainChildren : L0.ExternalValue
263 L0.HasValueType "VariableMap"
266 @L0.assert L0.domainChildren
267 STR.Functions.structuralRunDomainChildren : L0.ExternalValue
268 L0.HasValueType "VariableMap"
271 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
272 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
273 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
275 STR.SCLValue <T L0.SCLValue
276 @L0.assert L0.ConvertsToValueWith STR.Functions.computeExpression
277 @L0.assert L0.SCLValue.environment
278 _ : L0.SCLValue.Environment
279 L0.SCLValue.Environment.moduleName "Simantics/All"
280 L0.SCLValue.Environment.namespace ""
282 STR.scl : L0.Template
283 @template %subject %property %expression %valueType
285 %property _ : STR.SCLValue
286 L0.SCLValue.expression %expression
287 L0.HasValueType %valueType
289 STR.sclValue : L0.Template
290 @template %subject %expression %valueType
291 %subject : STR.SCLValue
292 L0.SCLValue.expression %expression
293 L0.HasValueType %valueType
295 STR.InvalidSCLExpressionIssue <T ISSUE.Issue
297 STR.Property <T L0.FunctionalRelation <T L0.PropertyRelation
298 @L0.assert STR.HasExpression
299 _ /* dummy */ : L0.Value
300 L0.HasValueType "String"
303 L0.HasConstraint STR.ConnectionConstraint : L0.Constraint
304 L0.Constraint.Validator
305 STR.Functions.connectionValidator : L0.Function
307 STR.ConnectionConstraint.ErrorIssue
308 @ISSUE.issue ISSUE.Severity.Error
309 STR.Functions.connectionIssueDescription : L0.Function
310 L0.HasValueType "String"
312 STR.ConnectionConstraint.Source <T ISSUE.Sources.DependencyTracker
313 L0.HasLabel "Structural connection validity"
314 @L0.assert ISSUE.Sources.DependencyTracker.HasType STR.Component
315 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.Connection
316 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.ConnectionJoin
317 @L0.assert ISSUE.Sources.DependencyTracker.HasExtension STR.Functions.connectionExtension
318 @L0.assert ISSUE.Sources.DependencyTracker.HasConstraint STR.ConnectionConstraint
320 STR.HasJoinClusterSet <R L0.IsComposedOf
323 STR.structuralRevision <R L0.HasProperty : L0.FunctionalRelation
326 STR.synchronizedRevision <R L0.HasProperty : L0.FunctionalRelation
329 STR.input <R L0.HasProperty : L0.FunctionalRelation
332 STR.UserDefinedProperty <T L0.Entity
335 // This relation is inherited from L0.IsComposedOf because changes in the code
336 // need to be propagated to the component type
337 >-- STR.ComponentType.hasScript --> STR.ComponentTypeScript <R L0.IsComposedOf
338 STR.ComponentTypeScript <T L0.Entity
339 >-- STR.ComponentTypeScript.type --> L0.String <R L0.HasProperty : L0.FunctionalRelation
340 >-- STR.ComponentTypeScript.code --> L0.String <R L0.HasProperty : L0.FunctionalRelation
342 STR.ComponentType.Locked
344 L0.HasDomain STR.ComponentType
345 L0.HasDescription "Indicates that the component type is locked and cannot be opened for editing."