Abstract
This paper addresses the problem of abstracting a set of affine transformers \(\overrightarrow{v}' = \overrightarrow{v} \cdot C + \overrightarrow{d}\), where \(\overrightarrow{v}\) and \(\overrightarrow{v}'\) represent the pre-state and post-state, respectively. We introduce a framework to harness any base abstract domain \(\mathcal {B}\) in an abstract domain of affine transformations. Abstract domains are usually used to define constraints on the variables of a program. In this paper, however, abstract domain \(\mathcal {B}\) is re-purposed to constrain the elements of C and \(\overrightarrow{d}\)—thereby defining a set of affine transformers on program states. This framework facilitates intra- and interprocedural analyses to obtain function and loop summaries, as well as to prove program assertions.
Supported, in part, by a gift from Rajiv and Ritu Batra; DARPA MUSE award FA8750-14-2-0270 and DARPA STAC award FA8750-15-C-0082; and by the UW-Madison Office of the Vice Chancellor for Research and Graduate Education with funding from the Wisconsin Alumni Research Foundation. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the authors, and do not necessarily reflect the views of the sponsoring agencies.
T. Reps has an ownership interest in GrammaTech, Inc., which has licensed elements of the technology discussed in this publication.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
k of the coefficients are always 0, and one coefficient is always 1 (i.e., the first column is always \((1\vert \ 0\ 0\ ...\ 0)^t\)). For this reason, we really need only \(k+k^2\) elements, but we will sometimes refer to \((k+1)^2\) elements for brevity.
- 2.
- 3.
The abstract domain \(\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}\) is the product domain of \((k+1)^2\) interval domains, that is, \(\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}= \mathcal {I}_{\mathbb {Z}_{2^w}}\times \mathcal {I}_{\mathbb {Z}_{2^w}}\times \ldots \times \mathcal {I}_{\mathbb {Z}_{2^w}}\). \(\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}\) uses smash product to maintain a canonical representation for \(\bot _{\text {ATA}[\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}]}\). Thus, if any of the coefficients in an abstract-domain element \(b\in \text {ATA}[\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}]\) is \(\bot _{\mathcal {I}_{\mathbb {Z}_{2^w}}}\), then b is smashed to \(\bot _{\text {ATA}[\mathcal {I}_{\mathbb {Z}_{2^w}}^{(k+1)^2}]}\).
References
Chen, L., Miné, A., Wang, J., Cousot, P.: Interval polyhedra: an abstract domain to infer interval linear relationships. In: Palsberg, J., Su, Z. (eds.) SAS 2009. LNCS, vol. 5673, pp. 309–325. Springer, Heidelberg (2009). doi:10.1007/978-3-642-03237-0_21
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.: Abstract interpretation: a unified lattice model for static analysis of programs by construction of approximation of fixed points. In: POPL, pp. 238–252 (1977)
Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: POPL (1979)
Cousot, P., Halbwachs, N.: Automatic discovery of linear constraints among variables of a program. In: POPL (1978)
Elder, M., Lim, J., Sharma, T., Andersen, T., Reps, T.: Abstract domains of affine relations. In: TOPLAS (2014)
Gange, G., Navas, J.A., Schachte, P., Søndergaard, H., Stuckey, P.J.: Abstract interpretation over non-lattice abstract domains. In: Logozzo, F., Fähndrich, M. (eds.) SAS 2013. LNCS, vol. 7935, pp. 6–24. Springer, Heidelberg (2013). doi:10.1007/978-3-642-38856-9_3
Jeannet, B., Gopan, D., Reps, T.: A relational abstraction for functions. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 186–202. Springer, Heidelberg (2005). doi:10.1007/11547662_14
King, A., Søndergaard, H.: Automatic abstraction for congruences. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 197–213. Springer, Heidelberg (2010). doi:10.1007/978-3-642-11319-2_16
Miné, A.: The octagon abstract domain. In: WCRE (2001)
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
Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: POPL (2004)
Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. TOPLAS 29(5) (2007). Article No. 29
Reps, T., Balakrishnan, G., Lim, J.: Intermediate-representation recovery from low-level code. In: Proceedings of the 2006 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (2006)
Reps, T., Sagiv, M., Yorsh, G.: Symbolic implementation of the best transformer. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 252–266. Springer, Heidelberg (2004). doi:10.1007/978-3-540-24622-0_21
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, Heidelberg (2005). doi:10.1007/978-3-540-30579-8_2
Sen, R., Srikant, Y.: Executable analysis using abstract interpretation with circular linear progressions. In: MEMOCODE (2007)
Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Program Flow Analysis Theory and Applications. Prentice-Hall, Englewood Cliffs (1981)
Sharma, T., Reps, T.: A new abstraction framework for affine transformers. Technical report UW-TR-1846r1:SR17, Computer Science Department, University of Wisconsin, Madison, WI, May 2017. Revised July 2017
Sharma, T., Reps, T.: Sound bit-precise numerical domains. In: Bouajjani, A., Monniaux, D. (eds.) VMCAI 2017. LNCS, vol. 10145, pp. 500–520. Springer, Cham (2017). doi:10.1007/978-3-319-52234-0_27
Simon, A., King, A.: Taming the wrapping of integer arithmetic. In: Nielson, H.R., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 121–136. Springer, Heidelberg (2007). doi:10.1007/978-3-540-74061-2_8
Thakur, A., Elder, M., Reps, T.: Bilateral algorithms for symbolic abstraction. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 111–128. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33125-1_10
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Sharma, T., Reps, T. (2017). A New Abstraction Framework for Affine Transformers. In: Ranzato, F. (eds) Static Analysis. SAS 2017. Lecture Notes in Computer Science(), vol 10422. Springer, Cham. https://doi.org/10.1007/978-3-319-66706-5_17
Download citation
DOI: https://doi.org/10.1007/978-3-319-66706-5_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-66705-8
Online ISBN: 978-3-319-66706-5
eBook Packages: Computer ScienceComputer Science (R0)