Browse Source

Merge branch 'yentl' into jit

Yentl Van Tendeloo 8 years ago
parent
commit
5bfcc0f6ab
2 changed files with 81 additions and 0 deletions
  1. 23 0
      core/core_algorithm.alc
  2. 58 0
      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 !

+ 58 - 0
core/core_formalism.mvc

@@ -0,0 +1,58 @@
+import models/SimpleClassDiagrams as SimpleClassDiagrams
+
+SimpleClassDiagrams CoreFormalism {
+    Class String {
+        $
+            if (bool_not(is_physical_string(self))):
+                return "String has no string value"!
+            else:
+                return "OK"!
+        $
+    }
+
+    Class Permissions {
+        $
+            if (bool_not(is_physical_string(self))):
+                return "Permissions has no string value"!
+            else:
+                return "OK"!
+        $
+    }
+
+    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 {
+        name : String
+    }
+
+    Association ownedBy (Group, User) {}
+
+    Class Model {
+        name : String
+        location : String
+        permissions : Permissions
+    }
+
+    Class Transformation {
+        name : String
+        location : String
+    }
+
+    Class ModelTransformation : Transformation {}
+
+    Class ActionLanguage : Transformation {}
+}
+
+export CoreFormalism to models/CoreFormalism