Knowledge Processing Model in SimpleModeling
This article concisely defines the transformation from knowledge to execution as the mechanism that projects knowledge into the real world. It proceeds through Embedding, RDF, Type, DSL (Domain Specific Language), Interpreter, and Effect to produce real-world impact, with the entire pipeline cross-cuttingly governed by Context.
Knowledge Processing Model
In SimpleModeling, knowledge is not merely stored information but a target for transformation into executable structure. This model explicitly defines that transformation process.
This figure represents the full structure from knowledge to real-world effects.
Embedding
Embedding represents knowledge as a semantic space, enabling similarity-based discovery.
-
ambiguous meaning
-
similarity search
-
AI-driven exploration
It is realized using vector databases.
RDF
RDF represents knowledge as a graph, making relationships explicit.
-
explicit representation of relationships
-
connection of knowledge
-
structuring
It is implemented using RDF databases or graph databases.
Type
Type fixes meaning into a strict structure and serves as the core of symbol grounding.
-
Entity / Value
-
constraints (invariants)
It is described in CML.
DSL
DSL describes behavior. At this stage, no side effects occur; it represents computation as intent.
It is described in CML.
Interpreter
Interpreter assigns meaning to DSL and transforms it into Effects.
-
DSL ⇒ Effect
-
definition of execution strategy
Context
Processing at each layer is affected by the application context.
For example, even for the same user registration process, in a development environment email sending may be replaced with logging, while in production it uses a real email service (e.g., SES). Such behavioral differences are controlled by context. Additionally, in a B2B application, organizationId may be required, while in a personal application it may not, meaning that even the structure of types can vary depending on context.
Context is a cross-cutting element that affects all layers.
Category Theory
By organizing the model from a category-theoretic perspective, we can validate the consistency and simplicity of its structure. In particular, it serves as a guideline to verify the separation of objects and morphisms, the naturalness of composition, and the coherence of transformations.
Modeling with category theory does not provide direct benefits, but it serves as a guiding framework to ensure the model is well-structured.
This model can be understood as a coherent structure in category theory. We describe it in terms of functors, natural transformations, and adjunctions.
Functor
A functor is a structure-preserving mapping between categories. In SimpleModeling, the transformation from the conceptual world to the program world can be seen as a functor.
ConceptWorld → TypeWorld
Free Structure and DSL
DSL can be understood as a free structure. It generates computational structures based on types without imposing additional constraints.
Type → DSL(AST)(Free)
function : Type → Type(Morphism)
procedure : Type → Effect[Type](Kleisli Morphism)
Natural Transformation
Interpreter can be understood as a natural transformation from DSL to Effect.
Interpreter : DSL ⇒ Effect
A natural transformation assigns meaning while preserving structure.
Effect and Evaluation
Effect represents unevaluated computation. Interaction with the real world occurs only through evaluation (run).
Effect --run--> Reality
Adjunction
Adjunction is the optimal correspondence between adding structure and forgetting structure.
F : Concept → Program
G : Program → Concept
F ⊣ G
Here:
Unit and Counit
Adjunctions come with two natural transformations.
η : Id ⇒ G ∘ F (unit)
ε : F ∘ G ⇒ Id (counit)
These guarantee round-trip consistency between meaning and structure.
Context as Parameter
Context can be understood as a parameter that determines natural transformations.
Context → (DSL ⇒ Effect)
In other words, different interpreters (natural transformations) are selected depending on context.
Correspondence
This section summarizes the correspondence of each element.
-
Concept: domain of meaning and knowledge
-
Type: structured objects
-
DSL: morphisms and their composition
-
AST: syntax of DSL (free structure)
-
procedure: Kleisli morphism with effects (Type → EffectType)
-
Interpreter: natural transformation (DSL ⇒ Effect)
-
Effect: evaluable computation
-
Reality: evaluated result in the real world
-
Context: meta-layer controlling interpretation
This model can be summarized as the following categorical correspondence:
Context acts as a meta-layer over the entire structure.
This structure allows SimpleModeling to handle the transformation from meaning to execution in a theoretically consistent manner.
Category theory is not required for implementation, but the ability to describe the model naturally in these terms is a strong indicator that the structure is simple and coherent.
Summary
The SimpleModeling knowledge processing model is a unified transformation system from meaning (Embedding/RDF) to structure (Type), then to computation (DSL), and finally to execution (Interpreter/Effect).
In this model, Types fix meaning as objects, while DSL composes computations as morphisms. The Interpreter, as a natural transformation, assigns semantics to DSL and transforms it into executable Effects.
Only through the evaluation (run) of Effects do real-world actions occur.
Context operates across the entire system, determining interpretation and execution at every layer.
This structure enables SimpleModeling to treat knowledge not merely as description, but as a structured, composable, and executable model.
References
Glossary
- Embedding
-
An Embedding is a numerical-vector representation of text, terms, Model Elements, or related content that enables computation of semantic similarity. It is used for similarity search and candidate retrieval.
- RDF
-
A W3C-standardized data model that represents information as subject–predicate–object triples.
- Type
-
Undefined
- DSL (Domain Specific Language)
-
A DSL (Domain-Specific Language) is a language designed for a particular domain, enabling direct and concise expression of the domain’s concepts and structures. Compared to general-purpose programming languages (GPLs), DSLs offer a higher level of abstraction tailored for domain-specific problem solving and automation.
- SimpleModeling
-
SimpleModeling is a modeling-centered software development methodology and technology system for constructing a Domain Model from Knowledge, formalizing it in CML, realizing it as executable software through Cozy and AI, and running it on Textus.
- Constraint
-
In UML, a Constraint is a condition or restriction expressed in natural language or a machine-readable language to declare part of the Semantics of one or more Model Elements. Its evaluation yields a Boolean value and has no side effects.
- type safety
-
Type safety refers to the property of a programming language or system where operations are guaranteed to be used with values of the correct type. Type-safe code prevents invalid operations by detecting type mismatches at compile time (or runtime), reducing runtime errors and unexpected behaviors. Scala ensures type safety through strong static typing combined with type inference, enabling expressive yet safe programming.
- CML (Cozy Modeling Language)
-
CML (Cozy Modeling Language) is the SimpleModeling formal modeling language for describing the Executable Model portion of an Object Model that connects to program generation and execution.
- Behavior
-
In UML, Behavior is a specification of how its context Behaviored Classifier changes State over time. It may define possible executions, emergent Behavior, or a selected example of execution.
- Dependency
-
In UML, a Dependency is a directed Relationship indicating that the specification or implementation of a client Model Element depends semantically or structurally on the definition of a supplier Model Element.
- Model
-
A Model is an abstraction that represents a subject according to a particular Purpose and Concern so that it can be understood, reasoned about, evaluated, or constructed. It is not the subject itself; it preserves the elements, relationships, and meanings required for its purpose.
- Object
-
An Object is an Instance classified by a Class or another Classifier and may have structure, State, and Behavior. It is treated as an individual that can be referred to separately from other Instances of the same Classifier.
- Interaction
-
Undefined
- Operation
-
In UML, an Operation is a Behavioral Feature of a Classifier that specifies the name, type, Parameters, and Constraints for invoking associated Behavior. The Operation specifies an invocation contract, while a Method or another Behavior realizes it.