|Department of Electrical and Computer Engineering|
The software artifacts always evolve over time and the set of active logical relationships among them is also dynamic. One software document may be logically related to another, which in turn is involved in relationships with one or more other documents. For instance, a requirement document A ``motivates'' a design document B, which ``requires'' the use of a class C, while a bug report D ``complains'' about a function E, which is later modified into new revision E' ``in response to'' the bug report D. Therefore, documents and their relationships can be seen as a network. The state of the network in which projects' software documents are in perfect semantic harmony with each other and with the semantics of their relationships is referred as conformance. The evolution of these documents may result in the breaking of the conformance state of the project and of the semantic connections among documents as well. We use the term conformance analysis to refer to the process of determining whether software documents and their logical relationships are in agreement. The network of documents and relationships is called a conformance graph.
Figure 1. Example of a conformance graph
Conformance Model and Tools
We developed a formal model, (named Conformance Model) of the conformance analysis process. The model can be used as a mathematical tool to determine the soundness of a conformance analysis strategy. Developers can model a conformance analysis strategy by defining an abstraction. To define an abstraction, they must define abstract values and constraint relations for nodes and links in a hypertext network, the abstraction relation, and the update function. The soundness theorem can be used to ensure that the conformance abstraction is sound when the abstraction is defined properly.
We have also developed a conformance analysis strategy that is based on timestamp and versioned hypermdia. The timestamp abstraction is based on hypertext versioning and timestamps on hyperlinks and anchors. The timestamp abstraction is the foundation for a semi-automatic tool to detect possible non-conformance in a software system. This timestamp strategy is implemented and used in the SC environment.
Developers can use the generalized formalism in the Conformance Model to verify the soundness of their combined strategy such as a combination between a semantics-dependent abstraction supported by an IDE for formal documents and a timestamp abstraction for all other documents. The tool analyzes the conformance graph in the order that determined by the formal model, and uses different conformance detection strategies (abstractions) to evaluate the conformance of each logical relationship and to assign a conformance ratings. Based on the ratings, developers can see the possible non-conformance in a software system.
Based on the generalized formalism in the Conformance Model, we have developed the conformance analysis algorithm that allows for the combination of multiple conformance analysis strategies.
The SC environment is modified to allow new conformance analysis strategies to be added into the environment via a simple Java plug-in mechanism. The extensibility of this conformance analysis tool and of the SC environment itself enables the use of different consistency management frameworks. In addition, it also helps developers to avoid the locality problem in maintaining conformance among documents. In current practice, when discovering non-conformance, developers often focus on fixing a small part of a project and it might lead to the breaking of other consistency constraints. For example, a bug in a source file is found and then fixed. However, the new version of the source file might violate other consistency constraints established by a design or a requirement. Multiple bugs in several places can quickly make the matter complicated. The conformance analysis algorithm ensures the consistency for conformance graphs at the end of the conformance analysis process. Therefore, it lets developers focus on fixing local inconsistency while still ensuring the overall conformance afterward.
For illustration, beside the timestamp strategy, we have developed two other strategies. The UML-validation strategy evaluates the consistency of relationships between UML class diagrams and actual program source code that realizes them. The other strategy is based on the vector-based model in information retrieval research. This strategy, which works only on textual documents, evaluates the conformance among non-program documents by their similarity measures. Figure 1 shows a snaphot of the conformance analysis tool.
Figure 1. Conformance Analysis