Abstract
Non-deterministic specifications play a central role in the use of formal methods for software development. Such specifications can be more readable, but hard to execute efficiently due to the usually large search space. Constraint programming offers advanced algorithms and heuristics for solving certain non-deterministic models. Unfortunately, this requires writing models in a form suitable for efficient solving where the readability typically required from a specification is lost. Tools like ProB attempt to bridge this gap by translating high-level first-order predicate logic specifications into formal models suitable for constraint solving. In this paper we study potential improvements to this methodology by (1) using refinement to transform specifications into models suitable for efficient solving, (2) translating first-order predicates directly into the OscaR framework and (3) using different kinds of solvers as a back end. Formal verification by proof ensures the correctness of the solution of the model with respect to the specification.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The term \(p \mapsto q\) denotes the pair with first component p and second component q.
- 2.
Private communication with Pierre Schaus.
References
Abrial, J.R.: Modeling in Event-B – System and Software Engineering. Cambridge University Press, Cambridge (2010)
Back, R.J., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998). https://doi.org/10.1007/978-1-4612-1674-2
Bruen, A., Dixon, R.: The n-queens problem. Discrete Math. 12(4), 393–395 (1975)
Couto, L.D., Foster, S., Payne, R.J.: Towards verification of constituent systems through automated proof. CoRR abs/1404.7792 (2014)
Dick, A.J.J., Krause, P.J., Cozens, J.: Computer aided transformation of Z into prolog. In: Nicholls, J.E. (ed.) Z User Workshop. Workshops in Computing, pp. 71–85. Springer, London (1990). https://doi.org/10.1007/978-1-4471-3877-8_5
Fuchs, N.E.: Specifications are (preferably) executable. Softw. Eng. J. 7(5), 323–334 (1992)
Gomes, C.P., Selman, B., Kautz, H.A.: Boosting combinatorial search through randomization. In: Mostow, J., Rich, C. (eds.) AAAI, pp. 431–437. AAAI Press/MIT Press (1998)
Hallerstede, S., Leuschel, M.: Constraint-based deadlock checking of high-level specifications. TPLP 11(4–5), 767–782 (2011)
Hansen, D., Schneider, D., Leuschel, M.: Using B and ProB for data validation projects. In: Butler, M., Schewe, K.-D., Mashkoor, A., Biro, M. (eds.) ABZ 2016. LNCS, vol. 9675, pp. 167–182. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-33600-8_10
Hayes, I., Jones, C.B.: Specifications are not (necessarily) executable. Softw. Eng. J. 4(6), 330–338 (1989)
Hehner, E.C.R.: A Practical Theory of Programming. Springer, New York (1993). https://doi.org/10.1007/978-1-4419-8596-5
Hentenryck, P.V., Michel, L.: Constraint-Based Local Search. MIT Press, Cambridge (2009)
van Hoeve, W.J.: The all different constraint: a survey. arXiv cs/0105015 (2001)
Jones, C.B.: Systematic Software Development Using VDM. Prentice Hall, Englewood Cliffs (1990)
Kans, A., Hayton, C.: Using ABC to prototype VDM specifications. SIGPLAN Not. 29(1), 27–36 (1994)
Krings, S., Leuschel, M., Körner, P., Hallerstede, S., Hasanagić, M.: Three is a crowd: SAT, SMT and CLP on a chessboard. In: Calimeri, F., Hamlen, K., Leone, N. (eds.) PADL 2018. LNCS, vol. 10702, pp. 63–79. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-73305-0_5
Leuschel, M., Butler, M.J.: ProB: an automated analysis toolset for the B method. STTT 10(2), 185–203 (2008)
Leuschel, M., Schneider, D.: Towards B as a high-level constraint modelling language – solving the jobs puzzle challenge. In: Ameur, Y.A., Schewe, K.D. (eds.) ABZ 2014. LNCS, vol. 8477, pp. 101–116. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-43652-3_8
Morgan, C.C.: Programming From Specifications, 2nd edn. Prentice Hall, Englewood Cliffs (1994)
Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL: A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9
Odersky, M., al.: An Overview of the Scala Programming Language. Technical report. IC/2004/64, EPFL, Lausanne, Switzerland (2004)
OscaR Team: OscaR: Scala in OR (2012). bitbucket.org/oscarlib
Pelletier, F.J.: Seventy-five problems for testing automatic theorem provers. J. Autom. Reason. 2, 191–216 (1986)
de Roever, W.P., Engelhardt, K.: Data Refinement: Model-oriented Proof Theories and their Comparison, vol. 46. Cambridge University Press, Cambridge (1998)
Schmalz, M.: Term rewriting in logics of partial functions. In: Qin, S., Qiu, Z. (eds.) ICFEM 2011. LNCS, vol. 6991, pp. 633–650. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24559-6_42
Schneider, D., Leuschel, M., Witt, T.: Model-based problem solving for university timetable validation and improvement. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 487–495. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19249-9_30
Silva, J.P.M., Sakallah, K.A.: GRASP: a search algorithm for propositional satisfiability. IEEE Trans. Comput. 48(5), 506–521 (1999)
Acknowledgments
The work presented here is partially supported by the INTO-CPS project funded by the European Commission’s Horizon 2020 programme under grant agreement number 664047.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Hallerstede, S., Hasanagić, M., Krings, S., Larsen, P.G., Leuschel, M. (2018). From Software Specifications to Constraint Programming. In: Johnsen, E., Schaefer, I. (eds) Software Engineering and Formal Methods. SEFM 2018. Lecture Notes in Computer Science(), vol 10886. Springer, Cham. https://doi.org/10.1007/978-3-319-92970-5_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-92970-5_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-92969-9
Online ISBN: 978-3-319-92970-5
eBook Packages: Computer ScienceComputer Science (R0)