Skip to main content

2017 | OriginalPaper | Buchkapitel

Sound Bit-Precise Numerical Domains

verfasst von : Tushar Sharma, Thomas Reps

Erschienen in: Verification, Model Checking, and Abstract Interpretation

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

This paper tackles the challenge of creating a numerical abstract domain that can identify affine-inequality invariants while handling overflow in arithmetic operations over bit-vector data-types. The paper describes the design and implementation of a class of new abstract domains, called the Bit-Vector-Sound, Finite-Disjunctive (\(\textit{BVSFD}\)) domains. We introduce a framework that takes an abstract domain \(\mathcal {A}\) that is sound with respect to mathematical integers and creates an abstract domain \(\textit{BVS}(\mathcal {A})\) whose operations and abstract transformers are sound with respect to machine integers. We also describe how to create abstract transformers for \(\textit{BVS}(\mathcal {A})\) that are sound with respect to machine arithmetic. The abstract transformers make use of an operation \(\textit{WRAP}(\textit{av}, v)\)—where \(\textit{av} \in \mathcal {A}\) and v is a set of program variables—which performs wraparound in av for the variables in v.
To reduce the loss of precision from \(\textit{WRAP}\), we use finite disjunctions of \(\textit{BVS}(\mathcal {A})\) values. The constructor of finite-disjunctive domains, \(\textit{FD}_k(\cdot )\), is parameterized by k, the maximum number of disjunctions allowed.
We instantiate the \(\textit{BVS}(\textit{FD}_k)\) framework using the abstract domain of polyhedra and octagons. Our experiments show that the analysis can prove \(25\%\) of the assertions in the SVCOMP loop benchmarks with \(k=6\), and \(88\%\) of the array-bounds checks in the SVCOMP array benchmarks with \(k=4\).

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Bagnara, R., Hill, P., Zaffanella, E.: Widening operators for powerset domains. STTT 8(4/5), 449–466 (2006)CrossRefMATH Bagnara, R., Hill, P., Zaffanella, E.: Widening operators for powerset domains. STTT 8(4/5), 449–466 (2006)CrossRefMATH
2.
Zurück zum Zitat Bagnara, R., Hill, P.M., Zaffanella, E.: The parma polyhedra library: toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Sci. Comput. Program. 72(1–2), 3–21 (2008)MathSciNetCrossRef Bagnara, R., Hill, P.M., Zaffanella, E.: The parma polyhedra library: toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Sci. Comput. Program. 72(1–2), 3–21 (2008)MathSciNetCrossRef
3.
Zurück zum Zitat Balakrishnan, G., Reps, T.: WYSINWYX: what you see is not what you execute. TOPLAS 32(6), 202–213 (2010)CrossRef Balakrishnan, G., Reps, T.: WYSINWYX: what you see is not what you execute. TOPLAS 32(6), 202–213 (2010)CrossRef
4.
Zurück zum Zitat Beyer, D.: Software verification and verifiable witnesses. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 401–416. Springer, Heidelberg (2015). doi:10.1007/978-3-662-46681-0_31 Beyer, D.: Software verification and verifiable witnesses. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 401–416. Springer, Heidelberg (2015). doi:10.​1007/​978-3-662-46681-0_​31
6.
7.
Zurück zum Zitat Brauer, J., King, A.: Transfer function synthesis without quantifier elimination. LMCS 8(3), 63 (2012)MathSciNetMATH Brauer, J., King, A.: Transfer function synthesis without quantifier elimination. LMCS 8(3), 63 (2012)MathSciNetMATH
8.
Zurück zum Zitat Bygde, S., Lisper, B., Holsti, N.: Fully bounded polyhedral analysis of integers with wrapping. In: International Workshop on Numerical and Symbolic Abstract Domains (2011) Bygde, S., Lisper, B., Holsti, N.: Fully bounded polyhedral analysis of integers with wrapping. In: International Workshop on Numerical and Symbolic Abstract Domains (2011)
9.
Zurück zum Zitat Cousot, P., Cousot, R.: Static determination of dynamic properties of programs. In: Proceedings of 2nd International Symposium on Programming, Paris, April 1976 Cousot, P., Cousot, R.: Static determination of dynamic properties of programs. In: Proceedings of 2nd International Symposium on Programming, Paris, April 1976
10.
Zurück zum Zitat Cousot, P., Halbwachs, N.: Automatic discovery of linear constraints among variables of a program. In: POPL (1978) Cousot, P., Halbwachs, N.: Automatic discovery of linear constraints among variables of a program. In: POPL (1978)
11.
Zurück zum Zitat Dietz, W., Li, P., Regehr, J., Adve, V.: Understanding integer overflow in C/C++. In: ICSE (2012) Dietz, W., Li, P., Regehr, J., Adve, V.: Understanding integer overflow in C/C++. In: ICSE (2012)
13.
Zurück zum Zitat Elder, M., Lim, J., Sharma, T., Andersen, T., Reps, T.: Abstract domains of affine relations. TOPLAS 36(4), 1–13 (2014)CrossRef Elder, M., Lim, J., Sharma, T., Andersen, T., Reps, T.: Abstract domains of affine relations. TOPLAS 36(4), 1–13 (2014)CrossRef
15.
Zurück zum Zitat Ghorbal, K., Ivančić, F., Balakrishnan, G., Maeda, N., Gupta, A.: Donut domains: efficient non-convex domains for abstract interpretation. In: VMCAI (2012) Ghorbal, K., Ivančić, F., Balakrishnan, G., Maeda, N., Gupta, A.: Donut domains: efficient non-convex domains for abstract interpretation. In: VMCAI (2012)
16.
Zurück zum Zitat Jones, N., Mycroft, A.: Data flow analysis of applicative programs using minimal function graphs. In: POPL, pp. 296–306 (1986) Jones, N., Mycroft, A.: Data flow analysis of applicative programs using minimal function graphs. In: POPL, pp. 296–306 (1986)
17.
Zurück zum Zitat Jourdan, J.-H., Laporte, V., Blazy, S., Leroy, X., Pichardie, D.: A formally-verified C static analyzer. In: POPL (2015) Jourdan, J.-H., Laporte, V., Blazy, S., Leroy, X., Pichardie, D.: A formally-verified C static analyzer. In: POPL (2015)
19.
Zurück zum Zitat Lal, A., Reps, T., Balakrishnan, G.: Extended weighted pushdown systems. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 434–448. Springer, Heidelberg (2005). doi:10.1007/11513988_44 CrossRef Lal, A., Reps, T., Balakrishnan, G.: Extended weighted pushdown systems. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 434–448. Springer, Heidelberg (2005). doi:10.​1007/​11513988_​44 CrossRef
20.
Zurück zum Zitat Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis & transformation. In: International Symposium on Code Generation and Optimization (2004) Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis & transformation. In: International Symposium on Code Generation and Optimization (2004)
21.
Zurück zum Zitat Laviron, V., Logozzo, F.: Subpolyhedra: a (more) scalable approach to infer linear inequalities. In: VMCAI (2009) Laviron, V., Logozzo, F.: Subpolyhedra: a (more) scalable approach to infer linear inequalities. In: VMCAI (2009)
22.
Zurück zum Zitat Lim, J.: Transformer specification language: a system for generating analyzers and its applications. Ph.D. thesis, Computer Science Department, University of Wisconsin, Madison, WI, Technical report 1689, May 2011 Lim, J.: Transformer specification language: a system for generating analyzers and its applications. Ph.D. thesis, Computer Science Department, University of Wisconsin, Madison, WI, Technical report 1689, May 2011
24.
Zurück zum Zitat Malmkjær, K.: Abstract interpretation of partial-evaluation algorithms. Ph.D. thesis, Department of Computer and Information Science, Kansas State University, Manhattan, Kansas (1993) Malmkjær, K.: Abstract interpretation of partial-evaluation algorithms. Ph.D. thesis, Department of Computer and Information Science, Kansas State University, Manhattan, Kansas (1993)
26.
Zurück zum Zitat Miné, A.: The octagon abstract domain. In: WCRE (2001) Miné, A.: The octagon abstract domain. In: WCRE (2001)
27.
Zurück zum Zitat Miné, A.: A few graph-based relational numerical abstract domains. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 117–132. Springer, Heidelberg (2002). doi:10.1007/3-540-45789-5_11 CrossRef Miné, A.: A few graph-based relational numerical abstract domains. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 117–132. Springer, Heidelberg (2002). doi:10.​1007/​3-540-45789-5_​11 CrossRef
28.
Zurück zum Zitat Miné, A.: Abstract domains for bit-level machine integer and floating-point operations. In: IJCAR, pp. 55–70 (2012) Miné, A.: Abstract domains for bit-level machine integer and floating-point operations. In: IJCAR, pp. 55–70 (2012)
29.
Zurück zum Zitat Monniaux, D.: Automatic modular abstractions for template numerical constraints. LMCS 6(3), 4 (2010)MathSciNetMATH Monniaux, D.: Automatic modular abstractions for template numerical constraints. LMCS 6(3), 4 (2010)MathSciNetMATH
30.
Zurück zum Zitat Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. TOPLAS 29(5), 29:1–29:27 (2007)CrossRefMATH Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. TOPLAS 29(5), 29:1–29:27 (2007)CrossRefMATH
31.
Zurück zum Zitat Mycroft, A., Jones, N.: A relational framework for abstract interpretation. In: Programs as Data Objects (1985) Mycroft, A., Jones, N.: A relational framework for abstract interpretation. In: Programs as Data Objects (1985)
34.
Zurück zum Zitat Reps, T., Balakrishnan, G., Lim, J.: Intermediate-representation recovery from low-level code. In: PEPM (2006) Reps, T., Balakrishnan, G., Lim, J.: Intermediate-representation recovery from low-level code. In: PEPM (2006)
35.
Zurück zum Zitat Reps, T., Schwoon, S., Jha, S., Melski, D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. SCP 58(1–2), 206–263 (2005)MathSciNetMATH Reps, T., Schwoon, S., Jha, S., Melski, D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. SCP 58(1–2), 206–263 (2005)MathSciNetMATH
36.
Zurück zum Zitat Sankaranarayanan, S., Ivančić, F., Shlyakhter, I., Gupta, A.: Static analysis in disjunctive numerical domains. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 3–17. Springer, Berlin (2006). doi:10.1007/11823230_2 CrossRef Sankaranarayanan, S., Ivančić, F., Shlyakhter, I., Gupta, A.: Static analysis in disjunctive numerical domains. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 3–17. Springer, Berlin (2006). doi:10.​1007/​11823230_​2 CrossRef
37.
Zurück zum Zitat Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Scalable analysis of linear systems using mathematical programming. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 25–41. Springer, Berlin (2005). doi:10.1007/978-3-540-30579-8_2 CrossRef Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Scalable analysis of linear systems using mathematical programming. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 25–41. Springer, Berlin (2005). doi:10.​1007/​978-3-540-30579-8_​2 CrossRef
38.
Zurück zum Zitat Sen, R., Srikant, Y.: Executable analysis using abstract interpretation with circular linear progressions. In: MEMOCODE (2007) Sen, R., Srikant, Y.: Executable analysis using abstract interpretation with circular linear progressions. In: MEMOCODE (2007)
39.
Zurück zum Zitat Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Program Flow Analysis: Theory and Applications. Prentice-Hall (1981) Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Program Flow Analysis: Theory and Applications. Prentice-Hall (1981)
40.
Zurück zum Zitat Sharma, T., Thakur, A., Reps, T.: An abstract domain for bit-vector inequalities. TR-1789, Computer Science Department, University of Wisconsin, Madison, WI (2013) Sharma, T., Thakur, A., Reps, T.: An abstract domain for bit-vector inequalities. TR-1789, Computer Science Department, University of Wisconsin, Madison, WI (2013)
42.
Zurück zum Zitat Simon, A., King, A., Howe, J.: Two variables per linear inequality as an abstract domain. In: International Workshop on Logic Based Program Development and Transformation, pp. 71–89 (2002) Simon, A., King, A., Howe, J.: Two variables per linear inequality as an abstract domain. In: International Workshop on Logic Based Program Development and Transformation, pp. 71–89 (2002)
43.
Zurück zum Zitat Warren Jr., H.: Hacker’s Delight. Addison-Wesley, Boston (2003) Warren Jr., H.: Hacker’s Delight. Addison-Wesley, Boston (2003)
Metadaten
Titel
Sound Bit-Precise Numerical Domains
verfasst von
Tushar Sharma
Thomas Reps
Copyright-Jahr
2017
DOI
https://doi.org/10.1007/978-3-319-52234-0_27