Semantic Modeling Framework is designed as the semantic layer above CMF to give SCM semantics to entities and relationships in containment models.
In SMF, we define semantic models that have a hierarchical structure: each semantic model consists of several SCM features and each feature is constructed with functions that can be decomposed into finer grain functions. The knowledge for feature and function composition is the derivative from the domain analysis. For example, version control feature can be divided into functions like version history, compression, delta, version identification and composition, etc. Functions are implemented using basic services provided by SCM utilities layer, e.g. CRUD operations, network services, access control, logging, testing, etc.

The implementation of the semantic model is the result of making selections in the feature and function design spaces. In SMF, we identify implementation patters of each feature and function so that SCM system developers simply make selections to instruct the code generator to create corresponding feature implementations. The following figure shows an example of 5 implementation patterns for version history using a sample version tree for foo.c.

To define semantics and operations for entities in each feature implementation pattern, we use a predefined entity type library called "SCM roles". Each role in the library will have different attributes and operations for different feature implementation patterns. For example, s_revision role defines "an entity representing a version in a containment model, the container for versioning metadata items". For "Ordered Revision" version history pattern in Figure 2, s_revision role can have attributes like s_rev_identifier, s_rev_author, s_rev_comment, etc., which are SCM roles themselves. And it can have operations like retrieving attribute values, querying predecessor and successor revisions, delta computation, etc. But for “Floating Object” version history pattern, s_revision may need a unique s_obj_identifier for global query processing and it will have more quite different query matching operations too. By using SCM roles and feature implementation patterns, we can precisely encode the knowledge captured during the SCM domain analysis process into the code generator.
SCM roles also bridge gap between the repository layer and semantic layer—we map entities in the containment model to roles in the semantic layer. The following table shows an example of mapping version control roles to entities in RCS containment model. We only present a partial list in the example because of the page limit.
| Version Control Roles |
Meaning and Usage |
RCS Entities |
| s_revision |
A version in a containment model, the container for versioning metadata items. |
revision |
| s_rev_identifier |
Unique identifier for each version. |
version identifier |
| s_rev_author |
Author for a revision. |
author |
| s_rev_comment |
User comments submitted with each revision. |
comment |