Table of Contents

Introduction

The Closed World Assumption (CWA) is a logical principle where anything not explicitly stated is assumed to be false. It’s the opposite of the default assumption used in semantic web technologies, where unmentioned facts are considered unknown rather than false.

Overview

The Closed World Assumption (CWA) is a logical principle that forms the basis for traditional database systems and many engineering verification tasks. Under CWA, if a fact is not explicitly stated in a knowledge base, it is assumed to be false. This contrasts with the Open World Assumption (OWA), which is the default for OWL ontologies, where unmentioned facts are considered unknown rather than false.

In digital engineering, CWA is particularly important for model verification tasks where explicit existence checks are required. The Semantic System Verification Layer (SSVL) uses CWA through tools like SHACL to perform constraint checks on ontology-aligned data, ensuring models meet specific requirements.

The CWA is crucial for verification tasks that require explicit existence checks (e.g., "this element must exist"), while the OWA is better suited for extensible knowledge representation where new information may be added later.

Position in Knowledge Hierarchy

Broader concepts: - SSVL (is-a)

Details

The CWA fundamentally changes how we interpret data and inferences. While OWL ontologies use the OWA by default (where anything not stated is unknown), the CWA treats unstated information as false. This distinction is critical for model verification in digital engineering.

CWA vs OWA: Key Differences

Assumption

Default for

Typical Use Case

Closed World Assumption (CWA)

Relational databases, SQL

Verification tasks requiring explicit existence checks

Open World Assumption (OWA)

OWL ontologies, Semantic Web

Knowledge representation, extensible systems

How CWA Works in Practice

Under CWA, a system assumes that all relevant facts are known and explicitly stated. If a fact isn’t stated, it’s considered false. This is in contrast to OWA, where unstated facts are simply unknown.

For example, in a model of vehicles: - Under CWA: If a vehicle doesn’t have an explicit "has_wheels" property with value 4, it’s assumed to not have 4 wheels (and thus is invalid). - Under OWA: If a vehicle doesn’t have an explicit "has_wheels" property with value 4, it’s unknown whether it has 4 wheels (it might have 4 wheels but the information isn’t stated).

The CWA is not a property of the data itself, but rather a way of interpreting the data. It’s particularly useful for verification tasks where you need to ensure that all required elements exist.

CWA Implementation in SSVL

The Semantic System Verification Layer (SSVL) implements CWA through the SHACL (Shapes Constraint Language) tool. SHACL provides a mechanism for constraint checking in ontology-aligned data that operates under a closed-world context.

The SSVL uses three verification approaches: 1. Open World Analysis (DL reasoning under OWA) 2. Closed World Analysis (SHACL under CWA) 3. Graph-Based Analysis

When implementing CWA, it’s essential to understand that it may conflict with the OWA used in the underlying ontology. This is why SHACL is used for CWA verification - it provides a way to "close" the analysis context for specific verification tasks.

SHACL Implementation Example

SHACL shapes define constraints that are checked under a closed-world assumption. Here’s a simple example of a SHACL shape that ensures a value property must be tagged with an ontology term:

@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix ex: <http://example.org/>.

ex:ValuePropertyShape
  a sh:NodeShape;
  sh:targetClass ex:ValueProperty;
  sh:property [
    sh:path ex:taggedWith;
    sh:minCount 1;
    sh:severity sh:Violation;
  ].

This SHACL shape ensures that every ValueProperty instance must have at least one "taggedWith" property value. Under CWA, if a ValueProperty instance doesn’t have this property, it’s considered a violation.

Practical applications and examples

The Closed World Assumption is critical for model verification in digital engineering. Here are some practical applications:

Example: Catapult Model Verification

In the Catapult example from the context, the SSVL uses CWA to verify specific model requirements. For instance, Requirement 7 states: "All value properties shall be tagged with a value in the loaded ontologies."

Under CWA (using SHACL), this requirement is verified by checking that every value property has an explicit tag. If a value property lacks a tag, it’s considered a violation.

When using CWA for verification, it’s essential to ensure that all failure paths are accounted for in the model requirements. For example, Requirement 7 could be broken into sub-requirements that state each type of element that needs to be tagged (Block, SoA System Under Analysis VP, and SoA Objective).

Example: Model Requirement Verification

Table 2 from the context shows example model requirements for a System of Analysis (SoA):

Requirement #

Requirement Description

Requirement Category

7

All value properties shall be tagged with a value in the loaded ontologies

DEFII

To verify Requirement 7 using CWA, a SHACL shape is created that checks for the presence of the "taggedWith" property on all value properties. If any value property lacks this property, it’s considered a violation under CWA.

The SHACL shape in Figure 155 from the context shows how this requirement can be implemented using SHACL with a SPARQL query to check for the presence of required tags.

Example: Graph-Based Analysis

While graph-based analysis typically uses the OWA, it can be combined with CWA for specific verification tasks. For example, to verify that a graph is acyclic (Requirement 10), a Python script using NetworkX can be written to check for cycles. However, the data used for this analysis would need to be filtered under a CWA to ensure all required connections exist.

import networkx as nx

def check_acyclic(graph):
    if nx.is_directed_acyclic_graph(graph):
        return True
    else:
        # Find the cycle
        cycle = nx.find_cycle(graph)
        return False, cycle

This function uses the NetworkX library to check if a graph is acyclic. Under CWA, the function would expect all required connections to exist, so a cycle would be considered a violation of the requirement.

References

Knowledge Graph

Visualize the relationships between Closed World Assumption and related concepts

graph TD A[Closed World Assumption CWA] --> B[Semantic System Verification Layer SSVL] A --> C[SHACL Shapes Constraint Language] A --> D[Model Verification] A --> E[Digital Engineering] B --> F[Open World Assumption OWA] B --> G[Graph-Based Analysis] F --> H[OWL Ontologies] C --> I[Constraint Checking] D --> J[Requirement 7: All value properties must be tagged] E --> K[IoIF Armaments Interoperability and Integration Framework] K --> L[Ontology-Aligned Data] L --> M[SysML Models]