mvc.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. Modelverse Core
  2. ===============
  3. The Modelverse Core (MvC) is an example (meta-)modelling interface that can be used with a plethora of tools.
  4. While the MvC itself is rather simple and its interface is kind of hard to use, wrappers can be put in front of it to make the behaviour much friendlier.
  5. For example, a simple call to instantiate a specific class requires several XML/HTTPRequest calls back and forth.
  6. A simple wrapper can abstract from this complexity, while retaining the elegance of the versatile interface.
  7. The MvC at the moment is written for a simple textual interface, but can easily be augmented with additional information to make it more computer-readable.
  8. For example, requests and replies can make use of IDs to distinguish or identify the information being passed around, or perform context switches.
  9. The MvC manages the Modelverse information visible to all users.
  10. Since all information in the Modelverse is stored as a model, this user and model management information is stored as a model as well: the Core model.
  11. The core model is a mega-model that provides links to all other models stored in the Modelverse (including itself!).
  12. For each of these models, additional meta-information is stored within the Core model.
  13. Only admin users have read and write permission to the Core model by default: this model is used for all other operations.
  14. While some operations are allowed for other users, such as modifying the permissions of your own file, this write must be done with administrator permissions.
  15. Therefore, this MvC interface provides some specialized operations which check for the necessary permissions (*e.g.*, owner of the model), and then apply the requested operation with admin permissions.
  16. An overview of the MvC interface is shown below.
  17. A complete overview of the code is shown in the :download:`MvC core algorithm <../core/core_algorithm.alc>`
  18. None of these operations manipulate the model at a finer granularity: for that we use the :download:`Mini-Modify <../core/mini_modify.alc>` code, which is sometimes called.
  19. A detailed explanation of its operations is shown later.
  20. Model operations
  21. ----------------
  22. The first set of operations are basic model management operations.
  23. model_add
  24. ^^^^^^^^^
  25. Adds a new model to the Modelverse.
  26. Model content is specified using model constructors, which can be generated with the model compiler.
  27. Script:
  28. +-----------------------------------+--------------------+
  29. | Modelverse | Client |
  30. +===================================+====================+
  31. | Creating new model! | |
  32. +-----------------------------------+--------------------+
  33. | Model type? | |
  34. +-----------------------------------+--------------------+
  35. | | model_type |
  36. +-----------------------------------+--------------------+
  37. | Model name? | |
  38. +-----------------------------------+--------------------+
  39. | | model_name |
  40. +-----------------------------------+--------------------+
  41. | Waiting for model constructors... | |
  42. +-----------------------------------+--------------------+
  43. | | model_constructors |
  44. +-----------------------------------+--------------------+
  45. | Model upload success! | |
  46. +-----------------------------------+--------------------+
  47. model_modify
  48. ^^^^^^^^^^^^
  49. +-----------------------------------+--------------------+
  50. | Modelverse | Client |
  51. +===================================+====================+
  52. | Which model do you want to modify?| |
  53. +-----------------------------------+--------------------+
  54. | | model_name |
  55. +-----------------------------------+--------------------+
  56. | << mini_modify >> | |
  57. +-----------------------------------+--------------------+
  58. model_list
  59. ^^^^^^^^^^
  60. +-----------------------------------+--------------------+
  61. | Modelverse | Client |
  62. +===================================+====================+
  63. | model_A : Model_A | |
  64. +-----------------------------------+--------------------+
  65. | model_A : Model_A | |
  66. +-----------------------------------+--------------------+
  67. | ... | |
  68. +-----------------------------------+--------------------+
  69. | model_Z : Model_Z | |
  70. +-----------------------------------+--------------------+
  71. model_list_full
  72. ^^^^^^^^^^^^^^^
  73. +---------------------------------------+--------------------+
  74. | Modelverse | Client |
  75. +=======================================+====================+
  76. | 123 user group model_A : Model_A | |
  77. +---------------------------------------+--------------------+
  78. | 123 user group model_B : Model_B | |
  79. +---------------------------------------+--------------------+
  80. | ... | |
  81. +---------------------------------------+--------------------+
  82. | 123 user group model_Z : Model_Z | |
  83. +---------------------------------------+--------------------+
  84. model_overwrite
  85. ^^^^^^^^^^^^^^^
  86. +-----------------------------------+--------------------+
  87. | Modelverse | Client |
  88. +===================================+====================+
  89. | Which model to overwrite? | |
  90. +-----------------------------------+--------------------+
  91. | | model_name |
  92. +-----------------------------------+--------------------+
  93. | Waiting for model constructors... | |
  94. +-----------------------------------+--------------------+
  95. | | model_constructors |
  96. +-----------------------------------+--------------------+
  97. | Model overwrite success! | |
  98. +-----------------------------------+--------------------+
  99. verify
  100. ^^^^^^
  101. +-----------------------------------+--------------------+
  102. | Modelverse | Client |
  103. +===================================+====================+
  104. | Which model to verify? | |
  105. +-----------------------------------+--------------------+
  106. | | model_name |
  107. +-----------------------------------+--------------------+
  108. | OK | |
  109. +-----------------------------------+--------------------+
  110. Transformation-specific operations
  111. ----------------------------------
  112. transformation_add_MT_language
  113. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  114. +------------------------------------------------------+--------------------+
  115. | Modelverse | Client |
  116. +======================================================+====================+
  117. | Formalisms to include (terminate with empty string)? | |
  118. +------------------------------------------------------+--------------------+
  119. | | model_name_A |
  120. +------------------------------------------------------+--------------------+
  121. | | model_name_B |
  122. +------------------------------------------------------+--------------------+
  123. | | ... |
  124. +------------------------------------------------------+--------------------+
  125. | | model_name_Z |
  126. +------------------------------------------------------+--------------------+
  127. | | <<empty string>> |
  128. +------------------------------------------------------+--------------------+
  129. | Name of the RAMified transformation metamodel? | |
  130. +------------------------------------------------------+--------------------+
  131. | | model_name |
  132. +------------------------------------------------------+--------------------+
  133. transformation_add_MT
  134. ^^^^^^^^^^^^^^^^^^^^^
  135. +------------------------------------------------------+--------------------+
  136. | Modelverse | Client |
  137. +======================================================+====================+
  138. | RAMified metamodel to use? | |
  139. +------------------------------------------------------+--------------------+
  140. | | model_name |
  141. +------------------------------------------------------+--------------------+
  142. | Supported metamodels: | |
  143. +------------------------------------------------------+--------------------+
  144. | model_A | |
  145. +------------------------------------------------------+--------------------+
  146. | model_B | |
  147. +------------------------------------------------------+--------------------+
  148. | ... | |
  149. +------------------------------------------------------+--------------------+
  150. | model_Z | |
  151. +------------------------------------------------------+--------------------+
  152. | | |
  153. +------------------------------------------------------+--------------------+
  154. | Which one do you want to use as source (...)? | |
  155. +------------------------------------------------------+--------------------+
  156. | | model_name_A |
  157. +------------------------------------------------------+--------------------+
  158. | Model added as source | |
  159. +------------------------------------------------------+--------------------+
  160. | | model_name_B |
  161. +------------------------------------------------------+--------------------+
  162. | Model added as source | |
  163. +------------------------------------------------------+--------------------+
  164. | | ... |
  165. +------------------------------------------------------+--------------------+
  166. | | model_name_Z |
  167. +------------------------------------------------------+--------------------+
  168. | Model added as source | |
  169. +------------------------------------------------------+--------------------+
  170. | | <<empty string>> |
  171. +------------------------------------------------------+--------------------+
  172. | Which one do you want to use as target (...)? | |
  173. +------------------------------------------------------+--------------------+
  174. | | model_name_A |
  175. +------------------------------------------------------+--------------------+
  176. | Model added as target | |
  177. +------------------------------------------------------+--------------------+
  178. | | model_name_B |
  179. +------------------------------------------------------+--------------------+
  180. | Model added as target | |
  181. +------------------------------------------------------+--------------------+
  182. | | ... |
  183. +------------------------------------------------------+--------------------+
  184. | | model_name_Z |
  185. +------------------------------------------------------+--------------------+
  186. | Model added as target | |
  187. +------------------------------------------------------+--------------------+
  188. | | <<empty string>> |
  189. +------------------------------------------------------+--------------------+
  190. | Name of new transformation? | |
  191. +------------------------------------------------------+--------------------+
  192. | | model_name |
  193. +------------------------------------------------------+--------------------+
  194. | Waiting for model constructors... | |
  195. +------------------------------------------------------+--------------------+
  196. | | model_constructors |
  197. +------------------------------------------------------+--------------------+
  198. transformation_add_AL
  199. ^^^^^^^^^^^^^^^^^^^^^
  200. transformation_add_MANUAL
  201. ^^^^^^^^^^^^^^^^^^^^^^^^^
  202. transformation_execute
  203. ^^^^^^^^^^^^^^^^^^^^^^
  204. transformation_list
  205. ^^^^^^^^^^^^^^^^^^^
  206. transformation_list_full
  207. ^^^^^^^^^^^^^^^^^^^^^^^^
  208. transformation_detail
  209. ^^^^^^^^^^^^^^^^^^^^^
  210. transformation_RAMify
  211. ^^^^^^^^^^^^^^^^^^^^^
  212. Process operations
  213. ------------------
  214. process_execute
  215. ^^^^^^^^^^^^^^^
  216. Model permission operations
  217. ---------------------------
  218. permission_modify
  219. ^^^^^^^^^^^^^^^^^
  220. permission_owner
  221. ^^^^^^^^^^^^^^^^
  222. permission_group
  223. ^^^^^^^^^^^^^^^^
  224. Group operations
  225. ----------------
  226. group_create
  227. ^^^^^^^^^^^^
  228. group_delete
  229. ^^^^^^^^^^^^
  230. group_owner_add
  231. ^^^^^^^^^^^^^^^
  232. group_owner_delete
  233. ^^^^^^^^^^^^^^^^^^
  234. group_join
  235. ^^^^^^^^^^
  236. group_kick
  237. ^^^^^^^^^^
  238. group_list
  239. ^^^^^^^^^^
  240. Admin operations
  241. ----------------
  242. admin_promote
  243. ^^^^^^^^^^^^^
  244. admin_demote
  245. ^^^^^^^^^^^^
  246. General operations
  247. ------------------
  248. self-destruct
  249. ^^^^^^^^^^^^^
  250. exit
  251. ^^^^