]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.layer0/graph/Layer0Values.pgraph
Templates for creating SCL values
[simantics/platform.git] / bundles / org.simantics.layer0 / graph / Layer0Values.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2
3 L0.Value <T L0.Entity : L0.ValueType
4
5 L0.ValueType <T L0.Type
6     
7 L0.ExternalValue <T L0.Value
8
9 L0.ConvertsToValueWith <R L0.HasProperty : L0.FunctionalRelation
10     <-- L0.Value
11     --> L0.Entity    
12
13 L0.HasValueType <R L0.HasProperty : L0.FunctionalRelation
14     <-- L0.Value
15     --> L0.String
16     
17 L0.RequiresValueType <R L0.HasProperty : L0.FunctionalRelation
18     <-- L0.Relation
19     --> L0.String
20
21 L0.HasDefaultLiteralType <R L0.DependsOn : L0.FunctionalRelation
22     <-- L0.Relation
23     --> L0.Type
24     
25 L0.HasSubliteralPredicate <R L0.DependsOn
26
27 L0.RVIContext <T L0.Entity
28
29 L0.SCLValue <T L0.Value : L0.SCLValueType
30     @L0.tag L0.Abstract
31     >-- L0.SCLValue.expression --> L0.String <R L0.HasProperty : L0.TotalFunction
32     >-- L0.SCLValue.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.TotalFunction
33     @L0.assert L0.ConvertsToValueWith L0.Functions.sclValue
34
35 L0.SCLValueType <T L0.ValueType
36     >-- L0.SCLValueType.validator ==> "Variable -> <ReadGraph> String" <R L0.HasProperty
37
38 L0.scl : L0.Template
39     @template %subject %property %expression %valueType
40         %subject
41             %property _ : L0.SCLValue
42               L0.SCLValue.expression %expression
43               L0.HasValueType %valueType
44
45 L0.sclValue : L0.Template
46     @template %subject %expression %valueType
47         %subject : L0.SCLValue
48             L0.SCLValue.expression %expression
49             L0.HasValueType %valueType
50
51 L0.sclAssertion : L0.Template
52     @template %type %property %expression %valueType
53         %type
54             L0.Asserts _ : L0.Assertion
55               L0.HasPredicate %property
56               L0.HasObject _ : L0.SCLValue
57                 L0.SCLValue.expression %expression
58                 L0.HasValueType %valueType
59
60 L0.SCLValue.Environment <T L0.Entity
61     >-- L0.SCLValue.Environment.moduleName --> L0.String <R L0.HasProperty : L0.TotalFunction
62     >-- L0.SCLValue.Environment.namespace --> L0.String <R L0.HasProperty : L0.TotalFunction
63     >-- L0.SCLValue.Environment.uses --> L0.SCLValue.Environment <R L0.IsRelatedTo
64     @L0.assert L0.SCLValue.Environment.namespace ""
65     
66 L0.Property <T L0.Value
67     @L0.tag L0.Abstract
68     @L0.tag L0.Deprecated
69     @L0.assert L0.ConvertsToValueWith L0.Functions.composedPropertyValue