Bläddra i källkod

Added outline of core algorithm as well

Yentl Van Tendeloo 8 år sedan
förälder
incheckning
f9aa9cb777
2 ändrade filer med 35 tillägg och 4 borttagningar
  1. 23 0
      core/core_algorithm.alc
  2. 12 4
      core/core_formalism.mvc

+ 23 - 0
core/core_algorithm.alc

@@ -0,0 +1,23 @@
+Void function main():
+	// Initialize the Core Formalism
+
+	// Create the Model itself
+	// TODO
+
+	// Make us an admin user
+	// TODO
+
+	// Switch all new users to the user_function
+	// TODO
+
+	// Call this for ourselves as well
+	user_function()
+
+	// Done, so finish up
+	return !
+
+Void function user_function():
+	// Add user to Core Formalism
+
+	// Delete user from Core Formalism
+	return !

+ 12 - 4
core/core_formalism.mvc

@@ -19,8 +19,18 @@ SimpleClassDiagrams CoreFormalism {
         $
     }
 
+    Class Boolean {
+        $
+            if (bool_not(is_physical_bool(self))):
+                return "Boolean has no bool value"!
+            else:
+                return "OK"!
+        $
+    }
+
     Class User {
         name : String
+        admin : Boolean
     }
 
     Class Group {
@@ -40,11 +50,9 @@ SimpleClassDiagrams CoreFormalism {
         location : String
     }
 
-    Class ModelTransformation : Transformation {
-    }
+    Class ModelTransformation : Transformation {}
 
-    Class ActionLanguage : Transformation {
-    }
+    Class ActionLanguage : Transformation {}
 }
 
 export CoreFormalism to models/CoreFormalism