Browse Source

Document some wrapper functions

Yentl Van Tendeloo 7 years ago
parent
commit
f8b9a5ff43
1 changed files with 28 additions and 2 deletions
  1. 28 2
      doc/wrappers.rst

+ 28 - 2
doc/wrappers.rst

@@ -158,10 +158,36 @@ Model Management
      set([("formalisms/SimpleClassDiagrams", "type mappings/2", None)])
 
 .. function:: conformance_add(model_name, metamodel_name)
-   TODO
+
+   Add a new conformance relation between a model stored at *model_name* and a metamodel stored at *metamodel_name*.
+   While this adds the conformance relation, it does not specify the type mapping model, meaning that it has to be subsequently resolved before use.
+   Where possible, type mapping models can be automatically deduced (e.g., conformance bottom, traceability, and type mapping).
+   If no type mapping can be deduced, an exception will be thrown during the execution of the first command that tries to open the model in this way.
+   After the *conformance_add* operation, the relation can already be seen using *model_types*, as it is stored at the server.
+   This is in contrast to *alter_context*, which is only stored locally in the client.
+
+   Examples:
+
+   * To consider a model *my_pn* as a conformance bottom model.
+
+     >>> conformance_add("my_pn", "formalisms/Bottom")
 
 .. function:: conformance_delete(model_name, metamodel_name, type_mapping_name)
-   TODO
+
+   Delete a conformance relation between a model stored at *model_name* and a metamodel stored at *metamodel_name*, using the type mapping model stored at *type_mapping_name*.
+   The *type_mapping_name* can be left empty (empty string) if no type mapping model is defined yet.
+   All matching conformance relations are removed.
+   After the conformance relation is removed, it might be possible that the relation lingers in the context, meaning that a new attempt will be made to deduce a typing relation from scratch.
+
+   Examples:
+
+   * To remove the previously considered conformance bottom relation for model "my_pn", with type mapping model "type mappings/123".
+
+     >>> conformance_delete("my_pn", "formalisms/Bottom", "type mappings/123")
+
+   * To remove the previously considered conformance bottom relation for model "my_pn", without a constructed type mapping model.
+
+     >>> conformance_delete("my_pn", "formalisms/Bottom", "")
 
 .. function:: model_add(model_name, metamodel_name, model_code=None)