From 9728f0b61d5e2b13e845ee7b8db5ef30929850d5 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 9 Jun 2023 14:37:45 +0200 Subject: [PATCH 01/18] adjusted M3 docs for id recommendations (#91) --- lioncore/metametamodel.adoc | 76 +++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/lioncore/metametamodel.adoc b/lioncore/metametamodel.adoc index 27313af..94e71c0 100644 --- a/lioncore/metametamodel.adoc +++ b/lioncore/metametamodel.adoc @@ -671,44 +671,46 @@ This includes references to #TODO: How to refer to stdlib elements? By id or key?# === Pre-defined Ids and Keys +The metamodel itself has key `LIonCore-M3`.{fn-org91} + ==== Keys of M3 Elements [cols="d,d,m"] |=== |M3 element |Concept |Key -|<> |Concept |LIonCore_M3_Concept -|<> |Property |LIonCore_M3_Concept_abstract -|<> |Reference |LIonCore_M3_Concept_extends -|<> |Reference |LIonCore_M3_Concept_implements -|<> |Concept |LIonCore_M3_ConceptInterface -|<> |Reference |LIonCore_M3_ConceptInterface_extends -|<> |Concept |LIonCore_M3_Containment -|<> |Concept |LIonCore_M3_DataType -|<> |Concept |LIonCore_M3_Enumeration -|<> |Containment |LIonCore_M3_Enumeration_literals -|<> |Concept |LIonCore_M3_EnumerationLiteral -|<> |Concept |LIonCore_M3_Feature -|<> |Property |LIonCore_M3_Feature_optional -|<> |Concept |LIonCore_M3_FeaturesContainer -|<> |Containment |LIonCore_M3_FeaturesContainer_features -|<> |Concept |LIonCore_M3_Link -|<> |Property |LIonCore_M3_Link_multiple -|<> |Reference |LIonCore_M3_Link_type -|<> |Concept |LIonCore_M3_Language -|<> |Property |LIonCore_M3_Language_name -|<> |Property |LIonCore_M3_Language_key -|<> |Reference |LIonCore_M3_Language_dependsOn -|<> |Containment |LIonCore_M3_Language_elements -|<> |Concept |LIonCore_M3_LanguageElement -|<> |Concept |LIonCore_M3_NamespacedEntity -|<> |Property |LIonCore_M3_NamespacedEntity_name -|<> |Property |LIonCore_M3_NamespacedEntity_key -|<> |Concept |LIonCore_M3_NamespaceProvider -|<> |Concept |LIonCore_M3_PrimitiveType -|<> |Concept |LIonCore_M3_Property -|<> |Reference |LIonCore_M3_Property_type -|<> |Concept |LIonCore_M3_Reference +|<> |Concept |Concept +|<> |Property |Concept-abstract +|<> |Reference |Concept-extends +|<> |Reference |Concept-implements +|<> |Concept |ConceptInterface +|<> |Reference |ConceptInterface-extends +|<> |Concept |Containment +|<> |Concept |DataType +|<> |Concept |Enumeration +|<> |Containment |Enumeration-literals +|<> |Concept |EnumerationLiteral +|<> |Concept |Feature +|<> |Property |Feature-optional +|<> |Concept |FeaturesContainer +|<> |Containment |FeaturesContainer-features +|<> |Concept |Link +|<> |Property |Link-multiple +|<> |Reference |Link-type +|<> |Concept |Language +|<> |Property |Language-name +|<> |Property |Language-key +|<> |Reference |Language-dependsOn +|<> |Containment |Language-elements +|<> |Concept |LanguageElement +|<> |Concept |NamespacedEntity +|<> |Property |NamespacedEntity-name +|<> |Property |NamespacedEntity-key +|<> |Concept |NamespaceProvider +|<> |Concept |PrimitiveType +|<> |Concept |Property +|<> |Reference |Property-type +|<> |Concept |Reference |=== ==== Ids of Built-in Instances @@ -717,11 +719,11 @@ This includes references to |=== |Instance |Concept |Id -|<> |PrimitiveType |LIonCore_M3_String -|<> |PrimitiveType |LIonCore_M3_Boolean -|<> |PrimitiveType |LIonCore_M3_Integer -|<> |PrimitiveType |LIonCore_M3_JSON -|<> |Concept |LIonCore_M3_Node +|<> |PrimitiveType |LIonCore-M3-String +|<> |PrimitiveType |LIonCore-M3-Boolean +|<> |PrimitiveType |LIonCore-M3-Integer +|<> |PrimitiveType |LIonCore-M3-JSON +|<> |Concept |LIonCore-M3-Node |=== From 26fe053e3b18aead623082306dbb847c327d803b Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Mon, 26 Jun 2023 15:39:03 +0200 Subject: [PATCH 02/18] adjusted M3 docs for partition concept (#29) --- lioncore/issue-footnotes.adoc | 1 + lioncore/metametamodel.adoc | 13 +++++++++++++ lioncore/metametamodel.puml | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lioncore/issue-footnotes.adoc b/lioncore/issue-footnotes.adoc index 772fd6d..a880afe 100644 --- a/lioncore/issue-footnotes.adoc +++ b/lioncore/issue-footnotes.adoc @@ -6,6 +6,7 @@ :fn-org9: footnote:org9[https://github.com/LIonWeb-org/organization/issues/9[Supported built-in primitive types #9]] :fn-org9-intrange: footnote:org9[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1288624098[Discussion on supported integer range]] :fn-org13: footnote:org13[https://github.com/LIonWeb-org/organization/issues/13[If and how to represent Annotations in M3 #13]] +:fn-org29: footnote:org29[https://github.com/LIonWeb-org/organization/issues/29[Repo API: Do we need model partitions? #29]] :fn-org33: footnote:org33[https://github.com/LIonWeb-org/organization/issues/33[Repo API: Node representation #33]] :fn-org34: footnote:org34[https://github.com/LIonWeb-org/organization/issues/34[Repo API: Property value encondings #34]] :fn-org35: footnote:org35[https://github.com/LIonWeb-org/organization/issues/35[Repo API: Represent dangling pointers #35]] diff --git a/lioncore/metametamodel.adoc b/lioncore/metametamodel.adoc index 94e71c0..eb3f313 100644 --- a/lioncore/metametamodel.adoc +++ b/lioncore/metametamodel.adoc @@ -125,6 +125,9 @@ A Concept has a <> and an <> via the boolean `partition` property.{fn-org29} + A Concept is a <> (as it has features). It is indirectly a <> (as it is a top level element in a <>), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). @@ -606,6 +609,16 @@ We could alternatively also imagine using specific annotations for supporting th In general Generics complicate the solution and MPS can live without them. Also, in StarLasu we never encountered the need for them so far. +[[partition]] +=== Partitions +Each node that does not have a parent node must be of a Concept with <> flag set to `true`. +This implies that every node is contained in exactly one partition, namely the partition defined by its root node.{fn-org29} + +.EMF & MPS equivalent +A partition is similar to ECore's `Resource`. + +A partition is similar to MPS' `model`. + [[identifiers]] === Identifiers diff --git a/lioncore/metametamodel.puml b/lioncore/metametamodel.puml index 5ee95da..cb97eba 100644 --- a/lioncore/metametamodel.puml +++ b/lioncore/metametamodel.puml @@ -3,6 +3,7 @@ hide empty members class Concept #LightGreen extends FeaturesContainer { abstract: Boolean + partition: Boolean } class ConceptInterface #LightGreen extends FeaturesContainer @@ -27,7 +28,7 @@ abstract class Link #LightBlue extends Feature { multiple: Boolean } -class Language implements NamespaceProvider { +class Language <> implements NamespaceProvider { name: String key: Id version: Integer From cde399f2f9b27b0fb2cde2b2e274fc0b2d708234 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Tue, 27 Jun 2023 11:42:51 +0200 Subject: [PATCH 03/18] moved serialization to separate directory --- index.adoc | 2 +- lioncore/serialization.puml | 72 ---- lioncore/serialization/children-variants.json | 89 +++++ lioncore/serialization/minimal-node.json | 23 ++ lioncore/serialization/minimal.json | 5 + lioncore/serialization/property-variants.json | 101 ++++++ .../serialization/reference-variants.json | 100 +++++ .../{ => serialization}/serialization.adoc | 341 +----------------- lioncore/serialization/serialization.puml | 63 ++++ 9 files changed, 399 insertions(+), 397 deletions(-) delete mode 100644 lioncore/serialization.puml create mode 100644 lioncore/serialization/children-variants.json create mode 100644 lioncore/serialization/minimal-node.json create mode 100644 lioncore/serialization/minimal.json create mode 100644 lioncore/serialization/property-variants.json create mode 100644 lioncore/serialization/reference-variants.json rename lioncore/{ => serialization}/serialization.adoc (72%) create mode 100644 lioncore/serialization/serialization.puml diff --git a/index.adoc b/index.adoc index e293ae2..6512cb0 100644 --- a/index.adoc +++ b/index.adoc @@ -3,5 +3,5 @@ * xref:documentation/use-cases.adoc[Use cases] * xref:lioncore/metametamodel.adoc[Meta-meta-model (M3)] // * xref:lioncore/model-representations.adoc[Models representations] -* xref:lioncore/serialization.adoc[Serialization format] +* xref:lioncore/serialization/serialization.adoc[Serialization format] diff --git a/lioncore/serialization.puml b/lioncore/serialization.puml deleted file mode 100644 index a7bf2b7..0000000 --- a/lioncore/serialization.puml +++ /dev/null @@ -1,72 +0,0 @@ -@startuml -title Serialization Format - -hide empty members - -legend - <#transparent,#transparent>|= Legend |= | - | [key] / [value] | representation as JSON object | -end legend - -class SerializationChunk { - serializationFormatVersion: String -} - -SerializationChunk *--> "0..*" UsedLanguage: languages - -class UsedLanguage { - key: Id - version: String -} - -SerializationChunk *--> "0..*" Node: nodes - -class Node { - id: Id - parent: Id -} - -Node *--> "1" MetaPointer: concept - -class MetaPointer { - language: Id - version: String - key: Id -} - -Node *--> "0..*" Children: children - -class Children { -} - -Children *--> "1" MetaPointer: containment - -Children *--> "0..1" ChildTarget: children - -class ChildTarget { - target: Id -} - -Node *--> "0..*" References: references - -class References { -} - -References *--> "1" MetaPointer: reference - -References *--> "0..*" ReferenceTarget: targets - -class ReferenceTarget { - reference: Id - resolveInfo: String -} - -Node *--> "0..*" PropertyValue: properties - -class PropertyValue { - value: String -} - -PropertyValue *--> "1" MetaPointer: property - -@enduml \ No newline at end of file diff --git a/lioncore/serialization/children-variants.json b/lioncore/serialization/children-variants.json new file mode 100644 index 0000000..17f6d58 --- /dev/null +++ b/lioncore/serialization/children-variants.json @@ -0,0 +1,89 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "myLanguage", + "version": "2" + } + ], + "nodes": [ + { + "id": "ccc", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "myConceptId" + }, + "properties": {}, + "children": [ + { + "containment": { + "language": "myLanguage", + "version": "2", + "key": "emptyContainmentId" + }, + "children": [] + }, + { + "containment": { + "language": "myLanguage", + "version": "2", + "key": "singleContainmentId" + }, + "children": [ + "cdd" + ] + }, + { + "containment": { + "language": "myLanguage", + "version": "2", + "key": "multiContainmentId" + }, + "children": [ + "cee", + "cff", + "cgg" + ] + } + ], + "references": {}, + "parent": null + }, + { + "id": "cgg", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "differentConceptId" + }, + "properties": {}, + "children": {}, + "references": {}, + "parent": null + }, + { + "id": "cdd", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "otherConceptId" + }, + "properties": {}, + "children": {}, + "references": {} + }, + { + "id": "cee", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "differentConceptId" + }, + "properties": {}, + "children": {}, + "references": {}, + "parent": null + } + ] +} \ No newline at end of file diff --git a/lioncore/serialization/minimal-node.json b/lioncore/serialization/minimal-node.json new file mode 100644 index 0000000..fc34553 --- /dev/null +++ b/lioncore/serialization/minimal-node.json @@ -0,0 +1,23 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "myLanguage", + "version": "2" + } + ], + "nodes": [ + { + "id": "aaa", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "myConceptId" + }, + "properties": {}, + "children": {}, + "references": {}, + "parent": null + } + ] +} \ No newline at end of file diff --git a/lioncore/serialization/minimal.json b/lioncore/serialization/minimal.json new file mode 100644 index 0000000..3410bc1 --- /dev/null +++ b/lioncore/serialization/minimal.json @@ -0,0 +1,5 @@ +{ + "serializationFormatVersion": "1", + "languages": [], + "nodes": [] +} \ No newline at end of file diff --git a/lioncore/serialization/property-variants.json b/lioncore/serialization/property-variants.json new file mode 100644 index 0000000..50fc31d --- /dev/null +++ b/lioncore/serialization/property-variants.json @@ -0,0 +1,101 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "myLanguage", + "version": "2" + } + ], + "nodes": [ + { + "id": "bbb", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "myConceptId" + }, + "properties": [ + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "stringPropertyId" + }, + "value": "my string value" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "integerPropertyId" + }, + "value": "123" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "booleanPropertyId" + }, + "value": "true" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "jsonPropertyId" + }, + "value": "{ \"name\": \"Bob\" }" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "unsetPropertyId" + }, + "value": null + } + ], + "children": {}, + "references": {}, + "parent": null + }, + { + "id": "21", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "time_to_open" + }, + "properties": [ + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "day" + }, + "value": "tttt" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "starthour" + }, + "value": "9" + }, + { + "property": { + "language": "myLanguage", + "version": "2", + "key": "endhour" + }, + "value": "5" + } + ], + "children": [], + "references": [], + "parent": null + } + ] +} \ No newline at end of file diff --git a/lioncore/serialization/reference-variants.json b/lioncore/serialization/reference-variants.json new file mode 100644 index 0000000..aa4fc46 --- /dev/null +++ b/lioncore/serialization/reference-variants.json @@ -0,0 +1,100 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "myLanguage", + "version": "2" + } + ], + "nodes": [ + { + "id": "ddd", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "myConceptId" + }, + "properties": {}, + "children": {}, + "references": [ + { + "reference": { + "language": "myLanguage", + "version": "2", + "key": "emptyReferenceId" + }, + "targets": [] + }, + { + "reference": { + "language": "myLanguage", + "version": "2", + "key": "singleReferenceId" + }, + "targets": [ + { + "resolveInfo": "some name", + "reference": "dee" + } + ] + }, + { + "reference": { + "language": "myLanguage", + "version": "2", + "key": "multiReferenceId" + }, + "targets": [ + { + "resolveInfo": "self-reference", + "reference": "ddd" + }, + { + "resolveInfo": "only resolve info", + "reference": null + } + ] + }, + { + "reference": { + "language": "myLanguage", + "version": "2", + "key": "noResolveInfoReferenceId" + }, + "targets": [ + { + "resolveInfo": null, + "reference": "dee" + } + ] + }, + { + "reference": { + "language": "myLanguage", + "version": "2", + "key": "neitherResolveInfoNorReferenceId" + }, + "targets": [ + { + "resolveInfo": null, + "reference": null + } + ] + } + ], + "parent": null + }, + { + "id": "dee", + "concept": { + "language": "myLanguage", + "version": "2", + "key": "differentConceptId" + }, + "properties": {}, + "children": {}, + "references": {}, + "parent": null + } + ] +} \ No newline at end of file diff --git a/lioncore/serialization.adoc b/lioncore/serialization/serialization.adoc similarity index 72% rename from lioncore/serialization.adoc rename to lioncore/serialization/serialization.adoc index a3bc0b1..d60c3fb 100644 --- a/lioncore/serialization.adoc +++ b/lioncore/serialization/serialization.adoc @@ -1,4 +1,4 @@ -include::issue-footnotes.adoc[] +include::../issue-footnotes.adoc[] :fn-mof: footnote:mof[https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility], also known as M3 model] @@ -13,13 +13,19 @@ include::issue-footnotes.adoc[] == Design Goals We do not take any measures to reduce the amount of transmitted data.{fn-org73} - == Description LIonWeb node serialization format is defined in JSON (https://datatracker.ietf.org/doc/html/rfc8259[RFC 8259]). +== Overview of structures + +[plantuml, serialization, svg] +---- +include::serialization.puml[] +---- + === Root structure -Root level MUST be an _object_ with three members. +Root level MUST be an _object_ with three members, called *serialization chunk*. ##TODO: Are more members allowed?{fn-org67}## @@ -39,7 +45,7 @@ Each _element_ must be unique with respect to the value of its _key_ `id`. [[language]] === Language structure -Each *used language* MUST be an _object_. +Each *used language* MUST be an _object_.{fn-org129} The order of _members_ is undefined. The _object_ MUST contain the following _members_:{fn-org76} @@ -65,7 +71,7 @@ It's used at several places within <>. Each meta-pointer MUST be an _object_. The order of _members_ is undefined. -The _object_ MUST contain the following members: +The _object_ MUST contain the following _members_: * _key_ `language` with _string_ _value_, adhering to <>. * _key_ `version` with _string_ _value_, adhering to <>. @@ -187,7 +193,7 @@ An unset property CAN be serialized as JSON _null_. * containing escaped Unicode characters: `"\uD83D\uDE10"` ==== Boolean -<> MUST be encoded as one of these JSON _strings_: +<> MUST be encoded as exactly one of these JSON _strings_: * `"true"` * `"false"` @@ -250,39 +256,13 @@ MUST refer to the <> of an < "0..*" UsedLanguage: languages + +class UsedLanguage { + key: Id + version: String +} + +SerializationChunk *--> "0..*" Node: nodes + +class Node { + id: Id + parent: Id +} + +Node *--> "1" MetaPointer: concept + +class MetaPointer { + language: Id + version: String + key: Id +} + +Node *--> "0..*" Child: children + +class Child { + children: String[] +} + +Child *--> "1" MetaPointer: containment + +Node *--> "0..*" Property: properties + +class Property { + value: String +} + +Property *--> "1" MetaPointer: property + + +Node *--> "0..*" Reference: references + +class Reference { +} + +Reference *--> "1" MetaPointer: reference + +Reference *--> "0..*" ReferenceTarget: targets + +class ReferenceTarget { + reference: Id + resolveInfo: String +} + +@enduml \ No newline at end of file From 38a1edc3d989d5a7db2ac3227b6b36f521d35d94 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Tue, 27 Jun 2023 11:48:39 +0200 Subject: [PATCH 04/18] moved metametamodel to separate directory --- index.adoc | 2 +- lioncore/issue-footnotes.adoc | 1 + .../{ => metametamodel}/images/EcoreRelations.png | Bin .../images/LionWeb-Language-Example.png | Bin .../images/mps-structure-language.png | Bin lioncore/{ => metametamodel}/metametamodel.adoc | 6 +++++- lioncore/{ => metametamodel}/metametamodel.puml | 0 .../metametamodel_simplified.puml | 0 8 files changed, 7 insertions(+), 2 deletions(-) rename lioncore/{ => metametamodel}/images/EcoreRelations.png (100%) rename lioncore/{ => metametamodel}/images/LionWeb-Language-Example.png (100%) rename lioncore/{ => metametamodel}/images/mps-structure-language.png (100%) rename lioncore/{ => metametamodel}/metametamodel.adoc (99%) rename lioncore/{ => metametamodel}/metametamodel.puml (100%) rename lioncore/{ => metametamodel}/metametamodel_simplified.puml (100%) diff --git a/index.adoc b/index.adoc index 6512cb0..e544f4a 100644 --- a/index.adoc +++ b/index.adoc @@ -1,7 +1,7 @@ = LIonWeb Documentation * xref:documentation/use-cases.adoc[Use cases] -* xref:lioncore/metametamodel.adoc[Meta-meta-model (M3)] +* xref:lioncore/metametamodel/metametamodel.adoc[Meta-meta-model (M3)] // * xref:lioncore/model-representations.adoc[Models representations] * xref:lioncore/serialization/serialization.adoc[Serialization format] diff --git a/lioncore/issue-footnotes.adoc b/lioncore/issue-footnotes.adoc index a880afe..04db29c 100644 --- a/lioncore/issue-footnotes.adoc +++ b/lioncore/issue-footnotes.adoc @@ -37,5 +37,6 @@ :fn-org100: footnote:org100[https://github.com/LIonWeb-org/organization/issues/100[Do we allow + prefix for integer property values? #100]] :fn-org101: footnote:org101[https://github.com/LIonWeb-org/organization/issues/101[Rename MetamodelElement to LanguageElement? #101]] :fn-org128: footnote:org128[https://github.com/LIonWeb-org/organization/issues/128[Refer to EnumLiteral by key? #128]] +:fn-org129: footnote:org129[https://github.com/LIonWeb-org/organization/issues/129[Establish name for entries in serialization/languages? #129]] :fn-org130: footnote:org130[https://github.com/LIonWeb-org/organization/issues/130[What does Language.version mean semantically? #130]] :fn-org131: footnote:org131[https://github.com/LIonWeb-org/organization/issues/131[How to refer from one language to another? #131]] \ No newline at end of file diff --git a/lioncore/images/EcoreRelations.png b/lioncore/metametamodel/images/EcoreRelations.png similarity index 100% rename from lioncore/images/EcoreRelations.png rename to lioncore/metametamodel/images/EcoreRelations.png diff --git a/lioncore/images/LionWeb-Language-Example.png b/lioncore/metametamodel/images/LionWeb-Language-Example.png similarity index 100% rename from lioncore/images/LionWeb-Language-Example.png rename to lioncore/metametamodel/images/LionWeb-Language-Example.png diff --git a/lioncore/images/mps-structure-language.png b/lioncore/metametamodel/images/mps-structure-language.png similarity index 100% rename from lioncore/images/mps-structure-language.png rename to lioncore/metametamodel/images/mps-structure-language.png diff --git a/lioncore/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc similarity index 99% rename from lioncore/metametamodel.adoc rename to lioncore/metametamodel/metametamodel.adoc index eb3f313..5ed2456 100644 --- a/lioncore/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -1,4 +1,4 @@ -include::issue-footnotes.adoc[] +include::../issue-footnotes.adoc[] = Meta-Metamodel :toc: preamble @@ -89,6 +89,10 @@ A Language is a <> (as it provides a Namespace to all its ele A Language can depend on other Languages via `dependsOn` reference. Dependencies must be explicitly declared.{fn-org50} +// [[UsedLanguage]] +// For each dependency, a Language contains one `UsedLanguage` instance. +// A UsedLanguage has a [[UsedLanguage.key, UsedLanguage.key]]`key` and a [[UsedLanguage.version, UsedLanguage.version]]`version` property, pointing to the other Language this Language depends on.{fn-org129} + .Constraints ``key``s must a valid <>. `key` SHOULD be globally unique, and MUST be unique within an <>.{fn-org91} diff --git a/lioncore/metametamodel.puml b/lioncore/metametamodel/metametamodel.puml similarity index 100% rename from lioncore/metametamodel.puml rename to lioncore/metametamodel/metametamodel.puml diff --git a/lioncore/metametamodel_simplified.puml b/lioncore/metametamodel/metametamodel_simplified.puml similarity index 100% rename from lioncore/metametamodel_simplified.puml rename to lioncore/metametamodel/metametamodel_simplified.puml From 728be014f44def6909a81308965c4592e0d39034 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 29 Jun 2023 15:47:04 +0200 Subject: [PATCH 05/18] added reference definitions of M3 and builtins as JSON --- lioncore/metametamodel/builtins.json | 360 ++++ lioncore/metametamodel/lioncore.json | 2299 ++++++++++++++++++++++++++ 2 files changed, 2659 insertions(+) create mode 100644 lioncore/metametamodel/builtins.json create mode 100644 lioncore/metametamodel/lioncore.json diff --git a/lioncore/metametamodel/builtins.json b/lioncore/metametamodel/builtins.json new file mode 100644 index 0000000..4b0da65 --- /dev/null +++ b/lioncore/metametamodel/builtins.json @@ -0,0 +1,360 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "LIonCore-M3", + "version": "1" + } + ], + "nodes": [ + { + "id": "LIonCore-builtins", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-name" + }, + "value": "LIonCore.builtins" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-version" + }, + "value": "1" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-key" + }, + "value": "LIonCore-builtins" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-elements" + }, + "children": [ + "LIonCore-builtins-String", + "LIonCore-builtins-Boolean", + "LIonCore-builtins-Integer", + "LIonCore-builtins-JSON", + "LIonCore-builtins-Node", + "LIonCore-builtins-INamed" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-dependsOn" + }, + "targets": [] + } + ], + "parent": null + }, + { + "id": "LIonCore-builtins-String", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "PrimitiveType" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "String" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-String" + } + ], + "children": [], + "references": [], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-Boolean", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "PrimitiveType" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Boolean" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-Boolean" + } + ], + "children": [], + "references": [], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-Integer", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "PrimitiveType" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Integer" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-Integer" + } + ], + "children": [], + "references": [], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-JSON", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "PrimitiveType" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "JSON" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-JSON" + } + ], + "children": [], + "references": [], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-Node", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Node" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-Node" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-INamed", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "ConceptInterface" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "INamed" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-INamed" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "LIonCore-builtins-INamed-name" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "ConceptInterface-extends" + }, + "targets": [] + } + ], + "parent": "LIonCore-builtins" + }, + { + "id": "LIonCore-builtins-INamed-name", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "name" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LIonCore-builtins-INamed-name" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "LIonCore-builtins-INamed" + } + ] +} \ No newline at end of file diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json new file mode 100644 index 0000000..7d4240f --- /dev/null +++ b/lioncore/metametamodel/lioncore.json @@ -0,0 +1,2299 @@ +{ + "serializationFormatVersion": "1", + "languages": [ + { + "key": "LIonCore-M3", + "version": "1" + } + ], + "nodes": [ + { + "id": "-id-LIonCore-M3", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-name" + }, + "value": "LIonCore.M3" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-version" + }, + "value": "1" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-key" + }, + "value": "LIonCore-M3" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-elements" + }, + "children": [ + "-id-Concept", + "-id-ConceptInterface", + "-id-Containment", + "-id-DataType", + "-id-Enumeration", + "-id-EnumerationLiteral", + "-id-Feature", + "-id-FeaturesContainer", + "-id-Link", + "-id-Language", + "-id-LanguageElement", + "-id-NamespacedEntity", + "-id-NamespaceProvider", + "-id-PrimitiveType", + "-id-Property", + "-id-Reference" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-dependsOn" + }, + "targets": [] + } + ], + "parent": null + }, + { + "id": "-id-Concept", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Concept" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Concept" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Concept-abstract", + "-id-Concept-extends", + "-id-Concept-implements" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "FeaturesContainer", + "reference": "-id-FeaturesContainer" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Concept-abstract", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "abstract" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Concept-abstract" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LIonCore-M3-Boolean" + } + ] + } + ], + "parent": "-id-Concept" + }, + { + "id": "-id-Concept-extends", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "extends" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Concept-extends" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Concept", + "reference": "-id-Concept" + } + ] + } + ], + "parent": "-id-Concept" + }, + { + "id": "-id-Concept-implements", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "implements" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Concept-implements" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "ConceptInterface", + "reference": "-id-ConceptInterface" + } + ] + } + ], + "parent": "-id-Concept" + }, + { + "id": "-id-Concept-partition", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "partition" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Concept-partition" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LIonCore-M3-Boolean" + } + ] + } + ], + "parent": "-id-Concept" + }, + { + "id": "-id-ConceptInterface", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "ConceptInterface" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "ConceptInterface" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-ConceptInterface-extends" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "FeaturesContainer", + "reference": "-id-FeaturesContainer" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-ConceptInterface-extends", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "extends" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "ConceptInterface-extends" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "ConceptInterface", + "reference": "-id-ConceptInterface" + } + ] + } + ], + "parent": "-id-ConceptInterface" + }, + { + "id": "-id-Containment", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Containment" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Containment" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Link", + "reference": "-id-Link" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-DataType", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "DataType" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "DataType" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "LanguageElement", + "reference": "-id-LanguageElement" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Enumeration", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Enumeration" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Enumeration" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Enumeration-literals" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "DataType", + "reference": "-id-DataType" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "implements" + }, + "targets": [ + { + "resolveInfo": "NamespaceProvider", + "reference": "-id-NamespaceProvider" + } + ] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Enumeration-literals", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "literals" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Enumeration-literals" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "EnumerationLiteral", + "reference": "-id-EnumerationLiteral" + } + ] + } + ], + "parent": "-id-Enumeration" + }, + { + "id": "-id-EnumerationLiteral", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "EnumerationLiteral" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "EnumerationLiteral" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Feature", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Feature" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Feature" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Feature-optional" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Feature-optional", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "optional" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Feature-optional" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LIonCore-M3-Boolean" + } + ] + } + ], + "parent": "-id-Feature" + }, + { + "id": "-id-FeaturesContainer", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "FeaturesContainer" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "FeaturesContainer" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-FeaturesContainer-features" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "LanguageElement", + "reference": "-id-LanguageElement" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "NamespaceProvider", + "reference": "-id-NamespaceProvider" + } + ] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-FeaturesContainer-features", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "features" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "FeaturesContainer-features" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Feature", + "reference": "-id-Feature" + } + ] + } + ], + "parent": "-id-FeaturesContainer" + }, + { + "id": "-id-Link", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Link" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Link" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Link-multiple", + "-id-Link-type" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Feature", + "reference": "-id-Feature" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Link-multiple", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "multiple" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Link-multiple" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LIonCore-M3-Boolean" + } + ] + } + ], + "parent": "-id-Link" + }, + { + "id": "-id-Link-type", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "type" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Link-type" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "FeaturesContainer", + "reference": "-id-FeaturesContainer" + } + ] + } + ], + "parent": "-id-Link" + }, + { + "id": "-id-Language", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Language" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Language-name" + }, + "value": "LIonCore.M3.Language" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Language" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Language-name", + "-id-Language-version", + "-id-Language-key", + "-id-Language-dependsOn", + "-id-Language-elements" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "NamespaceProvider", + "reference": "-id-NamespaceProvider" + } + ] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Language-name", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "name" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Language-name" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "-id-Language" + }, + { + "id": "-id-Language-key", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "key" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Language-key" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "-id-Language" + }, + { + "id": "-id-Language-dependsOn", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "dependsOn" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "dependsOn" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Language", + "reference": "-id-Language" + } + ] + } + ], + "parent": "-id-Language" + }, + { + "id": "-id-Language-elements", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "elements" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "elements" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LanguageElement", + "reference": "-id-LanguageElement" + } + ] + } + ], + "parent": "-id-Language" + }, + { + "id": "-id-Language-version", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "version" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Language-version" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "-id-Language" + }, + { + "id": "-id-LanguageElement", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "LanguageElement" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "LanguageElement" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-NamespacedEntity", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "NamespacedEntity" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "NamespacedEntity" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-NamespacedEntity-name", + "-id-NamespacedEntity-key" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-NamespacedEntity-name", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "name" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "NamespacedEntity-name" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "-id-NamespacedEntity" + }, + { + "id": "-id-NamespacedEntity-key", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "key" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "NamespacedEntity-key" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LIonCore-M3-String" + } + ] + } + ], + "parent": "-id-NamespacedEntity" + }, + { + "id": "-id-NamespaceProvider", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "ConceptInterface" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "NamespaceProvider" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "NamespaceProvider" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "ConceptInterface-extends" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-PrimitiveType", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "PrimitiveType" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "PrimitiveType" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "DataType", + "reference": "-id-DataType" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + }, + { + "id": "-id-Property", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Property" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Property" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [ + "-id-Property-type" + ] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Feature", + "reference": "-id-Feature" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "LIonCore-M3" + }, + { + "id": "-id-Property-type", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "type" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Property-type" + } + ], + "children": [], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "DataType", + "reference": "-id-DataType" + } + ] + } + ], + "parent": "-id-Property" + }, + { + "id": "-id-Reference", + "concept": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-partition" + }, + "value": "false" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-name" + }, + "value": "Reference" + }, + { + "property": { + "language": "LIonCore-M3", + "version": "1", + "key": "NamespacedEntity-key" + }, + "value": "Reference" + } + ], + "children": [ + { + "containment": { + "language": "LIonCore-M3", + "version": "1", + "key": "FeaturesContainer-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Link", + "reference": "-id-Link" + } + ] + }, + { + "reference": { + "language": "LIonCore-M3", + "version": "1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "parent": "-id-LIonCore-M3" + } + ] +} \ No newline at end of file From b5eee9ba67d11461a3ebf49902296eeffbf97b6d Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 29 Jun 2023 15:48:15 +0200 Subject: [PATCH 06/18] updated pre-defined ids and keys in M3 document; added reference JSONs --- .gitignore | 1 + lioncore/issue-footnotes.adoc | 4 +- lioncore/metametamodel/metametamodel.adoc | 229 +++++++++++++--------- 3 files changed, 136 insertions(+), 98 deletions(-) diff --git a/.gitignore b/.gitignore index 988b127..6bd25a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # temp files ~$* +.asciidoctor/ \ No newline at end of file diff --git a/lioncore/issue-footnotes.adoc b/lioncore/issue-footnotes.adoc index 04db29c..7434573 100644 --- a/lioncore/issue-footnotes.adoc +++ b/lioncore/issue-footnotes.adoc @@ -4,7 +4,8 @@ :fn-org7: footnote:org7[https://github.com/LIonWeb-org/organization/issues/7[Is version part of M3 Metamodel? #7]] :fn-org8: footnote:org8[https://github.com/LIonWeb-org/organization/issues/8[Which parts of a link can be specialized? #8]] :fn-org9: footnote:org9[https://github.com/LIonWeb-org/organization/issues/9[Supported built-in primitive types #9]] -:fn-org9-intrange: footnote:org9[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1288624098[Discussion on supported integer range]] +:fn-org9-intrange: footnote:org9intrange[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1288624098[Discussion on supported integer range]] +:fn-org9-implicit: footnote:org9implicit[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1381934044[Discussion on implicitly importing stdlib]] :fn-org13: footnote:org13[https://github.com/LIonWeb-org/organization/issues/13[If and how to represent Annotations in M3 #13]] :fn-org29: footnote:org29[https://github.com/LIonWeb-org/organization/issues/29[Repo API: Do we need model partitions? #29]] :fn-org33: footnote:org33[https://github.com/LIonWeb-org/organization/issues/33[Repo API: Node representation #33]] @@ -29,6 +30,7 @@ :fn-org77: footnote:org77[https://github.com/LIonWeb-org/organization/issues/77[Rename Metamodel.qualifiedName to name #77]] :fn-org78: footnote:org78[https://github.com/LIonWeb-org/organization/issues/78[Rename M3 Metamodel to Language? #78]] :fn-org84: footnote:org84[https://github.com/LIonWeb-org/organization/issues/84[Rename NamespacedEntity.simpleName to name? #84]] +:fn-org86: footnote:org86[https://github.com/LIonWeb-org/organization/issues/86[Introducing the builtin interface INamed #86]] :fn-org89: footnote:org89[https://github.com/LIonWeb-org/organization/issues/89[Establish term meta-pointer #89]] :fn-org90: footnote:org90[https://github.com/LIonWeb-org/organization/issues/90[Rename M3 property id -> key #90]] :fn-org91: footnote:org91[https://github.com/LIonWeb-org/organization/issues/91[Requirements on metamodel keys #91]] diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 5ed2456..7351977 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -547,44 +547,87 @@ This is typically calculated by combining the namespaces of all the ancestors up .Constraints TBD -=== Supporting Terminology -==== Multiplicity -Multiplicity describes how many targets a link must and can have. +=== Pre-defined Ids and Keys +The language itself has key `LIonCore-M3`.{fn-org91} -.Example -Common multiplicities are `1` (meaning there MUST be exactly one target), `0..1` (meaning there CAN be exactly one target), `0..\*` (meaning there CAN be zero or more targets), and `1..*` (meaning there MUST be at least one target, but there CAN be more than one targets). +==== Keys of M3 Elements -.EMF & MPS equivalent -In Ecore there is no equivalent as `lowerBound` and `upperBound` can be set independently. +[cols="d,d,m"] +|=== +|M3 element |Concept |Key -This is equivalent to MPS’ `Cardinality`, which has the four values mentioned as example. +|<> |Concept |Concept +|<> |Property |Concept-abstract +|<> |Reference |Concept-extends +|<> |Reference |Concept-implements +|<> |Concept |ConceptInterface +|<> |Reference |ConceptInterface-extends +|<> |Concept |Containment +|<> |Concept |DataType +|<> |Concept |Enumeration +|<> |Containment |Enumeration-literals +|<> |Concept |EnumerationLiteral +|<> |Concept |Feature +|<> |Property |Feature-optional +|<> |Concept |FeaturesContainer +|<> |Containment |FeaturesContainer-features +|<> |Concept |Link +|<> |Property |Link-multiple +|<> |Reference |Link-type +|<> |Concept |Language +|<> |Property |Language-name +|<> |Property |Language-key +|<> |Reference |Language-dependsOn +|<> |Containment |Language-elements +|<> |Property |Language-version +|<> |Concept |LanguageElement +|<> |Concept |NamespacedEntity +|<> |Property |NamespacedEntity-name +|<> |Property |NamespacedEntity-key +|<> |Concept |NamespaceProvider +|<> |Concept |PrimitiveType +|<> |Concept |Property +|<> |Reference |Property-type +|<> |Concept |Reference +|=== -.Characteristics -LionCore represents multiplicity as the two booleans <> (whether there MUST be at least one target) and <> (whether there CAN be more than one target). +==== Ids of Built-in elements +The language hosting built-in elements has key `LIonCore-builtins`. -[%autowidth] +Every language implicitly depends on this language.{fn-org9-implicit} +Thus, the ids in this language MUST be stable. +This means the id MUST be identical to the key for each node in this language. + +[cols="d,d,m"] |=== -|Multiplicity |`optional` |`multiple` -|`1` |true |false -|`0..1` |false |false -|`0..*` |true |true -|`1..*` |false |true +|Instance |Concept |Id and key + +|<> |PrimitiveType |LIonCore-builtins-String +|<> |PrimitiveType |LIonCore-builtins-Boolean +|<> |PrimitiveType |LIonCore-builtins-Integer +|<> |PrimitiveType |LIonCore-builtins-JSON +|<> |Concept |LIonCore-builtins-Node +|<> |ConceptInterface |LIonCore-builtins-INamed |=== -.Constraints -TBD - -== Other considerations [[stdlib, standard library]] -=== Pre-defined elements -Each LIonWeb implementation ships with a set of pre-defined elements, akin to a _standard library_. +=== Built-in elements +Each LIonWeb implementation ships with a set of built-in elements, akin to a _standard library_. ==== Concepts [[Node, Node]] * `Node`{fn-org71}, an _abstract_ <> that's the (explicit or implicit) the ancestor of all concepts. +==== Interfaces + +[[INamed, INamed]] +* `INamed`{fn-org86}, an <> with one <> called `name` of type <>. ++ +This interface CAN be used to resolve references by name. +#TODO link to explanation# + ==== Primitive types Some <> will be widely used, so it makes sense to pre-define them.{fn-org9} @@ -594,27 +637,36 @@ Some <> will be widely used, so it makes sense t * [[Integer, Integer]] `Integer` * [[JSON, JSON]] `JSON` -=== Annotations -We intend to support annotations in a future release.{fn-org13} +=== Supporting Terminology +==== Multiplicity +Multiplicity describes how many targets a link must and can have. -=== Reflection +.Example +Common multiplicities are `1` (meaning there MUST be exactly one target), `0..1` (meaning there CAN be exactly one target), `0..\*` (meaning there CAN be zero or more targets), and `1..*` (meaning there MUST be at least one target, but there CAN be more than one targets). -Reflection describes the ability of each Meta-Metamodel instance to access the definition of the Meta-Metamodel element from which it has been instantiated. +.EMF & MPS equivalent +In Ecore there is no equivalent as `lowerBound` and `upperBound` can be set independently. -It is important to offer this functionality also in consideration that some implementation languages may not offer reflection capabilities that could be used as an alternative. +This is equivalent to MPS’ `Cardinality`, which has the four values mentioned as example. -=== Generics +.Characteristics +LionCore represents multiplicity as the two booleans <> (whether there MUST be at least one target) and <> (whether there CAN be more than one target). -Generics are not directly supported by this proposal. -We can solve some needs through specialization of features in derived classes. -We could alternatively also imagine using specific annotations for supporting this. +[%autowidth] +|=== +|Multiplicity |`optional` |`multiple` +|`1` |true |false +|`0..1` |false |false +|`0..*` |true |true +|`1..*` |false |true +|=== -In general Generics complicate the solution and MPS can live without them. -Also, in StarLasu we never encountered the need for them so far. +.Constraints +TBD [[partition]] -=== Partitions +==== Partitions Each node that does not have a parent node must be of a Concept with <> flag set to `true`. This implies that every node is contained in exactly one partition, namely the partition defined by its root node.{fn-org29} @@ -624,9 +676,9 @@ A partition is similar to ECore's `Resource`. A partition is similar to MPS' `model`. [[identifiers]] -=== Identifiers +==== Identifiers -==== Valid characters +===== Valid characters Ids can only contain these symbols: @@ -638,18 +690,18 @@ Ids can only contain these symbols: This is the same character set as https://en.wikipedia.org/wiki/Base64#Variants_summary_table[Base64url variant]. -==== Representation +===== Representation Ids are represented by a string, containing only valid characters (as defined above). An id string is NOT padded, also not by whitespaces. An id string does NOT contain any terminating symbols (compared to some BASE64 variants); this does not affect internal representation in a specific implementation language, e.g. C-style \0-terminated strings. -==== Scope +===== Scope Node ids MUST be unique within their id-space. [[id-space]] -===== Id-space +====== Id-space An id-space is a realm that guarantees the uniqueness of all ids within. Typically, this means one repository. @@ -661,11 +713,51 @@ In LIonWeb (the protocol), id-spaces are NOT hierarchical. An implementation might choose to use hierarchical id-spaces internally. [[node-id]] -==== Identification +===== Identification A node can be identified relative to its id-space by the node's id. To globally identify a node, we use the combination of the id-space id and the node id. +== Reference models + +=== Meta-meta model +The LIonCore model, aka LIonWeb M3. +It is defined by means of itself, as outlined by link:https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility]. + +[source, json] +---- +include::lioncore.json[] +---- + +=== Pre-defined elements +The LIonCore built-in elements. + +[source, json] +---- +include::builtins.json[] +---- + +== Other considerations + +=== Annotations + +We intend to support annotations in a future release.{fn-org13} + +=== Reflection + +Reflection describes the ability of each Meta-Metamodel instance to access the definition of the Meta-Metamodel element from which it has been instantiated. + +It is important to offer this functionality also in consideration that some implementation languages may not offer reflection capabilities that could be used as an alternative. + +=== Generics + +Generics are not directly supported by this proposal. +We can solve some needs through specialization of features in derived classes. +We could alternatively also imagine using specific annotations for supporting this. + +In general Generics complicate the solution and MPS can live without them. +Also, in StarLasu we never encountered the need for them so far. + === References to Language Elements From a language, we refer to all language elements by their <>.{fn-org131} This includes references to @@ -687,63 +779,6 @@ This includes references to #TODO: How to refer to stdlib elements? By id or key?# -=== Pre-defined Ids and Keys -The metamodel itself has key `LIonCore-M3`.{fn-org91} - -==== Keys of M3 Elements - -[cols="d,d,m"] -|=== -|M3 element |Concept |Key - -|<> |Concept |Concept -|<> |Property |Concept-abstract -|<> |Reference |Concept-extends -|<> |Reference |Concept-implements -|<> |Concept |ConceptInterface -|<> |Reference |ConceptInterface-extends -|<> |Concept |Containment -|<> |Concept |DataType -|<> |Concept |Enumeration -|<> |Containment |Enumeration-literals -|<> |Concept |EnumerationLiteral -|<> |Concept |Feature -|<> |Property |Feature-optional -|<> |Concept |FeaturesContainer -|<> |Containment |FeaturesContainer-features -|<> |Concept |Link -|<> |Property |Link-multiple -|<> |Reference |Link-type -|<> |Concept |Language -|<> |Property |Language-name -|<> |Property |Language-key -|<> |Reference |Language-dependsOn -|<> |Containment |Language-elements -|<> |Concept |LanguageElement -|<> |Concept |NamespacedEntity -|<> |Property |NamespacedEntity-name -|<> |Property |NamespacedEntity-key -|<> |Concept |NamespaceProvider -|<> |Concept |PrimitiveType -|<> |Concept |Property -|<> |Reference |Property-type -|<> |Concept |Reference -|=== - -==== Ids of Built-in Instances - -[cols="d,d,m"] -|=== -|Instance |Concept |Id - -|<> |PrimitiveType |LIonCore-M3-String -|<> |PrimitiveType |LIonCore-M3-Boolean -|<> |PrimitiveType |LIonCore-M3-Integer -|<> |PrimitiveType |LIonCore-M3-JSON -|<> |Concept |LIonCore-M3-Node -|=== - - === Union or Intersection Types These are not supported. From fa9756e983cecd64f98ea1aef2a2573b66319253 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 29 Jun 2023 15:54:33 +0200 Subject: [PATCH 07/18] replace M3 `name` properties by inheritance from INamed (#86) --- lioncore/metametamodel/lioncore.json | 107 ++------------------------- 1 file changed, 7 insertions(+), 100 deletions(-) diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index 7d4240f..78c4b37 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -1430,62 +1430,15 @@ { "resolveInfo": "NamespaceProvider", "reference": "-id-NamespaceProvider" - } - ] - } - ], - "parent": "-id-LIonCore-M3" - }, - { - "id": "-id-Language-name", - "concept": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property" - }, - "properties": [ - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Feature-optional" - }, - "value": "false" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-name" - }, - "value": "name" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-key" - }, - "value": "Language-name" - } - ], - "children": [], - "references": [ - { - "reference": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property-type" - }, - "targets": [ + }, { - "resolveInfo": "String", - "reference": "LIonCore-M3-String" + "resolveInfo": "INamed", + "reference": "LIonCore-builtins-INamed" } ] } ], - "parent": "-id-Language" + "parent": "-id-LIonCore-M3" }, { "id": "-id-Language-key", @@ -1852,61 +1805,15 @@ "version": "1", "key": "Concept-implements" }, - "targets": [] - } - ], - "parent": "-id-LIonCore-M3" - }, - { - "id": "-id-NamespacedEntity-name", - "concept": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property" - }, - "properties": [ - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Feature-optional" - }, - "value": "false" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-name" - }, - "value": "name" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-key" - }, - "value": "NamespacedEntity-name" - } - ], - "children": [], - "references": [ - { - "reference": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property-type" - }, "targets": [ { - "resolveInfo": "String", - "reference": "LIonCore-M3-String" + "resolveInfo": "INamed", + "reference": "LIonCore-builtins-INamed" } ] } ], - "parent": "-id-NamespacedEntity" + "parent": "-id-LIonCore-M3" }, { "id": "-id-NamespacedEntity-key", From 9b0132d5de7cb19883664ed425c72a9e2ac08eb4 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 30 Jun 2023 08:52:27 +0200 Subject: [PATCH 08/18] added builtins.INamed to M3 diagram --- lioncore/metametamodel/metametamodel.adoc | 4 ++++ lioncore/metametamodel/metametamodel.puml | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 7351977..48f6096 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -80,6 +80,8 @@ For this use case, different Languages could be used instead. .Characteristics A Language has a [[Language.name, Language.name]]`name`{fn-org77}, a [[Language.key, Language.key]]`key`{fn-org90}, and a [[Language.version, Language.version]]`version`{fn-org7}{fn-org92}, similar to MPS Languages. +#TODO Change `Language.name` to `INamed.name` and mention implementation relation.# + [[Language.elements, Language.elements]] Each Language will contain a list of <> in its `elements` containment. @@ -333,6 +335,8 @@ n/a [[NamespacedEntity.name, NamespacedEntity.name]] A NamespacedEntity has a `name`.{fn-org84} +#TODO Change `NamespacedEntity.name` to `INamed.name` and mention implementation relation.# + [[NamespacedEntity.key, NamespacedEntity.key]] A NamespacedEntity has an `key`.{fn-org90} diff --git a/lioncore/metametamodel/metametamodel.puml b/lioncore/metametamodel/metametamodel.puml index cb97eba..2d13ab7 100644 --- a/lioncore/metametamodel/metametamodel.puml +++ b/lioncore/metametamodel/metametamodel.puml @@ -1,6 +1,12 @@ @startuml hide empty members +'package builtins { + interface builtins.INamed { + name: String + } +'} + class Concept #LightGreen extends FeaturesContainer { abstract: Boolean partition: Boolean @@ -28,16 +34,16 @@ abstract class Link #LightBlue extends Feature { multiple: Boolean } -class Language <> implements NamespaceProvider { - name: String +class Language <> implements NamespaceProvider, builtins.INamed { +' name: String key: Id version: Integer } abstract class LanguageElement implements NamespacedEntity -abstract class NamespacedEntity { - name: String +abstract class NamespacedEntity implements builtins.INamed { +' name: String key: Id } From f6e31ea5b6bbb055bf2c5eb8016723d050f5f0b3 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 30 Jun 2023 09:10:04 +0200 Subject: [PATCH 09/18] turned NamespacedEntity into an interface --- lioncore/metametamodel/lioncore.json | 44 ++++++++--------- lioncore/metametamodel/metametamodel.adoc | 58 +++++++++++------------ lioncore/metametamodel/metametamodel.puml | 2 +- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index 78c4b37..b24eb59 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -868,12 +868,7 @@ "version": "1", "key": "Concept-extends" }, - "targets": [ - { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" - } - ] + "targets": [] }, { "reference": { @@ -881,7 +876,12 @@ "version": "1", "key": "Concept-implements" }, - "targets": [] + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] } ], "parent": "-id-LIonCore-M3" @@ -946,12 +946,7 @@ "version": "1", "key": "Concept-extends" }, - "targets": [ - { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" - } - ] + "targets": [] }, { "reference": { @@ -959,7 +954,12 @@ "version": "1", "key": "implements" }, - "targets": [] + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] } ], "parent": "-id-LIonCore-M3" @@ -1718,12 +1718,7 @@ "version": "1", "key": "Concept-extends" }, - "targets": [ - { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" - } - ] + "targets": [] }, { "reference": { @@ -1731,7 +1726,12 @@ "version": "1", "key": "Concept-implements" }, - "targets": [] + "targets": [ + { + "resolveInfo": "NamespacedEntity", + "reference": "-id-NamespacedEntity" + } + ] } ], "parent": "-id-LIonCore-M3" @@ -1741,7 +1741,7 @@ "concept": { "language": "LIonCore-M3", "version": "1", - "key": "Concept" + "key": "ConceptInterface" }, "properties": [ { diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 48f6096..0dc2502 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -318,34 +318,7 @@ TBD === Abstract Classes -The abstract classes are <>, <>, <>, <>, <>, and <>. - -[[NamespacedEntity]] -==== NamespacedEntity -Something with a name and contained in a Namespace. - -.Example -A Concept _Invoice_, contained in a Language `com.foo.Accounting`. -Therefore, _Invoice_ will have the qualifiedName `com.foo.Accounting.Invoice`. - -.EMF & MPS equivalent -n/a - -.Characteristics -[[NamespacedEntity.name, NamespacedEntity.name]] -A NamespacedEntity has a `name`.{fn-org84} - -#TODO Change `NamespacedEntity.name` to `INamed.name` and mention implementation relation.# - -[[NamespacedEntity.key, NamespacedEntity.key]] -A NamespacedEntity has an `key`.{fn-org90} - -.Constraints -A NamespaceEntity's `name` must be unique within the NamespaceProvider. - -A NamespaceEntity's `key` must be unique within the Language.{fn-org91} -``key``s must a valid <>. - +The abstract classes are <>, <>, <>, <>, and <>. [[LanguageElement]] ==== LanguageElement @@ -531,7 +504,34 @@ TBD === Interfaces -The interfaces are <>. +The interfaces are <> and <>. + +[[NamespacedEntity]] +==== NamespacedEntity +Something with a name and contained in a Namespace. + +.Example +A Concept _Invoice_, contained in a Language `com.foo.Accounting`. +Therefore, _Invoice_ will have the qualifiedName `com.foo.Accounting.Invoice`. + +.EMF & MPS equivalent +n/a + +.Characteristics +[[NamespacedEntity.name, NamespacedEntity.name]] +A NamespacedEntity has a `name`.{fn-org84} + +#TODO Change `NamespacedEntity.name` to `INamed.name` and mention implementation relation.# + +[[NamespacedEntity.key, NamespacedEntity.key]] +A NamespacedEntity has an `key`.{fn-org90} + +.Constraints +A NamespaceEntity's `name` must be unique within the NamespaceProvider. + +A NamespaceEntity's `key` must be unique within the Language.{fn-org91} +``key``s must a valid <>. + [[NamespaceProvider]] ==== NamespaceProvider diff --git a/lioncore/metametamodel/metametamodel.puml b/lioncore/metametamodel/metametamodel.puml index 2d13ab7..d6ea107 100644 --- a/lioncore/metametamodel/metametamodel.puml +++ b/lioncore/metametamodel/metametamodel.puml @@ -42,7 +42,7 @@ class Language <> implements NamespaceProvider, builtins.INamed { abstract class LanguageElement implements NamespacedEntity -abstract class NamespacedEntity implements builtins.INamed { +interface NamespacedEntity extends builtins.INamed { ' name: String key: Id } From 03e5c99261eb4088b3fa506ced9945e2388dec92 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 30 Jun 2023 09:30:06 +0200 Subject: [PATCH 10/18] use INamed in reference M3 models --- lioncore/metametamodel/builtins.json | 16 ++--- lioncore/metametamodel/lioncore.json | 76 ++++++++++------------- lioncore/metametamodel/metametamodel.adoc | 3 +- 3 files changed, 43 insertions(+), 52 deletions(-) diff --git a/lioncore/metametamodel/builtins.json b/lioncore/metametamodel/builtins.json index 4b0da65..d48a9f7 100644 --- a/lioncore/metametamodel/builtins.json +++ b/lioncore/metametamodel/builtins.json @@ -19,7 +19,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "Language-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "LIonCore.builtins" }, @@ -81,7 +81,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "String" }, @@ -110,7 +110,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Boolean" }, @@ -139,7 +139,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Integer" }, @@ -168,7 +168,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "JSON" }, @@ -213,7 +213,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Node" }, @@ -268,7 +268,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "INamed" }, @@ -325,7 +325,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "name" }, diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index b24eb59..ce1a24f 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -19,7 +19,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "Language-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "LIonCore.M3" }, @@ -107,7 +107,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Concept" }, @@ -179,7 +179,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "abstract" }, @@ -238,7 +238,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "extends" }, @@ -297,7 +297,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "implements" }, @@ -348,7 +348,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "partition" }, @@ -407,7 +407,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "ConceptInterface" }, @@ -485,7 +485,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "extends" }, @@ -544,7 +544,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Containment" }, @@ -620,7 +620,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "DataType" }, @@ -696,7 +696,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Enumeration" }, @@ -779,7 +779,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "literals" }, @@ -838,7 +838,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "EnumerationLiteral" }, @@ -914,7 +914,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Feature" }, @@ -984,7 +984,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "optional" }, @@ -1043,7 +1043,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "FeaturesContainer" }, @@ -1126,7 +1126,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "features" }, @@ -1185,7 +1185,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Link" }, @@ -1256,7 +1256,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "multiple" }, @@ -1315,7 +1315,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "type" }, @@ -1374,18 +1374,10 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Language" }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Language-name" - }, - "value": "LIonCore.M3.Language" - }, { "property": { "language": "LIonCore-M3", @@ -1403,7 +1395,6 @@ "key": "FeaturesContainer-features" }, "children": [ - "-id-Language-name", "-id-Language-version", "-id-Language-key", "-id-Language-dependsOn", @@ -1460,7 +1451,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "key" }, @@ -1519,7 +1510,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "dependsOn" }, @@ -1578,7 +1569,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "elements" }, @@ -1629,7 +1620,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "version" }, @@ -1688,7 +1679,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "LanguageElement" }, @@ -1764,7 +1755,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "NamespacedEntity" }, @@ -1785,7 +1776,6 @@ "key": "FeaturesContainer-features" }, "children": [ - "-id-NamespacedEntity-name", "-id-NamespacedEntity-key" ] } @@ -1835,7 +1825,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "key" }, @@ -1878,7 +1868,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "NamespaceProvider" }, @@ -1941,7 +1931,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "PrimitiveType" }, @@ -2017,7 +2007,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Property" }, @@ -2095,7 +2085,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "type" }, @@ -2154,7 +2144,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-name" + "key": "LIonCore-builtins-INamed-name" }, "value": "Reference" }, diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 0dc2502..98d2831 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -612,6 +612,7 @@ This means the id MUST be identical to the key for each node in this language. |<> |PrimitiveType |LIonCore-builtins-JSON |<> |Concept |LIonCore-builtins-Node |<> |ConceptInterface |LIonCore-builtins-INamed +|<> |Property |LIonCore-builtins-INamed-name |=== @@ -627,7 +628,7 @@ Each LIonWeb implementation ships with a set of built-in elements, akin to a _st ==== Interfaces [[INamed, INamed]] -* `INamed`{fn-org86}, an <> with one <> called `name` of type <>. +* `INamed`{fn-org86}, an <> with one <> called [[INamed.name]]`name` of type <>. + This interface CAN be used to resolve references by name. #TODO link to explanation# From adf341be09787d993e4a893763086f05cffa2613 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 30 Jun 2023 09:45:02 +0200 Subject: [PATCH 11/18] added links to reference models --- lioncore/metametamodel/metametamodel.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 98d2831..4569852 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -727,7 +727,7 @@ To globally identify a node, we use the combination of the id-space id and the n === Meta-meta model The LIonCore model, aka LIonWeb M3. -It is defined by means of itself, as outlined by link:https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility]. +It is link:lioncore.json[defined] by means of itself, as outlined by link:https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility]. [source, json] ---- @@ -735,7 +735,7 @@ include::lioncore.json[] ---- === Pre-defined elements -The LIonCore built-in elements. +The LIonCore link:builtins.json[built-in] elements. [source, json] ---- From 44b5de38f122ae2a4eb10ecd2ebde495d34517ad Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Fri, 30 Jun 2023 15:17:07 +0200 Subject: [PATCH 12/18] consistently use INamed.name; cleanup; explain INamed vs. ResolveInfo --- lioncore/issue-footnotes.adoc | 7 +- lioncore/metametamodel/metametamodel.adoc | 95 ++++++++++------------- lioncore/metametamodel/metametamodel.puml | 8 +- lioncore/serialization/serialization.adoc | 86 +++++++++++--------- 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/lioncore/issue-footnotes.adoc b/lioncore/issue-footnotes.adoc index 7434573..d9aaa26 100644 --- a/lioncore/issue-footnotes.adoc +++ b/lioncore/issue-footnotes.adoc @@ -29,6 +29,7 @@ :fn-org76: footnote:org76[https://github.com/LIonWeb-org/organization/issues/76[Should serialization contain a list of used metamodels? #76]] :fn-org77: footnote:org77[https://github.com/LIonWeb-org/organization/issues/77[Rename Metamodel.qualifiedName to name #77]] :fn-org78: footnote:org78[https://github.com/LIonWeb-org/organization/issues/78[Rename M3 Metamodel to Language? #78]] +:fn-org80: footnote:org80[https://github.com/LIonWeb-org/organization/issues/80[Metamodel.id/NamespacedEntity.id vs. Node id #80]] :fn-org84: footnote:org84[https://github.com/LIonWeb-org/organization/issues/84[Rename NamespacedEntity.simpleName to name? #84]] :fn-org86: footnote:org86[https://github.com/LIonWeb-org/organization/issues/86[Introducing the builtin interface INamed #86]] :fn-org89: footnote:org89[https://github.com/LIonWeb-org/organization/issues/89[Establish term meta-pointer #89]] @@ -41,4 +42,8 @@ :fn-org128: footnote:org128[https://github.com/LIonWeb-org/organization/issues/128[Refer to EnumLiteral by key? #128]] :fn-org129: footnote:org129[https://github.com/LIonWeb-org/organization/issues/129[Establish name for entries in serialization/languages? #129]] :fn-org130: footnote:org130[https://github.com/LIonWeb-org/organization/issues/130[What does Language.version mean semantically? #130]] -:fn-org131: footnote:org131[https://github.com/LIonWeb-org/organization/issues/131[How to refer from one language to another? #131]] \ No newline at end of file +:fn-org139: footnote:org139[https://github.com/LIonWeb-org/organization/issues/139[Disallow redefining / overriding inherited feature #139]] +:fn-org131: footnote:org131[https://github.com/LIonWeb-org/organization/issues/131[How to refer from one language to another? #131]] +:fn-org141: footnote:org141[https://github.com/LIonWeb-org/organization/issues/141[Key of builtin stdlib #141]] +:fn-org143: footnote:org143[https://github.com/LIonWeb-org/organization/issues/143[Is M3 NamespacedEntity an abstract concept or interface? #143]] +:fn-org145: footnote:org145[https://github.com/LIonWeb-org/organization/issues/145[Is Language.dependsOn a UsedLanguage? #145]] \ No newline at end of file diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index 4569852..bf5aee3 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -1,5 +1,5 @@ include::../issue-footnotes.adoc[] - +:serialization: ../serialization/serialization = Meta-Metamodel :toc: preamble :toclevels: 3 @@ -78,23 +78,17 @@ EPackages have instead sub-packages and MPS Languages have virtual folders. For this use case, different Languages could be used instead. .Characteristics -A Language has a [[Language.name, Language.name]]`name`{fn-org77}, a [[Language.key, Language.key]]`key`{fn-org90}, and a [[Language.version, Language.version]]`version`{fn-org7}{fn-org92}, similar to MPS Languages. - -#TODO Change `Language.name` to `INamed.name` and mention implementation relation.# +A Language has a <>, a [[Language.key, Language.key]]`key`{fn-org90}, and a [[Language.version, Language.version]]`version`{fn-org7}{fn-org92}, similar to MPS Languages. [[Language.elements, Language.elements]] Each Language will contain a list of <> in its `elements` containment. -A Language is a <> (as it provides a Namespace to all its elements). +A Language is a <> (as it provides a Namespace to all its elements) and indirectly an <> (as it has a name). [[Language.dependsOn, Language.dependsOn]] -A Language can depend on other Languages via `dependsOn` reference. +A Language can depend on other Languages via `dependsOn` reference.{fn-org145} Dependencies must be explicitly declared.{fn-org50} -// [[UsedLanguage]] -// For each dependency, a Language contains one `UsedLanguage` instance. -// A UsedLanguage has a [[UsedLanguage.key, UsedLanguage.key]]`key` and a [[UsedLanguage.version, UsedLanguage.version]]`version` property, pointing to the other Language this Language depends on.{fn-org129} - .Constraints ``key``s must a valid <>. `key` SHOULD be globally unique, and MUST be unique within an <>.{fn-org91} @@ -126,7 +120,7 @@ Single entities could be Concept instances, such as Invoice #1/2022. A Concept is roughly equivalent to an `EClass` (with the `isInterface` flag set to `false`) or an MPS’s `ConceptDeclaration`. .Characteristics -A Concept has a <> and an <>. +A Concept has a <> and an <>. [[Concept.abstract, Concept.abstract]] A Concept can be concrete (i.e., instantiable) or abstract, marked by boolean `abstract` property. @@ -135,7 +129,7 @@ A Concept can be concrete (i.e., instantiable) or abstract, marked by boolean `a A concept can be marked as <> via the boolean `partition` property.{fn-org29} A Concept is a <> (as it has features). -It is indirectly a <> (as it is a top level element in a <>), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). [[Concept.extends, Concept.extends]] Each Concept `extends` zero or one Concepts. @@ -161,10 +155,10 @@ For example, `Named` would be a ConceptInterface. A ConceptInterface in LionWeb will be roughly equivalent to an `EClass` (with the `isInterface` flag set to `true`) or an MPS’s `ConceptInterfaceDeclaration`. .Characteristics -A ConceptInterface has a <> and an <>. +A ConceptInterface has a <> and an <>. A ConceptInterface is an <> (as it has features). -It is indirectly a <> (as it is a top level element in a <>), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). [[ConceptInterface.extends, ConceptInterface.extends]] Each ConceptInterface `extends` zero or more ConceptInterfaces. @@ -187,10 +181,10 @@ A PrimitiveType is similar to Ecore’s `EDataType` and to MPS’ `PrimitiveData Differently from ECore’s `EDataType` PrimitiveType has no flag `serializable`, and it does not inherit fields such as `instanceClassName`, `instanceClass`, or `defaultValue`. .Characteristics -A PrimitiveType has a <> and an <>. +A PrimitiveType has a <> and an <>. A PrimitiveType is a <> (as it can be used as <> of a <>). -It is indirectly a <> (as it is a top level element in a <>) and a <> (as it has an identity, and it is contained in the namespace of the Language). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of the Language). The correspondence between a PrimitiveType an implementation class on a specific platforms can be specified through annotations, but it is not specified on the PrimitiveType itself. @@ -210,13 +204,13 @@ An Enumeration is similar to Ecore’s `EEnum` and to MPS’ `EnumerationDeclara Differently from ECore’s `EEnum` Enumeration has no flag `serializable`, and it does not inherit fields such as `instanceClassName`, `instanceClass`, or `defaultValue`. .Characteristics -An Enumeration has a <> and an <>. +An Enumeration has a <> and an <>. [[Enumeration.literals, Enumeration.literals]] An Enumeration contains <> in its `literals` containment. An Enumeration is a <> (as it can be used as <> of a <>) and a <> (as it act as the namespace for its literals). -It is indirectly a <> (as it is a top level element in a <>) and a <> (as it has an identity, and it is contained in the namespace of the Language). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of the Language). .Constraints TBD @@ -232,9 +226,9 @@ _Monday_, _Tuesday_, _Wednesday_, _Thursday_, _Friday_, _Saturday_ and _Sunday_ An EnumerationLiteral is similar to Ecore’s `EEnumLiteral` and to MPS’ `EnumerationMemberDeclaration`. .Characteristics -An EnumerationLiteral has a <> and an <>. +An EnumerationLiteral has a <> and an <>. -An Enumeration is a <> (as it has an identity, and it is contained in the namespace of its <>). +An Enumeration is a <> (as it has an identity, and it is contained in the namespace of its <>) and indirectly an <> (as it has a name). .Constraints TBD @@ -254,13 +248,13 @@ A Containment is similar to an MPS’s `LinkDeclaration` with `metaClass` having Differently from a `LinkDeclaration` there is no field `unordered`. .Characteristics -A Containment has a <> and an <>. +A Containment has a <> and an <>. It can be marked as <> and <>. A Containment refers its <>, which is a <>. A Containment is a <> (as it describes a relation between two FeaturesContainers). -It is indirectly a <> (as it describes the characteristics of a <>) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). .Constraints TBD @@ -280,13 +274,13 @@ A Reference is similar to an MPS’s `LinkDeclaration` with `metaClass` having v Differently from a `LinkDeclaration` there is no field `unordered`. .Characteristics -A Reference has a <> and an <>. +A Reference has a <> and an <>. It can be marked as <> and <>. A Containment refers its <>, which is a <>. A Reference is a <> (as it describes a relation between two FeaturesContainers). -It is indirectly a <> (as it describes the characteristics of a <>) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). .Constraints TBD @@ -304,14 +298,14 @@ A Property is similar to Ecore’s `EAttribute`. A Property is similar to MPS’s `AttributeDeclaration`. .Characteristics -A Property has a <> and an <>. +A Property has a <> and an <>. It can be marked as <>. [[Property.type, Property.type]] A Property refers its `type`, which is a <>. A Property is a <> (as it describes the characteristics of a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer) and an <> (as it has a name). .Constraints TBD @@ -334,9 +328,9 @@ LanguageElement is similar to MPS’ `IStructureElement`. The difference is that `IStructureElement` includes also elements that cannot appear as top level elements of a structure aspects, such as `LinkDeclaration`, `PropertyDeclaration`, and `EnumerationMemberDeclaration`. .Characteristics -A LanguageElement has a <> and an <>. +A LanguageElement has a <> and an <>. -A LanguageElement is a <> (as it has an identity, and it is contained in the namespace of its <>). +A LanguageElement is a <> (as it has an identity, and it is contained in the namespace of its <>), and indirectly an <> (as it has a name). A LanguageElement can be one of: @@ -345,7 +339,7 @@ A LanguageElement can be one of: * <> * <> -The `qualifiedName` of a LanguageElement can be obtained by combining the name of the containing <> with the name of the Concept. +The `qualifiedName` of a LanguageElement can be obtained by combining the name of the containing <> with the name of the LanguageElement. .Constraints Each LanguageElement must have a unique `name` within the Language. @@ -363,7 +357,7 @@ A Concept can have several features. FeaturesContainer is similar to `EClass` in Ecore (which is used both for classes and interfaces) and to `AbstractConceptDeclaration` in MPS. .Characteristics -A FeaturesContainer has a <> and an <>. +A FeaturesContainer has a <> and an <>. [[FeaturesContainer.features, FeaturesContainer.features]] A FeaturesContainer owns any number of <> in `features` containment. @@ -374,7 +368,7 @@ A FeaturesContainer can be one of: * <> A FeaturesContainer is a <> (as it is a top level element in a <>) and a <> (as it act as the namespace for its features). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language). +It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language) and an <> (as it has a name). .Constraints TBD @@ -392,10 +386,10 @@ It is similar to Ecore’s `EDataType`. It is similar to MPS’ `DataTypeDeclaration`. .Characteristics -A DataType has a <> and an <>. +A DataType has a <> and an <>. A DataType is a <> (as it is a top level element in a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language). +It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language) and an <> (as it has a name). A DataType can be one of: @@ -422,12 +416,12 @@ They have no `default value`. Different from MPS' `Link`, Features CANNOT be specialized.{fn-org8} .Characteristics -A Feature has a <> and an <>. +A Feature has a <> and an <>. [[Feature.optional, Feature.optional]] A Feature can be set to `optional` or required. -A Feature is a <> (as it has an identity, and it is contained in the namespace of the <>). +A Feature is a <> (as it has an identity, and it is contained in the namespace of the <>) and indirectly an <> (as it has a name). A Feature can either be one of: @@ -436,9 +430,7 @@ A Feature can either be one of: * <> .Constraints -Each Feature MUST have a unique name within a specific <>. - -#TODO: Can we define features with the same name as an inherited one?# +Each Feature MUST have a unique name within a specific <>, including all (directly or indirectly) inherited Features.{fn-org139} We CAN have non-unique _inherited_ feature _names_, as in this example: @@ -483,7 +475,7 @@ It is similar to Ecore’s `EReference`. It is similar to MPS’ `LinkDeclaration`. .Characteristics -A Link has a <> and an <>. +A Link has a <> and an <>. It can be marked as <>. [[Link.multiple, Link.multiple]] @@ -493,7 +485,7 @@ A Link can have `multiple` or only a single targets. A Link refers its `type`, which is a <>. A Link is a <> (as it describes the characteristics of a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer) and an <> (as it has a name). A Link can be either a <>, or a <>. @@ -508,7 +500,7 @@ The interfaces are <> and <>. [[NamespacedEntity]] ==== NamespacedEntity -Something with a name and contained in a Namespace. +Something with a name and contained in a Namespace.{fn-org143} .Example A Concept _Invoice_, contained in a Language `com.foo.Accounting`. @@ -518,13 +510,10 @@ Therefore, _Invoice_ will have the qualifiedName `com.foo.Accounting.Invoice`. n/a .Characteristics -[[NamespacedEntity.name, NamespacedEntity.name]] -A NamespacedEntity has a `name`.{fn-org84} - -#TODO Change `NamespacedEntity.name` to `INamed.name` and mention implementation relation.# - [[NamespacedEntity.key, NamespacedEntity.key]] -A NamespacedEntity has an `key`.{fn-org90} +A NamespacedEntity has a <> and an `key`.{fn-org90} + +A NamespacedEntity is an <> (as it has a name). .Constraints A NamespaceEntity's `name` must be unique within the NamespaceProvider. @@ -579,14 +568,12 @@ The language itself has key `LIonCore-M3`.{fn-org91} |<> |Property |Link-multiple |<> |Reference |Link-type |<> |Concept |Language -|<> |Property |Language-name |<> |Property |Language-key |<> |Reference |Language-dependsOn |<> |Containment |Language-elements |<> |Property |Language-version |<> |Concept |LanguageElement |<> |Concept |NamespacedEntity -|<> |Property |NamespacedEntity-name |<> |Property |NamespacedEntity-key |<> |Concept |NamespaceProvider |<> |Concept |PrimitiveType @@ -596,7 +583,7 @@ The language itself has key `LIonCore-M3`.{fn-org91} |=== ==== Ids of Built-in elements -The language hosting built-in elements has key `LIonCore-builtins`. +The language hosting built-in elements has key `LIonCore-builtins`.{fn-org141} Every language implicitly depends on this language.{fn-org9-implicit} Thus, the ids in this language MUST be stable. @@ -630,8 +617,7 @@ Each LIonWeb implementation ships with a set of built-in elements, akin to a _st [[INamed, INamed]] * `INamed`{fn-org86}, an <> with one <> called [[INamed.name]]`name` of type <>. + -This interface CAN be used to resolve references by name. -#TODO link to explanation# +If a <> targets a FeaturesContainer that implements INamed, implementations SHOULD use the target's `name` property as default <<{serialization}.adoc#Reference.reference.resolveInfo, resolveInfo>> value. ==== Primitive types @@ -772,7 +758,9 @@ This includes references to * <> or <> Interfaces * Types of <> or <> -From an instance, we refer to its defining language element by the language element's <>. +As the <> is just another language, we refer to its members by their id, just as any other language members. + +From an instance, we refer to its defining language element by the language element's <>.{fn-org80} This includes references to * <> usage @@ -782,7 +770,6 @@ This includes references to * <> assignment * <> value -#TODO: How to refer to stdlib elements? By id or key?# === Union or Intersection Types diff --git a/lioncore/metametamodel/metametamodel.puml b/lioncore/metametamodel/metametamodel.puml index d6ea107..510ac0e 100644 --- a/lioncore/metametamodel/metametamodel.puml +++ b/lioncore/metametamodel/metametamodel.puml @@ -1,11 +1,11 @@ @startuml hide empty members -'package builtins { +package builtins { interface builtins.INamed { name: String } -'} +} class Concept #LightGreen extends FeaturesContainer { abstract: Boolean @@ -27,7 +27,6 @@ abstract class Feature #LightBlue implements NamespacedEntity { } abstract class FeaturesContainer #LightGreen extends LanguageElement implements NamespaceProvider { - allFeatures(): List } abstract class Link #LightBlue extends Feature { @@ -35,7 +34,6 @@ abstract class Link #LightBlue extends Feature { } class Language <> implements NamespaceProvider, builtins.INamed { -' name: String key: Id version: Integer } @@ -43,12 +41,10 @@ class Language <> implements NamespaceProvider, builtins.INamed { abstract class LanguageElement implements NamespacedEntity interface NamespacedEntity extends builtins.INamed { -' name: String key: Id } interface NamespaceProvider { - namespaceQualifier(): String } class PrimitiveType #LightPink extends DataType diff --git a/lioncore/serialization/serialization.adoc b/lioncore/serialization/serialization.adoc index d60c3fb..9260f3b 100644 --- a/lioncore/serialization/serialization.adoc +++ b/lioncore/serialization/serialization.adoc @@ -1,5 +1,6 @@ include::../issue-footnotes.adoc[] +:m3: ../metametamodel/metametamodel :fn-mof: footnote:mof[https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility], also known as M3 model] = LIonWeb Serialization Format @@ -25,19 +26,23 @@ include::serialization.puml[] === Root structure +[[SerializationChunk]] Root level MUST be an _object_ with three members, called *serialization chunk*. ##TODO: Are more members allowed?{fn-org67}## +[[SerializationChunk.serializationFormatVersion]] The first member MUST be _key_ `serializationFormatVersion` with a _string_ _value_.{fn-org58} The value MUST be a decimal integer (without leading or trailing whitespace) describing the serialization format version used to create the processed document, according to <>. +[[SerializationChunk.languages]] The second member MUST be _key_ `languages` with an _array_ _value_.{fn-org76}{fn-org78} Each _element_ in the value array MUST adhere to <>. The order of _elements_ is undefined. _elements_ MUST contain all language/version referred to by any <> in the processed document. Each _element_ must be unique with respect to all its _members_. +[[SerializationChunk.nodes]] The third member MUST be _key_ `nodes` with an _array_ _value_.{fn-org33} Each _element_ in the value array MUST adhere to <>. The order of _elements_ is undefined. @@ -45,26 +50,28 @@ Each _element_ must be unique with respect to the value of its _key_ `id`. [[language]] === Language structure +[[UsedLanguage]] Each *used language* MUST be an _object_.{fn-org129} The order of _members_ is undefined. The _object_ MUST contain the following _members_:{fn-org76} -* _key_ `key` with _string_ _value_, adhering to <>. -* _key_ `version` with _string_ _value_, adhering to <>. +* [[UsedLanguage.key]] _key_ `key` with _string_ _value_, adhering to <>. +* [[UsedLanguage.version]] _key_ `version` with _string_ _value_, adhering to <>. [[language-key]] ==== Language key -A _string_ according to <>. -Refers to the <> of the language. +A _string_ according to <<{m3}.adoc#identifiers, Identifier spec>>. +Refers to the <<{m3}.adoc#Language.key, key>> of the language. [[language-version]] ==== Language version A _string_ with any contents{fn-org128}{fn-org130}, MUST NOT be empty.{fn-org92} -Refers to the <> of the language. +Refers to the <<{m3}.adoc#Language.version, version>> of the language. [[meta-pointer]] === Meta-pointer +[[MetaPointer]] A *meta-pointer* is a reference from M1 to M2.{fn-org89}{fn-mof} It's used at several places within <>. @@ -73,49 +80,51 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* _key_ `language` with _string_ _value_, adhering to <>. -* _key_ `version` with _string_ _value_, adhering to <>. -* _key_ `key` with _string_ _value_ according to <>. -Refers to some <>. +* [[MetaPointer.lanuage]] _key_ `language` with _string_ _value_, adhering to <>. +* [[MetaPointer.version]] _key_ `version` with _string_ _value_, adhering to <>. +* [[MetaPointer.key]] _key_ `key` with _string_ _value_ according to <<{m3}.adoc#identifiers, Identifier spec>>. +Refers to some <<{m3}.adoc#NamespacedEntity, element in the language>>. Which element exactly is specified for each usage of meta-pointer. [[node]] === Node structure +[[Node]] Each *node* MUST be an _object_.{fn-org37} The order of _members_ is undefined. The _object_ MUST contain the following _members_:{fn-org59}{fn-java33}{fn-org55} -* _key_ `id` with _string_ _value_, adhering to <>. -* _key_ `concept`{fn-org37-name} with _object_ _value_, adhering to <>. - The *meta-pointer*'s ``key``'s _value_ refers to the <> of the <> this *node* is an instance of. -* _key_ `properties` with _array_ _value_, each _element_ adhering to <>. +* [[Node.id]] _key_ `id` with _string_ _value_, adhering to <>. +* [[Node.concept]] _key_ `concept`{fn-org37-name} with _object_ _value_, adhering to <>. + The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Concept, *Concept*>> this *node* is an instance of. +* [[Node.properties]] _key_ `properties` with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined. -* _key_ `children`{fn-org55-name-children} with _array_ _value_, each _element_ adhering to <>. +* [[Node.children]] _key_ `children`{fn-org55-name-children} with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined. -* _key_ `references`{fn-org55-name-references} with _array_ _value_, each _element_ adhering to <>. +* [[Node.references]] _key_ `references`{fn-org55-name-references} with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined. -* _key_ `parent` with _string_ or _null_ _value_, adhering to <>. +* [[Node.parent]] _key_ `parent` with _string_ or _null_ _value_, adhering to <>. ##TODO: How to store invalid text?{fn-org62}## [[id]] ==== Id value -A _string_ according to <>. +A _string_ according to <<{m3}.adoc#identifiers, Identifier spec>>. Defines the *id* of this *node*. [[property]] ==== Property +[[Property]] Each *property* MUST be an _object_. The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* _key_ `property` with _object_ _value_, adhering to <>. - The *meta-pointer*'s ``key``'s _value_ refers to the <> of the <> this *property* is an instance of. -* _key_ `value` with _value_ as one of +* [[Property.property]] _key_ `property` with _object_ _value_, adhering to <>. + The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Property, *Property*>> this *property* is an instance of. +* [[Property.value]] _key_ `value` with _value_ as one of ** _string_{fn-org34} containing the value of the property referenced by the `property`. Refer to <> for the specification of the value format. CAN be an empty _string_. @@ -124,15 +133,16 @@ CAN be an empty _string_. [[child]] ==== Child +[[Child]] Each *child* MUST be an _object_. The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* _key_ `containment` with _object_ _value_, adhering to <>. -The *meta-pointer*'s ``key``'s _value_ refers to the <> of the <> this *child* is an instance of. -* _key_ `children` with _array_ _value_ with _string_ _elements_. -Each _element_ adheres to <>, and refers to the *id* of the contained *node*. +* [[Child.containment]] _key_ `containment` with _object_ _value_, adhering to <>. +The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Containment, *Containment*>> this *child* is an instance of. +* [[Child.children]] _key_ `children` with _array_ _value_ with _string_ _elements_. +Each _element_ adheres to <<{m3}.adoc#identifiers, Identifier spec>>, and refers to the *id* of the contained *node*. The order of _elements_ is undefined. + NOTE: Each *child* element is the inverse relation of *parent*. @@ -141,23 +151,25 @@ NOTE: The children *node* CAN be contained in the processed document, but also C [[reference]] ==== Reference +[[Reference]] Each *reference* MUST be an _object_. The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* _key_ `reference` with _object_ _value_, adhering to <>. -The *meta-pointer*'s ``key``'s _value_ refers to the <> of the <> this *reference* is an instance of. -* _key_ `targets` with __object_ _elements_. +* [[Reference.reference]] _key_ `reference` with _object_ _value_, adhering to <>. +The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Reference, *Reference*>> this *reference* is an instance of. +* [[Reference.targets]] _key_ `targets` with __object_ _elements_. Each _element_ MUST have the following _members_ in undefined order:{fn-org55-name-references} -** _key_ `resolveInfo`{fn-org36} with _value_ as one of: +** [[Reference.reference.resolveInfo]] _key_ `resolveInfo`{fn-org36} with _value_ as one of: *** _string_ containing *resolveInfo*, a textual hint that might be used to find the target *node* of this reference. +Interface <<{m3}.adoc#INamed, INamed>> SHOULD be used as a default, if available. The exact value depends on the implementation. CAN be an empty _string_. *** _null_ if no *resolveInfo* is available. -** _key_ `reference`{fn-org35} with _value_ as one of: -*** _string_ according to <>. +** [[Reference.reference.reference]] _key_ `reference`{fn-org35} with _value_ as one of: +*** _string_ according to <<{m3}.adoc#identifiers, Identifier spec>>. Refers to the *id* of the target *node*. + NOTE: The referred *node* CAN be contained in the processed document, but also CAN be outside the processed document (i.e. not contained in the processed document). @@ -167,7 +179,7 @@ NOTE: The referred *node* CAN be contained in the processed document, but also C ==== Parent One of -* _string_ according to <>. +* _string_ according to <<{m3.acoc}#identifiers, Identifier spec>>. Refers to the *id* of the *node* containing this *node*. + NOTE: *parent* is the inverse relation of one *child*. @@ -184,7 +196,7 @@ All property values MUST be serialized as JSON _string_.{fn-org34}{fn-org9}. An unset property CAN be serialized as JSON _null_. ==== String -<> might be any string, of any length, including (but not limited to): +<<{m3}.adoc#String, LIonCore Strings>> might be any string, of any length, including (but not limited to): * empty string: `""` * only containing whitespace: `" "` @@ -193,7 +205,7 @@ An unset property CAN be serialized as JSON _null_. * containing escaped Unicode characters: `"\uD83D\uDE10"` ==== Boolean -<> MUST be encoded as exactly one of these JSON _strings_: +<<{m3}.adoc#Boolean, LIonCore Booleans>> MUST be encoded as exactly one of these JSON _strings_: * `"true"` * `"false"` @@ -201,7 +213,7 @@ An unset property CAN be serialized as JSON _null_. Booleans MUST NOT be encoded with leading or trailing whitespace, uppercase characters, short forms (like `t` or `f`), or decimal representation (like `1`, `0`, `-1`). ==== Integer -<> MUST be encoded as JSON _string_. +<<{m3}.adoc#Integer, LIonCore Integers>> MUST be encoded as JSON _string_. * Integers MUST be represented in base-10. * The digits CAN be prefixed with either `+` (plus) or `-` (minus).{fn-org100} @@ -237,7 +249,7 @@ Booleans MUST NOT be encoded with leading or trailing whitespace, uppercase char * `"-6 "` ==== JSON -<> MUST be encoded as JSON _string_. +<<{m3}.adoc#JSON, LIonCore JSON>> MUST be encoded as JSON _string_. All double quotes, line breaks, etc. MUST be escaped to form a proper JSON _string_. The value MUST adhere to JSON spec (RFC 8259). @@ -248,8 +260,8 @@ The value MUST adhere to JSON spec (RFC 8259). `{ "key": "my value", "myArray": [1, -2, true] }` ==== Enumeration Literals -<> MUST be encoded as JSON _string_ _value_ according to <>. -MUST refer to the <> of an <> of the <> defined as <> of this *Property*.{fn-org128} +<<{m3}.adoc#EnumerationLiteral, LIonCore Enumeration literals>> MUST be encoded as JSON _string_ _value_ according to <<{m3}.adoc#identifiers, Identifier spec>>. +MUST refer to the <<{m3}.adoc#NamespacedEntity.key, key>> of an <<{m3}.adoc#EnumerationLiteral, EnumerationLiteral>> of the <<{m3}.adoc#Enumeration, Enumeration>> defined as <<{m3}.adoc#Property.type, type>> of this *Property*.{fn-org128} == Examples From 19815ee4817acfcc8659ee9dd0e52a542bb78360 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 6 Jul 2023 09:28:24 +0200 Subject: [PATCH 13/18] fixed inconsistencies in lioncore.json (thanks Jos) --- lioncore/metametamodel/lioncore.json | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index ce1a24f..f5c7c74 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -739,7 +739,7 @@ "reference": { "language": "LIonCore-M3", "version": "1", - "key": "implements" + "key": "Concept-implements" }, "targets": [ { @@ -952,7 +952,7 @@ "reference": { "language": "LIonCore-M3", "version": "1", - "key": "implements" + "key": "Concept-implements" }, "targets": [ { @@ -1520,7 +1520,7 @@ "version": "1", "key": "NamespacedEntity-key" }, - "value": "dependsOn" + "value": "Language-dependsOn" } ], "children": [], @@ -1579,7 +1579,7 @@ "version": "1", "key": "NamespacedEntity-key" }, - "value": "elements" + "value": "Language-elements" } ], "children": [], @@ -1735,22 +1735,6 @@ "key": "ConceptInterface" }, "properties": [ - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Concept-abstract" - }, - "value": "true" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Concept-partition" - }, - "value": "false" - }, { "property": { "language": "LIonCore-M3", From 82b40c58ae1335cc0866f5fa65cc6f0ec5f45ca3 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 6 Jul 2023 11:32:03 +0200 Subject: [PATCH 14/18] fixed all properties with metapointer key INamed-name to language LIonCore-builtins; fixed parent id ref (Thanks Federico) --- lioncore/metametamodel/builtins.json | 16 +++---- lioncore/metametamodel/lioncore.json | 68 ++++++++++++++-------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/lioncore/metametamodel/builtins.json b/lioncore/metametamodel/builtins.json index d48a9f7..88b1b53 100644 --- a/lioncore/metametamodel/builtins.json +++ b/lioncore/metametamodel/builtins.json @@ -17,7 +17,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -79,7 +79,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -108,7 +108,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -137,7 +137,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -166,7 +166,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -211,7 +211,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -266,7 +266,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -323,7 +323,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index f5c7c74..97b35fb 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -17,7 +17,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -105,7 +105,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -177,7 +177,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -236,7 +236,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -295,7 +295,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -346,7 +346,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -405,7 +405,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -483,7 +483,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -542,7 +542,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -618,7 +618,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -694,7 +694,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -777,7 +777,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -836,7 +836,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -912,7 +912,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -982,7 +982,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1041,7 +1041,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1124,7 +1124,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1183,7 +1183,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1254,7 +1254,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1313,7 +1313,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1372,7 +1372,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1449,7 +1449,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1508,7 +1508,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1567,7 +1567,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1618,7 +1618,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1677,7 +1677,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1737,7 +1737,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1807,7 +1807,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1850,7 +1850,7 @@ "properties": [ { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1913,7 +1913,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -1989,7 +1989,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -2039,7 +2039,7 @@ "targets": [] } ], - "parent": "LIonCore-M3" + "parent": "-id-LIonCore-M3" }, { "id": "-id-Property-type", @@ -2067,7 +2067,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, @@ -2126,7 +2126,7 @@ }, { "property": { - "language": "LIonCore-M3", + "language": "LIonCore-builtins", "version": "1", "key": "LIonCore-builtins-INamed-name" }, From a5e58714e11554f0d4ca23925754e49e3305c0de Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Mon, 10 Jul 2023 17:06:31 +0200 Subject: [PATCH 15/18] generated all organization issues as footnotes --- lioncore/issue-footnotes.adoc | 111 +++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 8 deletions(-) diff --git a/lioncore/issue-footnotes.adoc b/lioncore/issue-footnotes.adoc index d9aaa26..63653cb 100644 --- a/lioncore/issue-footnotes.adoc +++ b/lioncore/issue-footnotes.adoc @@ -1,13 +1,46 @@ -:fn-java33: footnote:java33[https://github.com/LIonWeb-org/lioncore-java/issues/33[Require empty members in serialization #33]] +// To update +// 1. `gh issue list --state all --limit 1000 > issues.txt` in `organizations` repo dir +// 2. Use Excel to delete all columns except id and title +// 3. Paste here +// 4. Run search/replace with +// search: ([0-9]+)\t(.+) +// replace: :fn-org$1: footnote:org$1[https://github.com/LIonWeb-org/organization/issues/$1\[$2 #$1]] +// 5. Use Notepad++ to +// a) Edit | Line Operations | Sort Lines As Integers Ascending +// b) Edit | Line Operations | Remove Duplicate Lines -:fn-org6: footnote:org6[https://github.com/LIonWeb-org/organization/issues/6[How to represent DerivedFeature in M3? #6]] +:fn-java33: footnote:java33[https://github.com/LIonWeb-org/lioncore-java/issues/33[Require empty members in serialization #33]] +:fn-org3: footnote:org3[https://github.com/LIonWeb-org/organization/issues/3[Use Cases for Repo Access API #3]] +:fn-org4: footnote:org4[https://github.com/LIonWeb-org/organization/issues/4[If and how to represent ordered / unordered containments in M3 #4]] +:fn-org5: footnote:org5[https://github.com/LIonWeb-org/organization/issues/5[First-class support of Enums in M3 #5]] +:fn-org6: footnote:org6[https://github.com/LIonWeb-org/organization/issues/6[How to represent ComputedFeature in M3? #6]] :fn-org7: footnote:org7[https://github.com/LIonWeb-org/organization/issues/7[Is version part of M3 Metamodel? #7]] :fn-org8: footnote:org8[https://github.com/LIonWeb-org/organization/issues/8[Which parts of a link can be specialized? #8]] :fn-org9: footnote:org9[https://github.com/LIonWeb-org/organization/issues/9[Supported built-in primitive types #9]] -:fn-org9-intrange: footnote:org9intrange[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1288624098[Discussion on supported integer range]] :fn-org9-implicit: footnote:org9implicit[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1381934044[Discussion on implicitly importing stdlib]] +:fn-org9-intrange: footnote:org9intrange[https://github.com/LIonWeb-org/organization/issues/9#issuecomment-1288624098[Discussion on supported integer range]] +:fn-org10: footnote:org10[https://github.com/LIonWeb-org/organization/issues/10[Support custom DataTypes? #10]] +:fn-org11: footnote:org11[https://github.com/LIonWeb-org/organization/issues/11[Which M3 things can be annotated? #11]] +:fn-org12: footnote:org12[https://github.com/LIonWeb-org/organization/issues/12[Annotation instances shipped by default #12]] :fn-org13: footnote:org13[https://github.com/LIonWeb-org/organization/issues/13[If and how to represent Annotations in M3 #13]] +:fn-org14: footnote:org14[https://github.com/LIonWeb-org/organization/issues/14[Main feature annotation #14]] +:fn-org15: footnote:org15[https://github.com/LIonWeb-org/organization/issues/15[Support commentable nodes #15]] +:fn-org16: footnote:org16[https://github.com/LIonWeb-org/organization/issues/16[Have a default way to manage derived properties of nodes #16]] +:fn-org17: footnote:org17[https://github.com/LIonWeb-org/organization/issues/17[License for LIonWeb #17]] +:fn-org18: footnote:org18[https://github.com/LIonWeb-org/organization/issues/18[How to use GitHub features #18]] +:fn-org19: footnote:org19[https://github.com/LIonWeb-org/organization/issues/19[Are M3 elements a node<> (meta-circularity)? #19]] +:fn-org20: footnote:org20[https://github.com/LIonWeb-org/organization/issues/20[Typedef discussion (was: Comments on M3) #20]] +:fn-org22: footnote:org22[https://github.com/LIonWeb-org/organization/issues/22[Change Multiplicity removing 1..* and leaving only 0..1, 1..1, and 0..* #22]] +:fn-org23: footnote:org23[https://github.com/LIonWeb-org/organization/issues/23[Repository federation #23]] +:fn-org24: footnote:org24[https://github.com/LIonWeb-org/organization/issues/24[Iterations on repository API #24]] +:fn-org25: footnote:org25[https://github.com/LIonWeb-org/organization/issues/25[Repo API: Bulk read/write #25]] +:fn-org26: footnote:org26[https://github.com/LIonWeb-org/organization/issues/26[Repo API: Versioning / Collaboration #26]] +:fn-org27: footnote:org27[https://github.com/LIonWeb-org/organization/issues/27[Repo API: Access control #27]] +:fn-org28: footnote:org28[https://github.com/LIonWeb-org/organization/issues/28[Repo API: Change-based event notifications #28]] :fn-org29: footnote:org29[https://github.com/LIonWeb-org/organization/issues/29[Repo API: Do we need model partitions? #29]] +:fn-org30: footnote:org30[https://github.com/LIonWeb-org/organization/issues/30[Repo API: Locking #30]] +:fn-org31: footnote:org31[https://github.com/LIonWeb-org/organization/issues/31[Repo API: Node IDs #31]] +:fn-org32: footnote:org32[https://github.com/LIonWeb-org/organization/issues/32[Can we have multiple instances of the same Annotation associated to a certain Node? #32]] :fn-org33: footnote:org33[https://github.com/LIonWeb-org/organization/issues/33[Repo API: Node representation #33]] :fn-org34: footnote:org34[https://github.com/LIonWeb-org/organization/issues/34[Repo API: Property value encondings #34]] :fn-org35: footnote:org35[https://github.com/LIonWeb-org/organization/issues/35[Repo API: Represent dangling pointers #35]] @@ -15,35 +48,97 @@ :fn-org36-null: footnote:org36null[https://github.com/LIonWeb-org/organization/issues/36#issuecomment-1384070433[Meaning and rationale of `null` values for reference id and resolveInfo]] :fn-org37: footnote:org37[https://github.com/LIonWeb-org/organization/issues/37[Repo API: Node serialization #37]] :fn-org37-name: footnote:org37conc[https://github.com/LIonWeb-org/organization/issues/37#issuecomment-1411857068[Discussion on name `concept`]] +:fn-org38: footnote:org38[https://github.com/LIonWeb-org/organization/issues/38[Additional API: Deliver repo contents according to M2-based JSON schema #38]] +:fn-org39: footnote:org39[https://github.com/LIonWeb-org/organization/issues/39[Additional API: Complex queries #39]] +:fn-org40: footnote:org40[https://github.com/LIonWeb-org/organization/issues/40[Define a standard way to represent model diffs #40]] +:fn-org43: footnote:org43[https://github.com/LIonWeb-org/organization/issues/43[Is model API (PM3) part of LIonWeb spec? #43]] +:fn-org44: footnote:org44[https://github.com/LIonWeb-org/organization/issues/44[Create consolidated document to list all "agreed-upon" parts #44]] +:fn-org46: footnote:org46[https://github.com/LIonWeb-org/organization/issues/46[Add id field to MetamodelElement and Metamodel #46]] +:fn-org48: footnote:org48[https://github.com/LIonWeb-org/organization/issues/48[Allowed characters for names in metamodels #48]] :fn-org50: footnote:org50[https://github.com/LIonWeb-org/organization/issues/50[Metamodel dependencies: explicit, transitive? #50]] +:fn-org51: footnote:org51[https://github.com/LIonWeb-org/organization/issues/51[API Structuring #51]] +:fn-org53: footnote:org53[https://github.com/LIonWeb-org/organization/issues/53[Ids for M3 Elements #53]] +:fn-org54: footnote:org54[https://github.com/LIonWeb-org/organization/issues/54[Remove `NamespaceEntity.container` from M3 #54]] :fn-org55: footnote:org55[https://github.com/LIonWeb-org/organization/issues/55[Always provide both containment and parent id in serialization #55]] -:fn-org55-name-references: footnote:org55ref[https://github.com/LIonWeb-org/organization/issues/55#issuecomment-1415994431[Discussion on names `references` and `reference`]] :fn-org55-name-children: footnote:org55child[https://github.com/LIonWeb-org/organization/issues/55#issuecomment-1409321113[Discussion on name `children`]] +:fn-org55-name-references: footnote:org55ref[https://github.com/LIonWeb-org/organization/issues/55#issuecomment-1415994431[Discussion on names `references` and `reference`]] :fn-org57: footnote:org57[https://github.com/LIonWeb-org/organization/issues/57[Supported reference targets #57]] :fn-org58: footnote:org58[https://github.com/LIonWeb-org/organization/issues/58[Include serialization format version in serialization #58]] :fn-org59: footnote:org59[https://github.com/LIonWeb-org/organization/issues/59[Require empty members in serialization #59]] +:fn-org61: footnote:org61[https://github.com/LIonWeb-org/organization/issues/61[Goal and Scope of LionWeb #61]] :fn-org62: footnote:org62[https://github.com/LIonWeb-org/organization/issues/62[How to store invalid text typed at arbitrary places? #62]] +:fn-org63: footnote:org63[https://github.com/LIonWeb-org/organization/issues/63[Formulate minimal integration path - the “demo app” #63]] +:fn-org64: footnote:org64[https://github.com/LIonWeb-org/organization/issues/64[How should serialization work? #64]] +:fn-org66: footnote:org66[https://github.com/LIonWeb-org/organization/issues/66[Migrate diagrams from PlantUML to Mermaid #66]] :fn-org67: footnote:org67[https://github.com/LIonWeb-org/organization/issues/67[Allow additional info in serialization #67]] +:fn-org68: footnote:org68[https://github.com/LIonWeb-org/organization/issues/68[Model State Token in the Bulk API -- first step to concurrency and versioning #68]] +:fn-org69: footnote:org69[https://github.com/LIonWeb-org/organization/issues/69[Node update: do we allow concept change? #69]] +:fn-org70: footnote:org70[https://github.com/LIonWeb-org/organization/issues/70[Can Repositories have stricter requirements on node IDs than LIonWeb (e.g. only longs)? #70]] :fn-org71: footnote:org71[https://github.com/LIonWeb-org/organization/issues/71[Do we need to represent BaseConcept? #71]] +:fn-org72: footnote:org72[https://github.com/LIonWeb-org/organization/issues/72[Do we specify how language evolution works? #72]] :fn-org73: footnote:org73[https://github.com/LIonWeb-org/organization/issues/73[We don't care about serialization verbosity #73]] -:fn-org76: footnote:org76[https://github.com/LIonWeb-org/organization/issues/76[Should serialization contain a list of used metamodels? #76]] +:fn-org74: footnote:org74[https://github.com/LIonWeb-org/organization/issues/74[Node validation #74]] +:fn-org75: footnote:org75[https://github.com/LIonWeb-org/organization/issues/75[Bulk API atomicity #75]] +:fn-org76: footnote:org76[https://github.com/LIonWeb-org/organization/issues/76[Should serialization contain a list of used languages? #76]] :fn-org77: footnote:org77[https://github.com/LIonWeb-org/organization/issues/77[Rename Metamodel.qualifiedName to name #77]] :fn-org78: footnote:org78[https://github.com/LIonWeb-org/organization/issues/78[Rename M3 Metamodel to Language? #78]] :fn-org80: footnote:org80[https://github.com/LIonWeb-org/organization/issues/80[Metamodel.id/NamespacedEntity.id vs. Node id #80]] +:fn-org82: footnote:org82[https://github.com/LIonWeb-org/organization/issues/82[How to represent non-existent nodes in serialization? #82]] +:fn-org83: footnote:org83[https://github.com/LIonWeb-org/organization/issues/83[Write down what model correctness is #83]] :fn-org84: footnote:org84[https://github.com/LIonWeb-org/organization/issues/84[Rename NamespacedEntity.simpleName to name? #84]] :fn-org86: footnote:org86[https://github.com/LIonWeb-org/organization/issues/86[Introducing the builtin interface INamed #86]] +:fn-org87: footnote:org87[https://github.com/LIonWeb-org/organization/issues/87[Use id + resolveInfo for references to the meta-model. #87]] :fn-org89: footnote:org89[https://github.com/LIonWeb-org/organization/issues/89[Establish term meta-pointer #89]] :fn-org90: footnote:org90[https://github.com/LIonWeb-org/organization/issues/90[Rename M3 property id -> key #90]] :fn-org91: footnote:org91[https://github.com/LIonWeb-org/organization/issues/91[Requirements on metamodel keys #91]] :fn-org92: footnote:org92[https://github.com/LIonWeb-org/organization/issues/92[Add version property to M3 Metamodel #92]] +:fn-org93: footnote:org93[https://github.com/LIonWeb-org/organization/issues/93[Change serialization format to use meta-pointers #93]] +:fn-org94: footnote:org94[https://github.com/LIonWeb-org/organization/issues/94[Provide id mapping API #94]] +:fn-org95: footnote:org95[https://github.com/LIonWeb-org/organization/issues/95[In-process API for processors #95]] +:fn-org96: footnote:org96[https://github.com/LIonWeb-org/organization/issues/96[Describe ResolveInfo as per latest conclusions #96]] :fn-org97: footnote:org97[https://github.com/LIonWeb-org/organization/issues/97[Name clashes during inheritance #97]] :fn-org100: footnote:org100[https://github.com/LIonWeb-org/organization/issues/100[Do we allow + prefix for integer property values? #100]] :fn-org101: footnote:org101[https://github.com/LIonWeb-org/organization/issues/101[Rename MetamodelElement to LanguageElement? #101]] +:fn-org103: footnote:org103[https://github.com/LIonWeb-org/organization/issues/103[Rename DerivedFeatures to avoid confusion with Derived Models #103]] +:fn-org104: footnote:org104[https://github.com/LIonWeb-org/organization/issues/104[Interfaces vs. (abstract) Concepts vs. Multiple Inheritance #104]] +:fn-org105: footnote:org105[https://github.com/LIonWeb-org/organization/issues/105[Rename FeaturesContainer to Classifier #105]] +:fn-org106: footnote:org106[https://github.com/LIonWeb-org/organization/issues/106[[documentation] Aim of LIonWeb #106]] +:fn-org107: footnote:org107[https://github.com/LIonWeb-org/organization/issues/107[[documentation] Summary of core concepts #107]] +:fn-org108: footnote:org108[https://github.com/LIonWeb-org/organization/issues/108[[documentation] Use cases #108]] +:fn-org109: footnote:org109[https://github.com/LIonWeb-org/organization/issues/109[[documentation] Roadmap #109]] +:fn-org110: footnote:org110[https://github.com/LIonWeb-org/organization/issues/110[[documentation] Contributing #110]] +:fn-org111: footnote:org111[https://github.com/LIonWeb-org/organization/issues/111[[documentation: How-to guides] Implementations #111]] +:fn-org112: footnote:org112[https://github.com/LIonWeb-org/organization/issues/112[[documentation: How-to guides] How to create a metamodel #112]] +:fn-org113: footnote:org113[https://github.com/LIonWeb-org/organization/issues/113[[documentation: How-to guides] How to use the API #113]] +:fn-org114: footnote:org114[https://github.com/LIonWeb-org/organization/issues/114[[documentation: How-to guides] How to deserialize a model #114]] +:fn-org115: footnote:org115[https://github.com/LIonWeb-org/organization/issues/115[[documentation: How-to guides] How to serialize a model #115]] +:fn-org116: footnote:org116[https://github.com/LIonWeb-org/organization/issues/116[[documentation: How-to guides] How to implement model queries #116]] +:fn-org117: footnote:org117[https://github.com/LIonWeb-org/organization/issues/117[[documentation: How-to guides] How to evolve a metamodel #117]] +:fn-org118: footnote:org118[https://github.com/LIonWeb-org/organization/issues/118[[documentation: How-to guides] How to implement a type system #118]] +:fn-org119: footnote:org119[https://github.com/LIonWeb-org/organization/issues/119[[documentation: Explanation] How do references work #119]] +:fn-org120: footnote:org120[https://github.com/LIonWeb-org/organization/issues/120[[documentation: Explanation] How does language reuse work #120]] +:fn-org121: footnote:org121[https://github.com/LIonWeb-org/organization/issues/121[[documentation: Reference] Working principles #121]] +:fn-org122: footnote:org122[https://github.com/LIonWeb-org/organization/issues/122[[documentation: Reference] Layering: data interchange “vs.” programmatic #122]] +:fn-org123: footnote:org123[https://github.com/LIonWeb-org/organization/issues/123[[documentation: Reference] Reference architecture #123]] +:fn-org124: footnote:org124[https://github.com/LIonWeb-org/organization/issues/124[[documentation: Reference] Serialization format #124]] +:fn-org125: footnote:org125[https://github.com/LIonWeb-org/organization/issues/125[[documentation: Reference] LIonCore/M3 #125]] +:fn-org126: footnote:org126[https://github.com/LIonWeb-org/organization/issues/126[[documentation: Reference] Model correctness #126]] +:fn-org127: footnote:org127[https://github.com/LIonWeb-org/organization/issues/127[[documentation: Reference] API (bulk mode) #127]] :fn-org128: footnote:org128[https://github.com/LIonWeb-org/organization/issues/128[Refer to EnumLiteral by key? #128]] :fn-org129: footnote:org129[https://github.com/LIonWeb-org/organization/issues/129[Establish name for entries in serialization/languages? #129]] :fn-org130: footnote:org130[https://github.com/LIonWeb-org/organization/issues/130[What does Language.version mean semantically? #130]] -:fn-org139: footnote:org139[https://github.com/LIonWeb-org/organization/issues/139[Disallow redefining / overriding inherited feature #139]] :fn-org131: footnote:org131[https://github.com/LIonWeb-org/organization/issues/131[How to refer from one language to another? #131]] +:fn-org132: footnote:org132[https://github.com/LIonWeb-org/organization/issues/132[Sending a sub-tree to be attached to an existing parent #132]] +:fn-org134: footnote:org134[https://github.com/LIonWeb-org/organization/issues/134[Integrate use cases from Munich discussion into docs #134]] +:fn-org135: footnote:org135[https://github.com/LIonWeb-org/organization/issues/135[Promote LIonWeb with other tool providers #135]] +:fn-org136: footnote:org136[https://github.com/LIonWeb-org/organization/issues/136[Establish global symbol index #136]] +:fn-org139: footnote:org139[https://github.com/LIonWeb-org/organization/issues/139[Disallow redefining / overriding inherited feature #139]] :fn-org141: footnote:org141[https://github.com/LIonWeb-org/organization/issues/141[Key of builtin stdlib #141]] -:fn-org143: footnote:org143[https://github.com/LIonWeb-org/organization/issues/143[Is M3 NamespacedEntity an abstract concept or interface? #143]] -:fn-org145: footnote:org145[https://github.com/LIonWeb-org/organization/issues/145[Is Language.dependsOn a UsedLanguage? #145]] \ No newline at end of file +:fn-org142: footnote:org142[https://github.com/LIonWeb-org/organization/issues/142[Shall we have `IKeyed` interface in M3? #142]] +:fn-org143: footnote:org143[https://github.com/LIonWeb-org/organization/issues/143[Is M3 `NamespacedEntity` an abstract concept or interface? #143]] +:fn-org144: footnote:org144[https://github.com/LIonWeb-org/organization/issues/144[Principle: "everything is a model" / "everything is a node" #144]] +:fn-org145: footnote:org145[https://github.com/LIonWeb-org/organization/issues/145[Is `Language.dependsOn` a `UsedLanguage`? #145]] +:fn-org146: footnote:org146[https://github.com/LIonWeb-org/organization/issues/146[Rework NamespaceProvider and NamespacedEntity in M3 #146]] +:fn-org147: footnote:org147[https://github.com/LIonWeb-org/organization/issues/147[Rename LanguageElement to LanguageEntity #147]] +:fn-org148: footnote:org148[https://github.com/LIonWeb-org/organization/issues/148[Level of detail on API specifications #148]] +:fn-org149: footnote:org149[https://github.com/LIonWeb-org/organization/issues/149[Don't specify minimum supported range for integer #149]] \ No newline at end of file From 20403d087da4c4688d882f6e7905e87292697c31 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Mon, 10 Jul 2023 17:08:59 +0200 Subject: [PATCH 16/18] Updated docs to reflect #149, #147, #146, #142, #105, #48 --- lioncore/metametamodel/builtins.json | 20 +- lioncore/metametamodel/lioncore.json | 290 +++++++--------------- lioncore/metametamodel/metametamodel.adoc | 289 +++++++++++---------- lioncore/metametamodel/metametamodel.puml | 33 ++- lioncore/serialization/references.adoc | 100 ++++++++ lioncore/serialization/serialization.adoc | 123 +-------- 6 files changed, 375 insertions(+), 480 deletions(-) create mode 100644 lioncore/serialization/references.adoc diff --git a/lioncore/metametamodel/builtins.json b/lioncore/metametamodel/builtins.json index 88b1b53..37aeab3 100644 --- a/lioncore/metametamodel/builtins.json +++ b/lioncore/metametamodel/builtins.json @@ -35,7 +35,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "Language-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins" } @@ -89,7 +89,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-String" } @@ -118,7 +118,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-Boolean" } @@ -147,7 +147,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-Integer" } @@ -176,7 +176,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-JSON" } @@ -221,7 +221,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-Node" } @@ -231,7 +231,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -276,7 +276,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-INamed" } @@ -286,7 +286,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "LIonCore-builtins-INamed-name" @@ -333,7 +333,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "LIonCore-builtins-INamed-name" } diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index 97b35fb..d84e4ac 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -35,7 +35,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "Language-key" + "key": "IKeyed-key" }, "value": "LIonCore-M3" } @@ -55,12 +55,11 @@ "-id-Enumeration", "-id-EnumerationLiteral", "-id-Feature", - "-id-FeaturesContainer", + "-id-Classifier", "-id-Link", "-id-Language", - "-id-LanguageElement", - "-id-NamespacedEntity", - "-id-NamespaceProvider", + "-id-LanguageEntity", + "-id-IKeyed", "-id-PrimitiveType", "-id-Property", "-id-Reference" @@ -115,7 +114,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Concept" } @@ -125,7 +124,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Concept-abstract", @@ -143,8 +142,8 @@ }, "targets": [ { - "resolveInfo": "FeaturesContainer", - "reference": "-id-FeaturesContainer" + "resolveInfo": "Classifier", + "reference": "-id-Classifier" } ] }, @@ -187,7 +186,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Concept-abstract" } @@ -246,7 +245,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Concept-extends" } @@ -305,7 +304,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Concept-implements" } @@ -356,7 +355,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Concept-partition" } @@ -415,7 +414,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "ConceptInterface" } @@ -425,7 +424,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-ConceptInterface-extends" @@ -441,8 +440,8 @@ }, "targets": [ { - "resolveInfo": "FeaturesContainer", - "reference": "-id-FeaturesContainer" + "resolveInfo": "Classifier", + "reference": "-id-Classifier" } ] }, @@ -493,7 +492,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "ConceptInterface-extends" } @@ -552,7 +551,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Containment" } @@ -562,7 +561,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -628,7 +627,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "DataType" } @@ -638,7 +637,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -652,8 +651,8 @@ }, "targets": [ { - "resolveInfo": "LanguageElement", - "reference": "-id-LanguageElement" + "resolveInfo": "LanguageEntity", + "reference": "-id-LanguageEntity" } ] }, @@ -704,7 +703,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Enumeration" } @@ -714,7 +713,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Enumeration-literals" @@ -741,12 +740,7 @@ "version": "1", "key": "Concept-implements" }, - "targets": [ - { - "resolveInfo": "NamespaceProvider", - "reference": "-id-NamespaceProvider" - } - ] + "targets": [] } ], "parent": "-id-LIonCore-M3" @@ -787,7 +781,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Enumeration-literals" } @@ -846,7 +840,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "EnumerationLiteral" } @@ -856,7 +850,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -878,8 +872,8 @@ }, "targets": [ { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" + "resolveInfo": "IKeyed", + "reference": "-id-IKeyed" } ] } @@ -922,7 +916,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Feature" } @@ -932,7 +926,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Feature-optional" @@ -956,8 +950,8 @@ }, "targets": [ { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" + "resolveInfo": "IKeyed", + "reference": "-id-IKeyed" } ] } @@ -992,7 +986,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Feature-optional" } @@ -1016,7 +1010,7 @@ "parent": "-id-Feature" }, { - "id": "-id-FeaturesContainer", + "id": "-id-Classifier", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1045,15 +1039,15 @@ "version": "1", "key": "LIonCore-builtins-INamed-name" }, - "value": "FeaturesContainer" + "value": "Classifier" }, { "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, - "value": "FeaturesContainer" + "value": "Classifier" } ], "children": [ @@ -1061,10 +1055,10 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ - "-id-FeaturesContainer-features" + "-id-Classifier-features" ] } ], @@ -1077,8 +1071,8 @@ }, "targets": [ { - "resolveInfo": "LanguageElement", - "reference": "-id-LanguageElement" + "resolveInfo": "LanguageEntity", + "reference": "-id-LanguageEntity" } ] }, @@ -1088,18 +1082,13 @@ "version": "1", "key": "Concept-implements" }, - "targets": [ - { - "resolveInfo": "NamespaceProvider", - "reference": "-id-NamespaceProvider" - } - ] + "targets": [] } ], "parent": "-id-LIonCore-M3" }, { - "id": "-id-FeaturesContainer-features", + "id": "-id-Classifier-features", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1134,9 +1123,9 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, - "value": "FeaturesContainer-features" + "value": "Classifier-features" } ], "children": [], @@ -1155,7 +1144,7 @@ ] } ], - "parent": "-id-FeaturesContainer" + "parent": "-id-Classifier" }, { "id": "-id-Link", @@ -1193,7 +1182,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Link" } @@ -1203,7 +1192,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Link-multiple", @@ -1264,7 +1253,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Link-multiple" } @@ -1323,7 +1312,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Link-type" } @@ -1338,8 +1327,8 @@ }, "targets": [ { - "resolveInfo": "FeaturesContainer", - "reference": "-id-FeaturesContainer" + "resolveInfo": "Classifier", + "reference": "-id-Classifier" } ] } @@ -1382,7 +1371,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Language" } @@ -1392,11 +1381,10 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Language-version", - "-id-Language-key", "-id-Language-dependsOn", "-id-Language-elements" ] @@ -1419,69 +1407,14 @@ }, "targets": [ { - "resolveInfo": "NamespaceProvider", - "reference": "-id-NamespaceProvider" - }, - { - "resolveInfo": "INamed", - "reference": "LIonCore-builtins-INamed" + "resolveInfo": "IKeyed", + "reference": "IKeyed" } ] } ], "parent": "-id-LIonCore-M3" }, - { - "id": "-id-Language-key", - "concept": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property" - }, - "properties": [ - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "Feature-optional" - }, - "value": "false" - }, - { - "property": { - "language": "LIonCore-builtins", - "version": "1", - "key": "LIonCore-builtins-INamed-name" - }, - "value": "key" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-key" - }, - "value": "Language-key" - } - ], - "children": [], - "references": [ - { - "reference": { - "language": "LIonCore-M3", - "version": "1", - "key": "Property-type" - }, - "targets": [ - { - "resolveInfo": "String", - "reference": "LIonCore-M3-String" - } - ] - } - ], - "parent": "-id-Language" - }, { "id": "-id-Language-dependsOn", "concept": { @@ -1518,7 +1451,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Language-dependsOn" } @@ -1577,7 +1510,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Language-elements" } @@ -1592,8 +1525,8 @@ }, "targets": [ { - "resolveInfo": "LanguageElement", - "reference": "-id-LanguageElement" + "resolveInfo": "LanguageEntity", + "reference": "-id-LanguageEntity" } ] } @@ -1628,7 +1561,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Language-version" } @@ -1652,7 +1585,7 @@ "parent": "-id-Language" }, { - "id": "-id-LanguageElement", + "id": "-id-LanguageEntity", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1681,15 +1614,15 @@ "version": "1", "key": "LIonCore-builtins-INamed-name" }, - "value": "LanguageElement" + "value": "LanguageEntity" }, { "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, - "value": "LanguageElement" + "value": "LanguageEntity" } ], "children": [ @@ -1697,7 +1630,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -1719,8 +1652,8 @@ }, "targets": [ { - "resolveInfo": "NamespacedEntity", - "reference": "-id-NamespacedEntity" + "resolveInfo": "IKeyed", + "reference": "-id-IKeyed" } ] } @@ -1728,7 +1661,7 @@ "parent": "-id-LIonCore-M3" }, { - "id": "-id-NamespacedEntity", + "id": "-id-IKeyed", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1741,15 +1674,15 @@ "version": "1", "key": "LIonCore-builtins-INamed-name" }, - "value": "NamespacedEntity" + "value": "IKeyed" }, { "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, - "value": "NamespacedEntity" + "value": "IKeyed" } ], "children": [ @@ -1757,10 +1690,10 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ - "-id-NamespacedEntity-key" + "-id-IKeyed-key" ] } ], @@ -1790,7 +1723,7 @@ "parent": "-id-LIonCore-M3" }, { - "id": "-id-NamespacedEntity-key", + "id": "-id-IKeyed-key", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1817,9 +1750,9 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, - "value": "NamespacedEntity-key" + "value": "IKeyed-key" } ], "children": [], @@ -1838,54 +1771,7 @@ ] } ], - "parent": "-id-NamespacedEntity" - }, - { - "id": "-id-NamespaceProvider", - "concept": { - "language": "LIonCore-M3", - "version": "1", - "key": "ConceptInterface" - }, - "properties": [ - { - "property": { - "language": "LIonCore-builtins", - "version": "1", - "key": "LIonCore-builtins-INamed-name" - }, - "value": "NamespaceProvider" - }, - { - "property": { - "language": "LIonCore-M3", - "version": "1", - "key": "NamespacedEntity-key" - }, - "value": "NamespaceProvider" - } - ], - "children": [ - { - "containment": { - "language": "LIonCore-M3", - "version": "1", - "key": "FeaturesContainer-features" - }, - "children": [] - } - ], - "references": [ - { - "reference": { - "language": "LIonCore-M3", - "version": "1", - "key": "ConceptInterface-extends" - }, - "targets": [] - } - ], - "parent": "-id-LIonCore-M3" + "parent": "-id-IKeyed" }, { "id": "-id-PrimitiveType", @@ -1923,7 +1809,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "PrimitiveType" } @@ -1933,7 +1819,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } @@ -1999,7 +1885,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Property" } @@ -2009,7 +1895,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [ "-id-Property-type" @@ -2077,7 +1963,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Property-type" } @@ -2136,7 +2022,7 @@ "property": { "language": "LIonCore-M3", "version": "1", - "key": "NamespacedEntity-key" + "key": "IKeyed-key" }, "value": "Reference" } @@ -2146,7 +2032,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "FeaturesContainer-features" + "key": "Classifier-features" }, "children": [] } diff --git a/lioncore/metametamodel/metametamodel.adoc b/lioncore/metametamodel/metametamodel.adoc index bf5aee3..6bd99f2 100644 --- a/lioncore/metametamodel/metametamodel.adoc +++ b/lioncore/metametamodel/metametamodel.adoc @@ -6,8 +6,8 @@ include::../issue-footnotes.adoc[] :sectnums: -In this document we describe the Meta-Metamodel to be used by LionWeb. -The Meta-Metamodel is called LionCore. +In this document we describe the Meta-Metamodel to be used by LIonWeb. +The Meta-Metamodel is called LIonCore. [[goals]] == Goals @@ -59,7 +59,7 @@ The classes are <>, <>, <>, <> for <>. .Example For example, a Language for accounting could collect several Concepts such as _Invoice_, _Customer_, _InvoiceLine_, _Product_. @@ -78,24 +78,19 @@ EPackages have instead sub-packages and MPS Languages have virtual folders. For this use case, different Languages could be used instead. .Characteristics -A Language has a <>, a [[Language.key, Language.key]]`key`{fn-org90}, and a [[Language.version, Language.version]]`version`{fn-org7}{fn-org92}, similar to MPS Languages. +A Language has a <>, a <>{fn-org90}, and a [[Language.version, Language.version]]`version`{fn-org7}{fn-org92}, similar to MPS Languages. -[[Language.elements, Language.elements]] -Each Language will contain a list of <> in its `elements` containment. +[[Language.entities, Language.entities]] +Each Language will contain a list of <> in its `entities` containment. -A Language is a <> (as it provides a Namespace to all its elements) and indirectly an <> (as it has a name). +A Language is an <> (as it has a name) and an <> (as it has a key){fn-org142}. [[Language.dependsOn, Language.dependsOn]] A Language can depend on other Languages via `dependsOn` reference.{fn-org145} Dependencies must be explicitly declared.{fn-org50} .Constraints -``key``s must a valid <>. -`key` SHOULD be globally unique, and MUST be unique within an <>.{fn-org91} -For approximate global uniqueness, we SHOULD adopt Java's package naming scheme, based on domain names. -As we don't allow dots (`.`) in ids, we SHOULD use dashes (`-`) instead. - -`version` can be any non-empty string.{fn-org128}{fn-org130} +`version` can be any non-empty string.{fn-org130}{fn-org131} Language elements contained in a Language are allowed to refer to these other Language elements:{fn-org50} @@ -120,26 +115,26 @@ Single entities could be Concept instances, such as Invoice #1/2022. A Concept is roughly equivalent to an `EClass` (with the `isInterface` flag set to `false`) or an MPS’s `ConceptDeclaration`. .Characteristics -A Concept has a <> and an <>. +A Concept has a <> and an <>. [[Concept.abstract, Concept.abstract]] A Concept can be concrete (i.e., instantiable) or abstract, marked by boolean `abstract` property. [[Concept.partition, Concept.partition]] -A concept can be marked as <> via the boolean `partition` property.{fn-org29} +A concept can be marked as <> via the boolean `partition` property.{fn-org29} -A Concept is a <> (as it has features). -It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). +A Concept is a <> (as it has features). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has a key). [[Concept.extends, Concept.extends]] Each Concept `extends` zero or one Concepts. -If no Concepts are explicitly extended, the Concept will implicitly extend the Concept named `Node`. +If no Concepts are explicitly extended, the Concept will implicitly extend the Concept <>. `Node` is the only concept that truly does not extend any Concept. [[Concept.implements, Concept.implements]] A Concept `implements` zero or more <>. -A Concept can have any number of <>, given it is a <>. +A Concept can have any number of <>, given it is a <>. .Constraints TBD @@ -155,15 +150,15 @@ For example, `Named` would be a ConceptInterface. A ConceptInterface in LionWeb will be roughly equivalent to an `EClass` (with the `isInterface` flag set to `true`) or an MPS’s `ConceptInterfaceDeclaration`. .Characteristics -A ConceptInterface has a <> and an <>. +A ConceptInterface has a <> and an <>. -A ConceptInterface is an <> (as it has features). -It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has an identity, and it is contained in the namespace of the Language), and a <> (as it act as the namespace for its features). +A ConceptInterface is an <> (as it has features). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name), a <> (as it has a key). [[ConceptInterface.extends, ConceptInterface.extends]] Each ConceptInterface `extends` zero or more ConceptInterfaces. -A ConceptInterface can have any number of <>, given it is a <>. +A ConceptInterface can have any number of <>, given it is a <>. .Constraints {empty} @@ -181,10 +176,10 @@ A PrimitiveType is similar to Ecore’s `EDataType` and to MPS’ `PrimitiveData Differently from ECore’s `EDataType` PrimitiveType has no flag `serializable`, and it does not inherit fields such as `instanceClassName`, `instanceClass`, or `defaultValue`. .Characteristics -A PrimitiveType has a <> and an <>. +A PrimitiveType has a <> and an <>. A PrimitiveType is a <> (as it can be used as <> of a <>). -It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of the Language). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has a key). The correspondence between a PrimitiveType an implementation class on a specific platforms can be specified through annotations, but it is not specified on the PrimitiveType itself. @@ -204,13 +199,15 @@ An Enumeration is similar to Ecore’s `EEnum` and to MPS’ `EnumerationDeclara Differently from ECore’s `EEnum` Enumeration has no flag `serializable`, and it does not inherit fields such as `instanceClassName`, `instanceClass`, or `defaultValue`. .Characteristics -An Enumeration has a <> and an <>. +An Enumeration has a <> and an <>. [[Enumeration.literals, Enumeration.literals]] An Enumeration contains <> in its `literals` containment. +It also represents the <> for the EnumerationLiterals. + -An Enumeration is a <> (as it can be used as <> of a <>) and a <> (as it act as the namespace for its literals). -It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of the Language). +An Enumeration is a <> (as it can be used as <> of a <>). +It is indirectly a <> (as it is a top level element in a <>), an <> (as it has a name) and a <> (as it has a key). .Constraints TBD @@ -226,16 +223,18 @@ _Monday_, _Tuesday_, _Wednesday_, _Thursday_, _Friday_, _Saturday_ and _Sunday_ An EnumerationLiteral is similar to Ecore’s `EEnumLiteral` and to MPS’ `EnumerationMemberDeclaration`. .Characteristics -An EnumerationLiteral has a <> and an <>. +An EnumerationLiteral has a <> and an <>. -An Enumeration is a <> (as it has an identity, and it is contained in the namespace of its <>) and indirectly an <> (as it has a name). +An Enumeration is a <> (as it has a key) and indirectly an <> (as it has a name). .Constraints -TBD +Each EnumerationLiteral must have a unique `name` within the Enumeration. + +Each EnumerationLiteral belongs to one and only one Enumeration. [[Containment]] ==== Containment -Represents a relation between a containing <> and a contained <>. +Represents a relation between a containing <> and a contained <>. .Example Between an _IfStatement_ and its _condition_ there is a Containment relation. @@ -248,20 +247,20 @@ A Containment is similar to an MPS’s `LinkDeclaration` with `metaClass` having Differently from a `LinkDeclaration` there is no field `unordered`. .Characteristics -A Containment has a <> and an <>. +A Containment has a <> and an <>. It can be marked as <> and <>. -A Containment refers its <>, which is a <>. +A Containment refers its <>, which is a <>. -A Containment is a <> (as it describes a relation between two FeaturesContainers). -It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +A Containment is a <> (as it describes a relation between two Classifiers). +It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has a key). .Constraints TBD [[Reference]] ==== Reference -Represents a relation between a referring <> and referred <>. +Represents a relation between a referring <> and referred <>. .Example _VariableReference_ may have a Reference to a _VariableDeclaration_. @@ -274,13 +273,13 @@ A Reference is similar to an MPS’s `LinkDeclaration` with `metaClass` having v Differently from a `LinkDeclaration` there is no field `unordered`. .Characteristics -A Reference has a <> and an <>. +A Reference has a <> and an <>. It can be marked as <> and <>. -A Containment refers its <>, which is a <>. +A Containment refers its <>, which is a <>. -A Reference is a <> (as it describes a relation between two FeaturesContainers). -It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer). +A Reference is a <> (as it describes a relation between two Classifiers). +It is indirectly a <> (as it describes the characteristics of a <>), an <> (as it has a name) and a <> (as it has a key). .Constraints TBD @@ -298,84 +297,85 @@ A Property is similar to Ecore’s `EAttribute`. A Property is similar to MPS’s `AttributeDeclaration`. .Characteristics -A Property has a <> and an <>. +A Property has a <> and an <>. It can be marked as <>. [[Property.type, Property.type]] A Property refers its `type`, which is a <>. -A Property is a <> (as it describes the characteristics of a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer) and an <> (as it has a name). +A Property is a <> (as it describes the characteristics of a <>). +It is indirectly a <> (as it has a key) and an <> (as it has a name). .Constraints TBD === Abstract Classes -The abstract classes are <>, <>, <>, <>, and <>. +The abstract classes are <>, <>, <>, <>, and <>. -[[LanguageElement]] -==== LanguageElement -A LanguageElement is an element with an identity within a <>. +[[LanguageEntity]] +==== LanguageEntity +A LanguageEntity is an entity with an identity directly contained in a <>. .Example -For example, _Invoice_, _Currency_, _Named_, or _String_ could be LanguageElements. +For example, _Invoice_, _Currency_, _Named_, or _String_ could be LanguageEntities. .EMF & MPS equivalent -LanguageElement is similar to Ecore’s `EClassifier`. +LanguageEntity is similar to Ecore’s `EClassifier`. -LanguageElement is similar to MPS’ `IStructureElement`. +LanguageEntity is similar to MPS’ `IStructureElement`. The difference is that `IStructureElement` includes also elements that cannot appear as top level elements of a structure aspects, such as `LinkDeclaration`, `PropertyDeclaration`, and `EnumerationMemberDeclaration`. .Characteristics -A LanguageElement has a <> and an <>. +A LanguageEntity has a <> and an <>. -A LanguageElement is a <> (as it has an identity, and it is contained in the namespace of its <>), and indirectly an <> (as it has a name). +A LanguageEntity is a <> (as it has a key), and indirectly an <> (as it has a name). -A LanguageElement can be one of: +A LanguageEntity can be one of: * <> * <> * <> * <> -The `qualifiedName` of a LanguageElement can be obtained by combining the name of the containing <> with the name of the LanguageElement. - .Constraints -Each LanguageElement must have a unique `name` within the Language. +Each LanguageEntity must have a unique `name` within the Language. -Each LanguageElement belongs to one and only one Language. +Each LanguageEntity belongs to one and only one Language. -[[FeaturesContainer]] -==== FeaturesContainer -Something which can own <>. +[[Classifier]] +==== Classifier +Something which can own <>.{fn-org105} .Example A Concept can have several features. .EMF & MPS equivalent -FeaturesContainer is similar to `EClass` in Ecore (which is used both for classes and interfaces) and to `AbstractConceptDeclaration` in MPS. +Classifier is similar to `EClass` in Ecore (which is used both for classes and interfaces) and to `AbstractConceptDeclaration` in MPS. .Characteristics -A FeaturesContainer has a <> and an <>. +A Classifier has a <> and an <>. + +It also represents the <> for <>. -[[FeaturesContainer.features, FeaturesContainer.features]] -A FeaturesContainer owns any number of <> in `features` containment. -A FeaturesContainer can be one of: +[[Classifier.features, Classifier.features]] +A Classifier owns any number of <> in `features` containment. + +A Classifier can be one of: * <> * <> -A FeaturesContainer is a <> (as it is a top level element in a <>) and a <> (as it act as the namespace for its features). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language) and an <> (as it has a name). +A Classifier is a <> (as it is a top level element in a <>). +It is indirectly a <> (as it has a key) and an <> (as it has a name). .Constraints TBD [[DataType]] ==== DataType -A type of value which has not a relevant identity in the context of a model. +A type of value which has no relevant identity in the context of a model. .Example A _Currency_ or a _Date_ type. @@ -386,10 +386,10 @@ It is similar to Ecore’s `EDataType`. It is similar to MPS’ `DataTypeDeclaration`. .Characteristics -A DataType has a <> and an <>. +A DataType has a <> and an <>. -A DataType is a <> (as it is a top level element in a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of the Language) and an <> (as it has a name). +A DataType is a <> (as it is a top level element in a <>). +It is indirectly a <> (as it has a key) and an <> (as it has a name). A DataType can be one of: @@ -416,12 +416,12 @@ They have no `default value`. Different from MPS' `Link`, Features CANNOT be specialized.{fn-org8} .Characteristics -A Feature has a <> and an <>. +A Feature has a <> and an <>. [[Feature.optional, Feature.optional]] A Feature can be set to `optional` or required. -A Feature is a <> (as it has an identity, and it is contained in the namespace of the <>) and indirectly an <> (as it has a name). +A Feature is a <> (as it has a key) and indirectly an <> (as it has a name). A Feature can either be one of: @@ -430,7 +430,7 @@ A Feature can either be one of: * <> .Constraints -Each Feature MUST have a unique name within a specific <>, including all (directly or indirectly) inherited Features.{fn-org139} +Each Feature MUST have a unique name within a specific <>, including all (directly or indirectly) inherited Features.{fn-org139} We CAN have non-unique _inherited_ feature _names_, as in this example: @@ -464,7 +464,7 @@ If a host language cannot handle this situation, the generator towards that lang [[Link]] ==== Link -Represent a connection to an <>. +Represent a connection to an <>. .Example An _Invoice_ can be connected to its _InvoiceLines_ and to a _Customer_. @@ -475,17 +475,17 @@ It is similar to Ecore’s `EReference`. It is similar to MPS’ `LinkDeclaration`. .Characteristics -A Link has a <> and an <>. +A Link has a <> and an <>. It can be marked as <>. [[Link.multiple, Link.multiple]] A Link can have `multiple` or only a single targets. [[Link.type, Link.type]] -A Link refers its `type`, which is a <>. +A Link refers its `type`, which is a <>. -A Link is a <> (as it describes the characteristics of a <>). -It is indirectly a <> (as it has an identity, and it is contained in the namespace of its FeaturesContainer) and an <> (as it has a name). +A Link is a <> (as it describes the characteristics of a <>). +It is indirectly a <> (as it has a key) and an <> (as it has a name). A Link can be either a <>, or a <>. @@ -496,49 +496,46 @@ TBD === Interfaces -The interfaces are <> and <>. +The interfaces are <>. -[[NamespacedEntity]] -==== NamespacedEntity -Something with a name and contained in a Namespace.{fn-org143} +[[IKeyed]] +==== IKeyed +Something with a name that has a key.{fn-org142}{fn-org143} .Example A Concept _Invoice_, contained in a Language `com.foo.Accounting`. -Therefore, _Invoice_ will have the qualifiedName `com.foo.Accounting.Invoice`. .EMF & MPS equivalent n/a .Characteristics -[[NamespacedEntity.key, NamespacedEntity.key]] -A NamespacedEntity has a <> and an `key`.{fn-org90} +[[IKeyed.key, IKeyed.key]] +An IKeyed has a <> and an `key`.{fn-org90} + +A IKeyed is an <> (as it has a name). -A NamespacedEntity is an <> (as it has a name). +All elements of the Meta-Metamodel realize `IKeyed`. .Constraints -A NamespaceEntity's `name` must be unique within the NamespaceProvider. +A IKeyed's `name` MUST be unique within the namespace (i.e. <>, <>, or <>). +The name MUST be a valid programming language identifier{fn-org48}. -A NamespaceEntity's `key` must be unique within the Language.{fn-org91} -``key``s must a valid <>. +More specifically, we allow https://docs.oracle.com/javase/specs/jls/se20/html/jls-3.html#jls-3.8[Java identifiers] with the following modifications: +* We do NOT allow `$` (dollar sign) +* _ReservedKeyword_, _BooleanLiteral_, and _NullLiteral_ (as per Java identifier spec) are allowed identifiers. -[[NamespaceProvider]] -==== NamespaceProvider -Something which can act as the namespace for contained named things. +Effectively: -.Example -A Language `com.foo.Accounting` can be the NamespaceProvider for a Concept _Invoice_, which will therefore have the qualifiedName `com.foo.Accounting.Invoice`. +* Names MUST NOT start with a number. +* Names MUST NOT be empty. +* Names MUST NOT contain spaces. +* Names CAN use Unicode characters, numbers, and underscore. -.EMF & MPS equivalent -n/a +NOTE: These restrictions only apply to names of Language elements (i.e. M3 concepts/M2 instances). +Any language that uses `INamed` on its own can establish their own constraints. -.Characteristics -[[NamespaceProvider.namespaceQualifier, NamespaceProvider.namespaceQualifier]] -A NamespaceProvider can calculate the `namespaceQualifier` exposed to its children. -This is typically calculated by combining the namespaces of all the ancestors up to the top level ancestor. - -.Constraints -TBD +Refer to <> for more constraints. === Pre-defined Ids and Keys The language itself has key `LIonCore-M3`.{fn-org91} @@ -562,20 +559,18 @@ The language itself has key `LIonCore-M3`.{fn-org91} |<> |Concept |EnumerationLiteral |<> |Concept |Feature |<> |Property |Feature-optional -|<> |Concept |FeaturesContainer -|<> |Containment |FeaturesContainer-features +|<> |Concept |Classifier +|<> |Containment |Classifier-features |<> |Concept |Link |<> |Property |Link-multiple |<> |Reference |Link-type |<> |Concept |Language -|<> |Property |Language-key |<> |Reference |Language-dependsOn -|<> |Containment |Language-elements +|<> |Containment |Language-entities |<> |Property |Language-version -|<> |Concept |LanguageElement -|<> |Concept |NamespacedEntity -|<> |Property |NamespacedEntity-key -|<> |Concept |NamespaceProvider +|<> |Concept |LanguageEntity +|<> |ConceptInterface |IKeyed +|<> |Property |IKeyed-key |<> |Concept |PrimitiveType |<> |Concept |Property |<> |Reference |Property-type @@ -617,7 +612,7 @@ Each LIonWeb implementation ships with a set of built-in elements, akin to a _st [[INamed, INamed]] * `INamed`{fn-org86}, an <> with one <> called [[INamed.name]]`name` of type <>. + -If a <> targets a FeaturesContainer that implements INamed, implementations SHOULD use the target's `name` property as default <<{serialization}.adoc#Reference.reference.resolveInfo, resolveInfo>> value. +If a <> targets a Classifier that implements INamed, implementations SHOULD use the target's `name` property as default <<{serialization}.adoc#Reference.reference.resolveInfo, resolveInfo>> value. ==== Primitive types @@ -658,8 +653,9 @@ TBD [[partition]] ==== Partitions -Each node that does not have a parent node must be of a Concept with <> flag set to `true`. +Each node that does not have a parent node MUST be of a Concept with <> flag set to `true`. This implies that every node is contained in exactly one partition, namely the partition defined by its root node.{fn-org29} +Partitions CANNOT be nested. .EMF & MPS equivalent A partition is similar to ECore's `Resource`. @@ -709,24 +705,26 @@ An implementation might choose to use hierarchical id-spaces internally. A node can be identified relative to its id-space by the node's id. To globally identify a node, we use the combination of the id-space id and the node id. -== Reference models +[[keys]] +==== Keys +We use keys when we refer from _instance level_ to _meta level_.{fn-org80} +Refer to <> for a list of all usages. -=== Meta-meta model -The LIonCore model, aka LIonWeb M3. -It is link:lioncore.json[defined] by means of itself, as outlined by link:https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility]. +Keys are modeled via <>. +Keys MUST be valid <>. -[source, json] ----- -include::lioncore.json[] ----- +A key SHOULD be globally unique, and MUST be unique within an <>, i.e. the Language.{fn-org91} +For approximate global uniqueness, we SHOULD adopt Java's package naming scheme, based on domain names. +As we don't allow dots (`.`) in ids, we SHOULD use dashes (`-`) instead. -=== Pre-defined elements -The LIonCore link:builtins.json[built-in] elements. +[[namespaces]] +==== Namespaces +A Namespace implements <> and can have descendants that implement <>. -[source, json] ----- -include::builtins.json[] ----- +Typically, a namespace enforces some constraints on the contained names, like uniqueness within the same namespace, or what's considered a valid name. + +We can calculate a fully qualified name by concatenating the namespaces of all the ancestors up to the top level ancestor. +Future versions might support this directly.{fn-org146} == Other considerations @@ -749,6 +747,7 @@ We could alternatively also imagine using specific annotations for supporting th In general Generics complicate the solution and MPS can live without them. Also, in StarLasu we never encountered the need for them so far. +[[references-to-language-elements]] === References to Language Elements From a language, we refer to all language elements by their <>.{fn-org131} This includes references to @@ -760,7 +759,7 @@ This includes references to As the <> is just another language, we refer to its members by their id, just as any other language members. -From an instance, we refer to its defining language element by the language element's <>.{fn-org80} +From an instance, we refer to its defining language element by the language element's <>{fn-org80} This includes references to * <> usage @@ -779,6 +778,26 @@ These are not supported. Operations are not represented in the Meta-Metamodel. +== Reference models + +=== Meta-meta model +The LIonCore model, aka LIonWeb M3. +It is link:lioncore.json[defined] by means of itself, as outlined by link:https://en.wikipedia.org/wiki/Meta-Object_Facility[Meta-Object Facility]. + +[source, json] +---- +include::lioncore.json[] +---- + +=== Pre-defined elements +The LIonCore link:builtins.json[built-in] elements. + +[source, json] +---- +include::builtins.json[] +---- + + == Comparison with other meta-metamodels Main difference: we aim for multiple implementations on different platforms, we want to serve both textual and projectional languages and editors. @@ -840,16 +859,16 @@ link:https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrain (link:https://www.jetbrains.com/help/mps/structure.html#properties[docs], link:https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrains/mps/openapi/language/SProperty.html[javadoc]) -|<> +|<> |-- |-- -|<> +|<> |link:https://download.eclipse.org/modeling/emf/emf/javadoc/2.11/org/eclipse/emf/ecore/EClassifier.html[EClassifier] |link:http://127.0.0.1:63320/node?ref=r%3A00000000-0000-4000-0000-011c89590292%28jetbrains.mps.lang.structure.structure%29%2F1588368162880706270[IStructureElement] (link:https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrains/mps/openapi/language/SElement.html[javadoc]) -|<> +|<> |link:https://download.eclipse.org/modeling/emf/emf/javadoc/2.11/org/eclipse/emf/ecore/EClass.html[EClass] |link:http://127.0.0.1:63320/node?ref=r%3A00000000-0000-4000-0000-011c89590292%28jetbrains.mps.lang.structure.structure%29%2F1169125787135[AbstractConceptDeclaration] (link:https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrains/mps/openapi/language/SAbstractConcept.html[javadoc]) @@ -870,10 +889,6 @@ link:https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrain |link:http://127.0.0.1:63320/node?ref=r%3A00000000-0000-4000-0000-011c89590292%28jetbrains.mps.lang.structure.structure%29%2F1071489288298[LinkDeclaration] (https://alexanderpann.github.io/mps-openapi-doc/javadoc_2021.2/org/jetbrains/mps/openapi/language/SAbstractLink.html[javadoc]) -|<> -|-- -|-- - |=== diff --git a/lioncore/metametamodel/metametamodel.puml b/lioncore/metametamodel/metametamodel.puml index 510ac0e..b6c3c62 100644 --- a/lioncore/metametamodel/metametamodel.puml +++ b/lioncore/metametamodel/metametamodel.puml @@ -7,46 +7,41 @@ package builtins { } } -class Concept #LightGreen extends FeaturesContainer { +class Concept #LightGreen extends Classifier { abstract: Boolean partition: Boolean } -class ConceptInterface #LightGreen extends FeaturesContainer +class ConceptInterface #LightGreen extends Classifier class Containment #LightBlue extends Link -abstract class DataType #LightPink extends LanguageElement +abstract class DataType #LightPink extends LanguageEntity -class Enumeration #LightPink extends DataType implements NamespaceProvider +class Enumeration #LightPink extends DataType -class EnumerationLiteral #LightPink implements NamespacedEntity +class EnumerationLiteral #LightPink implements IKeyed -abstract class Feature #LightBlue implements NamespacedEntity { +abstract class Feature #LightBlue implements IKeyed { optional: Boolean } -abstract class FeaturesContainer #LightGreen extends LanguageElement implements NamespaceProvider { -} +abstract class Classifier #LightGreen extends LanguageEntity abstract class Link #LightBlue extends Feature { multiple: Boolean } -class Language <> implements NamespaceProvider, builtins.INamed { - key: Id +class Language <> implements IKeyed { version: Integer } -abstract class LanguageElement implements NamespacedEntity +abstract class LanguageEntity implements IKeyed -interface NamespacedEntity extends builtins.INamed { +interface IKeyed extends builtins.INamed { key: Id } -interface NamespaceProvider { -} - class PrimitiveType #LightPink extends DataType class Property #LightBlue extends Feature @@ -62,18 +57,18 @@ ConceptInterface "*" --> "*" ConceptInterface: extends EnumerationLiteral "*" -* "1" Enumeration : literals -Feature "*" -* "1" FeaturesContainer: features +Feature "*" -* "1" Classifier: features -Link "*" --> "1" FeaturesContainer: type +Link "*" --> "1" Classifier: type Language "*" --> "*" Language: dependsOn -LanguageElement "*" -* "1" Language: elements +LanguageEntity "*" -* "1" Language: entities Property "*" -> "1" DataType: type legend <#LightGray,#LightGray>| <#LightBlue>Feature | - | <#LightGreen>Feature Container | + | <#LightGreen>Classifier | | <#LightPink>DataType | end legend @enduml diff --git a/lioncore/serialization/references.adoc b/lioncore/serialization/references.adoc new file mode 100644 index 0000000..147b51b --- /dev/null +++ b/lioncore/serialization/references.adoc @@ -0,0 +1,100 @@ += References + +[[ref-resolve-null]] +== Meaning and rationale of `null` values for reference id and resolveInfo + +Based on{fn-org36-null} + +NOTE: We only consider low-level model structure here. +If we had a reference of type `Car`, but the id points to an existing `Wheel`, we would _still_ consider the reference valid on this low level. + +In the following matrix, the columns describe _reference_, the rows _resolveInfo_. + +reference: + +* _valid_ means there it is known that a node with the target id exists. +Undefined whether the targeted node is part of the same model fragment, known locally, or only known to the repository. +* _unknown_ means we don't know whether a node with the target id exists. +* _invalid_ means we know that no node with the target id exists. + +resolveInfo: + +* _uniquely resolvable_ means that the resolver[1] can find exactly one existing node that could match the given resolve info. +* _ambiguously resolvable_ means that the resolver[1] can find more than one existing node that could match the given resolve info. +* _non-resolvable_ means that the resolver[1] can not find any existing node that could match the given resolve info. + +ad [1]: It's currently undefined who the resolver is. +We just assume it can somehow interpret the resolve info, and can return [0..*] valid target nodes. + +[%header,cols=">h,<,<,<,<"] +|=== +|id → + +resolveInfo ↓ +^|non-null, valid +^|non-null, unknown +^|non-null, invalid +^|null + +|non-null, uniquely resolvable +|happy case +|transient, resolvable +|brittle +|brittle + +|non-null, ambiguously resolvable +|mostly happy +|transient +|external selection required +|external selection required + +|non-null, non-resolvable +|mostly happy +|transient +|external help required +|external help required + +|null +|mostly happy +|transient +|broken +|broken +|=== + +.Happy case +We know and can reach the target node of the reference. +We also have information how to find the target in case the target is not reachable (e.g. because it has been deleted). + +.Transient +We know a target node id, but don't know yet whether that node exists. + +.Resolvable +Either through node id or resolveInfo, we're sure we can eventually find our target. + +.Brittle +We cannot find the target node by id, but via resolveInfo. +However, resolveInfo might stop working at some point (e.g. if the target gets renamed before resolving the nodeInfo). + +.Mostly happy +We know and can reach the target node of the reference. +But we could not re-establish the reference if the target is not reachable (e.g. because the user cuts+pastes the target node, and the pasted one gets a new id). + +.External selection required +We don't know the target node. +However, we can present the user with a list of options to chose from. +We populate this list with the potential targets of the resolveInfo. + +.External help required +We don't know the target node, and cannot make sense of resolveInfo. +The user might use the resolveInfo to find the actual target. + +.Broken +We have no technical way to find the target node, or meaningful ways to support the user to find it. + +[NOTE] +==== +Instead of the user helping out, we might also infer the same information from language specifics. + +Example: Assume a function with only one parameter. +If we had a reference that can only target a parameter, we can infer that target to be the one parameter. +In practice, that means scoping could help us out here (but that's out of scope as of the first remark above). +==== \ No newline at end of file diff --git a/lioncore/serialization/serialization.adoc b/lioncore/serialization/serialization.adoc index 9260f3b..48fd763 100644 --- a/lioncore/serialization/serialization.adoc +++ b/lioncore/serialization/serialization.adoc @@ -61,8 +61,8 @@ The _object_ MUST contain the following _members_:{fn-org76} [[language-key]] ==== Language key -A _string_ according to <<{m3}.adoc#identifiers, Identifier spec>>. -Refers to the <<{m3}.adoc#Language.key, key>> of the language. +A _string_ according to <<{m3}.adoc#keys, Key spec>>. +Refers to the <<{m3}.adoc#IKeyed.key, key>> of the language. [[language-version]] ==== Language version @@ -82,8 +82,8 @@ The _object_ MUST contain the following _members_: * [[MetaPointer.lanuage]] _key_ `language` with _string_ _value_, adhering to <>. * [[MetaPointer.version]] _key_ `version` with _string_ _value_, adhering to <>. -* [[MetaPointer.key]] _key_ `key` with _string_ _value_ according to <<{m3}.adoc#identifiers, Identifier spec>>. -Refers to some <<{m3}.adoc#NamespacedEntity, element in the language>>. +* [[MetaPointer.key]] _key_ `key` with _string_ _value_ according to <<{m3}.adoc#keys, Keys spec>>. +Refers to some <<{m3}.adoc#IKeyed, element in the language>>. Which element exactly is specified for each usage of meta-pointer. [[node]] @@ -96,7 +96,7 @@ The _object_ MUST contain the following _members_:{fn-org59}{fn-java33}{fn-org55 * [[Node.id]] _key_ `id` with _string_ _value_, adhering to <>. * [[Node.concept]] _key_ `concept`{fn-org37-name} with _object_ _value_, adhering to <>. - The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Concept, *Concept*>> this *node* is an instance of. + The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Concept, *Concept*>> this *node* is an instance of. * [[Node.properties]] _key_ `properties` with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined. * [[Node.children]] _key_ `children`{fn-org55-name-children} with _array_ _value_, each _element_ adhering to <>. @@ -123,7 +123,7 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: * [[Property.property]] _key_ `property` with _object_ _value_, adhering to <>. - The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Property, *Property*>> this *property* is an instance of. + The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Property, *Property*>> this *property* is an instance of. * [[Property.value]] _key_ `value` with _value_ as one of ** _string_{fn-org34} containing the value of the property referenced by the `property`. Refer to <> for the specification of the value format. @@ -140,7 +140,7 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: * [[Child.containment]] _key_ `containment` with _object_ _value_, adhering to <>. -The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Containment, *Containment*>> this *child* is an instance of. +The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Containment, *Containment*>> this *child* is an instance of. * [[Child.children]] _key_ `children` with _array_ _value_ with _string_ _elements_. Each _element_ adheres to <<{m3}.adoc#identifiers, Identifier spec>>, and refers to the *id* of the contained *node*. The order of _elements_ is undefined. @@ -158,7 +158,7 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: * [[Reference.reference]] _key_ `reference` with _object_ _value_, adhering to <>. -The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#NamespacedEntity.key, *key*>> of the <<{m3}.adoc#Reference, *Reference*>> this *reference* is an instance of. +The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Reference, *Reference*>> this *reference* is an instance of. * [[Reference.targets]] _key_ `targets` with __object_ _elements_. Each _element_ MUST have the following _members_ in undefined order:{fn-org55-name-references} ** [[Reference.reference.resolveInfo]] _key_ `resolveInfo`{fn-org36} with _value_ as one of: @@ -220,10 +220,8 @@ Booleans MUST NOT be encoded with leading or trailing whitespace, uppercase char * Integers MUST NOT be prefixed by leading zeros. * Integers CAN contain value zero with any prefix, i.e. `0`, `-0`, or `+0`. * Integers MUST NOT contain leading or trailing whitespace. -* LIonWeb does NOT limit the range of the integer value. +* LIonWeb does NOT limit the range of the integer value.{fn-org149} An implementation MAY refuse a model containing an integer value outside the supported range. - Every implementation MUST support at least 32 bit signed integer range. - ##TODO supported integer range?##{fn-org9-intrange} .Examples of valid Integer encodings @@ -260,8 +258,8 @@ The value MUST adhere to JSON spec (RFC 8259). `{ "key": "my value", "myArray": [1, -2, true] }` ==== Enumeration Literals -<<{m3}.adoc#EnumerationLiteral, LIonCore Enumeration literals>> MUST be encoded as JSON _string_ _value_ according to <<{m3}.adoc#identifiers, Identifier spec>>. -MUST refer to the <<{m3}.adoc#NamespacedEntity.key, key>> of an <<{m3}.adoc#EnumerationLiteral, EnumerationLiteral>> of the <<{m3}.adoc#Enumeration, Enumeration>> defined as <<{m3}.adoc#Property.type, type>> of this *Property*.{fn-org128} +<<{m3}.adoc#EnumerationLiteral, LIonCore Enumeration literals>> MUST be encoded as JSON _string_ _value_ according to <<{m3}.adoc#keys, Key spec>>. +MUST refer to the <<{m3}.adoc#IKeyed.key, key>> of an <<{m3}.adoc#EnumerationLiteral, EnumerationLiteral>> of the <<{m3}.adoc#Enumeration, Enumeration>> defined as <<{m3}.adoc#Property.type, type>> of this *Property*.{fn-org128} == Examples @@ -434,102 +432,3 @@ Contents // |JSON syntax error // |JSON syntax error |=== - -[[ref-resolve-null]] -== Meaning and rationale of `null` values for reference id and resolveInfo - -Based on{fn-org36-null} - -NOTE: We only consider low-level model structure here. -If we had a reference of type `Car`, but the id points to an existing `Wheel`, we would _still_ consider the reference valid on this low level. - -In the following matrix, the columns describe _reference_, the rows _resolveInfo_. - -reference: - -* _valid_ means there it is known that a node with the target id exists. -Undefined whether the targeted node is part of the same model fragment, known locally, or only known to the repository. -* _unknown_ means we don't know whether a node with the target id exists. -* _invalid_ means we know that no node with the target id exists. - -resolveInfo: - -* _uniquely resolvable_ means that the resolver[1] can find exactly one existing node that could match the given resolve info. -* _ambiguously resolvable_ means that the resolver[1] can find more than one existing node that could match the given resolve info. -* _non-resolvable_ means that the resolver[1] can not find any existing node that could match the given resolve info. - -ad [1]: It's currently undefined who the resolver is. -We just assume it can somehow interpret the resolve info, and can return [0..*] valid target nodes. - -[%header,cols=">h,<,<,<,<"] -|=== -|id → + -resolveInfo ↓ -^|non-null, valid -^|non-null, unknown -^|non-null, invalid -^|null - -|non-null, uniquely resolvable -|happy case -|transient, resolvable -|brittle -|brittle - -|non-null, ambiguously resolvable -|mostly happy -|transient -|external selection required -|external selection required - -|non-null, non-resolvable -|mostly happy -|transient -|external help required -|external help required - -|null -|mostly happy -|transient -|broken -|broken -|=== - -.Happy case -We know and can reach the target node of the reference. -We also have information how to find the target in case the target is not reachable (e.g. because it has been deleted). - -.Transient -We know a target node id, but don't know yet whether that node exists. - -.Resolvable -Either through node id or resolveInfo, we're sure we can eventually find our target. - -.Brittle -We cannot find the target node by id, but via resolveInfo. -However, resolveInfo might stop working at some point (e.g. if the target gets renamed before resolving the nodeInfo). - -.Mostly happy -We know and can reach the target node of the reference. -But we could not re-establish the reference if the target is not reachable (e.g. because the user cuts+pastes the target node, and the pasted one gets a new id). - -.External selection required -We don't know the target node. -However, we can present the user with a list of options to chose from. -We populate this list with the potential targets of the resolveInfo. - -.External help required -We don't know the target node, and cannot make sense of resolveInfo. -The user might use the resolveInfo to find the actual target. - -.Broken -We have no technical way to find the target node, or meaningful ways to support the user to find it. - -[NOTE] -==== -Instead of the user helping out, we might also infer the same information from language specifics. - -Example: Assume a function with only one parameter. -If we had a reference that can only target a parameter, we can infer that target to be the one parameter. -In practice, that means scoping could help us out here (but that's out of scope as of the first remark above). -==== \ No newline at end of file From 80067a5fb449081e1a00c6571c3af4d852abee4a Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 13 Jul 2023 10:26:02 +0200 Subject: [PATCH 17/18] fixed lioncore.json reference model (thanks Federico) --- lioncore/metametamodel/lioncore.json | 35 +++++++++++----------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/lioncore/metametamodel/lioncore.json b/lioncore/metametamodel/lioncore.json index d84e4ac..f15fbd2 100644 --- a/lioncore/metametamodel/lioncore.json +++ b/lioncore/metametamodel/lioncore.json @@ -45,7 +45,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "Language-elements" + "key": "Language-entities" }, "children": [ "-id-Concept", @@ -128,6 +128,7 @@ }, "children": [ "-id-Concept-abstract", + "-id-Concept-partition", "-id-Concept-extends", "-id-Concept-implements" ] @@ -202,7 +203,7 @@ "targets": [ { "resolveInfo": "Boolean", - "reference": "LIonCore-M3-Boolean" + "reference": "LIonCore-builtins-Boolean" } ] } @@ -371,7 +372,7 @@ "targets": [ { "resolveInfo": "Boolean", - "reference": "LIonCore-M3-Boolean" + "reference": "LIonCore-builtins-Boolean" } ] } @@ -1002,7 +1003,7 @@ "targets": [ { "resolveInfo": "Boolean", - "reference": "LIonCore-M3-Boolean" + "reference": "LIonCore-builtins-Boolean" } ] } @@ -1269,7 +1270,7 @@ "targets": [ { "resolveInfo": "Boolean", - "reference": "LIonCore-M3-Boolean" + "reference": "LIonCore-builtins-Boolean" } ] } @@ -1386,7 +1387,7 @@ "children": [ "-id-Language-version", "-id-Language-dependsOn", - "-id-Language-elements" + "-id-Language-entities" ] } ], @@ -1408,7 +1409,7 @@ "targets": [ { "resolveInfo": "IKeyed", - "reference": "IKeyed" + "reference": "-id-IKeyed" } ] } @@ -1475,7 +1476,7 @@ "parent": "-id-Language" }, { - "id": "-id-Language-elements", + "id": "-id-Language-entities", "concept": { "language": "LIonCore-M3", "version": "1", @@ -1504,7 +1505,7 @@ "version": "1", "key": "LIonCore-builtins-INamed-name" }, - "value": "elements" + "value": "entities" }, { "property": { @@ -1512,7 +1513,7 @@ "version": "1", "key": "IKeyed-key" }, - "value": "Language-elements" + "value": "Language-entities" } ], "children": [], @@ -1577,7 +1578,7 @@ "targets": [ { "resolveInfo": "String", - "reference": "LIonCore-M3-String" + "reference": "LIonCore-builtins-String" } ] } @@ -1702,15 +1703,7 @@ "reference": { "language": "LIonCore-M3", "version": "1", - "key": "Concept-extends" - }, - "targets": [] - }, - { - "reference": { - "language": "LIonCore-M3", - "version": "1", - "key": "Concept-implements" + "key": "ConceptInterface-extends" }, "targets": [ { @@ -1766,7 +1759,7 @@ "targets": [ { "resolveInfo": "String", - "reference": "LIonCore-M3-String" + "reference": "LIonCore-builtins-String" } ] } From 9dad00d8f53af8ebed5da79948de50109e4ae534 Mon Sep 17 00:00:00 2001 From: Niko Stotz Date: Thu, 13 Jul 2023 10:45:24 +0200 Subject: [PATCH 18/18] fixed builtins.json reference model (thanks Federico) --- lioncore/metametamodel/builtins.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lioncore/metametamodel/builtins.json b/lioncore/metametamodel/builtins.json index 37aeab3..2d94817 100644 --- a/lioncore/metametamodel/builtins.json +++ b/lioncore/metametamodel/builtins.json @@ -45,7 +45,7 @@ "containment": { "language": "LIonCore-M3", "version": "1", - "key": "Language-elements" + "key": "Language-entities" }, "children": [ "LIonCore-builtins-String", @@ -349,7 +349,7 @@ "targets": [ { "resolveInfo": "String", - "reference": "LIonCore-M3-String" + "reference": "LIonCore-builtins-String" } ] }