Linked.Archi

Linked.Archi ArchiMate 3.2 Derivation Rules

SHACL Shapes

https://meta.linked.archi/archimate3/derivation#

v3.2 draft amderiv: Kalin Maldzhanski Linked.Archi Modified: 2026-10-16 License

SHACL rules (sh:SPARQLRule) implementing the ArchiMate 3.2 derivation rules of Appendix B: DR1–DR8, whose derived relationships are valid in any model, and PDR1–PDR12, whose derived relationships may hold. Each rule is the join its definition states; the restrictions of B.4 and the order of strength are written into each rule. A valid rule derives a statement: the direct triple, the qualified predicate and the resource, a relationship like any other. A potential rule derives a proposition: the resource alone, which reifies the triple (rdf:reifies) without asserting it, for the modeller to confirm by asserting the triple, with its qualified predicate. Either way the resource carries its certainty (:Valid or :Potential), the relationships it was derived from (prov:wasDerivedFrom) — the qualified relationships the rule matched, the modeller's or derived — and the activity that generated it (prov:wasGeneratedBy): the derivation activity, the rule applied to them, whose plan is the rule (prov:qualifiedAssociation, prov:hadPlan). Each rule is a prov:Plan. What runs the rules — an application, a pipeline — records its run: an activity of its own, with its agent and when it ran, of which each derivation activity it produced is part (dcterms:isPartOf). What the modeller stated is told from what a rule derived by the graph, in a store (a derivation is kept in .../graph/derived), and by the resource. Before the rules run, :QualifyRelationships gives each relationship the model states only as a direct triple a resource of its own. The IRIs are in the model's namespace, a derivation's and its derivation activity's from its rule and premises; with no model loaded, or several, in urn:linked-archi:. The rules are SPARQL 1.2. A rule derives only from relationships whose triple is asserted, in the model or by a valid derivation — one that is only :Potential is for the modeller to confirm, as is any other proposition — so the rules give the closure of valid derivations and one layer of potential ones; a valid derivation of a relationship that so far is only :Potential makes it :Valid. A potential rule derives only what the relationship tables of Appendix B.5 permit between the two element types, as archimate3.2-relationship-tables.ttl gives them: load it with the model. Generated from Appendix B (inline style).

Contents

DR1-TransitivityOfSpecialization

DR2-DerivationBetweenStructuralRelationships — target: ModelConcept

DR3-DerivationBetweenStructuralAndDependencyRelationships — target: ModelConcept

DR4-DerivationBetweenOpposingStructuralAndDependencyRelationships — target: ModelConcept

DR5-DerivationBetweenStructuralAndDynamicRelationships — target: ModelConcept

DR6-DerivationBetweenStructuralAndFlowRelationships — target: ModelConcept

DR7-DerivationBetweenStructuralAndTriggeringRelationships

DR8-DerivationBetweenTriggeringRelationships

DerivationRestrictions

SPARQL constraint: Appendix B.4 does not allow this derivation: {?value}. Violation
            SELECT $this ?value WHERE {
                $this arch:source ?_a ; arch:target ?_b ; rdf:type/arch:unqualifiedForm ?_relationship .
                FILTER(?_relationship != am:specializes)    # B.4 is not applied to specialization
                OPTIONAL { $this prov:wasDerivedFrom ?_premise1 , ?_premise2 . FILTER(STR(?_premise1) < STR(?_premise2))
                           ?_premise1 arch:source|arch:target ?_via . ?_premise2 arch:source|arch:target ?_via .
                           FILTER(?_via != ?_a && ?_via != ?_b) }
                BIND(IF(EXISTS { ?_a rdf:type/rdfs:subClassOf* arch:QualifiedRelationship }, "R", IF(EXISTS { ?_a rdf:type/rdfs:subClassOf* ?_junction . FILTER(?_junction IN (am:Junction_And, am:Junction_Or)) }, "J", IF(EXISTS { ?_a rdf:type/rdfs:subClassOf* am:MotivationElement }, "M", IF(EXISTS { ?_a rdf:type/rdfs:subClassOf* am:StrategyLayerElement }, "S", IF(EXISTS { ?_a rdf:type/rdfs:subClassOf* am:ImplementationAndMigrationLayerElement }, "I", "C"))))) AS ?_from)
                BIND(IF(EXISTS { ?_b rdf:type/rdfs:subClassOf* arch:QualifiedRelationship }, "R", IF(EXISTS { ?_b rdf:type/rdfs:subClassOf* ?_junction . FILTER(?_junction IN (am:Junction_And, am:Junction_Or)) }, "J", IF(EXISTS { ?_b rdf:type/rdfs:subClassOf* am:MotivationElement }, "M", IF(EXISTS { ?_b rdf:type/rdfs:subClassOf* am:StrategyLayerElement }, "S", IF(EXISTS { ?_b rdf:type/rdfs:subClassOf* am:ImplementationAndMigrationLayerElement }, "I", "C"))))) AS ?_to)
                BIND(IF(BOUND(?_via), IF(EXISTS { ?_via rdf:type/rdfs:subClassOf* arch:QualifiedRelationship }, "R", IF(EXISTS { ?_via rdf:type/rdfs:subClassOf* ?_junction . FILTER(?_junction IN (am:Junction_And, am:Junction_Or)) }, "J", IF(EXISTS { ?_via rdf:type/rdfs:subClassOf* am:MotivationElement }, "M", IF(EXISTS { ?_via rdf:type/rdfs:subClassOf* am:StrategyLayerElement }, "S", IF(EXISTS { ?_via rdf:type/rdfs:subClassOf* am:ImplementationAndMigrationLayerElement }, "I", "C"))))), ?_unbound) AS ?_through)
                BIND(EXISTS { ?_a rdf:type/rdfs:subClassOf* am:PassiveStructureElement } AS ?_passiveFrom)
                BIND(EXISTS { ?_b rdf:type/rdfs:subClassOf* am:PassiveStructureElement } AS ?_passiveTo)
                BIND(EXISTS { ?_a rdf:type/rdfs:subClassOf* ?_fromKind . FILTER(?_fromKind IN (am:Grouping, am:Location, am:Plateau)) } AS ?_fromGathers)
                BIND(IF(BOUND(?_via), EXISTS { ?_via rdf:type/rdfs:subClassOf* ?_viaKind . FILTER(?_viaKind IN (am:Grouping, am:Location)) }, ?_unbound) AS ?_viaGroups)
                BIND(COALESCE(IF(?_from IN ("I", "C", "S") && ?_to = "M" && ?_relationship NOT IN (am:assignedTo, am:realizes, am:influences, am:associatedWith), "from Core, Strategy or Implementation and Migration to Motivation, only assignment, realization, influence or association", IF(?_from = "M" && ?_to IN ("I", "C", "S") && ?_relationship != am:associatedWith, "from Motivation to Core, Strategy or Implementation and Migration, only association", IF(?_from IN ("I", "C") && ?_to = "S" && ?_relationship NOT IN (am:realizes, am:associatedWith), "from Core or Implementation and Migration to Strategy, only realization or association", IF(?_from = "S" && ?_to IN ("I", "C") && ?_relationship != am:associatedWith, "from Strategy to Core or Implementation and Migration, only association", IF(?_from = "I" && ?_to = "C" && ?_relationship NOT IN (am:realizes, am:associatedWith), "from Implementation and Migration to Core, only realization or association", IF(?_from = "C" && ?_to = "I" && ?_relationship NOT IN (am:assignedTo, am:associatedWith), "from Core to Implementation and Migration, only assignment or association", IF(?_to = "R" && ?_fromGathers && ?_relationship NOT IN (am:composedOf, am:aggregates, am:associatedWith), "from a grouping, location or plateau to a relationship, only composition, aggregation or association", IF(?_to = "R" && !?_fromGathers && ?_relationship != am:associatedWith, "from any other element to a relationship, only association", IF(?_from = "R" && ?_relationship != am:associatedWith, "from a relationship, only association", IF(?_relationship = am:influences && ?_to != "M", "influence only to Motivation", IF(?_relationship = am:accesses && !?_passiveTo, "access only to passive structure", IF(!?_passiveFrom && ?_passiveTo && ?_relationship NOT IN (am:accesses, am:assignedTo, am:associatedWith), "to passive structure from anything else, only access, assignment or association", IF(?_passiveFrom && ?_passiveTo && ?_relationship NOT IN (am:realizes, am:associatedWith), "between passive structure, only realization or association", IF(?_passiveFrom && !?_passiveTo && ?_relationship NOT IN (am:realizes, am:influences, am:associatedWith), "from passive structure to anything else, only realization, influence or association", IF(BOUND(?_through) && ?_from != "J" && ?_through != "J" && ?_to != "J" && ?_through != ?_from && ?_through != ?_to && !(?_from = "I" && ?_through = "C" && ?_to IN ("M", "S")), "not through an element of a domain neither end is in (but Core between Implementation and Migration and Motivation or Strategy)", IF(BOUND(?_viaGroups) && ?_from = "I" && ?_to IN ("M", "S") && ?_viaGroups, "from Implementation and Migration to Motivation or Strategy, not through a grouping or location", "")))))))))))))))), "") AS ?value)
                FILTER(?value != "")
            }
        

PDR1-SpecializationAndOtherRelationshipInLine

PDR10-DerivationBetweenFlowRelationships

PDR11-TriggeringAndStructuralOpposite

PDR12-GroupingMembers — target: Grouping

PDR2-SpecializationAndOtherRelationshipOpposite

PDR3-SpecializationSourceAndOtherRelationship

PDR4-OtherRelationshipToSpecializedElement

PDR5-StructuralAndDependencyAtSource — target: ModelConcept

PDR6-StructuralAndDependencyFromSource — target: ModelConcept

PDR7-DerivationBetweenDependencyRelationships — target: ModelConcept

PDR8-FlowAndStructuralInLine

PDR9-StructuralAndDynamicFromSource — target: ModelConcept

QualifyRelationships