Abstract
The success of several constraint-based modeling languages such as OPL, ZINC, or COMET, appeals for better software engineering practices, particularly in the testing phase. This paper introduces a testing framework enabling automated test case generation for constraint programming. We propose a general framework of constraint program development which supposes that a first declarative and simple constraint model is available from the problem specifications analysis. Then, this model is refined using classical techniques such as constraint reformulation, surrogate and global constraint addition, or symmetry-breaking to form an improved constraint model that must be thoroughly tested before being used to address real-sized problems. We think that most of the faults are introduced in this refinement step and propose a process which takes the first declarative model as an oracle for detecting non-conformities. We derive practical test purposes from this process to generate automatically test data that exhibit non-conformities. We implemented this approach in a new tool called CPTEST that was used to automatically detect non-conformities on two classical benchmark programs, namely the Golomb rulers and the car-sequencing problem.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Collavizza, H., Rueher, M., Van Hentenryck, P.: Cpbpv: A constraint-programming framework for bounded program verification. In: Stuckey, P.J. (ed.) CP 2008. LNCS, vol. 5202, pp. 327–341. Springer, Heidelberg (2008)
Deransart, P., Hermenegildo, M.V., Maluszynski, J.: DiSCiPl 1999. LNCS, vol. 1870. Springer, Heidelberg (2000)
Flener, P., Pearson, J., Agren, M., Garcia-Avello, C., Celiktin, M., Dissing, S.: Air-traffic complexity resolution in multi-sector planning. Journal of Air Transport Management 13(6), 323–328 (2007)
Gotlieb, A.: Tcas software verification using constraint programming. The Knowledge Engineering Review (2009) (accepted for publication)
Holland, A., O’Sullivan, B.: Robust solutions for combinatorial auctions. In: ACM Conference on Electronic Commerce (EC-2005), pp. 183–192 (2005)
Junker, U., Vidal, D.: Air traffic flow management with ilog cp optimizer. In: International Workshop on Constraint Programming for Air Traffic Control and Management, 7th EuroControl Innovative Research Workshop and Exhibition, INO 2008 (2008)
Langevine, L., Deransart, P., Ducassé, M., Jahier, E.: Prototyping clp(fd) tracers: a trace model and an experimental validation environment. In: WLPE (2001)
Rankin, W.T.: Optimal golomb rulers: An exhaustive parallel search implementation. Master’s thesis, Duke University, Durham (1993)
Sahinidis, N.V., Twarmalani, M.: Convexification and Global Optimization in Continuous and Mixed-Integer Nonlinear Programming. Kluwer Academic Publishers, Dordrecht (2002)
Van Hentenryck, P.: The OPL optimization programming language. MIT Press, Cambridge (1999)
Weyuker, E.J.: On testing non-testable programs. Computer Journal 25(4), 465–470 (1982)
Zhu, H., Hall, P.A.V., May, J.H.R.: Software unit test coverage and adequacy. ACM Comput. Surv. 29(4), 366–427 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lazaar, N., Gotlieb, A., Lebbah, Y. (2010). On Testing Constraint Programs. In: Cohen, D. (eds) Principles and Practice of Constraint Programming – CP 2010. CP 2010. Lecture Notes in Computer Science, vol 6308. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15396-9_28
Download citation
DOI: https://doi.org/10.1007/978-3-642-15396-9_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-15395-2
Online ISBN: 978-3-642-15396-9
eBook Packages: Computer ScienceComputer Science (R0)