Generating Metamodel Instances Satisfying Coverage Criteria via SMT Solving

Hao Wu

2016

Abstract

One of the challenges for using metamodels in Model Driven Engineering is to automatically generate metamodel instances. Each instance should satisfy many constraints defined by a metamodel. Such instances can then be used for verifying or validating metamodels. Recent studies have already shown that this can be tackled by using SAT/SMT solvers. However, such instance generation does not take coverage criteria into account, and instances satisfying specified coverage criteria could be useful for testing model transformation. In this paper, we present an approach consisting of two techniques for coverage oriented metamodel instance generation. The first technique realises the standard coverage criteria defined for UML class diagrams, while the second technique focuses on generating instances satisfying graph-based criteria. With our approach, both kinds of criteria are translated to SMT formulas which are then investigated by an SMT solver. Each successful assignment is then interpreted as a metamodel instance that provably satisfies a coverage criteria or a graph property. We have already integrated this approach into our existing tool to demonstrate the feasibility.

References

  1. Anastasakis, K., Bordbar, B., Georg, G., and Ray, I. (2007). UML2Alloy: A challenging model transformation. In ACM/IEEE 10th International Conference on Model Driven Engineering Languages and Systems, pages 436-450, Nashville, TN. Springer.
  2. Andrews, A., France, R., Ghosh, S., and Craig, G. (2003). Test adequacy criteria for UML design models. Software Testing, Verification and Reliability , 13(2):95- 127.
  3. Barrett, C., Conway, C. L., Deters, M., Hadarean, L., Jovanovic, D., King, T., Reynolds, A., and Tinelli, C. (2011). CVC4. In The 23rd International Conference on Computer Aided Verification , pages 171-177. Springer.
  4. Barrett, C., Stump, A., and Tinelli, C. (2010). The SMT-LIB Standard: Version 2.0. In 8th International Workshop on Satisfiability Modulo Theories , Edinburgh, UK. Elsevier Science.
  5. Binder, R. (1999). Testing Object Oriented Systems: Models, Patterns and Tools. Addison-Wesley.
  6. Bordbar, B. and Anastasakis, K. (2005). UML2Alloy: A tool for lightweight modelling of discrete event systems. In International Conference on Applied Computing, pages 209-216, Algarve, Portugal. IADIS.
  7. Büttner, F., Egea, M., and Cabot, J. (2012). On verifying ATL transformations using 'off-the-shelf' SMT solvers. In 15th International Conference on Model Driven Engineering Languages and Systems, pages 432-448.
  8. Cabot, J., Clarisó, R., and Riera, D. (2008). Verification of UML/OCL class diagrams using constraint programming. In IEEE International Conference on Software Testing Verification and Validation Workshop , pages 73-80, Berlin, Germany. IEEE Computer Society.
  9. Cabot, J., Clarisó, R., and Riera, D. (2014). On the verification of UML/OCL class diagrams using constraint programming. Journal of Systems and Software, 93:1- 23.
  10. Chidamber, S. and Kemerer, C. (1994). A metrics suite for object oriented design. IEEE Transactions Software Engineering, 20(6):476-493.
  11. Cimatti, A., Griggio, A., Schaafsma, B. J., and Sebastiani, R. (2013). The mathSAT5 SMT solver. In The 19th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 93- 107, Rome, Italy.
  12. De Moura, L. and Bjørner, N. (2008). Z3: an efficient SMT solver. In 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337-340, Budapest, Hungary. Springer.
  13. Ehrig, K., Küster, J. M., and Taentzer, G. (2009). Generating instance models from meta models. Software and Systems Modeling, 8(4):479-500.
  14. Felbinger, H. and Schwarzl, C. (2014). Suitability analysis of CSP- and SMT-solvers for test case generation. In The 6th International Workshop on Constraints in Software Testing, Verification, and Analysis, pages 40-49. ACM.
  15. Ghosh, S., France, R., Braganza, C., and Kawane, N. (2003). Test adequacy assessment for UML design model testing. In 14th International Symposium on Software Reliability Engineering, pages 332-343.
  16. González Pérez, C. A., Buettner, F., Clarisó, R., and Cabot, J. (2012). EMFtoCSP: A tool for the lightweight verification of EMF models. InFormal Methods in Software Engineering: Rigorous and Agile Approaches, Zurich, Suisse.
  17. Gulwani, S. (2010). Dimensions in program synthesis. In The 12th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming. ACM.
  18. Gutjahr, W. J. (1999). Partition testing vs. random testing: The influence of uncertainty. IEEE Transactions on Software Engineering, 25(5):661-674.
  19. Harm, J. and Lämmel, R. (2000). Testing attribute grammars. In 3rd Workshop on Attribute Grammars and their Applications, pages 79-99, Ponte de Lima, Portugal.
  20. Hoffmann, B. and Minas, M. (2011). Generating instance graphs from class diagrams with adaptive star grammars. In 3rd International Workshop on Graph Computation Models.
  21. Jackson, D. (2002). Alloy: a lightweight object modelling notation. ACM Transactions on Software Engineering Methodologies, 11(2):256-290.
  22. Kuhlmann, M. and Gogolla, M. (2012). Strengthening SATbased validation of UML/OCL models by representing collections as relations. In Modelling Foundations and Applications, volume 7349 of Lecture Notes in Computer Science, pages 32-48. Springer.
  23. Kuhlmann, M., Hamann, L., and Gogolla, M. (2011). Extensive validation of OCL models by integrating SAT solving into USE. In 49th International Conference on Objects, Models, Components, Patterns, pages 290- 306, Zurich, Switzerland. Springer.
  24. Macedo, N. and Cunha, A. (2013). Implementing QVT-R bidirectional model transformations using Alloy. In The 16th International Conference on Fundamental Approaches to Software Engineering, pages 297-311. Springer, Rome, Italy.
  25. McQuillan, J. A. and Power, J. F. (2008). A metamodel for the measurement of object-oriented systems: An analysis using Alloy. In 1st International Conference on Software Testing Verification and Validation , pages 288-297, Lillehammer, Norway. IEEE Computer Society.
  26. Myers, G. J. and Sandler, C. (2004). The Art of Software Testing. John Wiley & Sons.
  27. Ostrand, T. J. and Balcer, M. J. (1988). The categorypartition method for specifying and generating fuctional tests. Communications of the ACM, 31(6):676- 686.
  28. Purdom, P. (1972). A sentence generator for testing parsers. BIT Numerical Mathematics, 12(3):366-375.
  29. Sen, S., Baudry, B., and Mottu, J.-M. (2009). Automatic model generation strategies for model transformation testing. In 2nd International Conference on Theory and Practice of Model Transformations, pages 148- 164. Springer.
  30. Soeken, M., Wille, R., and Drechsler, R. (2011). Encoding OCL data types for SAT-based verification of UML/OCL models. In 5th International Conference on Tests and Proofs, pages 152-170, Zurich, Switzerland. Springer.
  31. Soeken, M., Wille, R., Kuhlmann, M., Gogolla, M., and Drechsler, R. (2010). Verifying UML/OCL models using boolean satisfiability. In Design, Automation Test in Europe Conference Exhibition, pages 1341- 1344, Dresden, Germany.
  32. Tillmann, N. and De Halleux, J. (2008). Pex: White box test generation for .NET. In The 2nd International Conference on Tests and Proofs, pages 134-153.
  33. Torlak, E. and Jackson, D. (2007). Kodkod: a relational model finder. In 13th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 632-647, Braga, Portugal. Springer.
  34. Wu, H., Monahan, R., and Power, J. F. (2013). Exploiting attributed type graphs to generate metamodel instances using an SMT solver. In 7th International Symposium on Theoretical Aspects of Software Engineering, Birmingham, UK.
Download


Paper Citation


in Harvard Style

Wu H. (2016). Generating Metamodel Instances Satisfying Coverage Criteria via SMT Solving . In Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD, ISBN 978-989-758-168-7, pages 40-51. DOI: 10.5220/0005650000400051


in Bibtex Style

@conference{modelsward16,
author={Hao Wu},
title={Generating Metamodel Instances Satisfying Coverage Criteria via SMT Solving},
booktitle={Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD,},
year={2016},
pages={40-51},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0005650000400051},
isbn={978-989-758-168-7},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD,
TI - Generating Metamodel Instances Satisfying Coverage Criteria via SMT Solving
SN - 978-989-758-168-7
AU - Wu H.
PY - 2016
SP - 40
EP - 51
DO - 10.5220/0005650000400051