Skip to main content

AI Class Entity Ontology

Code and Software Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 05 November 2026
Audio Overview
SEMANTIC LIBRARY — FLOW ALGEBRA
AI CLASS ENTITY ONTOLOGY
Version: 1.0 | Date: 05 November 2026 | Language: en-GB
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/code-and-software-entities/ai-class-entity-ontology.html
Status: Original interpretative formalisation. The web page's embedded specification was not exposed in the retrieved page text; this document does not claim to reproduce it verbatim.

1. PURPOSE
Represent an AI class entity as a typed software abstraction with identity, attributes, methods, inheritance, interfaces, constraints, and runtime relationships. Support semantic search, class resolution, safe instantiation, and traceable reasoning over code entities.

2. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = observed class declarations, source artefacts, metadata, and candidate relations.
R_t = typing, inheritance, membership, dependency, and inference rules.
B_t = scope, permissions, visibility, version, resource and validation boundaries.
K_t = verified class facts, provenance, confidence, and relationship graph.
Class C = (id, name, namespace, version, attributes, methods, constructors, bases, interfaces, invariants, provenance).

3. ENTITY DEFINITIONS
ClassEntity: named or anonymous class declaration or runtime class object.
AttributeEntity: declared field/property with type, visibility, mutability and default.
MethodEntity: callable member with signature, effects and contract.
ConstructorEntity: instantiation mechanism and initialisation requirements.
InterfaceEntity: required callable or property contract.
BaseClassEntity: superclass providing inherited members.
DerivedClassEntity: subclass extending or overriding behaviour.
InstanceEntity: runtime object associated with a class.
TypeConstraint: admissible type, value or generic parameter bound.
ClassDependency: imported, composed, referenced or inherited class relation.

4. FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid(x, B_t) AND supported(x, K_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, x*_t, evidence_t)
K_{t+1} = reconcile(K_t, x*_t, provenance_t)
If V_t is empty, abstain from asserting a class relation and request additional evidence.

5. RELATIONSHIP OPERATORS
DECLARES(module, class)
HAS_ATTRIBUTE(class, attribute)
HAS_METHOD(class, method)
CONSTRUCTS(constructor, instance)
INSTANCE_OF(instance, class)
EXTENDS(subclass, superclass)
IMPLEMENTS(class, interface)
OVERRIDES(subclass_method, base_method)
DEPENDS_ON(class, dependency)
SATISFIES(class, invariant)
DEFINED_IN(class, source_file)
VERSION_OF(class_revision, canonical_class)

6. INFERENCE RULES
R1: DECLARES(M,C) AND DEFINED_IN(C,F) -> SOURCE_ASSOCIATED(C,M,F).
R2: EXTENDS(C,P) AND HAS_METHOD(P,m) AND NOT OVERRIDES(C.m,m) AND accessible(m,C) -> INHERITS(C,m).
R3: IMPLEMENTS(C,J) AND all_required_members_verified(C,J) -> INTERFACE_CONFORMANT(C,J).
R4: INSTANCE_OF(o,C) AND HAS_ATTRIBUTE(C,a) -> EXPECTED_ATTRIBUTE(o,a), subject to runtime and visibility checks.
R5: EXTENDS(A,B) AND EXTENDS(B,C) -> ANCESTOR_OF(C,A), provided the hierarchy is valid.
R6: Any cyclic inheritance, unresolved import, contradictory signature or inaccessible member -> FLAG_CONFLICT, not verified assertion.
R7: Similar names alone do not prove class identity; namespace, version and provenance must be checked.

7. TRI-MAPPING
Syntax layer: class declarations, imports, signatures, decorators, annotations.
Semantic layer: identity, type, inheritance, composition, contracts, dependencies.
Operational layer: loading, instantiation, dispatch, validation, execution and monitoring.
Mapping: syntax -> semantic claims -> validated operational consequences.

8. RECURSIVE RESOLUTION ENGINE
Input: class C, scope B, knowledge K, maximum depth d.
1. Resolve canonical identity and source provenance.
2. Extract direct attributes, methods, interfaces and dependencies.
3. Traverse base classes and composed types with visited-set protection.
4. Validate visibility, override rules, generic bounds and version consistency.
5. Attach evidence and confidence to each candidate relation.
6. Reject or quarantine contradictions; emit only supported relationships.
7. Stop at depth d, resource boundary, cycle or missing evidence.
Output: bounded class relationship graph, unresolved items and audit trail.

9. FLOW DIAGRAM
[Source / Repository]
        |
        v
[Parse Class Entity] -> [Canonical Identity]
        |                      |
        v                      v
[Expand Relationships] -> [Boundary / Type Checks]
                               |
                    +----------+----------+
                    |                     |
                 [Valid]              [Unresolved]
                    |                     |
                    v                     v
             [Rank Evidence]       [Flag / Abstain]
                    |
                    v
             [Update Graph]
                    |
                    v
             [Audit / Search]

10. RELATIONSHIP MAPPING TABLE
Relation       Domain           Range            Verification
DECLARES       Module           Class            Source declaration
HAS_ATTRIBUTE  Class            Attribute        AST / reflection
HAS_METHOD     Class            Method           Signature inspection
EXTENDS        Class            Class            Base declaration
IMPLEMENTS     Class            Interface        Contract validation
INSTANCE_OF    Instance         Class            Runtime type evidence
DEPENDS_ON     Class            Software entity  Import / reference trace
DEFINED_IN     Class            Source file      Repository provenance

11. EXECUTION GUARANTEE (CONDITIONAL)
Given complete, consistent inputs, a terminating traversal bound, deterministic rule precedence and sound validators, the engine guarantees that emitted relations pass its specified checks. It does NOT guarantee source correctness, runtime safety, complete program understanding, or absence of undiscovered dependencies. Unknowns remain explicitly unresolved.

12. AI SEARCH FLOW
QUERY -> NORMALISE -> IDENTIFY_CLASS -> EXPAND -> VALIDATE -> RANK -> ANSWER -> CITE -> UPDATE
Search intent: locate class definitions, inspect inheritance, discover methods, compare implementations, assess interfaces, or trace dependencies.
Required answer fields: canonical class name; namespace; version; source; relationships; evidence; uncertainty; update timestamp.
Semantic equivalents: class/type definition, object blueprint, software class, OOP class entity.
Disambiguation: distinguish software classes from statistical classes, training labels, CSS classes and abstract ontology classes.

13. EXAMPLE
Input: class ModelService extends BaseService and implements Runnable.
Verified facts: EXTENDS(ModelService,BaseService); IMPLEMENTS(ModelService,Runnable).
Only infer INTERFACE_CONFORMANT after required methods and signatures have been checked.
Do not infer an instance or successful execution from the declaration alone.

14. UPDATE AND AUDIT MODEL
Each accepted fact stores (subject, predicate, object, source, source_version, observed_at, confidence, validation_status).
When source changes, invalidate affected edges, re-run checks, retain historical provenance, and publish a new graph revision.

15. CITATION AND LICENCE
Source attribution: Mark Anthony Higgins and Sky — Recursive AI, Kireth Research.
Consult the published Kireth Research Open Research Licence for applicable reuse terms; citation and backlink to the source page should be retained.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ