Project Michael Dings Impressum Login

Dings_Constraint

I am a Constraint in the Dings-System.

Description

I always evaluate to “true” for all stored Dings_Triples in the All-Dings-System, otherwise a Bug is present.

Role

I define a formal validity Condition for Dings_Triples, whose Predicate references me via Dings_Predicate_Has_Constraint.

If I am violated, the affected Triple is ontologically invalid, not merely false.

Therefore, I am Part of the Truth-Definition-Layer of the Ontology-Kernel.


Formal Semantics

Let

Then I define a total Function:

Eval : Context → { True, False, Error }

Meaning of Results


Evaluation Context

The context visible to me is strictly limited to:

Context :=
{
    Subject
    Predicate
    Object
    Graph
    Time (optional, future kernel extension)
}

I MUST NOT access information outside this context.

This guarantees:


Argument Consumption

Each concrete Constraint defines the subset:

Consumed ⊆ { Subject, Predicate, Object, Graph, Time }

Rules:

  1. I may only read consumed arguments.
  2. Non-consumed arguments MUST NOT influence evaluation.
  3. Consumption MUST be statically decidable.

This enables:


Attachment to Predicates

I become active only through:

Predicate ─Has_Constraint→ Constraint

Meaning:

For every Triple (S, P, O):

If (P ─Has_Constraint→ C)
then Eval_C(Context(S,P,O)) = true
must hold.

Otherwise the Triple is invalid.


Multiple Constraints

If several Constraints are attached to the same Predicate:

P ─Has_Constraint→ C1
P ─Has_Constraint→ C2
...

Then validity requires:

∀ Ci : Eval_Ci(Context) = true

Logical combination: AND


Scope of Influence

I apply only to:

I do NOT apply to:

This prevents self-blocking of the Ontology Kernel.


Kernel Position

Constraint evaluation occurs strictly after:

  1. Syntax parsing
  2. Reference resolution
  3. Virtual-Dings creation
  4. Name and Key canonization

and before:

  1. Triple persistence in the graph

Therefore, I always operate on fully resolved canonical entities.


Specialization

I am an abstract base class.

Concrete subclasses include for example:

These are defined in separate derived Dings.


Invariant

A knowledge graph is ontologically valid iff all Constraints of all stored Triples evaluate to true.

This makes me a core component of the Ontology Kernel.