blob: 92bcfecec46ea8e2dac0c8e3bcf5439271def77f (
plain) (
blame)
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
|
/**
* Test constructor and destructor expressions.
**/
active class Expressions_Constructor_Destructor {
class Initialization {
public activity 'b$defaultValue$1'(): Integer;
public activity 'a$defaultValue$1'(): Integer;
public a: Integer = 'a$defaultValue$1'();
public b: Integer = 'b$defaultValue$1'();
@Create
public Initialization();
@Destroy
public destroy();
}
class Initialization2 specializes Initialization {
public activity 'c$defaultValue$1'(): Integer;
public c: Integer = 'c$defaultValue$1'();
@Create
public Initialization2();
@Destroy
public destroy();
}
class Monitor {
@Destroy
public destroy(in recoveryLog: Log);
@Create
public Monitor();
}
class Log {
public activity 'name$defaultValue$1'(): String;
public activity 'logged$defaultValue$1'(): Boolean;
public name: String = 'name$defaultValue$1'();
public logged: Boolean = 'logged$defaultValue$1'();
@Create
public Log();
@Destroy
public destroy();
}
class Employee {
public activity 'transferred$defaultValue$1'(): Boolean;
public activity 'relocated$defaultValue$1'(): Boolean;
public id: Integer;
public name: String;
public transferred: Boolean = 'transferred$defaultValue$1'();
public relocated: Boolean = 'relocated$defaultValue$1'();
@Create
public Employee(in id: Integer, in name: String);
@Create
public transferred(in employeeInfo: Employee);
@Create
public relocated(in employeeInfo: Employee);
@Destroy
public destroy();
}
datatype D0 {
public y: Integer[0..*] sequence;
}
datatype D specializes D0 {
public x: String;
}
test(out employee1: Employee, out employee2: Employee,
out employee3: Employee, out init: Initialization, out log: Log,
out monitor1: Monitor, out monitor2: Monitor, out d: D);
@Create
public Expressions_Constructor_Destructor();
@Destroy
public destroy();
} do 'Expressions_Constructor_Destructor$behavior$1'
|