Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2774975.2774980acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
short-paper

Sound reasoning about integral data types with a reusable SMT solver interface

Published: 13 June 2015 Publication History

Abstract

We extend the Leon verification system for Scala with support for bit-vector reasoning, thus addressing one of its fundamental soundness limitation with respect to the treatment of integers primitives. We leverage significant progresses recently achieved in SMT solving by developing a solver-independent interface to easily configure the back-end of Leon. Our interface is based on the emerging SMT-LIB standard for SMT solvers, and we release a Scala library offering full support for the latest version of the standard. We use the standard BigInt Scala library to represent mathematical integers, whereas we correctly model Int as 32-bit integers. We ensure safety of arithmetic by checking for division by zero and correctly modeling division and modulo. We conclude with a performance comparison between the sound representation of Ints and the cleaner abstract representation using mathematical integers, and discuss the trade-off involved.

References

[1]
C. Barrett, C. L. Conway, M. Deters, L. Hadarean, D. Jovanovi´c, T. King, A. Reynolds, and C. Tinelli. CVC4. In Proceedings of the 23rd International Conference on Computer Aided Verification, CAV’11, pages 171–177, Berlin, Heidelberg, 2011. Springer-Verlag.
[2]
C. Barrett, A. Stump, and C. Tinelli. The Satisfiability Modulo Theories Library (SMT-LIB). www.SMT-LIB.org, 2010.
[3]
R. Blanc, V. Kuncak, E. Kneuss, and P. Suter. An overview of the Leon verification system: Verification by translation to recursive functions. In Proceedings of the 4th Workshop on Scala, SCALA ’13, pages 1:1–1:10, New York, NY, USA, 2013. ACM.
[4]
R. T. Boute. The euclidean definition of the functions div and mod. ACM Trans. Program. Lang. Syst., 14(2):127–144, Apr. 1992.
[5]
R. Brummayer and A. Biere. Boolector: An efficient smt solver for bit-vectors and arrays. In Tools and Algorithms for the Construction and Analysis of Systems, pages 174–177. Springer, 2009.
[6]
E. Darulova. Programming with Numerical Uncertainties. PhD thesis, EPFL, 2014.
[7]
E. Darulova and V. Kuncak. Sound compilation of reals. In ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2014.
[8]
L. De Moura and N. Bjørner. Z3: An efficient smt solver. In TACAS, 2008.
[9]
J.-C. Filliâtre and A. Paskevich. Why3 – Where Programs Meet Provers. In ESOP’13 22nd European Symposium on Programming, volume 7792, Rome, Italy, Mar. 2013. Springer.
[10]
H. Ganzinger, G. Hagen, R. Nieuwenhuis, A. Oliveras, and C. Tinelli. DPLL(T): Fast Decision Procedures. In R. Alur and D. Peled, editors, Computer Aided Verification, volume 3114 of Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2004.
[11]
S. Jha, R. Limaye, and S. Seshia. Beaver: Engineering an efficient smt solver for bit-vector arithmetic. In Computer Aided Verification, pages 668–674. 2009.
[12]
M. Kaufmann, J. S. Moore, and P. Manolios. Computer-aided reasoning: an approach. Kluwer Academic Publishers, 2000.
[13]
E. Kneuss, M. Koukoutos, and V. Kuncak. Deductive program repair. In Computer-Aided Verification (CAV), 2015.
[14]
E. Kneuss, I. Kuraj, V. Kuncak, and P. Suter. Synthesis modulo recursive functions. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’13, pages 407–426, New York, NY, USA, 2013. ACM.
[15]
V. Kuncak, E. Kneuss, and P. Suter. Executing specifications using synthesis and constraint solving (invited talk). In Runtime Verification (RV), 2013.
[16]
K. R. M. Leino. Dafny: An automatic program verifier for functional correctness. In Proceedings of the 16th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning, LPAR’10, pages 348–370, Berlin, Heidelberg, 2010. Springer-Verlag.
[17]
L. C. Paulson. Isabelle: A generic theorem prover, volume 828. Springer Science & Business Media, 1994.
[18]
P. Suter, M. Dotta, and V. Kuncak. Decision procedures for algebraic data types with abstractions. In Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’10, pages 199– 210, New York, NY, USA, 2010. ACM.
[19]
P. Suter, A. S. Köksal, and V. Kuncak. Satisfiability Modulo Recursive Programs. In SAS, 2011.
[20]
N. Voirol, E. Kneuss, and V. Kuncak. Counterexamplecomplete verification for higher-order functions. In SCALA, 2015.
[21]
C. Walther and S. Schweitzer. About verifun. In Automated Deduction–CADE-19, pages 322–327. Springer, 2003.
[22]
H. S. Warren. Hacker’s Delight. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2002.

Cited By

View all
  • (2019)System FR: formalized foundations for the stainless verifierProceedings of the ACM on Programming Languages10.1145/33605923:OOPSLA(1-30)Online publication date: 10-Oct-2019
  • (2016)SMT-based checking of predicate-qualified types for ScalaProceedings of the 2016 7th ACM SIGPLAN Symposium on Scala10.1145/2998392.2998398(31-40)Online publication date: 30-Oct-2016

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SCALA 2015: Proceedings of the 6th ACM SIGPLAN Symposium on Scala
June 2015
55 pages
ISBN:9781450336260
DOI:10.1145/2774975
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 June 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Satisfiability
  2. Verification

Qualifiers

  • Short-paper

Funding Sources

Conference

PLDI '15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 5 of 6 submissions, 83%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 31 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2019)System FR: formalized foundations for the stainless verifierProceedings of the ACM on Programming Languages10.1145/33605923:OOPSLA(1-30)Online publication date: 10-Oct-2019
  • (2016)SMT-based checking of predicate-qualified types for ScalaProceedings of the 2016 7th ACM SIGPLAN Symposium on Scala10.1145/2998392.2998398(31-40)Online publication date: 30-Oct-2016

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media