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
47 //STR.proceduralConnectionPointPath --> L0.String <R L0.HasProperty : L0.FunctionalRelation
50 STR.HasParameter <R L0.IsRelatedTo
51 L0.HasDomain STR.ComponentType
52 L0.HasRange STR.Variable
53 L0.HasDescription "Denotes that the given relation is a parameter to the Type."
54 L0.InverseOf STR.IsParameterOf <R L0.IsWeaklyRelatedTo
56 STR.ConnectionPointDefinition <T L0.PropertyDefinition
58 //// Specific structures
60 STR.Composite <T STR.Component
61 // [L0.ConsistsOf all Component]
62 L0.HasDescription "A structure defined as a set of other structures."
63 >-- STR.Composite.namingFunction ==> "ComponentNamingStrategy" <R L0.HasProperty : L0.TotalFunction
64 >-- STR.Composite.instantiationFunction ==> "Resource -> String -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
65 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."
67 STR.OrderedComposite <T STR.Component <T L0.OrderedSet
68 // Requirements are not currently expressible
72 STR.Variable <T L0.Entity
74 @L0.singleProperty STR.Binds
76 STR.Binds <R L0.IsRelatedTo
77 L0.HasRange L0.Relation
78 L0.InverseOf STR.IsBoundBy <R L0.IsWeaklyRelatedTo
80 //// Literal properties
82 // Find better name!!!
84 STR.LiteralVariable <T STR.Variable
85 //[Binds all VariableRelation]
87 STR.VariableRelation <T L0.Relation
89 STR.HasVariable <R L0.DependsOn : STR.VariableRelation
91 L0.InverseOf STR.VariableOf
93 STR.Expression <T L0.Entity
95 L0.HasDescription "Supertype of all value types that are not simple constant values or variables."
97 STR.ValueRelation <T L0.FunctionalRelation
99 STR.HasValue <R L0.HasProperty : STR.ValueRelation
100 @L0.tag L0.Abstract // can we use the tag for relations?
101 L0.HasDescription "Assigns a value to some parameter."
105 STR.Connection <T L0.Entity
106 @L0.property STR.Connects
107 @L0.property STR.IsJoinedBy
109 STR.ConnectionVariable <T STR.Variable <T STR.Connection
110 //[STR.Binds all STR.ConnectionRelation]
113 STR.Functions.connectionValueAccessor : L0.ExternalValue
114 L0.HasValueType "ValueAccessor"
116 STR.ConnectionRelationType <T L0.Type
118 STR.ConnectionRelation <T L0.Relation : STR.ConnectionRelationType
119 @L0.assert L0.SharedRange STR.ConnectionRelation
120 >-- STR.ConnectionRelation.connectionRequired --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
121 >-- STR.ConnectionRelation.equivalentConnectionPoint --> STR.ConnectionRelation <R L0.IsRelatedTo
122 L0.InverseOf STR.ConnectionRelation.equivalentConnectionPoint
123 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
124 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
125 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
127 STR.SynchronizedRelation <T L0.Relation
128 STR.SynchronizedConnectionRelation <T STR.ConnectionRelation
129 STR.ProvidingConnectionRelation <T STR.ConnectionRelation
131 STR.InComposite <R L0X.HasTemplate
135 //IsConnected <R L0.DependsOn : ConnectionRelation
136 // @L0.tag L0.Abstract
137 // L0.InverseOf IsConnected
139 STR.DirectedConnectionRelation <T STR.ConnectionRelation
140 L0.Asserts _ : L0.Assertion
141 L0.HasPredicate L0.SharedRange
142 L0.HasObject STR.DirectedConnectionRelation
144 STR.IsConnectedTo <R L0.DependsOn : STR.ConnectionRelation
146 L0.InverseOf STR.Connects
148 //// Connection types
151 STR.SupportsConnectionType <R L0.IsRelatedTo
152 L0.HasRange STR.ConnectionType
154 STR.HasConnectionType <R L0.IsRelatedTo : L0.FunctionalRelation
155 L0.HasRange STR.ConnectionType
157 STR.ConnectionType <T L0.Entity
158 >-- STR.ConnectionType.isUserSelectable --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
159 @L0.assert STR.ConnectionType.isUserSelectable false
160 //[STR.HasCardinalityRestriction all STR.CardinalityRestriction]
162 STR.SupportsDirection <R L0.IsRelatedTo
163 L0.HasRange STR.ConnectionDirection
165 STR.ConnectionDirection <T L0.Entity
167 STR.InputDirection : STR.ConnectionDirection
168 STR.OutputDirection : STR.ConnectionDirection
170 STR.HasCardinalityRestriction <R L0.IsRelatedTo
172 STR.CardinalityRestriction <T L0.Entity
173 //[STR.HasLowerBound card "0..1"]
174 //[STR.HasUpperBound card "0..1"]
175 //[STR.HasConnectionDirection card "0..1"]
177 STR.HasLowerBound <R L0.HasProperty
178 STR.HasUpperBound <R L0.HasProperty
179 STR.HasConnectionDirection <R L0.IsRelatedTo
181 STR.ConnectionJoin <T L0.Entity
182 @L0.property STR.Joins
183 STR.Joins <R L0.DependsOn
184 L0.InverseOf STR.IsJoinedBy <R L0.DependsOn
185 L0.HasDomain STR.Connection
186 L0.HasRange STR.ConnectionJoin
187 STR.HasConnectionJoin <R L0.DependsOn
188 L0.HasDomain STR.Composite
189 L0.HasRange STR.ConnectionJoin
190 L0.InverseOf STR.JoinsComposite <R L0.IsWeaklyRelatedTo
194 STR.ModelingRules <T L0.Entity
195 L0.HasDescription """Defines what can be populated to a composite
196 and what can be connected.
197 See <https://www.simantics.org/wiki/index.php/Diagram_ontology>."""
199 STR.HasModelingRules <R L0.IsRelatedTo : L0.FunctionalRelation
200 L0.HasDomain STR.Composite
201 L0.HasDomain STR.OrderedComposite
202 L0.HasRange STR.ModelingRules
204 STR.SimpleModelingRules <T STR.ModelingRules
205 @L0.singleProperty STR.HasConnectionType
206 @L0.singleProperty STR.HasAttachmentRelation
207 L0.HasDescription """Modeling rules that allow all connections."""
208 STR.HasAttachmentRelation <R L0.IsRelatedTo : L0.FunctionalRelation
209 L0.HasRange L0.Relation
211 STR.DefaultConnectionType : STR.ConnectionType
212 STR.DefaultModelingRules : STR.SimpleModelingRules
213 STR.HasConnectionType STR.DefaultConnectionType
214 STR.StandardModelingRules : STR.ModelingRules
215 STR.AllowsConnectionType <R L0.DependsOn
216 L0.HasDomain L0.Relation
217 L0.HasRange STR.ConnectionType
218 L0.InverseOf STR.AllowsConnectionType.Inverse <R L0.IsWeaklyRelatedTo
219 STR.OverridesConnectionType <R L0.DependsOn
220 L0.HasDomain STR.ConnectionType
221 L0.HasRange STR.ConnectionType
222 STR.IsIncludedInConnectionType <R L0.DependsOn
223 L0.HasDomain STR.ConnectionType
224 L0.HasRange STR.ConnectionType
225 STR.DefaultsToConnectionType <R L0.DependsOn : L0.FunctionalRelation
227 --> STR.ConnectionType
228 L0.InverseOf STR.DefaultsToConnectionType.Inverse <R L0.IsWeaklyRelatedTo
229 STR.ConnectionConstraint <T L0.Entity
230 STR.HasConnectionConstraint <R L0.IsRelatedTo
231 L0.HasDomain STR.ConnectionType
232 L0.HasRange STR.ConnectionConstraint
236 STR.BelongsTo <R L0.IsRelatedTo
237 L0.HasRange STR.ComponentGroup
238 L0.InverseOf STR.BelongsToInverse <R L0.IsWeaklyRelatedTo
239 STR.GroupBelongsTo <R L0.IsRelatedTo
240 L0.HasRange STR.GroupSubsumption
241 L0.InverseOf STR.GroupBelongsToInverse <R L0.IsWeaklyRelatedTo
242 STR.ComponentGroup <T L0.Entity
243 STR.GroupSubsumption <T L0.Entity
244 @L0.property STR.HasSubgroup
245 @L0.property STR.BelongsTo
246 STR.HasSubgroup <R L0.IsRelatedTo
247 L0.HasRange STR.ComponentGroup
249 // Support for expressions
250 STR.HasExpression <R L0.HasProperty
253 L0.valueAccessor STR.Functions.expressionValueAccessor : L0.ExternalValue
255 STR.Functions : L0.Library
259 // Removed these changes after r25103 since they cause ManyObjectsForFunctionalRelationException: Functional relation has assertions from multiple inherited types.
260 // problems for domainProperties and possibly valueAccessor too when simply viewing the properties of an instance whose type uses multi-inheritance.
261 // Need a solution for this before enabling.
263 @L0.assert L0.domainProperties
264 STR.Functions.structuralChildDomainProperties : L0.ExternalValue
265 L0.HasValueType "VariableMap"
266 @L0.assert L0.domainChildren
267 STR.Functions.structuralChildDomainChildren : L0.ExternalValue
268 L0.HasValueType "VariableMap"
269 @L0.assert L0.typeResource
271 L0.SCLValue.expression "structuralTypeResource"
272 L0.HasValueType "Variable -> Resource -> <ReadGraph> Resource"
275 @L0.assert L0.domainChildren
276 STR.Functions.structuralRunDomainChildren : L0.ExternalValue
277 L0.HasValueType "VariableMap"
280 @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
281 @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
282 @L0.assert L0.valueAccessor STR.Functions.connectionValueAccessor
284 STR.SCLValue <T L0.SCLValue
285 @L0.assert L0.ConvertsToValueWith STR.Functions.computeExpression
286 @L0.assert L0.SCLValue.environment
287 _ : L0.SCLValue.Environment
288 L0.SCLValue.Environment.moduleName "Simantics/All"
289 L0.SCLValue.Environment.namespace ""
291 STR.scl : L0.Template
292 @template %subject %property %expression %valueType
294 %property _ : STR.SCLValue
295 L0.SCLValue.expression %expression
296 L0.HasValueType %valueType
298 STR.sclValue : L0.Template
299 @template %subject %expression %valueType
300 %subject : STR.SCLValue
301 L0.SCLValue.expression %expression
302 L0.HasValueType %valueType
304 STR.InvalidSCLExpressionIssue <T ISSUE.Issue
306 STR.Property <T L0.FunctionalRelation <T L0.PropertyRelation
307 @L0.assert STR.HasExpression
308 _ /* dummy */ : L0.Value
309 L0.HasValueType "String"
312 L0.HasConstraint STR.ConnectionValidationConstraint : L0.Constraint
313 L0.Constraint.Validator
314 STR.Functions.connectionValidator : L0.Function
316 STR.ConnectionValidationConstraint.ErrorIssue
317 @ISSUE.issue ISSUE.Severity.Error
318 STR.Functions.connectionIssueDescription : L0.Function
319 L0.HasValueType "String"
321 STR.ConnectionValidationConstraint.Source <T ISSUE.Sources.DependencyTracker
322 L0.HasLabel "Structural connection validity"
323 @L0.assert ISSUE.Sources.DependencyTracker.HasType STR.Component
324 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.Connection
325 @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.ConnectionJoin
326 @L0.assert ISSUE.Sources.DependencyTracker.HasExtension STR.Functions.connectionExtension
327 @L0.assert ISSUE.Sources.DependencyTracker.HasConstraint STR.ConnectionConstraint
329 STR.HasJoinClusterSet <R L0.IsComposedOf
332 STR.structuralRevision <R L0.HasProperty : L0.FunctionalRelation
335 STR.synchronizedRevision <R L0.HasProperty : L0.FunctionalRelation
338 STR.input <R L0.HasProperty : L0.FunctionalRelation
341 STR.UserDefinedProperty <T L0.Entity
344 // This relation is inherited from L0.IsComposedOf because changes in the code
345 // need to be propagated to the component type
346 >-- STR.ComponentType.hasScript --> STR.ComponentTypeScript <R L0.IsComposedOf
347 STR.ComponentTypeScript <T L0.Entity
348 >-- STR.ComponentTypeScript.type --> L0.String <R L0.HasProperty : L0.FunctionalRelation
349 >-- STR.ComponentTypeScript.code --> L0.String <R L0.HasProperty : L0.FunctionalRelation
351 STR.ComponentType.Locked
353 L0.HasDomain STR.ComponentType
354 L0.HasDescription "Indicates that the component type is locked and cannot be opened for editing."
357 STR.TypeOverride <T L0.Entity
358 >-- STR.TypeOverride.HasOriginalType --> STR.ComponentType <R L0.IsRelatedTo : L0.TotalFunction
359 >-- STR.TypeOverride.HasReplacementType --> STR.ComponentType <R L0.IsRelatedTo : L0.TotalFunction
360 STR.HasTypeOverride --> STR.TypeOverride <R L0.IsRelatedTo