Skip to main content
Log in

Scalable satisfiability checking and test data generation from modeling diagrams

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

We explore the automatic generation of test data that respect constraints expressed in the Object-Role Modeling (ORM) language. ORM is a popular conceptual modeling language, primarily targeting database applications, with significant uses in practice. The general problem of even checking whether an ORM diagram is satisfiable is quite hard: restricted forms are easily NP-hard and the problem is undecidable for some expressive formulations of ORM. Brute-force mapping to input for constraint and SAT solvers does not scale: state-of-the-art solvers fail to find data to satisfy uniqueness and mandatory constraints in realistic time even for small examples. We instead define a restricted subset of ORM that allows efficient reasoning yet contains most constraints overwhelmingly used in practice. We show that the problem of deciding whether these constraints are consistent (i.e., whether we can generate appropriate test data) is solvable in polynomial time, and we produce a highly efficient (interactive speed) checker. Additionally, we analyze over 160 ORM diagrams that capture data models from industrial practice and demonstrate that our subset of ORM is expressive enough to handle their vast majority.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Aloul, F.A., Ramani, A., Markov, I.L., Sakallah, K.A.: PBS: A backtrack search pseudo-boolean solver and optimizer. In: Proc. 5th International Symposium on the Theory and Applications of Satisfiability Testing (SAT), pp. 346–353 (May 2002)

  • Berardi, D., Calvanese, D., Giacomo, G.D.: Reasoning on UML class diagrams. Artif. Intell. 168, 70–118 (2005)

    Article  MATH  Google Scholar 

  • Calvanese, D., Lenzerini, M.: On the interaction between isa and cardinality constraints. In: Proc. 10th International Conference on Data Engineering (ICDE), pp. 204–213. IEEE, New York (1994)

    Google Scholar 

  • Deng, Y., Frankl, P.G., Chays, D.: Testing database transactions with AGENDA. In: Proc. 27th International Conference on Software Engineering (ICSE), pp. 78–87. ACM, New Yrok (2005)

    Chapter  Google Scholar 

  • Egyed, A.: Instant consistency checking for the UML. In: Proc. 28th International Conference on Software Engineering (ICSE), pp. 381–390. ACM, New York (2006)

    Google Scholar 

  • Egyed, A.: Fixing inconsistencies in UML design models. In: Proc. 29th International Conference on Software Engineering (ICSE), pp. 292–301. IEEE, New York (2007)

    Chapter  Google Scholar 

  • Fan, W., Libkin, L.: On xml integrity constraints in the presence of dtds. J. ACM 49(3), 368–406 (2002)

    MathSciNet  Google Scholar 

  • Grant, J., Minker, J.: Inferences for numerical dependencies. Theor. Comput. Sci. 41(2–3), 271–287 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  • Halpin, T.A.: A fact-oriented approach to schema transformation. In: Proc. 3rd Symposium on Mathematical Fundamentals of Database and Knowledge Base Systems (MFDBS), pp. 342–356. Springer, New York (1991)

    Google Scholar 

  • Halpin, T.A.: Object-role modeling (ORM/NIAM). In: Handbook on Architectures of Information Systems. Springer, New York (1998)

    Google Scholar 

  • Halpin, T.A.: Information Modeling and Relational Databases. Morgan Kaufmann, Los Altos (2001)

    Google Scholar 

  • Halpin, T.A., Proper, H.A.: Database schema transformation and optimization. In: Proc. 14th International Conference on Object-Oriented and Entity-Relationship Modelling (OOER), pp. 191–203. Springer, New York (1995)

    Chapter  Google Scholar 

  • Heynmans, S.: Decidable open answer set programming. PhD thesis, Vrije Universiteit Brussel, Department of Computer Science (Feb. 2006)

  • Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, Cambridge (2006)

    Google Scholar 

  • Jarrar, M., Heymans, S.: Unsatisfiability reasoning in ORM conceptual schemes. In: Proc. International Conference on Semantics of a Networked World (ICSNW). Springer, New York (2005)

    Google Scholar 

  • Kaneiwa, K., Satoh, K.: Consistency checking algorithms for restricted UML class diagrams. In: Proc. 4th International Symposium on the Foundations of Information and Knowledge Systems (FoIKS), pp. 219–239 (Feb. 2006)

  • Keet, C.M.: Prospects for and issues with mapping the object-role modeling language into DLRifd. In: Proc. 20th International Workshop on Description Logics, June 2007

  • Khurshid, S., Jackson, D.: Exploring the design of an intentional naming scheme with an automatic constraint analyzer. In: Proc. 15th IEEE International Conference on Automated Software Engineering (ASE), pp. 13–22. IEEE, New York (2000)

    Google Scholar 

  • Lenzerini, M., Nobili, P.: On the satisfiability of dependency constraints in entity-relationship schemata. In: Proc. 13th International Conference on Very Large Data Bases (VLDB), pp. 147–154 (Sept. 1987)

  • Manolios, P., Subramanian, G., Vroon, D.: Automating component-based system assembly. In: Proc. ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). ACM, New York (2007)

    Google Scholar 

  • Maraee, A., Balaban, M.: Efficient reasoning about finite satisfiability of uml class diagrams with constrained generalization sets. In: Proc. 3rd European Conference on Model-Driven Architecture, 2007

  • Nentwich, C., Emmerich, W., Finkelstein, A.: Consistency management with repair actions. In: Proc. 25th International Conference on Software Engineering (ICSE), pp. 455–464. IEEE, New York (2003)

    Chapter  Google Scholar 

  • Neufeld, A., Moerkotte, G., Lockemann, P.C.: Generating consistent test data: Restricting the search space by a generator formula. VLDB J. 2, 173–213 (1993)

    Article  Google Scholar 

  • Nijssen, G.M., Halpin, T.A.: Conceptual Schema and Relational Database Design: A Fact Oriented Approach. Prentice-Hall, Englewood Cliffs (1989)

    Google Scholar 

  • Shlyakhter, I., Seater, R., Jackson, D., Sridharan, M., Taghdiri, M.: Debugging overconstrained declarative models using unsatisfiable cores. In: Proc. 18th IEEE International Conference on Automated Software Engineering (ASE), pp. 94–105. IEEE, New York (2003)

    Chapter  Google Scholar 

  • Smaragdakis, Y., Csallner, C., Subramanian, R.: Scalable automatic test data generation from modeling diagrams. In: Proc. 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 4–13. ACM, New York (2007)

    Google Scholar 

  • Taghdiri, M.: Inferring specifications to detect errors in code. In: Proc. 19th IEEE International Conference on Automated Software Engineering (ASE), pp. 144–153. IEEE, New York (2004)

    Google Scholar 

  • van Bommel, P., ter Hofstede, A., van der Weide, T.: Semantics and verification of object-role models. Inf. Syst. 16(5), 471–495 (1991)

    Article  Google Scholar 

  • Warren, I., Sun, J., Krishnamohan, S., Weerasinghe, T.: An automated formal approach to managing dynamic reconfiguration. In: Proc. 21st IEEE International Conference on Automated Software Engineering (ASE), pp. 37–46. IEEE, New York (2006)

    Chapter  Google Scholar 

  • Willmor, D., Embury, S.M.: An intensional approach to the specification of test cases for database applications. In: Proc. 28th International Conference on Software Engineering (ICSE), pp. 102–111. ACM, New York (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yannis Smaragdakis.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Smaragdakis, Y., Csallner, C. & Subramanian, R. Scalable satisfiability checking and test data generation from modeling diagrams. Autom Softw Eng 16, 73 (2009). https://doi.org/10.1007/s10515-008-0044-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-008-0044-6

Keywords

Navigation