Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6308))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. Deransart, P., Hermenegildo, M.V., Maluszynski, J.: DiSCiPl 1999. LNCS, vol. 1870. Springer, Heidelberg (2000)

    Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. Gotlieb, A.: Tcas software verification using constraint programming. The Knowledge Engineering Review (2009) (accepted for publication)

    Google Scholar 

  5. Holland, A., O’Sullivan, B.: Robust solutions for combinatorial auctions. In: ACM Conference on Electronic Commerce (EC-2005), pp. 183–192 (2005)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. Langevine, L., Deransart, P., Ducassé, M., Jahier, E.: Prototyping clp(fd) tracers: a trace model and an experimental validation environment. In: WLPE (2001)

    Google Scholar 

  8. Rankin, W.T.: Optimal golomb rulers: An exhaustive parallel search implementation. Master’s thesis, Duke University, Durham (1993)

    Google Scholar 

  9. Sahinidis, N.V., Twarmalani, M.: Convexification and Global Optimization in Continuous and Mixed-Integer Nonlinear Programming. Kluwer Academic Publishers, Dordrecht (2002)

    MATH  Google Scholar 

  10. Van Hentenryck, P.: The OPL optimization programming language. MIT Press, Cambridge (1999)

    Google Scholar 

  11. Weyuker, E.J.: On testing non-testable programs. Computer Journal 25(4), 465–470 (1982)

    Google Scholar 

  12. Zhu, H., Hall, P.A.V., May, J.H.R.: Software unit test coverage and adequacy. ACM Comput. Surv. 29(4), 366–427 (1997)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics