ソースを参照

Add drawio + object diagram vocabularies + move formalism-vocabularies to 'formalisms' directory

Joeri Exelmans 2 年 前
コミット
7496d75063
23 ファイル変更464 行追加109 行削除
  1. 34 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/acyclic.oml
  2. 19 6
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base.oml
  3. 1 1
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/file.oml
  4. 41 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/ftg.oml
  5. 5 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/immutable.oml
  6. 38 30
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/processtraces.oml
  7. 2 2
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/shaclproperty.oml
  8. 1 1
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/system.oml
  9. 2 2
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/violation.oml
  10. 11 11
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/bundle.oml
  11. 1 1
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/federation.oml
  12. 2 2
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/code.oml
  13. 3 3
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/component.oml
  14. 25 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/dict.oml
  15. 228 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/drawio.oml
  16. 37 0
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/object_diagram.oml
  17. 3 3
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/requirement.oml
  18. 2 2
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/richtext.oml
  19. 2 2
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/script.oml
  20. 1 1
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/tabular.oml
  21. 1 1
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/text.oml
  22. 5 5
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/workflow.oml
  23. 0 36
      examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/ftg.oml

+ 34 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/acyclic.oml

@@ -0,0 +1,34 @@
+vocabulary <http://ua.be/sdo2l/vocabulary/base/acyclic#> as acyclic {
+	
+	aspect element []
+	
+	// Add this type as a supertype of any relation to make it acyclic.
+	relation entity Acyclic [
+		from element
+		to element
+		forward acyclicForward
+		irreflexive
+		asymmetric
+	]
+	
+	relation entity derivedTransitiveRelation [
+		from element
+		to element
+		forward transitiveForward
+		irreflexive
+		asymmetric
+		
+		// transitive // Currently ignored by reasoner. See workaround below.
+	]
+	
+	
+	rule DeriveTransitiveRelation [
+		acyclicForward(A, B) -> transitiveForward(A, B)
+	]
+	
+	// Workaround:
+	rule MakeTransitive [
+		// Don't know if this creates unnecessary bloat, compared to the 'transitive'-flag, but it works:
+		transitiveForward(A, B) ^ transitiveForward(B, C) -> transitiveForward(A, C)
+	]
+}

+ 19 - 6
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base.oml

@@ -1,6 +1,18 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base#> as base {
+vocabulary <http://ua.be/sdo2l/vocabulary/base/base#> as base {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+	extends <http://ua.be/sdo2l/vocabulary/base/acyclic#> as acyclic
+
+	aspect ImmutableThing [
+		key hasGUID
+		restricts scalar property hasGUID to exactly 1 
+	]
+	
+	scalar property hasGUID [
+		domain ImmutableThing
+		range xsd:string
+		functional
+	]
 
 	// Elements for Identified Things
 
@@ -30,6 +42,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/base#> as base {
 
 	// Relationships aggreagation and containment
 
+	// Joeri: These appear to be unused at the moment. Can we remove them?
  	@rdfs:comment "The class of things that can be aggregated"
 	aspect AggregatedThing
 
@@ -47,7 +60,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/base#> as base {
 	aspect ContainedElement
 
 	@rdfs:comment "Contains is a many-to-many relation used to represent homomeric relations that form directed rooted trees."
-	relation entity Contains [
+	relation entity Contains :> acyclic:Acyclic [
 		from ContainedElement
 		to ContainedElement
 		forward contains
@@ -90,19 +103,19 @@ vocabulary <http://ua.be/sdo2l/vocabulary/base#> as base {
 
 	// Version
 
-	aspect Versionable
+	aspect Versionable :> ImmutableThing
 
 	@rdfs:comment "The has canonical name property"
-	scalar property hasVersion [
+	scalar property hasTag [
 		domain Versionable
 		range xsd:string
 	]
 
-	relation entity Versions [
+	relation entity Versions :> acyclic:Acyclic [
 		from Versionable
 		to Versionable
 		forward previousVersionOf
-		reverse newVersionOf
+		reverse nextVersionOf
 		asymmetric
 		irreflexive
 	]

+ 1 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/file.oml

@@ -1,6 +1,6 @@
 vocabulary <http://ua.be/sdo2l/vocabulary/base/file#> as file {
     extends <http://www.w3.org/2001/XMLSchema#> as xsd
-    extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+    extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 
     aspect Data
     aspect File :> traces:Artifact [key isLocatedAt] 

+ 41 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/ftg.oml

@@ -0,0 +1,41 @@
+vocabulary <http://ua.be/sdo2l/vocabulary/base/ftg#> as ftg {
+	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
+	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+
+	// Definitions for Activities
+	@rdfs:comment "The types of activities performed during the system design process. This concept should be used in the FTG."
+	concept Transformation :> base:ImmutableThing, base:DefinitionThing []
+
+	// Definitions for Artifacts
+	@rdfs:comment "The types of artifacts generated during the system design process. This concept should be used in the FTG."
+	concept Formalism :> base:ImmutableThing, base:DefinitionThing []
+
+	aspect InputOrOutput [
+		restricts scalar property hasName to exactly 1
+	]
+	
+	scalar property hasName [
+		domain InputOrOutput
+		range xsd:string
+		functional
+	]
+
+	relation entity Inputs :> InputOrOutput [
+		from Formalism
+		to Transformation
+		forward inputs
+		reverse isInputtedBy
+		asymmetric
+		irreflexive
+	]
+
+	relation entity Outputs :> InputOrOutput [
+		from Transformation
+		to Formalism
+		forward outputs
+		reverse isOutputedBy
+		asymmetric
+		irreflexive
+	]
+}

+ 5 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/immutable.oml

@@ -0,0 +1,5 @@
+vocabulary <http://ua.be/sdo2l/vocabulary/base/immutable#> as immutable {
+	
+	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+
+}

+ 38 - 30
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/processtraces.oml

@@ -1,44 +1,52 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
+vocabulary <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
-	extends <http://ua.be/sdo2l/vocabulary/workflow#> as wf
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/workflow#> as wf
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
 	extends <http://www.w3.org/2002/07/owl#> as owl
 
+	extends <http://ua.be/sdo2l/vocabulary/base/acyclic#> as acyclic
+
 	// TODO Add time to Event (starting time and ending time of PT events)
-	@rdfs:comment "The class to represent traces of execution of a given workflow."
-	concept Trace :> base:IdentifiedThing
+//	@rdfs:comment "The class to represent traces of execution of a given workflow."
+//	concept Trace :> base:IdentifiedThing
 
 	@rdfs:comment "The class to represent an event of a trace."
 	aspect Event
+	
+	@rdfs:comment "An event signaling the start of a new trace."
+	concept StartTraceEvent :> Event
+	
+	@rdfs:comment "An event signaling the end of a trace."
+	concept EndTraceEvent :> Event
 
 	@rdfs:comment "The class to represent a starting event of a trace."
-	concept StartingEvent :> Event
+	concept StartActivityEvent :> Event
 
 	@rdfs:comment "The class to represent an ending event of a trace."
-	concept EndingEvent :> Event
+	concept EndActivityEvent :> Event
 
-	relation entity Enacts [
-		from Trace
-		to wf:Workflow
-		forward enacts
-		reverse isEnactBy
-		asymmetric
-		irreflexive
-		functional
-	]
+//	relation entity Enacts [
+//		from Trace
+//		to wf:Workflow
+//		forward enacts
+//		reverse isEnactBy
+//		asymmetric
+//		irreflexive
+//		functional
+//	]
 
-	relation entity FirstEvent [
-		from Trace
-		to StartingEvent
-		forward startedBy
-		reverse startsTrace
-		asymmetric
-		irreflexive
-		functional
-	]
+//	relation entity FirstEvent [
+//		from Trace
+//		to StartingEvent
+//		forward startedBy
+//		reverse startsTrace
+//		asymmetric
+//		irreflexive
+//		functional
+//	]
 
-	relation entity Follows [
+	relation entity Follows :> acyclic:Acyclic [
 		from Event
 		to Event
 		forward isFollowedBy
@@ -50,7 +58,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
 	]
 
 	relation entity Starts [
-		from StartingEvent
+		from StartActivityEvent
 		to wf:Activity
 		forward starts
 		reverse isStartedBy
@@ -60,7 +68,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
 	]
 
 	relation entity Terminates [
-		from EndingEvent
+		from EndActivityEvent
 		to wf:Activity
 		forward terminates
 		reverse isTerminatedBy
@@ -70,7 +78,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
 	]
 
 	relation entity Receives [
-		from StartingEvent
+		from StartActivityEvent
 		to Artifact
 		forward receives
 		reverse isReceivedBy
@@ -80,7 +88,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
 	]
 
 	relation entity Provides [
-		from EndingEvent
+		from EndActivityEvent
 		to Artifact
 		forward provides
 		reverse isProvidedBy

+ 2 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/shaclproperty.oml

@@ -1,9 +1,9 @@
 vocabulary <http://ua.be/sdo2l/vocabulary/base/shaclproperty#> as shaclproperty {
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
 
-	extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+	extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 
 	concept SHACL-Property :> base:IdentifiedThing, traces:Artifact
 	

+ 1 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/system.oml

@@ -1,6 +1,6 @@
 vocabulary <http://ua.be/sdo2l/vocabulary/base/system#> as system {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
 	
 	@rdfs:comment "A system is the element to be designed."
 	concept System :> base:IdentifiedThing 

+ 2 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/violation.oml

@@ -1,8 +1,8 @@
 vocabulary <http://ua.be/sdo2l/vocabulary/base/violation#> as violation {
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
-	extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 
 	concept ViolationReport :> base:IdentifiedThing, traces:Artifact
 	

+ 11 - 11
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/bundle.oml

@@ -1,19 +1,19 @@
 vocabulary bundle <http://ua.be/sdo2l/vocabulary/bundle#> as ^bundle {
-	includes <http://ua.be/sdo2l/vocabulary/base#>
-	includes <http://ua.be/sdo2l/vocabulary/ftg#>
-    includes <http://ua.be/sdo2l/vocabulary/workflow#>
-	includes <http://ua.be/sdo2l/vocabulary/processtraces#>
+	includes <http://ua.be/sdo2l/vocabulary/base/base#>
+	includes <http://ua.be/sdo2l/vocabulary/base/ftg#>
+    includes <http://ua.be/sdo2l/vocabulary/formalisms/workflow#>
+	includes <http://ua.be/sdo2l/vocabulary/base/processtraces#>
 	includes <http://ua.be/sdo2l/vocabulary/federation#>
 
-	includes <http://ua.be/sdo2l/vocabulary/base/component#>
-	includes <http://ua.be/sdo2l/vocabulary/base/requirement#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/component#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/requirement#>
 	includes <http://ua.be/sdo2l/vocabulary/base/system#>
 	includes <http://ua.be/sdo2l/vocabulary/base/shaclproperty#>
 	includes <http://ua.be/sdo2l/vocabulary/base/violation#>
-	includes <http://ua.be/sdo2l/vocabulary/base/code#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/code#>
 	includes <http://ua.be/sdo2l/vocabulary/base/file#>
-	includes <http://ua.be/sdo2l/vocabulary/base/richtext#>
-	includes <http://ua.be/sdo2l/vocabulary/base/script#>
-	includes <http://ua.be/sdo2l/vocabulary/base/tabular#>
-	includes <http://ua.be/sdo2l/vocabulary/base/text#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/richtext#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/script#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/tabular#>
+	includes <http://ua.be/sdo2l/vocabulary/formalisms/text#>
 }

+ 1 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/federation.oml

@@ -3,7 +3,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/federation#> as federation {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
     extends <http://purl.org/dc/elements/1.1/> as dc
-    extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+    extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 
     // TODO Maybe add return values/names/types
     @rdfs:comment "An Operation specifies one possible call (or operation) that can be made. For example 'translate' for a Point class."

+ 2 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/code.oml

@@ -1,5 +1,5 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/code#> as code {
-	extends <http://ua.be/sdo2l/vocabulary/base/text#> as text
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/code#> as code {
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/text#> as text
 
 
     concept CodeData :> text:TextData

+ 3 - 3
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/component.oml

@@ -1,10 +1,10 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/component#> as component {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/component#> as component {
 	
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
 	extends <http://bipm.org/jcgm/vim4#> as vim4
 
-	extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+	extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 
 	@rdfs:comment "A Structural Model defines the static view of a system in terms of its components and their relationships."
 	concept StructuralModel :> base:IdentifiedThing, traces:Artifact//, base:WorkflowArtifact

+ 25 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/dict.oml

@@ -0,0 +1,25 @@
+// Extension of object_diagram vocabulary
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/dict#> as dict {
+	
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram
+	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+
+	aspect Object []
+	
+	// In many vocabularies, we want to have "dictionaries" (key-value mappings).
+	// We choose to represent every dictionary entry by an 'Object', that has a 'key' and 'value' field
+	aspect DictEntry :> Object [
+		restricts scalar property hasKey to exactly 1
+		restricts scalar property hasValue to exactly 1
+	]
+	scalar property hasKey :> object_diagram:hasField [
+		domain DictEntry
+		range xsd:string
+		functional
+	]
+	scalar property hasValue :> object_diagram:hasField [
+		domain DictEntry
+		range xsd:string
+		functional
+	]
+}

+ 228 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/drawio.oml

@@ -0,0 +1,228 @@
+// Vocabulary for the Draw.io file format
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/drawio#> as drawio {
+
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram
+	extends <http://ua.be/sdo2l/vocabulary/base/acyclic#> as acyclic
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/dict#> as dict
+	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+
+	aspect element :> object_diagram:Object []
+	
+	// Cells and Pages have a GUID generated by drawio.
+	aspect elementWithDrawioId :> element [
+		restricts scalar property hasDrawioId to exactly 1
+	]
+	scalar property hasDrawioId [
+		domain elementWithDrawioId
+		range xsd:string
+		functional
+	]
+
+	// All cells are vertices or edges, except for:
+	//   (1) The root cell of a page
+	//   (2) The cells that represent layers (direct children of the root cell)
+	aspect AbstractCell :> elementWithDrawioId []
+
+	scalar property hasValue [
+		domain Cell
+		range xsd:string
+		functional
+	]
+	
+	relation entity HasParentCell :> acyclic:Acyclic, object_diagram:Link [
+		from AbstractCell
+		to AbstractCell
+		forward hasParent
+		reverse hasChild
+		asymmetric
+		irreflexive
+		functional // all cells have one parent, except for the root cell
+	]
+	
+	relation entity HasProperty :> object_diagram:Link [
+		from AbstractCell
+		to CellProperty
+		forward hasProperty
+		reverse propertyOf
+		asymmetric
+		irreflexive
+		inverse functional
+	]
+	relation entity HasStyleEntry :> object_diagram:Link [
+		from AbstractCell
+		to CellStyleEntry
+		forward hasStyleEntry
+		reverse styleEntryOf
+		asymmetric
+		irreflexive
+		inverse functional
+	]
+	relation entity HasCellAttribute :> object_diagram:Link [
+		from AbstractCell
+		to CellAttribute
+		forward hasCellAttribute
+		reverse attributeOf
+		asymmetric
+		irreflexive
+		inverse functional
+	]
+	
+	concept CellProperty :> dict:DictEntry, element []
+	concept CellStyleEntry :> dict:DictEntry, element []
+	concept CellAttribute :> dict:DictEntry, element []
+	
+	structure Point [
+		restricts scalar property hasX to exactly 1
+		restricts scalar property hasY to exactly 1
+	]
+	scalar property hasX :> object_diagram:hasField [
+		domain Point
+		range xsd:decimal
+		functional
+	]
+	scalar property hasY :> object_diagram:hasField [
+		domain Point
+		range xsd:decimal
+		functional
+	]
+	
+	structure CellGeometry :> Point [
+		restricts scalar property hasWidth to exactly 1
+		restricts scalar property hasHeight to exactly 1
+	]
+	scalar property hasWidth :> object_diagram:hasField [
+		domain CellGeometry
+		range xsd:decimal
+		functional
+	]
+	scalar property hasHeight :> object_diagram:hasField [
+		domain CellGeometry
+		range xsd:decimal
+		functional
+	]
+	
+	// An edge may have an ordered sequence of 'waypoints'
+	// We'll add a 'list index' property to store the order.
+	structure PointListItem :> Point [
+		restricts scalar property hasListIndex to exactly 1
+	]
+	scalar property hasListIndex [
+		domain PointListItem
+		range xsd:nonNegativeInteger
+		functional
+	]
+	
+	structure EdgeGeometry []
+	structured property hasPoint [
+		domain EdgeGeometry
+		range PointListItem
+		// not functional: any number of points allowed
+	]
+	structured property hasSourcePoint [
+		domain EdgeGeometry
+		range Point
+		functional
+	]
+	structured property hasTargetPoint [
+		domain EdgeGeometry
+		range Point
+		functional
+	]
+	
+	concept Cell :> AbstractCell []
+	concept Edge :> AbstractCell []
+	
+	structured property hasCellGeometry [
+		domain Cell
+		range CellGeometry
+		functional
+	]
+	structured property hasEdgeGeometry [
+		domain Edge
+		range EdgeGeometry
+		functional
+	]
+	
+	relation entity EdgeHasSource [
+		from Edge
+		to Cell
+		forward hasSource
+		reverse sourceOf
+		functional
+		asymmetric
+		irreflexive
+	]
+	relation entity EdgeHasTarget [
+		from Edge
+		to Cell
+		forward hasTarget
+		reverse targetOf
+		functional
+		asymmetric
+		irreflexive
+	]
+	
+	concept Page :> elementWithDrawioId [
+		restricts relation ofModel to exactly 1
+		restricts scalar property hasName to exactly 1
+		restricts relation hasRootCell to exactly 1
+	]
+	
+	relation entity HasPageAttribute :> object_diagram:Link [
+		from Page
+		to PageAttribute
+		forward hasPageAttribute
+		reverse ofPage
+		asymmetric
+		irreflexive
+		inverse functional
+	]
+	relation entity HasRootCell :> object_diagram:Link [
+		from Page
+		to Cell
+		forward hasRootCell
+		reverse isRootOf
+		asymmetric
+		irreflexive
+		functional // every page has exactly one root cell
+		inverse functional // a cell can be the root of at most one page
+	]
+	
+	concept PageAttribute :> dict:DictEntry, element []
+	
+	scalar property hasName [
+		domain Page
+		range xsd:string
+		functional
+	]
+	
+	
+	// A Drawio file:
+	concept Model :> object_diagram:Model [
+		restricts all relation object_diagram:hasObject to element
+		restricts scalar property isCompressed to exactly 1
+		restricts scalar property hasDrawioVersion to exactly 1
+	]
+	
+	relation entity HasPage [
+		from Model
+		to Page
+		forward hasPage
+		reverse ofModel
+		inverse functional
+		asymmetric
+		irreflexive
+	]
+
+	scalar property isCompressed [
+		domain Model
+		range xsd:boolean
+		functional
+	]
+	
+	scalar property hasDrawioVersion [
+		domain Model
+		range xsd:string
+		functional
+	]
+}

+ 37 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/object_diagram.oml

@@ -0,0 +1,37 @@
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram {
+	
+	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
+
+	aspect Object []
+	
+	// Compromise:
+	//  - use attributes only for scalar properties
+	//  - if we want to have a reference to an object as an attribute, use a link instead
+	
+	// Supertype of all scalar properties that we consider to be a 'field' of an object
+	// An object can have any number of fields, hence this property is not functional
+	scalar property hasField [
+		domain Object
+		range rdfs:Literal // e.g., string, float, boolean, ...
+	]
+
+	// A link is also an object, meaning:
+	//   - it can have attributes
+	//   - it can be the source/target of another link
+	relation entity Link :> Object [
+		from Object
+		to Object
+	]
+		
+	aspect Model []
+	
+	relation entity HasObject [
+		from Model
+		to Object
+		forward hasObject
+		reverse inModel
+		inverse functional // every Object can be part of at most one model
+		asymmetric
+		irreflexive
+	]
+}

+ 3 - 3
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/requirement.oml

@@ -1,8 +1,8 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/requirement#> as requirement {
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/requirement#> as requirement {
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
 	extends <http://ua.be/sdo2l/vocabulary/base/system#> as system
 
-	extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
+	extends <http://ua.be/sdo2l/vocabulary/base/processtraces#> as traces
 	
 	concept Requirement :> base:IdentifiedThing
 	

+ 2 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/richtext.oml

@@ -1,7 +1,7 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/richtext#> as richtext {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/richtext#> as richtext {
     extends <http://www.w3.org/2001/XMLSchema#> as xsd
 
-    extends <http://ua.be/sdo2l/vocabulary/base/text#> as text
+    extends <http://ua.be/sdo2l/vocabulary/formalisms/text#> as text
 
 
     concept RichTextData :> text:TextData

+ 2 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/script.oml

@@ -1,6 +1,6 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/script#> as script {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/script#> as script {
     extends <http://www.w3.org/2001/XMLSchema#> as xsd
-    extends <http://ua.be/sdo2l/vocabulary/base/code#> as code
+    extends <http://ua.be/sdo2l/vocabulary/formalisms/code#> as code
     extends <http://ua.be/sdo2l/vocabulary/base/file#> as file
 
     concept ScriptData :> code:CodeData

+ 1 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/tabular.oml

@@ -1,4 +1,4 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/tabular#> as tabular {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/tabular#> as tabular {
     extends <http://www.w3.org/2001/XMLSchema#> as xsd
     extends <http://ua.be/sdo2l/vocabulary/base/file#> as file
 

+ 1 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/base/text.oml

@@ -1,4 +1,4 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/base/text#> as text {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/text#> as text {
     extends <http://www.w3.org/2001/XMLSchema#> as xsd
 
     extends <http://ua.be/sdo2l/vocabulary/base/file#> as file

+ 5 - 5
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/workflow.oml

@@ -1,10 +1,10 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/workflow#> as workflow {
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/workflow#> as workflow {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
-	extends <http://ua.be/sdo2l/vocabulary/ftg#> as ftg
+	extends <http://ua.be/sdo2l/vocabulary/base/base#> as base
+	extends <http://ua.be/sdo2l/vocabulary/base/ftg#> as ftg
 	
 	@rdfs:comment "The class to represent a workflow."
-	concept Workflow :> base:IdentifiedThing
+	concept WorkflowModel :> base:IdentifiedThing
 	
 	
 	@rdfs:comment "In a workflow we may have different instances of the same artifact type. Although they are not concrete artifacts, just indicators that an artifact is required/produced for an activity."
@@ -13,7 +13,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/workflow#> as workflow {
 	]
 	
 	relation entity Coordinates [
-		from Workflow
+		from WorkflowModel
 		to Node
 		forward coordinates
 		reverse isCoordinatedBy

+ 0 - 36
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/ftg.oml

@@ -1,36 +0,0 @@
-vocabulary <http://ua.be/sdo2l/vocabulary/ftg#> as ftg {
-	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
-	extends <http://ua.be/sdo2l/vocabulary/base#> as base
-	extends <http://ua.be/sdo2l/vocabulary/workflow#> as wf
-
-		// Definitions for Activities
-	@rdfs:comment "The types of activities performed during the system design process. This concept should be used in the FTG."
-	concept Transformation :> base:DefinitionThing [
-		restricts all relation base:defines to wf:Activity
-	]
-
-	// Definitions for Artifacts
-
-	@rdfs:comment "The types of artifacts generated during the system design process. This concept should be used in the FTG."
-	concept Formalism :> base:DefinitionThing [
-		restricts all relation base:defines to wf:WorkflowArtifact
-	]
-
-	relation entity Inputs [
-		from Formalism
-		to Transformation
-		forward inputs
-		reverse isInputtedBy
-		asymmetric
-		irreflexive
-	]
-
-	relation entity Outputs [
-		from Transformation
-		to Formalism
-		forward outputs
-		reverse isOutputedBy
-		asymmetric
-		irreflexive
-	]
-}