Skip to main content

Towards B as a High-Level Constraint Modelling Language

Solving the Jobs Puzzle Challenge

  • Conference paper
Abstract State Machines, Alloy, B, TLA, VDM, and Z (ABZ 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8477))

Abstract

We argue that B is a good language to conveniently express a wide range of constraint satisfaction problems. We also show that some problems can be solved quite effectively by the ProB tool. We illustrate our claim on several examples, such as the jobs puzzle - for which we solve the challenge set out by Shapiro. Here we show that the B formalization is both very close to the natural language specification and can still be solved efficiently by ProB. Our approach is particularly interesting when a high assurance of correctness is required. Indeed, compared to other existing approaches and tools, validation and double checking of solutions is available for ProB and formal proof can be applied to establish important properties or provide an unambiguous semantics to the problem specification.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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. Abrial, J.-R.: The B-Book. Cambridge University Press (1996)

    Google Scholar 

  2. Badeau, F., Doche-Petit, M.: Formal data validation with Event-B. CoRR abs/1210.7039, 2012 (2012) Proceedings of DS-Event-B 2012, Kyoto

    Google Scholar 

  3. Boite, O.: Méthode B et validation des invariants ferroviaires. Master’s thesis, Université Denis Diderot, Mémoire de DEA de logique et fondements de l’informatique (2000)

    Google Scholar 

  4. Carlsson, M., Ottosson, G.: An Open-Ended Finite Domain Constraint Solver. In: Glaser, H., Hartel, P., Kuchen, H. (eds.) PLILP 1997. LNCS, vol. 1292, pp. 191–206. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  5. ClearSy. Data Validation & Reverse Engineering, http://www.data-validation.fr/data-validation-reverse-engineering/ (June 2013)

  6. Déharbe, D., Fontaine, P., Guyot, Y., Voisin, L.: SMT solvers for Rodin. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 194–207. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  7. Gent, I.P., Petrie, K.E., Puget, J.-F.: Symmetry in constraint programming. Foundations of Artificial Intelligence 2, 329–376 (2006)

    Article  Google Scholar 

  8. Hansen, D., Leuschel, M.: Translating TLA +  to B for validation with ProB. In: Derrick, J., Gnesi, S., Latella, D., Treharne, H. (eds.) IFM 2012. LNCS, vol. 7321, pp. 24–38. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  9. Jackson, D.: Alloy: A lightweight object modelling notation. ACM Transactions on Software Engineering and Methodology 11, 256–290 (2002)

    Article  Google Scholar 

  10. Jackson, E.K., Levendovszky, T., Balasubramanian, D.: Reasoning about metamodeling with formal specifications and automatic proofs. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 653–667. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  11. Lecomte, T., Burdy, L., Leuschel, M.: Formally checking large data sets in the railways. CoRR, abs/1210.6815 (2012) Proceedings of DS-Event-B 2012, Kyoto

    Google Scholar 

  12. Leuschel, M., Falampin, J., Fritz, F., Plagge, D.: Automated property verification for large scale B models with ProB. Formal Asp. Comput. 23(6), 683–709 (2011)

    Article  MathSciNet  Google Scholar 

  13. Leuschel, M., Samia, M., Bendisposto, J., Luo, L.: Easy Graphical Animation and Formula Viewing for Teaching B. In: The B Method: from Research to Teaching, pp. 17–32 (2008)

    Google Scholar 

  14. Marriott, K., Nethercote, N., Rafeh, R., Stuckey, P.J., de la Banda, M.G., Wallace, M.: The design of the Zinc modelling language. Constraints 13(3), 229–267 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  15. Mccune, W.: Otter 3.3 reference manual (2003)

    Google Scholar 

  16. Niemelä, I., Simons, P., Syrjänen, T.: Smodels: A system for answer set programming. CoRR, cs.AI/0003033 (2000)

    Google Scholar 

  17. Plagge, D., Leuschel, M.: Validating Z Specifications Using the ProB Animator and Model Checker. In: Davies, J., Gibbons, J. (eds.) IFM 2007. LNCS, vol. 4591, pp. 480–500. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  18. Plagge, D., Leuschel, M.: Validating B,Z and TLA +  using ProB and Kodkod. In: Giannakopoulou, D., Méry, D. (eds.) FM 2012. LNCS, vol. 7436, pp. 372–386. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  19. Schwitter, R.: The jobs puzzle: Taking on the challenge via controlled natural language processing. Theory and Practice of Logic Programming 13, 487–501 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  20. Servat, T.: BRAMA: A new graphic animation tool for B models. In: Julliand, J., Kouchnarenko, O. (eds.) B 2007. LNCS, vol. 4355, pp. 274–276. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  21. Shapiro, S.C.: The jobs puzzle: A challenge for logical expressibility and automated reasoning. In: AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning (2011)

    Google Scholar 

  22. Shapiro, S.C., The SNePS Implementation Group.: SNePS 2.7.1 User’s Manual, Department of Computer Science and Engineering University at Buffalo, The State University of New York (December 2010)

    Google Scholar 

  23. Smith, B.M., Petrie, K.E., Gent, I.P.: Models and symmetry breaking for peaceable armies of queens. In: Régin, J.-C., Rueher, M. (eds.) CPAIOR 2004. LNCS, vol. 3011, pp. 271–286. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  24. Sterling, L., Shapiro, E.: The Art of Prolog. MIT Press (1986)

    Google Scholar 

  25. Torlak, E., Jackson, D.: Kodkod: A relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  26. Wos, L., Overbeek, R., Lusk, E., Boyle, J.: Automated Reasoning: Introduction and Applications. Prentice-Hall, Englewood Cliffs (1984)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Leuschel, M., Schneider, D. (2014). Towards B as a High-Level Constraint Modelling Language. In: Ait Ameur, Y., Schewe, KD. (eds) Abstract State Machines, Alloy, B, TLA, VDM, and Z. ABZ 2014. Lecture Notes in Computer Science, vol 8477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43652-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-43652-3_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-43651-6

  • Online ISBN: 978-3-662-43652-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics