Model Harness — Describing Software as Models
Model-driven development uses models as the foundation for describing, developing, and executing software. The mechanisms that check and execute these models also constrain AI-generated changes. This second installment examines that foundation as a Model Harness, covering description close to domain knowledge, state machines, processor-enforced constraints, and correspondence with requirements.
The Place of This Installment
The first installment introduced the harnesses supporting AI development. The Model Harness provides a foundation for development and execution by describing software close to domain knowledge. Parts 2–4 address the Model Harness, followed by Architecture in Part 5, Programming in Part 6, and Runtime in Part 7. Part 8 addresses the Knowledge Harness: linking Literate and Object Models through a glossary, checking their correspondence, and making that knowledge available to AI through MCP. Part 9 covers the Observed Model as a projection of execution results, and Part 10 covers the Verification Harness, completing the feedback to models.
The Modeling Foundation
The preceding series established model-driven development, using models as the foundation for describing, developing, and executing software. Its checking and execution mechanisms also constrain AI-generated changes. Object Models retain formal structure and behavior; Literate Models retain context, requirements, scenarios, and decisions; Knowledge Models retain semantic relationships, grounds, and sources. A glossary manages names, meanings, synonyms, identities, and applicable contexts, supporting correspondence among the three. Business knowledge expressed in prose remains available for reference and revision throughout development.
These foundations support Domain, Use Case, and Application Models organized by purpose. Static and dynamic perspectives concern their structure and behavior: domains have behavior, and applications have structure. Machines can detect inconsistencies in explicit references and constraints, while people judge whether business meanings agree. Part 8 details the mechanisms for preparing, providing, and admitting knowledge.
The concepts, elements, relationships, and rules of the static models discussed previously provide a basis for describing software structure. Behavior, collaboration, and state transitions can be made explicit as state machines and workflows. People and AI work with structure and behavior at the same abstraction level, while processors check and execute those descriptions.
Part 2 presents the shared principle: describe software as models and apply constraints through interpretation, checking, and execution. Part 3 develops static structure, and Part 4 develops dynamic behavior, including state machines. These are corresponding aspects of the same software.
Describing Software as Models
The motivation for model-driven development is to reduce impedance mismatch: the distance between domain concepts and their program representation. Recasting those concepts, relationships, and rules into substantially different implementation-oriented vocabulary and structures increases the effort of understanding and change. Models let software be described, generated, and changed at an abstraction close to the domain.
When developers describe software as models and AI supplies the missing implementation, the model effectively becomes their programming language. In SimpleModeling, Textus directly executes executable models written in CML, and AI automatically supplies necessary programming-language implementation beyond what the model provides. Developers can reduce their direct involvement in those implementation details and concentrate on concepts, relationships, rules, and behavior in the model.
Making Behavior Explicit with State Machines
State machines make dynamic behavior explicit. In conventional programming-language implementations, states, events, transition conditions, and destinations tend to be dispersed across variables, branches, and event handlers. A state machine brings them into one explicit structure. People and AI can reason about permitted behavior in that structure, and processors can check and execute it. Part 4 develops dynamic models, including state machines, in detail.
How Models Function as a Harness
Processors statically check the models that form the foundation of model-driven development and directly execute their executable parts. Their structure, rules, and behavior govern actual development and operation. These mechanisms also constrain models and complementary implementation generated or changed by AI. Incorporating model constraints into checking and execution is what makes this foundation function as a Model Harness.
Mechanisms That Apply the Constraints
CML grammar defines the model elements and structures that processors handle. BoK manages the glossary and links Literate, Object, and Knowledge Models through shared meanings and identities. The semantic basis used by AI during generation and change can thus be retained as external project knowledge.
Reviews in textus-cbd-support examine contradictions in both executable models and non-executable models such as Use Cases. Build-time static model checks examine structural and rule inconsistencies before execution. Textus runs executable models directly and applies their constraints at runtime. Review, static checking, and direct execution work together, providing evidence for human decisions about revision and adoption.
The Roles of CML, Cozy, AI, and Textus
CML describes models, Cozy transforms models into software, and Textus runs executable models. AI automatically supplies programming-language implementation where the model alone is insufficient for a complete program. Combining direct model execution with complementary implementation lets developers work at the model’s abstraction level. The complementary implementation must also reflect the model’s structure, rules, and behavior. Types and implementation discipline for that code are addressed by the Programming Harness in Part 6.
Checking Purpose Through Requirements
Correspondence with requirements establishes what the modeled software is intended to achieve. Retaining mappings and decision grounds among requirements, Use Cases, structure, behavior, and realizations supports checking both formal consistency and fitness for user goals. Traceability provides a means of examining purpose alongside model description, checking, and execution.
Moving directly from requirements to implementation can scatter AI-supplied assumptions and business choices across code, increasing the effort of checking correspondence. Making those assumptions and choices explicit in models and mapping them to realizations makes the reasons for a change and its impact available for examination.
Model Up/Down
Model Up/Down is a model-development concept specific to SimpleModeling. Model Down concretizes requirements and models toward realization. Model Up derives and displays an abstracted model suited to a review purpose. It makes models used in development and execution available in representations that stakeholders can understand.
Model Down Example: Concretizing Intent
Concretizing Use Case intent into execution is an example of Model Down. Domain facts and rules are connected to Use Case goals and scenarios and concretized into Application Models and admitted commands. Retaining identities and decision grounds at each stage makes the correspondence between intended meaning and realization traceable.
Natural-language intent is connected to execution through Typed Intent or commands. Making targets, values, preconditions, and authorization checkable gives the application explicit admission conditions.
Use Case Harness Checks
A Use Case Harness compares Use Case goals and scenarios with corresponding model states, operations, and execution-check results. CML-based structural checks and AI-assisted semantic comparisons support stakeholders in judging agreement with requirements. This mechanism checks correspondence between requirements and realization.
Model Up Example: State Machines as Flow Diagrams
A typical example of Model Up converts a workflow described as a state machine into a flowchart or activity diagram. State and transition details are abstracted for the review purpose, presenting a model of the business flow. Deriving an actor-goal list from a Use Case Model is another example. When the source model has undergone execution checks, its review abstraction lets stakeholders assess requirements against the model actually used for execution. Retaining correspondence with the source model allows feedback to return to development. In a requirements-model harness, this mechanism connects the model used for execution with stakeholder review.
Domain and Application Lifecycles
A Domain Model represents facts, concepts, and rules in the subject world. An Application Model combines domain functions to achieve user goals. Placing shared business rules and state management in the domain, and application-specific collaboration and flow in the application, enables applications with different needs to use a common domain.
Changes in user needs or usage context prompt changes to Application Models. New facts about the domain or changes in the business itself prompt changes to Domain Models. Reasons for change are mapped to this distinction, and changes to a shared domain are assessed for their impact on the applications that use it.
Managing Correspondence with Capabilities
Groups of Use Cases yield Application Capabilities offered to users, while individual scenarios yield Component Capabilities needed for realization. Capabilities are an intermediate representation for managing the abilities provided by the software. At runtime, the mapped operations and workflows execute.
Mappings link each Capability to its realizing operations and workflows and to verification examples. This intermediate representation lets the provided ability and its verification remain traceable as the realization changes.
Comparing Executable Models and Execution Examples
Executable models express general structure, behavior, and rules and are mapped to implementation. Execution Example Models express concrete scenarios and interactions and are mapped to verification examples. Comparing both with execution results helps examine how rules relate to concrete behavior and supports model improvement.
Model Quality and Software Quality Attributes
Models and views are assessed for clarity, consistency, validity, and accuracy: whether they admit a common interpretation, avoid conflicting definitions and relationships, answer concerns necessary for their purpose, and match domain facts and rules. Structural checks are complemented by user and domain-expert judgment and by observation and execution results.
Performance, reliability, and security are quality attributes of the resulting software. They are assessed across requirements, models, architecture, implementation, and execution. The later Verification Harness connects checks and evidence from the different harnesses.
Presenting Decision-Relevant Views
Views organized by purpose and concern present requirement mappings, candidate differences, grounds, change impacts, and verification results. The underlying models and glossary retain meanings and identities, while the views present decision-relevant information. People judge business meaning, priorities, and candidate adoption.
An Order Confirmation Example
For order confirmation, a static model describes orders, payments, stock reservations, and their relationships, while a dynamic model describes transitions following payment success or failure. Business rules explicitly state how to handle a stock reservation and which audit records to retain after payment failure, with links to realizing operations and verification examples. Comparing execution results makes the required failure behavior examinable. This example illustrates the correspondence.
Continuing the Series
The Model Harness describes software close to domain knowledge and constrains generation and change through processor checks and execution. Correspondence with requirements also supports checking the software’s purpose. Part 3 develops static structure through concepts, relationships, and rules; Part 4 develops dynamic behavior, including state machines.
References
Glossary
- 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.
- 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.
- StateMachine
-
In UML, a StateMachine is a Behavior that expresses the event-driven Behavior of a system element by traversing a graph of States through Transitions triggered by Event occurrences.
- Object Model
-
Undefined
- Glossary
-
A Glossary is a knowledge resource that manages the names, meanings, boundaries, synonyms, and identifiers of terms used in a subject domain. It provides a common foundation for participants to use the same terms with the same meanings.
- Model Context Protocol (MCP)
-
The Model Context Protocol (MCP) is an open protocol for connecting applications that use generative AI with external data sources and tools and for providing context and capabilities in a standardized form.
- Literate Model
-
Undefined
- 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.
- Identifier
-
An Identifier is a value used to refer to a subject with Identity or to a correlation subject and distinguish it from others. An Identifier may represent Identity, but it is not itself the meaning by which the subject remains the same over time.
- Knowledge Model
-
A Knowledge Model structures the concepts, semantic relationships, classifications, rules, evidence, sources, and related knowledge in a SimpleModeling Model primarily so that generative AI can retrieve, explore, relate, and interpret them.
- 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.
- Domain Model
-
Undefined
- Application Model
-
An Application Model is a purpose-specific Model describing how an application realizes Use Cases through participants, Roles, responsibilities, Collaborations, Interactions, state transitions, Events, Services, Operations, and Outcomes.
- Use Case Model
-
A Use Case Model is a purpose-specific Model that represents why users or external parties use a system and the Scenarios and expected Outcomes through which their Goals are achieved, using Actors, Goals, Use Cases, Scenarios, and Outcomes.
- Use Case
-
In UML, a Use Case is a Model Element that specifies a set of Actions performed by a subject to yield an observable result of value to an Actor or other stakeholder.
- 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.
- Executable Model
-
Undefined
- Textus
-
Textus is the runtime foundation for operating software realized through SimpleModeling. It provides execution, operational, and integration mechanisms shared by applications.
- 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.
- State
-
In UML, a State models a situation during which an invariant condition holds. The current State of an Object may determine accepted Events and Operations, applicable Constraints, and possible next Transitions.
- Event
-
In UML, an Event describes an occurrence that may arise during the execution of Behavior. Receiving an Event occurrence may trigger Behavior such as a Transition in a StateMachine.
- BoK (Body of Knowledge)
-
At SimpleModeling, the core knowledge system for contextual sharing is called the BoK (Body of Knowledge). The goal of building a BoK is to enable knowledge sharing, education, AI support, automation, and decision-making assistance.
- Cozy
-
Cozy is the SimpleModeling toolchain that analyzes Models expressed in CML and other DSLs and transforms them into realization artifacts such as programs, configuration, and documentation.
- Type
-
Undefined
- Traceability
-
Development Traceability is the property of being able to follow relationships among requirements, terms, Model Elements, design decisions, Tests, implementation, and execution results through identifiers and evidence.
- Precondition
-
A Precondition is a Constraint that the caller must satisfy before invoking an Operation under its contract.
- Transition
-
In UML, a Transition is a directed Relationship from a source Vertex to a target Vertex in a StateMachine. Triggers, Guards, Effects, and related elements specify when the Transition occurs and what it performs.
- Collaboration
-
In UML, a Collaboration is a Classifier describing a structure of participant Roles that perform specialized functions and collectively accomplish desired functionality.
- 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.
- Capability
-
A Capability describes what a Model or system makes possible for a user or problem domain. It focuses on the result or function provided rather than prescribing how it is realized.
- Component
-
A software construct that encapsulates well-defined responsibilities, contracts, and dependencies as a reusable and replaceable unit. In the logical model, it serves as an abstract structural unit; in the physical model, it corresponds to an implementation or deployment unit.
- verification
-
Verification is the activity of confirming that an implementation conforms to its specified design or requirements.
- Execution Example Model
-
Undefined
- View
-
A View is a representation that projects selected parts of a Model according to a particular Purpose and Concern so they can be understood, reasoned about, evaluated, or used. A View presents part of a Model and does not own meaning independently of the source Model.
- observation
-
A recorded result of perceiving/measuring a phenomenon.
- Quality Attribute
-
A Quality Attribute is a characteristic that expresses the degree of quality with which software satisfies requirements in addition to performing its functions. Examples include Security, Performance, Availability, Reliability, Resilience, Observability, and Maintainability.
- Performance
-
Performance is the quality by which a system satisfies timing requirements such as processing time, response time, Throughput, and capacity under specified conditions and resources.