changes.
[IRC.git] / Robust / src / designnotes
1 Objects have:
2 Collection of Flags
3    Flags have type/name associated with them
4    Are either present or not present
5
6 Assumptions:
7 Task parameters can't be modified
8
9 How do we handle new object allocation?
10 Idea #1: Set flags at allocation
11          Only allow flag setting at exit for parameters
12
13 Non parameter variables: 
14 1) Type must contain flags
15 2) Apply flag additions to all states
16
17 Tags operations:
18 create_tag operation(type)
19
20 tag name=new tag(type);
21
22 associate_with_tag operation(object, tag)
23
24 Dispatch:
25 after flag status, allow tag status...
26 each tag state is of the form: Type(name)
27
28 Other approach:
29 Tag sets:  {x, y, z, ... in R
30
31 Allow additions/removals of tuples in taskexit:
32 remove <x, y, z, ...> from R
33 add <x, y> to R
34
35 Allow addition of new tuples in object allocation
36 add <new, y> to R
37 ------------------------------------------------------------------------------
38
39
40
41
42 Collection of Tags
43    Tags have type/name associated with them   
44    Also have UID associated with them
45    Two basic types:
46      Ordered: Initial/Next / Preserves Sequencing 
47      Non-ordered: New  / Groups items together
48      
49 ----------------------------------------------------------------------
50 Tasks:
51 Have list of parameters w/ flag/tag specifications
52 Flag/Tag transitions at task exit
53 -----------------------------------------------------------------------
54 Problems:
55 How do we efficiently do task dispatch?
56
57 Idea:
58 Flags - efficiently
59 Build static state transition diagram : explore full space for now
60 Then for each state transition we consider:
61 1) What task activations have we added
62 2) What task activations have we removed
63 Collapse state transition diagram to 
64
65
66 Tags - search once we match a flag
67
68
69
70 Input:
71 trigger role specification for tasks:
72 role mutator operation:
73 role definition:
74
75 Generate:
76 Role transition diagram
77
78
79 Initial features:
80 methods
81 structs
82 type system
83
84 Language features:
85 Single Inheritance
86 Virtual methods
87 Objects
88
89 object metastate:
90 1. flags: flag role1
91 2. tags: tag tag1
92
93 tag operations:
94 tag tag1=new tag;
95 tag tag2=incrementtag(tag tag1);
96 tag tag3=no tag;
97
98 metastate operations:
99
100 task foo(type1 o1{role1||role2}, type2 o2{role3}) {
101         
102   exit(o1{role1'=false},o2{role3'=false},onew{role4=true});
103 }
104 ----------------------------------------------------------------
105 ----------------------------------------------------------------
106
107 Initial design:
108 ----------------------------------------------------------------
109
110 Provide runtime with:
111 1) List of tasks
112    a) Task names
113    b) Parameter types
114    c) Flag settings
115
116 2) List of flags for each type
117
118 3) Flag transition calls