Checking in code to put flags into createobjectnodes
[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 ------------------------------------------------------------------------------
18
19
20
21
22 Collection of Tags
23    Tags have type/name associated with them   
24    Also have UID associated with them
25    Two basic types:
26      Ordered: Initial/Next / Preserves Sequencing 
27      Non-ordered: New  / Groups items together
28      
29 ----------------------------------------------------------------------
30 Tasks:
31 Have list of parameters w/ flag/tag specifications
32 Flag/Tag transitions at task exit
33 -----------------------------------------------------------------------
34 Problems:
35 How do we efficiently do task dispatch?
36
37 Idea:
38 Flags - efficiently
39 Build static state transition diagram : explore full space for now
40 Then for each state transition we consider:
41 1) What task activations have we added
42 2) What task activations have we removed
43 Collapse state transition diagram to 
44
45
46 Tags - search once we match a flag
47
48
49
50 Input:
51 trigger role specification for tasks:
52 role mutator operation:
53 role definition:
54
55 Generate:
56 Role transition diagram
57
58
59 Initial features:
60 methods
61 structs
62 type system
63
64 Language features:
65 Single Inheritance
66 Virtual methods
67 Objects
68
69 object metastate:
70 1. flags: flag role1
71 2. tags: tag tag1
72
73 tag operations:
74 tag tag1=new tag;
75 tag tag2=incrementtag(tag tag1);
76 tag tag3=no tag;
77
78 metastate operations:
79
80 task foo(type1 o1{role1||role2}, type2 o2{role3}) {
81         
82   exit(o1{role1'=false},o2{role3'=false},onew{role4=true});
83 }