Scalable satisfiability checking and test data generation from modeling diagrams

  • Yannis Smaragdakis
  • Christoph Csallner
  • Ranjith Subramanian
Article

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.

Keywords

ORM Modeling Testing Databases NP-hardness ORM- Test data generation 

References

  1. 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) Google Scholar
  2. Berardi, D., Calvanese, D., Giacomo, G.D.: Reasoning on UML class diagrams. Artif. Intell. 168, 70–118 (2005) MATHCrossRefGoogle Scholar
  3. 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
  4. 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) CrossRefGoogle Scholar
  5. 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
  6. Egyed, A.: Fixing inconsistencies in UML design models. In: Proc. 29th International Conference on Software Engineering (ICSE), pp. 292–301. IEEE, New York (2007) CrossRefGoogle Scholar
  7. Fan, W., Libkin, L.: On xml integrity constraints in the presence of dtds. J. ACM 49(3), 368–406 (2002) MathSciNetGoogle Scholar
  8. Grant, J., Minker, J.: Inferences for numerical dependencies. Theor. Comput. Sci. 41(2–3), 271–287 (1985) MATHCrossRefMathSciNetGoogle Scholar
  9. 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
  10. Halpin, T.A.: Object-role modeling (ORM/NIAM). In: Handbook on Architectures of Information Systems. Springer, New York (1998) Google Scholar
  11. Halpin, T.A.: Information Modeling and Relational Databases. Morgan Kaufmann, Los Altos (2001) Google Scholar
  12. 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) CrossRefGoogle Scholar
  13. Heynmans, S.: Decidable open answer set programming. PhD thesis, Vrije Universiteit Brussel, Department of Computer Science (Feb. 2006) Google Scholar
  14. Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, Cambridge (2006) Google Scholar
  15. 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
  16. 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) Google Scholar
  17. 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 Google Scholar
  18. 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
  19. 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) Google Scholar
  20. 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
  21. 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 Google Scholar
  22. 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) CrossRefGoogle Scholar
  23. 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) CrossRefGoogle Scholar
  24. Nijssen, G.M., Halpin, T.A.: Conceptual Schema and Relational Database Design: A Fact Oriented Approach. Prentice-Hall, Englewood Cliffs (1989) Google Scholar
  25. 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) CrossRefGoogle Scholar
  26. 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
  27. 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
  28. van Bommel, P., ter Hofstede, A., van der Weide, T.: Semantics and verification of object-role models. Inf. Syst. 16(5), 471–495 (1991) CrossRefGoogle Scholar
  29. 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) CrossRefGoogle Scholar
  30. 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

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  • Yannis Smaragdakis
    • 1
  • Christoph Csallner
    • 2
  • Ranjith Subramanian
    • 3
  1. 1.Computer ScienceUniversity of MassachusettsAmherstUSA
  2. 2.Computer Science and EngineeringUniversity of Texas at ArlingtonArlingtonUSA
  3. 3.TheFind.comMountain ViewUSA

Personalised recommendations