Abstract
The ever growing pervasiveness of software systems in modern days technology results in an increasing need of software/program correctness proofs. The latter, allow developers to spot software failures before production, hence preventing potentially catastrophic repercussions on our society, as in the case of safety-critical infrastructures.
Unfortunately, correctness proofs may fail (even when software is actually correct) due to program analysis imprecision: program analysis sacrifices precision in order to gain decidability. In standard abstract interpretation-based static analyses, such imprecision is “measured” in terms of completeness of the chosen observation (i.e., of the chosen abstract domain) w.r.t. the programming language semantics. In this setting, fixed the language language, it is crucial to have decidable techniques to determine whether the chosen abstraction is sufficiently precise to analyze the program under consideration.
In this paper, we characterize abstract domain precision from a novel point of view, providing a formal framework for characterizing and (statically) verifying abstract domain precision, that can be adopted also in the case of “weakened”, i.e., Galois Connection-less, static analysis frameworks. Distinctive examples adopting such frameworks are the Convex Polyhedra and Automata domains, for which standard approaches to reason about analysis precision (i.e., completeness) cannot be applied.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
We avoid the pedex when the structure is clear form the context or it is not relevant.
- 2.
We choose to keep the language as simple as possible, avoiding non necessary language features, in order to keep the focus on the analysis from a purely semantic point of view.
- 3.
In GC-based abstract interpretation, this condition is implied by \(\gamma \) being co-additive.
- 4.
The one-to-one hypothesis is not restrictive, being implicit in the GI-based framework. Indeed, \(\gamma \) can always be made one-to-one by collapsing the elements of A with the same concrete meaning w.r.t. \(\gamma \).
- 5.
The function \(\rho _2\) is also an upper closure operator.
- 6.
Note that what we call here Abstract Non-Interference is a specific version of the notion in [23], there called narrow.
- 7.
In the following, \(\lambda x\in { Var}.X\) (or \([x\mapsto X]\)) denotes the set \(\{{{\,\mathrm{\mathbb {m}}\,}}\in \mathbb {M}~|~{{\,\mathrm{\mathbb {m}}\,}}(x)\in X\}\).
- 8.
Note that, an hypersemantics can be given in an abstract way on \(\wp (C)\), in the same way we defined the concrete semantics on C in Sect. 2.
References
Albarghouthi, A.: Introduction to Neural Network Verification (2021). https://doi.org/10.48550/ARXIV.2109.10317, https://arxiv.org/abs/2109.10317
Arceri, V., Mastroeni, I.: Analyzing dynamic code: a sound abstract interpreter for evil eval. ACM Trans. Priv. Secur. 24(2), 10:1–10:38 (2021)
Arceri, V., Mastroeni, I., Xu, S.: Static analysis for ECMAScript string manipulation programs. Appl. Sci. 10, 3525 (2020). https://doi.org/10.3390/app10103525
Assaf, M., Naumann, D.A., Signoles, J., Totel, E., Tronel, F.: Hypercollecting semantics and its application to static analysis of information flow. In: Proceedings of POPL, pp. 874–887 (2017)
Bruni, R., Giacobazzi, R., Gori, R., Ranzato, F.: A logic for locally complete abstract interpretations. In: Symposium on Logic in Computer Science, LICS, pp. 1–13. IEEE (2021)
Campion, M., Dalla Preda, M., Giacobazzi, R.: Partial (in)completeness in abstract interpretation: limiting the imprecision in program analysis. Proc. ACM Program. Lang. 6(POPL), 1–31 (2022). https://doi.org/10.1145/3498721
Clarkson, M.R., Schneider, F.B.: Hyperproperties. J. Comput. Secur. 18(6), 1157–1210 (2010)
Cohen, E.S.: Information transmission in sequential programs. In: et al., D. (ed.) Foundations of Secure Computation, pp. 297–335. Academic Press, New York (1978)
Cousot, P.: Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theor. Comput. Sci. 277(1–2), 47–103 (2002)
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Conference Record of the 4th ACM Symposium on Principles of Programming Languages ( POPL 1977), pp. 238–252. ACM Press (1977)
Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Conference Record of the 6th ACM Symposium on Principles of Programming Languages (POPL 1979), pp. 269–282. ACM Press (1979)
Cousot, P., Cousot, R.: Abstract interpretation frameworks. J. Logic and Comput. 2(4), 511–547 (1992)
Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: POPL 1978: Proceedings of the 5th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 84–96. ACM Press (1978). http://doi.acm.org/10.1145/512760.512770
Cousot, P., Giacobazzi, R., Ranzato, F.: A\({^2}\)i: abstract\({^2}\) interpretation. Proc. ACM Program. Lang. 3(POPL), 42:1–42:31 (2019)
Dijkstra, E.W.: The humble programmer. Commun. ACM 15(10), 859–866 (1972). https://doi.org/10.1145/355604.361591
Filé, G., Giacobazzi, R., Ranzato, F.: A unifying view of abstract domain design. ACM Comput. Surv. 28(2), 333–336 (1996)
Gehr, T., Mirman, M., Drachsler-Cohen, D., Tsankov, P., Chaudhuri, S., Vechev, M.: Ai2: safety and robustness certification of neural networks with abstract interpretation. In: 2018 IEEE Symposium on Security and Privacy (SP), pp. 3–18 (2018). https://doi.org/10.1109/SP.2018.00058
Giacobazzi, R., Mastroeni, I.: Abstract non-interference: parameterizing non-interference by abstract interpretation. In: Proceedings of the 31st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2004), pp. 186–197. ACM-Press (2004)
Giacobazzi, R., Mastroeni, I.: Proving abstract non-interference. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 280–294. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30124-0_23
Giacobazzi, R., Mastroeni, I.: Adjoining declassification and attack models by abstract interpretation. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 295–310. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31987-0_21
Giacobazzi, R., Mastroeni, I.: Adjoining classified and unclassified information by abstract interpretation. J. Comput. Secur. 18(5), 751–797 (2010)
Giacobazzi, R., Mastroeni, I.: A proof system for abstract non-interference. J. Log. Comput. 20, 449–479 (2010)
Giacobazzi, R., Mastroeni, I.: Abstract non-interference: a unifying framework for weakening information-flow. ACM Trans. Priv. Secur. 21(2), 1–31 (2018)
Giacobazzi, R., Ranzato, F.: Refining and compressing abstract domains. In: Degano, P., Gorrieri, R., Marchetti-Spaccamela, A. (eds.) ICALP 1997. LNCS, vol. 1256, pp. 771–781. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-63165-8_230
Giacobazzi, R., Ranzato, F., Scozzari, F.: Making abstract interpretation complete. J. ACM 47(2), 361–416 (2000)
Girard, A.: Reachability of uncertain linear systems using zonotopes. In: Morari, M., Thiele, L. (eds.) HSCC 2005. LNCS, vol. 3414, pp. 291–305. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31954-2_19
Goguen, J.A., Meseguer, J.: Security policies and security models. In: Proceedings of the IEEE Symposium on Security and Privacy, pp. 11–20. IEEE Computer Society Press (1982)
Hunt, S., Mastroeni, I.: The PER model of abstract non-interference. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 171–185. Springer, Heidelberg (2005). https://doi.org/10.1007/11547662_13
Mastroeni, I., Pasqua, M.: Hyperhierarchy of semantics - a formal framework for hyperproperties verification. In: Ranzato, F. (ed.) SAS 2017. LNCS, vol. 10422, pp. 232–252. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66706-5_12
Mastroeni, I., Pasqua, M.: Verifying bounded subset-closed hyperproperties. In: Podelski, A. (ed.) SAS 2018. LNCS, vol. 11002, pp. 263–283. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99725-4_17
Mastroeni, I.: Abstract interpretation-based approaches to security - a survey on abstract non-interference and its challenging applications. In: Banerjee, A., Danvy, O., Doh, K., Hatcliff, J. (eds.) Semantics, Abstract Interpretation, and Reasoning about Programs: Essays Dedicated to David A. Schmidt on the Occasion of his Sixtieth Birthday, Manhattan, Kansas, USA, 19–20th September 2013. EPTCS, vol. 129, pp. 41–65 (2013)
Mastroeni, I., Pasqua, M.: Statically analyzing information flows: an abstract interpretation-based hyperanalysis for non-interference. In: Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing, pp. 2215–2223. Association for Computing Machinery (2019). https://doi.org/10.1145/3297280.3297498
Mastroeni, I., Pasqua, M.: Verifying opacity by abstract interpretation. In: Hong, J., Bures, M., Park, J.W., Cerný, T. (eds.) SAC 2022: The 37th ACM/SIGAPP Symposium on Applied Computing, Virtual Event, 25–29 April 2022, pp. 1817–1826. ACM (2022). https://doi.org/10.1145/3477314.3507119
O’Hearn, P.W.: Incorrectness logic. Proc. ACM Program. Lang. (POPL) 4(10), 1-32 (2020)
Ranzato, F., Tapparo, F.: Strong preservation as completeness in abstract interpretation. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 18–32. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24725-8_3
Sabelfeld, A., Myers, A.: Language-based information-flow security. IEEE J. Sel. Areas Commun. 21(1), 5–19 (2003)
Winskel, G.: The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge (1993)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Selected Proofs
A Selected Proofs
Proof
(Proof of Lemma 1). We prove that the set \(\eta ^{\wedge }_f\) is a Moore family, namely that is closed under greatest lower bound. Let us consider \(Y\subseteq \eta ^{\wedge }_f\) and suppose \(\exists x\in D \, .\, z\in \kappa ^\eta _f(x)\) and such that \(\bigwedge Y\ge z\), then \(\forall y\in Y\) we have \(Y\ge \bigwedge Y\ge z\). But, by definition of Y, this means that \(\forall y\in Y\) we have \(y\ge \vee \kappa ^\eta _f\), hence by definition of glb we have \(\bigwedge Y\ge \vee \kappa ^\eta _f\), meaning that \(\bigwedge Y\in \eta ^{\wedge }_f\).
Suppose now that \(\forall x\in D.\forall z\in \kappa ^\eta _f(x)\) we have \(\bigwedge Y\not \ge z\), hence the implication defining \({ Nint}_f^\eta \) is trivially true and again \(\bigwedge Y\in \eta ^{\wedge }_f\).
Proof
(Proof of Theorem 3). First of all we have to show that:
By construction, and . By Lemma 1, we know that also the glb of \({ Nint}_f^\eta \) elements satisfies \({ Nint}_f^\eta \), namely is in the set. Let us prove that if y is such that \({ Nint}_f^\eta (y)\) then it is greater than any image of f. Suppose , then \(y\ge f(x_1)\), but by hypothesis, but then by \({ Nint}_f^\eta \) hypothesis, \(y\ge \bigvee \kappa ^\eta _f(x_2)\ge f(x_2)\). Namely . Since we do not have hypotheses on \(x_1\) and \(x_2\), this proves that the two sets are the same, and therefore .
We now have to prove that it is the most concrete. This come trivially by construction, since \(\eta ^{\wedge }_f\) takes all the elements y such that \({ Nint}_f^\eta (y)\), any more concrete domain \(\rho '\) must contain w such that \(\lnot { Nint}_f^\eta (w)\). But this means that \(\exists x \in D \,\exists z\in \kappa ^\eta _f(x)\) such that \(w\ge z=f(y)\) (for some \(y\in D\)) but \(w\not \ge \bigvee \kappa ^\eta _f(x)\), meaning that there must exists \(z'\in \kappa ^\eta _f(x)\) such that \(w\not \ge z'=f(y')\) (for some \(y'\in D\)). Hence we have \(\eta (y)=\eta (y')\) and while meaning that .
Proof
(Proof of Lemma 2). Extensivity holds trivially by definition. Let us prove idempotence. Suppose . Let us compute . But the we trivially have that \(\rho \circ f(x)=\rho \circ f(y)=\rho \circ f(w)\), hence \(w\le y\) being y maximal, and \(y\le w\) by extensivity of \(\rho ^{\vee }_f\), hence \(\rho ^{\vee }_f(x)=y=w=\rho ^{\vee }_f(y)=\rho ^{\vee }_f \circ \rho ^{\vee }_f(x)\).
Proof
(Proof of Theorem 4). We have to prove that:
Suppose that \(\rho ^{\vee }_f(x_1)=\rho ^{\vee }_f(x_2)\). Then, and , with \(y_1=y_2\), hence \(\rho \circ f(x_1)=\rho \circ f(y_1)\) and \(\rho \circ f(y_2)=\rho \circ f(x_2)\).
We have now to prove that it is maximal w.r.t. the relative precision order, namely any more abstract abstraction does not satisfy the ANI property. Suppose there exists \(\eta '\in { wAbs}(D)\) more abstract than \(\rho ^{\vee }_f\), then it means that there exists \(x \in D\) such that \(y\triangleq \rho ^{\vee }_f(x) \lneq \eta '(x)\), namely . Hence \(\eta ' \circ \eta '(x)=\eta '(x)\), by idempotence, but \(\rho \circ f(\eta '(x))\ne \rho \circ f(x)\) being y maximal.
Proof
(Proof of Theorem 5). Exploiting the correspondence between completeness and Abstract Non-Interference (Theorem 2), we just have to prove that ANI holds. Indeed, we have to prove that if then holds. Let us prove that all rules in Fig. 4 are sound, namely that the deduced abstraction ensure ANI for \(\textsf{P}\).
-
Rule R0: \(\forall x_1,x_2\), independently from the input observation \(\eta \), we trivially have \(\mathbb {T}{\llbracket \texttt{C} \rrbracket }(x_1)=\mathbb {T}{\llbracket \texttt{C} \rrbracket }(x_2)\). On the other hand, \({ id}(x_1)={ id}(x_2)\) means that \(x_1=x_2\), and therefore trivially, for any \(\rho \), \(\rho {\llbracket \texttt{C} \rrbracket }(x_1)=\rho {\llbracket \texttt{C} \rrbracket }(x_2)\).
-
Rule R1: We consider here expressions as base case of the induction. By Corollary 2 we have that \(\eta ^{\wedge }_{\{\!|\textsf{e}|\!\}}\) is such that \(\forall x_1,x_2.\,\eta (x_1)=\eta (x_2)\ \Rightarrow \ \eta ^{\wedge }_{\{\!|\textsf{e}|\!\}}\{\!|\textsf{e}|\!\}(x_1)=\eta ^{\wedge }_{\{\!|\textsf{e}|\!\}}\{\!|\textsf{e}|\!\}(x_2)\). Analogous for the other rule by Corollary 3. Note that, in order to be precise we should have to write other two axioms for \(\textsf{b};\) but they are almost the same by considering \(\{\!|\textsf{b}|\!\}\) when computing, respectively, the input and the output observations.
-
Rule R2: In this case we can observe that, holds iff \(\forall x_1,x_2\) we have that \(\eta (x_1)=\eta (x_2)\) implies \(\rho {\llbracket \textbf{skip} \rrbracket }(x_1)=\rho (x_1)=\rho (x_2)=\rho {\llbracket \textbf{skip} \rrbracket }(x_2)\), and this trivially holds if \(\eta \sqsubseteq \rho \).
-
Rule R3: In this case we need the precondition , which means that the expression semantics does not change the property, i.e., \(\eta (x_1)=\eta (x_2)\ \Rightarrow \ \rho (\{\!|\textsf{e}|\!\}(x_1))=\rho (\{\!|\textsf{e}|\!\}(x_2))\). Hence, the assignment is complete if the expression is complete, but if there is more than one variable we need \(\eta \sqsubseteq \rho \) for guaranteeing the implication (the assignment behaves like \(\textbf{skip};\) on the other potential program viariables). Indeed, \({\llbracket x:=\textsf{e} \rrbracket }(x_1)=x_1[x\mapsto \{\!|\textsf{e}|\!\}(x_1)]\) and \({\llbracket x:=\textsf{e} \rrbracket }(x_2)=x_2[x\mapsto \{\!|\textsf{e}|\!\}(x_2)]\), provides results with the same \(\rho \) property since all the variables \(y\ne x\), due to the hypotheses \(\eta (x_1)=\eta (x_2)\) and \(\eta \sqsubseteq \rho \), have values sharing the same \(\rho \) property, while for x returns the evaluations of the expression on the two different input memories. These evaluations share precisely the same \(\rho \) property by the rule precondition.
-
Rule R4: It is trivial since the semantics of the basic transfer function \(\textsf{b}?\) is precisely the semantics of the boolean expression \(\textsf{b}\).
-
Rule R5: In this case, the proof is obtained by using rule R2, R6 and R8. Indeed, when we do not execute \(\texttt{C}\) (\(n=0\)) we need in output to observe \(\eta \) (R2). When we execute \(\texttt{C}\) one or more times, by induction on \(n\ge 1\), by hypotheses and by R6, we prove ANI with \(\rho \) in output, and therefore by R8 we prove ANI observing \(\eta \sqcup \rho =\eta \).
-
Rule R6: If \(\forall x_1,x_2.\,\eta (x_1)=\eta (x_2)\ \Rightarrow \ \rho {\llbracket \texttt{C}_1 \rrbracket }(x_1)=\rho {\llbracket \texttt{C}_1 \rrbracket }(x_2)\) and \(\forall y_1,y_2.\,\eta _1(y_1)=\eta _1(y_2)\ \Rightarrow \ \rho _1 {\llbracket \texttt{C}_2 \rrbracket }(y_1)=\rho _1{\llbracket \texttt{C}_2 \rrbracket }(y_2)\), then we have that \(\forall x_1,x_2.\,\eta (x_1)=\eta (x_2)\ \Rightarrow \ \rho _1 {\llbracket \texttt{C}_2 \rrbracket }({\llbracket \texttt{C}_1 \rrbracket }(x_1))=\rho _1{\llbracket \texttt{C}_2 \rrbracket }({\llbracket \texttt{C}_1 \rrbracket }(x_2))\). At this point, since \(\rho {\llbracket \texttt{C}_1 \rrbracket }(x_1)=\rho {\llbracket \texttt{C}_1 \rrbracket }(x_2)\) implies \(\eta _1{\llbracket \texttt{C}_1 \rrbracket }(x_1)=\eta _1{\llbracket \texttt{C}_1 \rrbracket }(x_2)\), then we have the thesis.
-
Rule R7: If \(\forall x_1,x_2\) we have \(\eta _1(x_1)=\eta _1(x_2)\ \Rightarrow \ \rho _1 {\llbracket \texttt{C}_1 \rrbracket }(x_1)=\rho _1{\llbracket \texttt{C}_1 \rrbracket }(x_2)\) and \(\forall y_1,y_2\) we have \(\eta _2(y_1)=\eta _2(y_2)\ \Rightarrow \ \rho _2 {\llbracket \texttt{C}_2 \rrbracket }(y_1)=\rho _2{\llbracket \texttt{C}_2 \rrbracket }(y_2)\), then \(\forall x_1,x_2\) we have that \(.\,(\eta _1\sqcap \eta _2)(x_1)=(\eta _1\sqcap \eta _2)(x_2)\) implies both the equalities \(\eta _1(x_1)=\eta _1(x_2)\) and \(\eta _2(x_1)=\eta _2(x_2)\), hence we have both \(\rho _1 {\llbracket \texttt{C}_1 \rrbracket }(x_1)=\rho _1{\llbracket \texttt{C}_1 \rrbracket }(x_2)\) and \(\rho _2 {\llbracket \texttt{C}_2 \rrbracket }(x_1)=\rho _2{\llbracket \texttt{C}_2 \rrbracket }(x_2)\). This implies that, being , .
-
Rule R8: Trivial. Indeed, \(\eta \) implies \(\eta _1\) and \(\rho _1\) implies \(\rho \).
-
Rule R9: By definition of \(\sqcup \) of partitioning closures [28], we have that \(\eta _1\sqcup \eta _2(x_1)=\eta _1\sqcup \eta _2(x_2)\) implies that either \(\eta _1(x_1)=\eta _1(x_2)\) or \(\eta _2(x_1)=\eta _2(x_2)\). then by hypothesis, in both cases we have that \(\rho {\llbracket \texttt{C} \rrbracket }(x_1)=\rho {\llbracket \texttt{C} \rrbracket }(x_2)\), namely we have the thesis. We can trivially extend the proof to any set I.
-
Rule R10: Trivial by rule R7.
-
Rule R11: By definition of \(\sqcap \) we have that \(\sqcap _i \rho _i{\llbracket \texttt{C} \rrbracket }(x_1)=\bigwedge _i\rho _i{\llbracket \texttt{C} \rrbracket }(x_1)\). By hypothesis if \(\eta (x_)=\eta (x_2)\) then for each \(i\in I\) we have \(\rho _i {\llbracket \texttt{C} \rrbracket }(x_1)=\rho _i {\llbracket \texttt{C} \rrbracket }(x_2)\), but then \(\bigwedge _i\rho _i{\llbracket \texttt{C} \rrbracket }(x_1)=\bigwedge _i\rho _i{\llbracket \texttt{C} \rrbracket }(x_2)=\sqcap _i \rho _i{\llbracket \texttt{C} \rrbracket }(x_2)\), namely we have the thesis.
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Mastroeni, I., Pasqua, M. (2023). Domain Precision in Galois Connection-Less Abstract Interpretation. In: Hermenegildo, M.V., Morales, J.F. (eds) Static Analysis. SAS 2023. Lecture Notes in Computer Science, vol 14284. Springer, Cham. https://doi.org/10.1007/978-3-031-44245-2_19
Download citation
DOI: https://doi.org/10.1007/978-3-031-44245-2_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-44244-5
Online ISBN: 978-3-031-44245-2
eBook Packages: Computer ScienceComputer Science (R0)