Semantic difference analysis for model compositions of class diagrams, OCL constraints, and object diagrams
摘要
Models are the primary source-artifacts in model-driven development and are thus subject to changes and evolution throughout the development process. To better understand these model-changes, semantic differencing operators can be employed. In this paper, we present an approach for automatically detecting the semantic differences of class diagrams (CDs) that have been extended with object constraint language (OCL) constraints. Previous works regarding OCL models focused mostly on validation and satisfiability of OCL invariants and conditions, not analyzing semantic differences between subsequent versions of CDs and OCL models. While implementations of semantic differencing operators for CDs already exist, they have yet to integrate OCL models in their analysis. Using a translation of CDs and OCL constraints to SMT, we developed a tool for detecting semantic differences between two compositions of CD and OCL models. The differences are reported in the form of object diagrams (ODs) that describe valid instances of one model but not the other, and the refinement of invariants is traced across models. In addition to invariants, we also consider semantic differencing of operation constraints in OCL, as well as the supplementary translation of ODs to SMT for further restricting or completing instances. The implementation of this tool is publicly available.