|
@@ -1,5 +1,6 @@
|
|
|
### Configuration for creating the bootstrap model using conformance_bottom.
|
|
|
import glob
|
|
|
+import hashlib
|
|
|
|
|
|
def bootstrap():
|
|
|
root = ["__hierarchy"]
|
|
@@ -110,7 +111,7 @@ def bootstrap():
|
|
|
\tElement root
|
|
|
\troot = read_root()
|
|
|
\troot = root["__hierarchy"]["objects"]
|
|
|
- \texec(root["bootstrap/user_manager.alc"])
|
|
|
+ \texec(root["bootstrap/user_manager.alc"]["initializers"])
|
|
|
\tuser_management()
|
|
|
'''
|
|
|
|
|
@@ -123,15 +124,15 @@ def bootstrap():
|
|
|
\tElement root
|
|
|
\troot = read_root()
|
|
|
\troot = root["__hierarchy"]["objects"]
|
|
|
- \texec(root["bootstrap/primitives.alc"])
|
|
|
- \texec(root["bootstrap/compilation_manager.alc"])
|
|
|
- \texec(root["bootstrap/constructors.alc"])
|
|
|
- \texec(root["bootstrap/library.alc"])
|
|
|
- \texec(root["bootstrap/object_operations.alc"])
|
|
|
- \texec(root["bootstrap/conformance_scd.alc"])
|
|
|
- \texec(root["bootstrap/metamodels.alc"])
|
|
|
- \texec(root["bootstrap/modelling.alc"])
|
|
|
- \texec(root["bootstrap/user_interface.alc"])
|
|
|
+ \texec(root["bootstrap/primitives.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/compilation_manager.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/constructors.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/library.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/object_operations.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/conformance_scd.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/metamodels.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/modelling.alc"]["initializers"])
|
|
|
+ \texec(root["bootstrap/user_interface.alc"]["initializers"])
|
|
|
\tnew_user()
|
|
|
'''
|
|
|
|
|
@@ -252,9 +253,19 @@ def bootstrap():
|
|
|
result = compile_code_AL(bootstrap_file, "initial_IP", prepend=bootstrap_file, is_file=True)
|
|
|
f.write(result, both=False)
|
|
|
# Now link the code with the compilation manager structure
|
|
|
+ f.write("Node elem()\n", both=False)
|
|
|
+ f.write('Node initializers("initializers")\n', both=False)
|
|
|
+ f.write('Node hash("hash_md5")\n', both=False)
|
|
|
+ f.write("Edge _(__objects, elem)\n", both=False)
|
|
|
f.write('Node filename("%s")\n' % bootstrap_file, both=False)
|
|
|
- f.write("Edge _(__objects, %s_initial_IP)\n" % bootstrap_file, both=False)
|
|
|
f.write("Edge _(_, filename)\n", both=False)
|
|
|
+ f.write("Edge _(elem, %s_initial_IP)\n" % bootstrap_file, both=False)
|
|
|
+ f.write("Edge _(_, initializers)\n", both=False)
|
|
|
+ md5 = hashlib.md5()
|
|
|
+ md5.update(open(bootstrap_file, 'r').read())
|
|
|
+ f.write('Node hash_value("%s")\n' % md5.hexdigest(), both=False)
|
|
|
+ f.write("Edge _(elem, hash_value)\n", both=False)
|
|
|
+ #TODO add the symbols as well!
|
|
|
|
|
|
# Create code for initial user
|
|
|
print("[BOOT] initial_user")
|