[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1007/978-3-030-39197-3_13guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

A DSL for Integer Range Reasoning: Partition, Interval and Mapping Diagrams

Published: 20 January 2020 Publication History

Abstract

Expressing linear integer constraints and assertions over integer ranges—as becomes necessary when reasoning about arrays—in a legible and succinct form poses a challenge for deductive program verification. Even simple assertions, such as integer predicates quantified over finite ranges, become quite verbose when given in basic first-order logic syntax. In this paper, we propose a domain-specific language (DSL) for assertions over integer ranges based on Reynolds’s interval and partitiondiagrams, two diagrammatic notations designed to integrate well into linear textual content such as specifications, program annotations, and proofs. We extend intervalf diagrams to the more general concept of mapping diagrams, representing partial functions from disjoint integer intervals. A subset of mapping diagrams, colorings, provide a compact notation for selecting integer intervals that we intend to constrain, and an intuitive new construct, the legend, allows connecting colorings to first-order integer predicates. Reynolds’s diagrams have not been supported widely by verification tools. We implement the syntax and semantics of partition and mapping diagrams as a DSL and theory extension to the Why3 program verifier. We illustrate the approach with examples of verified programs specified with colorings and legends. This work aims to extend the verification toolbox with a lightweight, intuitive DSL for array and integer range specifications.

References

[1]
Astrachan, O.L.: Pictures as invariants. In: Dale, N.B. (ed.) Proceedings of the 22nd SIGCSE Technical Symposium on Computer Science Education, pp. 112–118. ACM (1991). 10.1145/107004.107026
[2]
Back RJInvariant based programming: basic approach and teaching experiencesForm. Asp. Comput.2009213227-2441178.68334
[3]
Barrett C et al. Gopalakrishnan G, Qadeer S, et al. CVC4 Computer Aided Verification 2011 Heidelberg Springer 171-177
[4]
Bobot, F., Conchon, S., Contejean, E., Iguernelala, M., Lescuyer, S., Mebsout, A.: The Alt-Ergo Automated Theorem Prover (2008). http://alt-ergo.lri.fr/
[5]
Bobot, F., Filliâtre, J.C., Marché, C., Melquiond, G., Paskevich, A.: The Why3 Platform (2019). Version 1.2.0. http://why3.lri.fr/manual.pdf
[6]
Bobot F, Filliâtre JC, Marché C, and Paskevich A Let’s verifythis with why3 Int. J. Softw. Tools Tech. Transf. 2015 17 6 709-727
[7]
de Moura L and Bjørner N Ramakrishnan CR and Rehof J Z3: an efficient SMT solver Tools and Algorithms for the Construction and Analysis of Systems 2008 Heidelberg Springer 337-340
[8]
Dijkstra EW The humble programmer Commun. ACM 1972 15 10 859-866
[9]
Dijkstra EW A Discipline of Programming 1976 Upper Saddle River Prentice-Hall
[10]
Eriksson J, Parsa M, and Back R-J Furia CA and Winter K A precise pictorial language for array invariants Integrated Formal Methods 2018 Cham Springer 151-160
[11]
Filliâtre J-C and Paskevich A Felleisen M and Gardner P Why3—where programs meet provers Programming Languages and Systems 2013 Heidelberg Springer 125-128
[12]
Gries D The Science of Programming 1987 1 New York Springer
[13]
Jami M and Ireland A Giannakopoulou D and Kroening D A verification condition visualizer Verified Software: Theories, Tools and Experiments 2014 Cham Springer 72-86
[14]
Moremedi K and van der Poll JA Cuzzocrea A and Maabout S Transforming formal specification constructs into diagrammatic notations Model and Data Engineering 2013 Heidelberg Springer 212-224
[15]
Pearce, D.J.: Array programming in whiley. In: Proceedings of the 4th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming, pp. 17–24. ACM, New York (2017). 10.1145/3091966.3091972
[16]
Reynolds JCReasoning about arraysCommun. ACM1979225290-2995325760394.68009
[17]
Reynolds JC The Craft of Programming 1981 Upper Saddle River Prentice Hall PTR
[18]
Tennent, R.D.: Specifying Software - A Hands-On Introduction. Cambridge University Press, Cambridge (2002)
[19]
Wickerson J, Dodds M, and Parkinson M Felleisen M and Gardner P Ribbon proofs for separation logic Programming Languages and Systems 2013 Heidelberg Springer 189-208

Cited By

View all
  • (2023)A Decision Procedure for a Theory of Finite Sets with Finite Integer IntervalsACM Transactions on Computational Logic10.1145/362523025:1(1-34)Online publication date: 18-Nov-2023

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
Practical Aspects of Declarative Languages: 22nd International Symposium, PADL 2020, New Orleans, LA, USA, January 20–21, 2020, Proceedings
Jan 2020
234 pages
ISBN:978-3-030-39196-6
DOI:10.1007/978-3-030-39197-3

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 20 January 2020

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)A Decision Procedure for a Theory of Finite Sets with Finite Integer IntervalsACM Transactions on Computational Logic10.1145/362523025:1(1-34)Online publication date: 18-Nov-2023

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media