Modelverse Core =============== The Modelverse Core (MvC) is an example (meta-)modelling interface that can be used with a plethora of tools. 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. For example, a simple call to instantiate a specific class requires several XML/HTTPRequest calls back and forth. A simple wrapper can abstract from this complexity, while retaining the elegance of the versatile interface. 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. For example, requests and replies can make use of IDs to distinguish or identify the information being passed around, or perform context switches. The MvC manages the Modelverse information visible to all users. 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. The core model is a mega-model that provides links to all other models stored in the Modelverse (including itself!). For each of these models, additional meta-information is stored within the Core model. Only admin users have read and write permission to the Core model by default: this model is used for all other operations. 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. 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. An overview of the MvC interface is shown below. A complete overview of the code is shown in the :download:`MvC core algorithm <../core/core_algorithm.alc>` 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. A detailed explanation of its operations is shown later. Model operations ---------------- The first set of operations are basic model management operations. model_add ^^^^^^^^^ Adds a new model to the Modelverse. Model content is specified using model constructors, which can be generated with the model compiler. Script: +-----------------------------------+--------------------+ | Modelverse | Client | +===================================+====================+ | Creating new model! | | +-----------------------------------+--------------------+ | Model type? | | +-----------------------------------+--------------------+ | | model_type | +-----------------------------------+--------------------+ | Model name? | | +-----------------------------------+--------------------+ | | model_name | +-----------------------------------+--------------------+ | Waiting for model constructors... | | +-----------------------------------+--------------------+ | | model_constructors | +-----------------------------------+--------------------+ | Model upload success! | | +-----------------------------------+--------------------+ model_modify ^^^^^^^^^^^^ +-----------------------------------+--------------------+ | Modelverse | Client | +===================================+====================+ | Which model do you want to modify?| | +-----------------------------------+--------------------+ | | model_name | +-----------------------------------+--------------------+ | << mini_modify >> | | +-----------------------------------+--------------------+ model_list ^^^^^^^^^^ +-----------------------------------+--------------------+ | Modelverse | Client | +===================================+====================+ | model_A : Model_A | | +-----------------------------------+--------------------+ | model_A : Model_A | | +-----------------------------------+--------------------+ | ... | | +-----------------------------------+--------------------+ | model_Z : Model_Z | | +-----------------------------------+--------------------+ model_list_full ^^^^^^^^^^^^^^^ +---------------------------------------+--------------------+ | Modelverse | Client | +=======================================+====================+ | 123 user group model_A : Model_A | | +---------------------------------------+--------------------+ | 123 user group model_B : Model_B | | +---------------------------------------+--------------------+ | ... | | +---------------------------------------+--------------------+ | 123 user group model_Z : Model_Z | | +---------------------------------------+--------------------+ model_overwrite ^^^^^^^^^^^^^^^ +-----------------------------------+--------------------+ | Modelverse | Client | +===================================+====================+ | Which model to overwrite? | | +-----------------------------------+--------------------+ | | model_name | +-----------------------------------+--------------------+ | Waiting for model constructors... | | +-----------------------------------+--------------------+ | | model_constructors | +-----------------------------------+--------------------+ | Model overwrite success! | | +-----------------------------------+--------------------+ verify ^^^^^^ +-----------------------------------+--------------------+ | Modelverse | Client | +===================================+====================+ | Which model to verify? | | +-----------------------------------+--------------------+ | | model_name | +-----------------------------------+--------------------+ | OK | | +-----------------------------------+--------------------+ Transformation-specific operations ---------------------------------- transformation_add_MT_language ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------------------------------------+--------------------+ | Modelverse | Client | +======================================================+====================+ | Formalisms to include (terminate with empty string)? | | +------------------------------------------------------+--------------------+ | | model_name_A | +------------------------------------------------------+--------------------+ | | model_name_B | +------------------------------------------------------+--------------------+ | | ... | +------------------------------------------------------+--------------------+ | | model_name_Z | +------------------------------------------------------+--------------------+ | | <> | +------------------------------------------------------+--------------------+ | Name of the RAMified transformation metamodel? | | +------------------------------------------------------+--------------------+ | | model_name | +------------------------------------------------------+--------------------+ transformation_add_MT ^^^^^^^^^^^^^^^^^^^^^ +------------------------------------------------------+--------------------+ | Modelverse | Client | +======================================================+====================+ | RAMified metamodel to use? | | +------------------------------------------------------+--------------------+ | | model_name | +------------------------------------------------------+--------------------+ | Supported metamodels: | | +------------------------------------------------------+--------------------+ | model_A | | +------------------------------------------------------+--------------------+ | model_B | | +------------------------------------------------------+--------------------+ | ... | | +------------------------------------------------------+--------------------+ | model_Z | | +------------------------------------------------------+--------------------+ | | | +------------------------------------------------------+--------------------+ | Which one do you want to use as source (...)? | | +------------------------------------------------------+--------------------+ | | model_name_A | +------------------------------------------------------+--------------------+ | Model added as source | | +------------------------------------------------------+--------------------+ | | model_name_B | +------------------------------------------------------+--------------------+ | Model added as source | | +------------------------------------------------------+--------------------+ | | ... | +------------------------------------------------------+--------------------+ | | model_name_Z | +------------------------------------------------------+--------------------+ | Model added as source | | +------------------------------------------------------+--------------------+ | | <> | +------------------------------------------------------+--------------------+ | Which one do you want to use as target (...)? | | +------------------------------------------------------+--------------------+ | | model_name_A | +------------------------------------------------------+--------------------+ | Model added as target | | +------------------------------------------------------+--------------------+ | | model_name_B | +------------------------------------------------------+--------------------+ | Model added as target | | +------------------------------------------------------+--------------------+ | | ... | +------------------------------------------------------+--------------------+ | | model_name_Z | +------------------------------------------------------+--------------------+ | Model added as target | | +------------------------------------------------------+--------------------+ | | <> | +------------------------------------------------------+--------------------+ | Name of new transformation? | | +------------------------------------------------------+--------------------+ | | model_name | +------------------------------------------------------+--------------------+ | Waiting for model constructors... | | +------------------------------------------------------+--------------------+ | | model_constructors | +------------------------------------------------------+--------------------+ transformation_add_AL ^^^^^^^^^^^^^^^^^^^^^ transformation_add_MANUAL ^^^^^^^^^^^^^^^^^^^^^^^^^ transformation_execute ^^^^^^^^^^^^^^^^^^^^^^ transformation_list ^^^^^^^^^^^^^^^^^^^ transformation_list_full ^^^^^^^^^^^^^^^^^^^^^^^^ transformation_detail ^^^^^^^^^^^^^^^^^^^^^ transformation_RAMify ^^^^^^^^^^^^^^^^^^^^^ Process operations ------------------ process_execute ^^^^^^^^^^^^^^^ Model permission operations --------------------------- permission_modify ^^^^^^^^^^^^^^^^^ permission_owner ^^^^^^^^^^^^^^^^ permission_group ^^^^^^^^^^^^^^^^ Group operations ---------------- group_create ^^^^^^^^^^^^ group_delete ^^^^^^^^^^^^ group_owner_add ^^^^^^^^^^^^^^^ group_owner_delete ^^^^^^^^^^^^^^^^^^ group_join ^^^^^^^^^^ group_kick ^^^^^^^^^^ group_list ^^^^^^^^^^ Admin operations ---------------- admin_promote ^^^^^^^^^^^^^ admin_demote ^^^^^^^^^^^^ General operations ------------------ self-destruct ^^^^^^^^^^^^^ exit ^^^^