summaryrefslogtreecommitdiff
path: root/bos-meta-bootstrap.sh
blob: 4199feb5f7ac8feb2d45f73a3768e14b17e2f3b4 (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
#!bash 
 
## metaclass instance for bos/meta/class itself 
 
declare bos_meta_class_meta_class_instance
bos/meta/class/create-object-into bos_meta_class_meta_class_instance bos/meta/class
bos-meta/set-metaclass-instance-for bos/meta/class "$bos_meta_class_meta_class_instance"
 
$bos_meta_class_meta_class_instance make-mro-for bos/meta/class
 
# metaclass instance for bos/meta/attribute 
 
declare bos_meta_attribute_meta_class_instance
bos/meta/class/create-object-into bos_meta_attribute_meta_class_instance bos/meta/class
bos-meta/set-metaclass-instance-for bos/meta/attribute "$bos_meta_attribute_meta_class_instance"
 
$bos_meta_attribute_meta_class_instance make-mro-for bos/meta/attribute
 
# metaclass instance for bos/base 
 
declare bos_base_meta_class_instance
bos/meta/class/create-object-into bos_base_meta_class_instance bos/meta/class
bos-meta/set-metaclass-instance-for bos/base "$bos_base_meta_class_instance"
 
$bos_base_meta_class_instance make-mro-for bos/base
 
# here we create meta-attributes for the three attributes of 
# bos/meta/attribute: attribute_name attribute_type associated_class 
# and register them with the $bos_meta_attribute_meta_class_instance 
 
## this is the `attribute_name` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_name_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_name_instance set-value "$bos_meta_attribute_name_instance" attribute_name
 
attribute_name='attribute_type'
$bos_meta_attribute_name_instance set-value "$bos_meta_attribute_name_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_name_instance set-value "$bos_meta_attribute_name_instance" bos/meta/attribute
 
unset attribute_type attribute_name associated_class
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'attribute_name' "$bos_meta_attribute_name_instance"
 
## this is the `attribute_type` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_type_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_type_instance set-value "$bos_meta_attribute_type_instance" attribute_type
 
attribute_name='attribute_type'
$bos_meta_attribute_type_instance set-value "$bos_meta_attribute_type_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_type_instance set-value "$bos_meta_attribute_type_instance" bos/meta/attribute
 
unset attribute_type attribute_name associated_class
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'attribute_type' "$bos_meta_attribute_type_instance"
 
## this is the `associated_class` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_class_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_class_instance set-value "$bos_meta_attribute_class_instance" associated_class
 
attribute_name='attribute_type'
$bos_meta_attribute_class_instance set-value "$bos_meta_attribute_class_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_class_instance set-value "$bos_meta_attribute_class_instance" bos/meta/attribute
 
unset attribute_type attribute_name associated_class
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'associated_class' "$bos_meta_attribute_class_instance"
 
# now we set the attributes for bos/meta/class! 
 
## this is the `class_attributes` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_classattrs_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_classattrs_instance set-value "$bos_meta_attribute_classattrs_instance" 'class_attributes'
 
attribute_name='attribute_type'
$bos_meta_attribute_classattrs_instance set-value "$bos_meta_attribute_classattrs_instance" assoc
 
attribute_name='associated_class'
$bos_meta_attribute_classattrs_instance set-value "$bos_meta_attribute_classattrs_instance" bos/meta/class
 
unset attribute_type attribute_name associated_class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'class_attributes' "$bos_meta_attribute_classattrs_instance"
$bos_base_meta_class_instance set-attribute-by-name 'class_attributes' "$bos_meta_attribute_classattrs_instance"
 
## this is the `class_name` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_classname_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_classname_instance set-value "$bos_meta_attribute_classname_instance" 'class_name'
 
attribute_name='attribute_type'
$bos_meta_attribute_classname_instance set-value "$bos_meta_attribute_classname_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_classname_instance set-value "$bos_meta_attribute_classname_instance" bos/meta/class
 
unset attribute_type attribute_name associated_class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'class_name' "$bos_meta_attribute_classname_instance"
 
$bos_meta_attribute_classname_instance set-value "$bos_meta_class_meta_class_instance" 'bos/meta/class'
$bos_meta_attribute_classname_instance set-value "$bos_meta_attribute_meta_class_instance" 'bos/meta/attribute'
$bos_meta_attribute_classname_instance set-value "$bos_base_meta_class_instance" 'bos/base'
 
## this is the `isa` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_isa_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_isa_instance set-value "$bos_meta_attribute_isa_instance" 'isa'
 
attribute_name='attribute_type'
$bos_meta_attribute_isa_instance set-value "$bos_meta_attribute_isa_instance" array
 
attribute_name='associated_class'
$bos_meta_attribute_isa_instance set-value "$bos_meta_attribute_isa_instance" bos/meta/class
 
unset attribute_type attribute_name associated_class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'isa' "$bos_meta_attribute_isa_instance"
 
## this is the `mro` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_mro_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_mro_instance set-value "$bos_meta_attribute_mro_instance" 'mro'
 
attribute_name='attribute_type'
$bos_meta_attribute_mro_instance set-value "$bos_meta_attribute_mro_instance" array
 
attribute_name='associated_class'
$bos_meta_attribute_mro_instance set-value "$bos_meta_attribute_mro_instance" bos/meta/class
 
unset attribute_type attribute_name associated_class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'mro' "$bos_meta_attribute_mro_instance"
 
$bos_meta_attribute_mro_instance set-value "$bos_meta_class_meta_class_instance" 'bos/meta/class'
$bos_meta_attribute_mro_instance set-value "$bos_meta_attribute_meta_class_instance" 'bos/meta/attribute'
$bos_meta_attribute_mro_instance set-value "$bos_base_meta_class_instance" 'bos/base'
 
unset bos_meta_class_meta_class_instance bos_meta_attribute_instance attribute_name attribute_type associated_class