Abstract
Formal reasoning about hashing-based probabilistic data structures often requires reasoning about random variables where when one variable gets larger (such as the number of elements hashed into one bucket), the others tend to be smaller (like the number of elements hashed into the other buckets). This is an example of negative dependence, a generalization of probabilistic independence that has recently found interesting applications in algorithm design and machine learning. Despite the usefulness of negative dependence for the analyses of probabilistic data structures, existing verification methods cannot establish this property for randomized programs.
To fill this gap, we design LINA, a probabilistic separation logic for reasoning about negative dependence. Following recent works on probabilistic separation logic using separating conjunction to reason about the probabilistic independence of random variables, we use separating conjunction to reason about negative dependence. Our assertion logic features two separating conjunctions, one for independence and one for negative dependence. We generalize the logic of bunched implications (BI) to support multiple separating conjunctions, and provide a sound and complete proof system. Notably, the semantics for separating conjunction relies on a non-deterministic, rather than partial, operation for combining resources. By drawing on closure properties for negative dependence, our program logic supports a Frame-like rule for negative dependence and monotone operations. We demonstrate how LINA can verify probabilistic properties of hash-based data structures and balls-into-bins processes.
Supplemental Material
- Nima Anari, Shayan Oveis Gharan, and Alireza Rezaei. 2016. Monte Carlo Markov chain algorithms for sampling Strongly Rayleigh distributions and determinantal point processes. In Conference on Computational Learning Theory (COLT). 49, Proceedings of Machine Learning Research, New York, New York. 103–115. http://proceedings.mlr.press/v49/anari16.htmlGoogle Scholar
- Jialu Bao, Simon Docherty, Justin Hsu, and Alexandra Silva. 2021. A Bunched logic for conditional independence. In IEEE Symposium on Logic in Computer Science (LICS). IEEE, Rome, Italy. 1–14. https://doi.org/10.1109/LICS52264.2021.9470712 Google Scholar
Digital Library
- Jialu Bao, Marco Gaboardi, Justin Hsu, and Joseph Tassarotti. 2022. A Separation Logic for Negative Dependence. Proceedings of the ACM on Programming Languages, 6, POPL (2022), arxiv:2111.14917Google Scholar
Digital Library
- Gilles Barthe, Benjamin Grégoire, and Santiago Zanella Béguelin. 2012. Probabilistic relational Hoare logics for computer-aided security Proofs. In Mathematics of Program Construction (MPC). Springer, Madrid, Spain. 1–6. https://doi.org/10.1007/978-3-642-31113-0_1 Google Scholar
Digital Library
- Gilles Barthe, Justin Hsu, and Kevin Liao. 2020. A probabilistic separation logic. Proceedings of the ACM on Programming Languages, 4, POPL (2020), 55:1–55:30. https://doi.org/10.1145/3371123 Google Scholar
Digital Library
- Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Thomas Noll. 2019. Quantitative separation logic: a logic for reasoning about probabilistic pointer programs. Proceedings of the ACM on Programming Languages, 3, POPL (2019), 34:1–34:29. https://doi.org/10.1145/3290347 Google Scholar
Digital Library
- Luca Becchetti, Andrea Clementi, Emanuele Natale, Francesco Pasquale, and Gustavo Posta. 2019. Self-stabilizing repeated balls-into-bins. Distributed Computing, 32, 1 (2019), 59–68. https://doi.org/10.1007/s00446-017-0320-4 Google Scholar
Digital Library
- Ioana O. Bercea and Guy Even. 2019. Fully-dynamic space-efficient dictionaries and filters with constant number of memory accesses. CoRR, abs/1911.05060 (2019), arxiv:1911.05060Google Scholar
- Burton H. Bloom. 1970. Space/time trade-offs in hash coding with allowable errors. Commun. ACM, 13, 7 (1970), 422–426. https://doi.org/10.1145/362686.362692 Google Scholar
Digital Library
- Julius Borcea, Petter Brändén, and Thomas M. Liggett. 2009. Negative dependence and the geometry of polynomials. Journal of the American Mathematical Society, 22, 2 (2009), 521–567. https://www.ams.org/journals/jams/2009-22-02/S0894-0347-08-00618-8/Google Scholar
Cross Ref
- Prosenjit Bose, Hua Guo, Evangelos Kranakis, Anil Maheshwari, Pat Morin, Jason Morrison, Michiel Smid, and Yihui Tang. 2008. On the false-positive rate of Bloom filters. Inform. Process. Lett., 108, 4 (2008), 210–213. https://doi.org/10.1016/j.ipl.2008.05.018 Google Scholar
Digital Library
- Petter Brändén and Johan Jonasson. 2012. Negative dependence in sampling. Scandinavian Journal of Statistics, 39, 4 (2012), 830–838. https://doi.org/10.1111/j.1467-9469.2011.00766.x Google Scholar
Cross Ref
- Stephen Brookes. 2007. A semantics for concurrent separation logic. Theoretical Computer Science, 375, 1–3 (2007), 227–270. https://doi.org/10.1016/j.tcs.2006.12.034 Google Scholar
Digital Library
- Aleksandar Chakarov and Sriram Sankaranarayanan. 2013. Probabilistic program analysis with martingales. In International Conference on Computer Aided Verification (CAV). Springer, Saint Petersburg, Russia. 511–526. https://doi.org/10.1007/978-3-642-39799-8_34 Google Scholar
Cross Ref
- Bolin Ding and Arnd Christian König. 2011. Fast set intersection in memory. Proceedings of the VLDB Endowment, 4, 4 (2011), 255–266. https://doi.org/10.14778/1938545.1938550 Google Scholar
Digital Library
- Simon Docherty. 2019. Bunched logics: a uniform approach. Ph. D. Dissertation. UCL (University College London).Google Scholar
- Devdatt P. Dubhashi, Johan Jonasson, and Desh Ranjan. 2007. Positive influence and negative dependence. Combinatorics, Probability and Computing, 16, 1 (2007), 29–41. https://doi.org/10.1017/S0963548306007772 Google Scholar
Digital Library
- Devdatt P. Dubhashi and Desh Ranjan. 1998. Balls and bins: A study in negative dependence. Random Structures and Algorithms, 13, 2 (1998), 99–124. https://doi.org/10.5555/299633.299634Google Scholar
Digital Library
- Kiran Gopinathan and Ilya Sergey. 2020. Certifying certainty and uncertainty in approximate membership query structures. In International Conference on Computer Aided Verification (CAV) (Lecture Notes in Computer Science, Vol. 12225). Springer, Los Angeles, California. 279–303. https://doi.org/10.1007/978-3-030-53291-8_16 Google Scholar
Digital Library
- Andrew D. Gordon, Thomas A. Henzinger, Aditya V. Nori, and Sriram K. Rajamani. 2014. Probabilistic programming. In Future of Software Engineering Proceedings (FOSE). Hyderabad, India. 167–181. https://doi.org/10.1145/2593882.2593900 Google Scholar
Digital Library
- Samin Ishtiaq and Peter W. O’Hearn. 2001. BI as an assertion language for mutable data structures. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL). London, England. 14–26. https://doi.org/10.1145/360204.375719 Google Scholar
Digital Library
- Kumar Joag-Dev and Frank Proschan. 1983. Negative association of random variables with applications. The Annals of Statistics, 11, 1 (1983), 286–295. https://doi.org/10.1214/aos/1176346079 Google Scholar
Cross Ref
- Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Ales Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. Journal of Functional Programming, 28 (2018), e20. https://doi.org/10.1017/S0956796818000151 Google Scholar
Cross Ref
- Dexter Kozen. 1981. Semantics of probabilistic programs. J. Comput. System Sci., 22, 3 (1981), 328–350. https://doi.org/10.1016/0022-0000(81)90036-2 Google Scholar
Cross Ref
- Alex Kulesza and Ben Taskar. 2012. Determinantal point processes for machine learning. Foundations and Trends in Machine Learning, 5, 2-3 (2012), 123–286. https://doi.org/10.1561/2200000044 Google Scholar
Cross Ref
- Michael Mitzenmacher and Eli Upfal. 2005. Probability and computing - randomized algorithms and probabilistic analysis. Cambridge University Press.Google Scholar
- Peter W. O’Hearn. 2007. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375, 1–3 (2007), 271–307. https://doi.org/10.1016/j.tcs.2006.12.035 Google Scholar
Digital Library
- Peter W. O’Hearn and David J. Pym. 1999. The logic of bunched implications. Bulletin of Symbolic Logic, 215–244. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.27.4742&rep=rep1&type=pdfGoogle Scholar
- Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local reasoning about programs that alter data structures. In International Conference on Computer Science Logic (CSL) (Lecture Notes in Computer Science, Vol. 2142). Springer, Paris, France. 1–19. https://doi.org/10.1007/3-540-44802-0_1 Google Scholar
Cross Ref
- Jens Pagel and Florian Zuleger. 2021. Strong-Separation Logic. In European Symposium on Programming (ESOP), Luxembourg City, Luxembourg (Lecture Notes in Computer Science, Vol. 12648). Springer, 664–692. https://doi.org/10.1007/978-3-030-72019-3_24 Google Scholar
Digital Library
- Robin Pemantle. 2000. Towards a theory of negative dependence. J. Math. Phys., 41, 3 (2000), 1371–1390. https://doi.org/10.1063/1.533200 Google Scholar
Cross Ref
- David J. Pym. 2002. The semantics and proof theory of the logic of Bunched implications (Applied Logic Series, Vol. 26). Kluwer Academic Publishers. Errata and Remarks maintained at: http://www.cantab.net/users/david.pym/BI-monograph-errata.pdfGoogle Scholar
- David J. Pym, Peter W. O’Hearn, and Hongseok Yang. 2004. Possible worlds and resources: The semantics of BI. Theoretical Computer Science, 315, 1 (2004), 257–305. https://www.sciencedirect.com/science/article/pii/S0304397503006248Google Scholar
Digital Library
- John C. Reynolds. 2001. Intuitionistic reasoning about shared mutable data structure. Millennial Perspectives in Computer Science, 2, 1 (2001), 303–321. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.11.5999&rep=rep1&type=pdfGoogle Scholar
- Ilya Sergey, Aleksandar Nanevski, and Anindya Banerjee. 2015. Mechanized verification of fine-grained concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, Portland, Oregon. 77–87. https://doi.org/10.1145/2737924.2737964 Google Scholar
Digital Library
- Aravind Srinivasan. 2001. Distributions on level-sets with applications to approximation algorithms. In IEEE Symposium on Foundations of Computer Science (FOCS). IEEE, Las Vegas, Nevada. 588–597. https://doi.org/10.1109/SFCS.2001.959935 Google Scholar
Cross Ref
- Joseph Tassarotti and Robert Harper. 2019. A separation logic for concurrent randomized programs. Proceedings of the ACM on Programming Languages, 3, POPL (2019), 64:1–64:30. https://doi.org/10.1145/3290377 Google Scholar
Digital Library
- Jinyi Wang, Yican Sun, Hongfei Fu, Krishnendu Chatterjee, and Amir Kafshdar Goharshady. 2021. Quantitative analysis of assertion violations in probabilistic programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, Virtual. 1171–1186. https://doi.org/10.1145/3453483.3454102 Google Scholar
Digital Library
Index Terms
A separation logic for negative dependence
Recommendations
Quantitative separation logic: a logic for reasoning about probabilistic pointer programs
We present quantitative separation logic (QSL). In contrast to classical separation logic, QSL employs quantities which evaluate to real numbers instead of predicates which evaluate to Boolean values. The connectives of classical separation logic, ...
Interactive proofs in higher-order concurrent separation logic
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWhen using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they ...
Interactive proofs in higher-order concurrent separation logic
POPL '17When using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they ...






Comments