Abstract
Operation contracts consisting of pre- and postconditions are a well-known means of specifying operations. In this paper we deal with the problem of operation contract simulation, i.e., determining operation results satisfying the postconditions based on input data supplied by the user; simulating operation contracts is an important technique for requirements validation and prototyping. Current approaches to operation contract simulation exhibit poor performance for large sets of input data or require additional guidance from the user. We show how these problems can be alleviated and describe an efficient as well as fully automatic approach. It is implemented in our tool OCLexec that generates from UML/OCL operation contracts corresponding Java implementations which call a constraint solver at runtime. The generated code can serve as a prototype. A case study demonstrates that our approach can handle problem instances of considerable size.
- }}K. Anastasakis, B. Bordbar, G. Georg, and I. Ray. UML2Alloy: A challenging model transformation. In G. Engels, B. Opdyke, D. C. Schmidt, and F. Weil, editors. Proc. 10th Int. Conf. Model Driven Engineering Language and Systems (MoDELS'07), volume 4735 of Lect. Notes Comp. Sci., pages 436--450. Springer, 2007. Google Scholar
Digital Library
- }}J. Blanchette and T. Nipkow. Nitpick: A counterexample generator for higher-order logic based on relational model finder. In M. Kaufmann and L. Paulson, editors, Interactive Theories Proving, volume 6172 of Lect. Notes Comp. Sci., pages 131--146. Springer, 2010. Google Scholar
Digital Library
- }}F. Bouquet, B. Legeard, and F. Peureux. CLPS-B -- a constraint solver to animate a B specification. Int. J. Softw. Tools Tech. Trans., 60 (2): 143--157, 2004. Google Scholar
Digital Library
- }}F. Bouquet, F. Dadeau, B. Legeard, and M. Utting. Symbolic animation of JML specifications. In Proc. 13th Int. Conf. Formal Methods 2000 (FM'05), volume 3582 of Lect. Notes Comp. Sci., pages 75--90. Springer, 2005. Google Scholar
Digital Library
- }}A. D. Brucker and B. Wolff. Semantics, calculi, and analysis for object-oriented specifications. Acta Inf., 460 (4):0 255--284, 2009. Google Scholar
Digital Library
- }}A. D. Brucker, J. Doser, and B. Wolff. An MDA framework supporting OCL. ECEASST, 5, 2006.Google Scholar
- }}R. E. Bryant, D. Kroening, J. Ouaknine, S. A. Seshia, O. Strichman, and B. A. Brady. An abstraction-based decision procedure for bit-vector arithmetic. STTT, 110 (2):0 95--104, 2009. Google Scholar
Digital Library
- }}L. Burdy, Y. Cheon, D. R. Cok, M. D. Ernst, J. R. Kiniry, G. T. Leavens, K. R. M. Leino, and E. Poll. An overview of JML tools and applications. STTT, 70 (3):0 212--232, 2005. Google Scholar
Digital Library
- }}J. Cabot, R. Clariso, and D. Riera. Verifying UML/OCL operation contracts. In M. Leuschel and H. Wehrheim, editors, IFM, volume 5423 of Lect. Notes Comp. Sci., pages 40--55. Springer, 2009. Google Scholar
Digital Library
- }}M. Cadoli and A. Schaerf. Compiling problem specifications into SAT. Artif. Intell., 1620 (1--2):0 89--120, 2005. Google Scholar
Digital Library
- }}N. Catano and T. Wahls. Executing JML specifications of Java card applications: a case study. In S. Y. Shin and S. Ossowski, editors, SAC, pages 404--408. ACM, 2009. Google Scholar
Digital Library
- }}K. Claessen and N. Sörensson. New techniques that improve MACE-style finite model finding. In Proc. Wsh. Model Computation -- Principles, Algorithms. Applications, Miami, Florida, 2003.Google Scholar
- }}L. M. de Moura and N. Bjorner. Z3: An efficient SMT solver. In C. R. Ramakrishnan and J. Rehof, editors, TACAS, volume 4963 of Lect. Notes Comp. Sci., pages 337--340. Springer, 2008. Google Scholar
Digital Library
- }}A. Dick, P. Krause, and J. Cozens. Computer aided transformation of Z into Prolog. In J. Nicholls, editor, Proc. 4th Z User. Workshop, Workshops in Computing, pages 71--85, Oxford, 1989. Springer.Google Scholar
- }}V. Doma and R. A. Nicholl. EZ: A system for automatic prototyping of Z specifications. In S. Prehn and W. J. Toetenel, editors, Proc. 4th Int. Symp. VDM Europe (VDM'91), volume 551 of Lect. Notes Comp. Sci. pages 189--203, 1991. Google Scholar
Digital Library
- }}N. Eén and N. Sörensson. An extensible SAT-solver. In E. Giunchiglia and A. Tacchella, editors, Sel. Rev. Paper. 6th Int. Conf. Theory and Applications of Satisfiability Testing (SAT'03), volume 2919 of Lect. Notes Comp. Sci., pages 502--518. Springer, 2004.Google Scholar
- }}D. Gale and L. S. Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 690 (1): 9--15, 1962.Google Scholar
Cross Ref
- }}M. Gogolla, F. Büttner, and M. Richters. USE: A UML-based specification environment for validating UML and OCL. Sci. Comp. Prog., 690 (1--3):0 27--34, 2007. Google Scholar
Digital Library
- }}G. Gottlob, C. Koch, and R. Pichler. Efficient algorithms for processing XPath queries. In VLDB, pages 95--106. Morgan Kaufmann, 2002. Google Scholar
Digital Library
- }}J. Gray and S. Schach. Constraint animation using an object-oriented declarative language. In A. J. Turner, editor, Proc. 38th ACM Southeast Reg. Conf., pages 1--10. ACM, 2000. Google Scholar
Digital Library
- }}W. Grieskamp. A computation model for Z based on concurrent constraint resolution. In J. P. Bowen, S. Dunne, A. Galloway, and S. King, editors. Proc. 1st Int. Conf. B and Z Users (ZB'00), volume 1878 on Lect. Notes Comp. Sci., pages 414--432. Springer, 2000. Google Scholar
Digital Library
- }}D. Jackson. Software Abstractions: Logic, Language, and Analysis. The MIT Press, 2006. Google Scholar
Digital Library
- }}S. Khurshid, D. Marinov, and D. Jackson. An analyzable annotation language. In OOPSLA, pages 231--245, 2002. Google Scholar
Digital Library
- }}P. Kosiuczenko. Specification of invariability in OCL. In O. Nierstrasz, J. Whittle, D. Harel, and G. Reggio, editors. MoDELS, volume 4199 of Lect. Notes Comp. Sci., pages 676--691. Springer, 2006. Google Scholar
Digital Library
- }}B. Krause and T. Wahls. jmle: A tool for executing JML specifications via constraint programming. In L. Brim, B. R. Haverkort, M. Leucker, and J. van de Pol, editors. Rev. Sel. Papers 5th Int. Wsh. Parallel and Distribute. Methods for Verification (PDMC'06), volume 4346 of Lect. Notes Comp. Sci., pages 293--296. Springer, 2006. Google Scholar
Digital Library
- }}M. P. Krieger and A. Knapp. Executing underspecified OCL operation contracts with a SAT solver. ECEASST, 15, 2008. Proceedings of the 8th International Workshop on OCL Concepts and Tools.Google Scholar
- }}M. Leuschel and M. Butler. ProB: An automated analysis toolset for the B method. Int. J. Softw. Tools Tech. Trans., 100 (2): 185--203, 2008. Google Scholar
Digital Library
- }}W. McCune. MACE 2.0 reference manual and guide. Comp. Res. Rep., 6, 2001. http://arxiv.org/abs/cs.LO/0106042.Google Scholar
- }}I. Niemelä. Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell., 250 (3--4): 241--273, 1999. Google Scholar
Digital Library
- }}Object Management Group. Object constraint language specification, version 2.2. Specification, OMG, 2010. http://www.omg.org/spec/OCL/2.2.Google Scholar
- }}I. Oliver and S. Kent. Validation of object oriented models using animation. In Proc. 25th Conf. EUROMICRO, pages 2237--2242. IEEE Computer Society, 1999.Google Scholar
Cross Ref
- }}T. Servat. BRAMA: A new graphic animation tool for B models. In J. Julliand and O. Kouchnarenko, editors, Proc. 7th Int. Conf. B Users (B'07), volume 4355 of Lect. Note. Comp. Sci., pages 274--276. Springer, 2007. Google Scholar
Digital Library
- }}I. Shlyakhter, M. Sridharan, R. Seater, and D. Jackson. Exploiting subformula sharing in automatic analysis of quantified formulas. In E. Giunchiglia and A. Tacchella, editors, Sel. Rev. Paper. 6th Int. Conf. Theory and Applications of Satisfiability Testing (SAT'03), volume 2919 of Lect. Notes Comp. Sci. Springer, May 2004.Google Scholar
- }}N. Tamura, A. Taga, S. Kitagawa, and M. Banbara. Compiling finite linear CSP into SAT. Constraints, 140 (2):0 254--272, 2009. Google Scholar
Digital Library
- }}E. Torlak and D. Jackson. Kodkod: A relational model finder. In O. Grumberg and M. Huth, editors, Proc. 13th Int. Conf. Tools and Algorithms for the Construction and Analysis of System. (TACAS'07), volume 4424 of Lect. Notes Comp. Sci., pages 632--647. Springer, 2007. Google Scholar
Digital Library
- }}M. Utting. Data structures for Z testing tools. In G. Schellhorn and W. Reif, editors, Proc. 4th Wsh. Tools for System Design and Verification (FM-TOOLS'00). Technical Report 2000-07, Universitat Ulm, 2000.Google Scholar
- }}M. Veanes, P. Grigorenko, P. de Halleux, and N. Tillmann. Symbolic query exploration. In K. Breitman and A. Cavalcanti, editors, ICFEM, volume 588 of Lect. Notes Comp. Sci., pages 49--68. Springer, 2009. Google Scholar
Digital Library
Index Terms
Automatic and efficient simulation of operation contracts
Recommendations
Automatic and efficient simulation of operation contracts
GPCE '10: Proceedings of the ninth international conference on Generative programming and component engineeringOperation contracts consisting of pre- and postconditions are a well-known means of specifying operations. In this paper we deal with the problem of operation contract simulation, i.e., determining operation results satisfying the postconditions based ...
USE: A UML-based specification environment for validating UML and OCL
The Unified Modeling Language (UML) is accepted today as an important standard for developing software. UML tools however provide little support for validating and checking models in early development phases. There is also no substantial support for the ...
Contracts for model execution verification
ECMFA'11: Proceedings of the 7th European conference on Modelling foundations and applicationsOne of the main goals of model-driven engineering is the manipulation of models as exclusive software artifacts. Model execution is in particular a means to substitute models for code. We focus in this paper on verifying model executions. We use a ...







Comments