skip to main content
research-article

A model counter for constraints over unbounded strings

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

Model counting is the problem of determining the number of solutions that satisfy a given set of constraints. Model counting has numerous applications in the quantitative analyses of program execution time, information flow, combinatorial circuit designs as well as probabilistic reasoning. We present a new approach to model counting for structured data types, specifically strings in this work. The key ingredient is a new technique that leverages generating functions as a basic primitive for combinatorial counting. Our tool SMC which embodies this approach can model count for constraints specified in an expressive string language efficiently and precisely, thereby outperforming previous finite-size analysis tools. SMC is expressive enough to model constraints arising in real-world JavaScript applications and UNIX C utilities. We demonstrate the practical feasibility of performing quantitative analyses arising in security applications, such as determining the comparative strengths of password strength meters and determining the information leakage via side channels.

References

  1. BusyBox. http://www.busybox.net/.Google ScholarGoogle Scholar
  2. CoreUtils. http://www.gnu.org/software/coreutils.Google ScholarGoogle Scholar
  3. Drupal Password Strength Meter. https://drupal.org.Google ScholarGoogle Scholar
  4. eBay Password Strength Meter. https://ebay.com.Google ScholarGoogle Scholar
  5. Fuzzball. http://bitblaze.cs.berkeley.edu/fuzzball.html.Google ScholarGoogle Scholar
  6. Ghttpd Vulnerability. http://www.securityfocus.com/bid/5960.Google ScholarGoogle Scholar
  7. John the Ripper. http://www.openwall.com/john/.Google ScholarGoogle Scholar
  8. LattE Tool. http://www.math.ucdavis.edu/~latte/.Google ScholarGoogle Scholar
  9. MathLink API. http://reference.wolfram.com/mathematica/guide/MathLinkAPI.html.Google ScholarGoogle Scholar
  10. Microsoft Password Strength Meter. https://www.microsoft.com/security/pc-security/password-checker.aspx.Google ScholarGoogle Scholar
  11. Null HTTPd Vulnerability. http://www.securityfocus.com/bid/5774.Google ScholarGoogle Scholar
  12. RelSat Tool. http://code.google.com/p/relsat/.Google ScholarGoogle Scholar
  13. SMC Tool Online. https://github.com/loiluu/smc.Google ScholarGoogle Scholar
  14. F. Bacchus, S. Dalmao, and T. Pitassi. Solving #SAT and Bayesian Inference with Backtracking Search. Journal of Artificial Intelligence Research, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Backes, B. Kopf, and A. Rybalchenko. Automatic Discovery and Quantification of Information Leaks. In Proceedings of the 30th IEEE Symposium on Security and Privacy, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. I. Barvinok. A Polynomial Time Algorithm for Counting Integral Points in Polyhedra When the Dimension Is Fixed. In Proceedings of the 34th Annual Symposium on Foundations of Computer Science, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. J. Bayardo and J. D. Pehoushek. Counting Models using Connected Components. In Proceedings of the AAAI National Conference, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. J. Bayardo, Jr. and R. C. Schrag. Using CSP Look-back Techniques to Solve Real-world SAT Instances. In Proceedings of the 14th National Conference on Artificial Intelligence and Ninth Conference on Innovative Applications of Artificial Intelligence, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Beyls and E. H. D'Hollander. Generating Cache Hints for Improved Program Efficiency. Journal of Systems Architure, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. F. Biondi, A. Legay, L.-M. Traonouez, and A. Wasowski. QUAIL: A quantitative security analyzer for imperative code. In Proceedings of the 25th International Conference on Computer Aided Verification, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. E. Birnbaum and E. L. Lozinskii. The good old davis-putnam procedure helps counting models. Journal of Artificial Intelligence Research, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Cadar, D. Dunbar, and D. Engler. KLEE: Unassisted and Automatic. Generation of High-Coverage Tests for Complex Systems Programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Castro, M. Costa, and J.-P. Martin. Better Bug Reporting with Better Privacy. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. X. de Carné de Carnavalet and M. Mannan. From Very Weak to Very Strong: Analyzing Password-Strength Meters. In Proceedings of the Network and Distributed System Security Symposium, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  25. A. de Moivre. Miscellanea Analytica. 1730.Google ScholarGoogle Scholar
  26. P. Godefroid, N. Klarlund, and K. Sen. DART: Directed Automated Random Testing. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Godefroid, M. Y. Levin, and D. A. Molnar. Automated Whitebox Fuzz Testing. In Proceedings of the Network and Distributed System Security Symposium, 2008.Google ScholarGoogle Scholar
  28. P. Hooimeijer and W. Weimer. A Decision Procedure for Subset Constraints over Regular Languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Kiezun, V. Ganesh, P. J. Guo, P. Hooimeijer, and M. D. Ernst. HAMPI: A solver for string constraints. In Proceedings of the Eighteenth International Symposium on Software testing and Analysis, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. V. Klebanov. Precise Quantitative Information Flow Analysis Using Symbolic Model Counting. In Proceedings of the International Workshop on Quantitative Aspects in Security Assurance, 2012.Google ScholarGoogle Scholar
  31. D. E. Knuth. The Art of Computer Programming, Volume 1 (3rd Ed.): Fundamental Algorithms. Addison Wesley Longman Publishing Co., Inc., 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques - Adaptive Computation and Machine Learning. The MIT Press, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. B. Lisper. Fully Automatic, Parametric Worst-Case Execution Time Analysis. In Proceedings of Worst-Case Execution Time (WCET) Analysis Workshop, 2003.Google ScholarGoogle Scholar
  34. S. McCamant and M. D. Ernst. Quantitative Information Flow as Network Flow Capacity. In Proceedings of the ACM SIGPLAN Conference on Programming language Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. A. Morgado, P. J. Matos, V. M. Manquinho, and J. P. M. Silva. Counting Models in Integer Domains. In SAT, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. Newsome, S. McCamant, and D. Song. Measuring Channel Capacity to Distinguish Undue Influence. In Proceedings of the ACM SIGPLAN Workshop on Programming Languages and Analysis for Security, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Q.-S. Phan, P. Malacaria, O. Tkachuk, and C. S. Păsăreanu. Symbolic Quantitative Information Flow. SIGSOFT Software Engineering Notes, Nov. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. R. A. Popa, C. M. S. Redfield, N. Zeldovich, and H. Balakrishnan. CryptDB: Protecting Confidentiality with Encrypted Query Processing. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. D. Roth. On the Hardness of Approximate Reasoning. Journal Artificial Intelligence, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. P. Saxena, D. Akhawe, S. Hanna, F. Mao, S. McCamant, and D. Song. A Symbolic Execution Framework for JavaScript. In Proceedings of the IEEE Symposium on Security and Privacy, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. R. Sedgewick and P. Flajolet. Analytic Combinatorics. Cambridge University Press, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. R. Sedgewick and P. Flajolet. An Introduction to the Analysis of Algorithms. Addison-Wesley Professional, 2013.Google ScholarGoogle Scholar
  43. C. E. Shannon. A Mathematical Theory of Communication. Bell System Technical Journal, 1948.Google ScholarGoogle Scholar
  44. G. Smith. On the Foundations of Quantitative Information Flow. In Proceedings of the 12th International Conference on Foundations of Software Science and Computational Structures, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. B. Taylor. Linear Perspective. 1715.Google ScholarGoogle Scholar
  46. S. Tople, S. Shinde, Z. Chen, and P. Saxena. AutoCrypt: Enabling homomorphic computation on servers to protect sensitive web content. In Proceedings of the ACM SIGSAC Conference on Computer & Communications Security, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. A. Turjan, B. Kienhuis, and E. Deprettere. A Compile Time Based Approach for Solving Out-of-Order Communication in Kahn Process Networks. In Proceedings of The IEEE International Conference onApplication-Specific Systems, Architectures and Processors, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. S. Verdoolaege, R. Seghir, K. Beyls, V. Loechner, and M. Bruynooghe. Counting integer points in parametric polytopes using Barvinok's rational functions. Algorithmica, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. Weir, S. Aggarwal, B. de Medeiros, and B. Glodek. Password cracking using probabilistic context-free grammars. 2012 IEEE Symposium on Security and Privacy, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Wolfram Research. Mathematica. http://www.wolfram.com/mathematica, 2013.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 6
    PLDI '14
    June 2014
    598 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2666356
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2014
      619 pages
      ISBN:9781450327848
      DOI:10.1145/2594291

    Copyright © 2014 ACM

    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 ACM 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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 9 June 2014

    Check for updates

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader