|
@@ -184,6 +184,7 @@ def bootstrap():
|
|
|
return model_code + "\n"
|
|
|
|
|
|
# Compile all model definitions to ALC directly
|
|
|
+ single_file = ""
|
|
|
total_alc = []
|
|
|
binding_alc = 'Void function initialize_MMs():\n\tinitialize_SCD("models/SimpleClassDiagrams")\n'
|
|
|
|
|
@@ -208,10 +209,12 @@ def bootstrap():
|
|
|
|
|
|
# Compile all files and add to structure manually
|
|
|
bootstrap_files = sorted(glob.glob("bootstrap/*.alc") + glob.glob("bootstrap/.*.alc"))
|
|
|
+ all_code = ""
|
|
|
for bootstrap_file in bootstrap_files:
|
|
|
# Compile the subfile
|
|
|
bootstrap_file = bootstrap_file.replace("\\", "/")
|
|
|
print("[ALC] %s" % bootstrap_file)
|
|
|
+ all_code += open(bootstrap_file, 'r').read()
|
|
|
f.write(compile_code_AL(bootstrap_file, "initial_IP", prepend=bootstrap_file, main=bootstrap_file==main_file), both=False)
|
|
|
|
|
|
# TODO all assigns stored in:
|
|
@@ -219,6 +222,10 @@ def bootstrap():
|
|
|
|
|
|
# Now link the code with the compilation manager structure
|
|
|
|
|
|
+ print("[MERGE]")
|
|
|
+ with open("bootstrap/merged.alm", 'w') as merged:
|
|
|
+ merged.write(all_code)
|
|
|
+
|
|
|
# Stitch all IPs together
|
|
|
print("[LINK]")
|
|
|
counter = 0
|