Software & Systems Modeling

, Volume 14, Issue 1, pp 413–427 | Cite as

Lightweight string reasoning in model finding

Special Section Paper

Abstract

Models play a key role in assuring software quality in the model-driven approach. Precise models usually require the definition of well-formedness rules to specify constraints that cannot be expressed graphically. The Object Constraint Language (OCL) is a de-facto standard to define such rules. Techniques that check the satisfiability of such models and find corresponding instances of them are important in various activities, such as model-based testing and validation. Several tools for these activities have been developed, but to our knowledge, none of them supports OCL string operations on scale that is sufficient for, e.g., model-based testing. As, in contrast, many industrial models do contain such operations, there is evidently a gap. We present a lightweight solver that is specifically tailored to generate large solutions for tractable string constraints in model finding, and that is suited to directly express the main operations of the OCL datatype String. It is based on constraint logic programming (CLP) and constraint handling rules, and can be seamlessly combined with other constraint solvers in CLP. We have integrated our solver into the EMFtoCSP model finder, and we show that our implementation efficiently solves several common string constraints on large instances.

Keywords

Model instantiation OCL String constraints Constraint logic programming Constraint handling rules 

References

  1. 1.
    Ali, S., Iqbal, M.Z.Z., Arcuri, A., Briand, L.C.: A search-based OCL constraint solver for model-based test data generation. In: QSIC, pp. 41–50 (2011)Google Scholar
  2. 2.
    Anastasakis, K., Bordbar, B., Georg, G., Ray, I.: On challenges of model transformation from UML to Alloy. Softw. Syst. Model. 9(1), 69–86 (2010)CrossRefGoogle Scholar
  3. 3.
    Bjørner, N., Tillmann, N., Voronkov, A.: Path feasibility analysis for string-manipulating programs. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 307–321. Springer, Berlin (2009)Google Scholar
  4. 4.
    Büttner, F., Cabot, J.: Lightweight string reasoning for OCL. In: Vallecillo, A., Tolvanen, J.-P., Kindler, E., Störrle, H., Kolovos, D.S. (eds.) Modelling Foundations and Applications-Proceedings of the 8th European Conference, ECMFA 2012. LNCS, vol. 7349, pp. 244–258. Springer, Berlin (2012)Google Scholar
  5. 5.
    Cabot, J., Clarisó, R., Riera, D.: UMLtoCSP: a tool for the formal verification of UML/OCL models using constraint programming. In: Stirewalt, R.E.K., Egyed, A., Fischer, B. (eds.) Proceedings of the Automated Software Engineering, ASE 2007. ACM (2007)Google Scholar
  6. 6.
    Cadoli, M., Calvanese, D., De Giacomo, G., Mancini, T.: Finite satisfiability of UML class diagrams by constraint programming. In: Proceedings of the CP 2004 Workshop on CSP Techniques with Immediate Application (2004)Google Scholar
  7. 7.
    Clavel, M., Egea, M., de Dios, M.A.G.: Checking unsatisfiability for OCL constraints. Electron. Commun. EASST 24, 1–13 (2009)Google Scholar
  8. 8.
    Ehrig, K., Küster, J., Taentzer, G.: Generating instance models from meta models. Softw. Syst. Model. 8, 479–500 (2009)CrossRefGoogle Scholar
  9. 9.
    Frühwirth, T.W.: Constraint handling rules. In: Podelski, A. (ed) Constraint Programming. LNCS, vol. 910, pp. 90–107 (1994)Google Scholar
  10. 10.
    Frühwirth, T.W.: Constraint handling rules: the story so far. In: Bossi, A., Maher, M.J. (eds.) Proceedings of the 8th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP), 10–12 July 2006, Venice, Italy, pp. 13–14. ACM (2006)Google Scholar
  11. 11.
    Golden, K., Pang, W.: Constraint reasoning over strings. In: Rossi, F. (ed) Principles and Practice of Constraint Programming-CP 2003. LNCS, vol. 2833 (2003)Google Scholar
  12. 12.
    González Pérez, C.A., Buettner, F., Clarisó, R., Cabot, J.: EMFtoCSP: a tool for the lightweight verification of EMF models. In: Formal Methods in Software Engineering: Rigorous and Agile Approaches (FormSERA), Zurich, Switzerland (2012)Google Scholar
  13. 13.
    González, C.A., Büttner, F., Clarisó, R., Cabot, J.: EMFtoCSP: a tool for the lightweight verification of EMF models. In: Formal Methods in Software Engineering: Rigorous and Agile Approaches (FormSERA), Workshop at ICSE, Proceedings (2012)Google Scholar
  14. 14.
    Hooimeijer, P., Veanes, M.: An evaluation of automata algorithms for string analysis. In: Jhala, R., Schmidt, D.A. (eds) VMCAI. LNCS, vol. 6538, pp. 248–262 (2011) Google Scholar
  15. 15.
    Hooimeijer, P., Weimer, W.: StrSolve: solving string constraints lazily. Autom. Softw. Eng. 19(4), 531–559 (2012)CrossRefGoogle Scholar
  16. 16.
    Jackson, D.: Alloy: a lightweight object modelling notation. ACM Trans. Softw. Eng. Methodol. 11(2), 256–290 (2002)CrossRefGoogle Scholar
  17. 17.
    Jha, S., Seshia, S.A., Limaye, R.: On the Computational Complexity of Satisfiability Solving for String Theories. CoRR, abs/0903.2825:1–11 (2009)Google Scholar
  18. 18.
    Kiezun, A., Ganesh, V., Artzi, S., Guo, P.J., Hooimeijer, P., Ernst, M. D.: HAMPI: a solver for word equations over strings, regular expressions and context-free grammars. ACM Trans. Softw. Eng. Methodol. (TOSEM) 21(4):25 (2012)Google Scholar
  19. 19.
    Kuhlmann, M., Gogolla, M.: From UML and OCL to Relational logic and back. In: France, R.B., Kazmeier, J., Breu, R., Atkinson, C. (eds) Model Driven Engineering Languages and Systems-15th International Conference, MODELS 2012, Innsbruck, Austria, September 30-October 5, 2012. Proceedings. Lecture Notes in Computer Science, vol. 7590, pp. 415–431. Springer, Berlin (2012)Google Scholar
  20. 20.
    Kuhlmann, M., Hamann, L., Gogolla, M.: Extensive validation of OCL models by integrating SAT solving into USE. In: Bishop, J., Vallecillo, A. (eds.) TOOLS 201. LNCS, vol. 6705, pp. 290–306. Springer, Berlin (2011)Google Scholar
  21. 21.
    Malgouyres, H., Motet, G.: A UML model consistency verification approach based on meta-modeling formalization. In: Proceedings of the 2006 ACM Symposium on Applied Computing, SAC ’06, pp. 1804–1809, New York, NY, USA, ACM (2006)Google Scholar
  22. 22.
    Maraee, A., Balaban, M.: Efficient reasoning about finite satisfiability of UML class diagrams with constrained generalization sets. In: Proceedings of the 3rd European conference on Model Driven Architecture-Foundations and Applications, ECMDA-FA’07, pp. 17–31, Berlin, Heidelberg. Springer, Berlin (2007)Google Scholar
  23. 23.
    OMG. Object Constraint Language Specification, version 2.3.1 (Document formal/2012-01-01) (2012)Google Scholar
  24. 24.
    Queralt, A., Teniente, E.: Verification and validation of UML conceptual schemas with OCL constraints. ACM Trans. Softw. Eng. Methodol. 21(2), 13 (2012)CrossRefGoogle Scholar
  25. 25.
    Rossi, F., Van Beek, P., Walsh, T.: Handbook of constraint programming. Elsevier Science, Amsterdam (2006)Google Scholar
  26. 26.
    Schimpf, J., Shen, K.: ECLiPSe: from LP to CLP. Theory Pract Log Program 12, 127–156 (2012)CrossRefMATHMathSciNetGoogle Scholar
  27. 27.
    Sneyers, J., Weert, P.V., Schrijvers, T., Koninck, L.D.: As time goes by: constraint handling rules. TPLP 10(1), 1–47 (2010)MATHGoogle Scholar
  28. 28.
    Soeken, M., Wille, R., Drechsler, R.: Encoding OCL data types for SAT-based verification of UML/OCL models. In: Gogolla, M., Wolff, B. (eds.) TAP 2011. LNCS, vol. 6706, pp. 152–170. Springer, Berlin (2011)Google Scholar
  29. 29.
    Torlak, E., Jackson, D.: Kodkod: a relational model finder. In: Grumberg, O., Huth, M. (eds.) Tools and Algorithms for the Construction and Analysis of Systems, 13th International Conference, TACAS 2007, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2007 Braga, Portugal, March 24–April 1, 2007, Proceedings. Lecture Notes in Computer Science, vol. 4424, pp. 632–647. Springer, Berlin (2007)Google Scholar
  30. 30.
    Veanes, M., de Halleux, P., Tillmann, N.: Rex: Symbolic Regular Expression Explorer. In: ICST, pp. 498–507. IEEE Computer Society (2010)Google Scholar
  31. 31.
    Winkelmann, J., Taentzer, G., Ehrig, K., Küster, J.M.: Translation of restricted OCL constraints into graph constraints for generating meta model instances by graph grammars. Electr. Notes Theor. Comput. Sci. 211, 159–170 (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  1. 1.AtlanMod, École des Mines de Nantes-INRIANantesFrance

Personalised recommendations