summaryrefslogtreecommitdiff
path: root/bos-meta-bootstrap.sh
blob: b476f38e135555830ad29b19b51e7c2f985b5880 (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
#!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
 
# 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 
 
## we'll re-use this name 
declare bos_meta_attribute_instance
 
## this is the `attribute_name` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" attribute_name
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/attribute
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'attribute_name' "$bos_meta_attribute_instance"
 
## this is the `attribute_type` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" attribute_type
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/attribute
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'attribute_type' "$bos_meta_attribute_instance"
 
## this is the `associated_class` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" associated_class
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/attribute
 
$bos_meta_attribute_meta_class_instance set-attribute-by-name 'associated_class' "$bos_meta_attribute_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_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" 'class_attributes'
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" assoc
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'class_attributes' "$bos_meta_attribute_instance"
 
## this is the `class_name` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" 'class_name'
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" scalar
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'class_name' "$bos_meta_attribute_instance"
 
## this is the `isa` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/attribute'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" 'isa'
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" array
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'isa' "$bos_meta_attribute_instance"
 
## this is the `mro` meta-attribute 
bos/meta/class/create-object-into bos_meta_attribute_instance bos/meta/attribute
 
attribute_type='scalar'
associated_class='bos/meta/class'
 
attribute_name='attribute_name'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" 'mro'
 
attribute_name='attribute_type'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" array
 
attribute_name='associated_class'
$bos_meta_attribute_instance set-value "$bos_meta_attribute_instance" bos/meta/class
 
$bos_meta_class_meta_class_instance set-attribute-by-name 'mro' "$bos_meta_attribute_instance"
 
unset bos_meta_class_meta_class_instance bos_meta_attribute_instance attribute_name attribute_type associated_class