summaryrefslogtreecommitdiffstats
blob: 135332c5692d4b5fa994b7ab29dab655bc707c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
-- @name		LOTOS
-- @version		1.0
-- @domains		Formal specification
-- @authors		Frédéric Jouault
-- @date		2007/05/21
-- @description	This is a LOTOS (Language Of Temporal Ordering Specification, ISO 8807) metamodel.
-- @see			http://www.inrialpes.fr/vasy/cadp/
package LOTOS {

	abstract class LocatedElement {
		attribute location[0-1] : String;
		attribute commentsBefore[*] ordered : String;
		attribute commentsAfter[*] ordered : String;
	}
	
	abstract class NamedElement extends LocatedElement {
		attribute name : String;
	}

	class Specification extends NamedElement {
		attribute gates[*] ordered : String;
		reference parameters[*] ordered container : Parameter;
		attribute isExit : Boolean;
		reference types[*] ordered container : Type;
		reference definition[0-1] container : Definition;
	}
	
	class Definition extends LocatedElement {
		reference behaviour container : Behaviour;
		reference declarations[*] ordered container : TypeOrProcessDeclaration;
	}
	
	abstract class TypeOrProcessDeclaration extends NamedElement {}
	
	class Process extends TypeOrProcessDeclaration {
		attribute gates[*] ordered : String;
		reference variables[*] ordered container : VariableDeclarations;
		reference parameters[*] ordered container : Parameter;
		reference definition container : Definition;
		attribute isExit : Boolean;
	}
	
-- @begin Behaviour
	abstract class Behaviour extends LocatedElement {
	}
	
	class Let extends Behaviour {
		reference variables container : VariableDeclarations;
		reference value container : Value;
		reference behaviour container : Behaviour;
	}
	
	class Choice extends Behaviour {
		reference variables container : VariableDeclarations;
		reference behaviour container : Behaviour;		
	}
	
	class Hide extends Behaviour {
		attribute gates[*] ordered : String;
		reference behaviour container : Behaviour;
	}
	
	class ProcessCall extends Behaviour, NamedElement {
		attribute gates[*] ordered : String;
		reference arguments[*] ordered container : Value;
	}
	
	abstract class Parallel extends Behaviour {
		reference left container : Behaviour;
		reference right container : Behaviour;
	}
	
	class SimpleParallel extends Parallel {}
	
	class GatedParallel extends Parallel {
		attribute gates[*] ordered : String;
	}
	
	class GuardedBehaviour extends Behaviour {
		reference guard container : GuardExpression;
		reference behaviour container : Behaviour;
	}
	
	class ActionBehaviour extends Behaviour {
		reference action container : Action;
		reference behaviour container : Behaviour;
	}
	
	class Alternative extends Behaviour {
		reference left container : Behaviour;
		reference right container : Behaviour;
	}
-- @end Behaviour

-- @begin Actions
	abstract class Action extends LocatedElement {
	}
	
	class GateAction extends Action {
		attribute gate : String;
		reference communications[*] ordered container : Communication;
		reference guard[0-1] container : GuardExpression;
	}
	
	abstract class Communication extends LocatedElement {}
	
	class InComm extends Communication {
		reference declarations container : VariableDeclarations;
	}
	
	class OutComm extends Communication {
		reference value container : Value;
	}
-- @end Actions

-- @begin Guards
	abstract class GuardExpression extends LocatedElement {}
	
	class EqualityTestGuardExp extends GuardExpression {
		reference left container : Value;
		reference right container : Value;
	}
	
	class BooleanGuardExp extends GuardExpression {
		reference value container : Value;
	}
-- @end Guards

-- @begin Values
	abstract class Value extends LocatedElement {
	}
	
	class Variable extends Value {
		reference declaration : Declaration;
	}
	
	class OperationCall extends Value {
		attribute operationName : String;
		reference arguments[*] ordered container : Value;
	}
	
	class OperatorCall extends Value {
		attribute operatorName : String;
		reference left container : Value;
		reference right container : Value;
	}
	
	class IntegerVal extends Value {
		attribute value : Integer;
	}
	
	class BooleanVal extends Value {
		attribute value : Boolean;
	}
	
	class CastVal extends Value {
-- TODO
--		reference value container : Value;
		reference value container : IntegerVal;
		attribute toType : String;
	}
-- @end Values

	abstract class Declaration extends NamedElement {}
	
	class VariableDeclaration extends Declaration {}
	
	class VariableDeclarations extends LocatedElement {
		reference declarations[*] ordered container : VariableDeclaration;
		attribute type : String;
	}
	
	class Parameter extends VariableDeclaration {}
	
-- @begin Types
	abstract class Type extends TypeOrProcessDeclaration {}
	
	class LibraryList extends Type {
		attribute names[*] ordered : String;
	}
	
	class TypeDefinition extends Type, NamedElement {
		attribute types[1-*] ordered : String;
		attribute sorts[*] ordered : String;
		reference operations[*] ordered container : Operations;
		reference equations[*] ordered container : Equations;
	}
	
	class Operations extends LocatedElement {
		reference declarations[1-*] ordered container : OperationDeclaration;
		attribute parameterTypes[*] ordered : String;
		attribute returnType : String;
	}
	
	class OperationDeclaration extends Declaration {}
	
	class Equations extends NamedElement {
		reference declarations[1-*] ordered container : VariableDeclarations;
		reference ofSorts[*] ordered container : OfSort;
	}
	
	class OfSort extends NamedElement {
		reference equations[*] ordered container : Equation;
	}
	
	abstract class Equation extends LocatedElement {}

	class SimpleEquation extends Equation {
		reference left container : Value;
		reference right container : Value;
	}
	
	class GuardedEquation extends Equation {
		reference guard container : GuardExpression;
		reference equation container : SimpleEquation;
	}
-- @end Types
}

package PrimitiveTypes {
	datatype Boolean;
	datatype Integer;
	datatype String;
}