Skip to main content

Bddl: A Type System for Binary Decision Diagrams

  • Conference paper
  • First Online:
Tests and Proofs (TAP 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13361))

Included in the following conference series:

Abstract

Binary Decision Diagrams (BDDs) are compact data structures used to efficiently store and process boolean functions. BDDs have many uses, from system design to model checking to efficiently storing context information for context-sensitive analysis. The use of BDDs in verification and program analysis has been facilitated by the recent emergence of many open source BDD libraries. The correctness of BDD-based system design and verification hinges upon the correctness of the BDD library implementations, and the correct use of these libraries. Surprisingly, for a technology so prevalent in system design and formal verification, there has been little research effort on formally verifying the correctness of BDD library implementations or their use. For BDD libraries that do perform some correctness checks, these are mostly confined to runtime assertion checking, which slows down BDD operations and might still be unable to reveal errors until deployment. To address these issues and take a step toward provably correct, yet efficient, BDD-handling code, we propose a formal system called Bddl to describe, reason about, and prove the correctness of BDD operations. Bddl extends lambda calculus with support for BDD operations (e.g., creation, manipulation), expressing BDD structural properties (e.g., canonicity, proper ordering), and BDD semantics (e.g., sets, relations). Bddl uses a type system based on refinement types to statically check BDD manipulation. We have proved our system correct using a small-step semantics and standard notions of progress and preservation. Bddl is the first attempt to provide a well-defined syntax and semantics to BDD operations; we show how it could prevent bugs and semantic errors in the implementation and use of three mature DD libraries.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Other kinds of decision diagrams operate on integers and reals to encode algebraic, arithmetic, and relational functions. Decision diagrams have been employed in areas as diverse as optimization [2], electronic design [24], VLSI CAD [5], Genetics (gene expression analysis [25], data-mining DNA subsequences) [15], NASA safety operations [20], and reliability [23].

  2. 2.

    To eliminate ambiguity and prevent a potential incorrect use of functions that support both forms of encoding [1], some libraries do not leave this choice to the user.

References

  1. Miner, A., et al.: MEDDLY: multi-terminal and Edge-valued Decision Diagram LibrarY. https://meddly.sourceforge.io/

  2. Bergman, D., Cire, A.A., van Hoeve, W.J., Hooker, J.: Decision Diagrams for Optimization. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-42849-9

  3. Bernasconi, A., Ciriani, V.: Index-resilient zero-suppressed bdds: definition and operations. ACM Trans. Des. Autom. Electron. Syst. 21(4), 1–27 (2016)

    Article  Google Scholar 

  4. Bernasconi, A., Ciriani, V., Lago, L.: On the error resilience of ordered binary decision diagrams. Theor. Comput. Sci. 595, 11–33 (2015)

    Article  Google Scholar 

  5. Bryant, R.: On the complexity of VLSI implementations and graph representations of Boolean functions with application to integer multiplication. IEEE Trans. Comput. 40(2), 205–213 (1991)

    Article  Google Scholar 

  6. Drechsler, R.: Verifying integrity of decision diagrams. Integr. 32(1–2), 61–75 (2002)

    Google Scholar 

  7. Somenzi, F.: CUDD: CU Decision Diagram Package. https://github.com/ivmai/cudd

  8. Freeman, T., Pfenning, F.: Refinement types for ML, pp. 268–277. PLDI 1991, Association for Computing Machinery, New York, NY, USA (1991)

    Google Scholar 

  9. Ciardo, G., Miner, A.S.: SMART: Stochastic model-checking analyzer for reliability and timing. https://asminer.github.io/smart/

  10. Giorgino, M., Strecker, M.: Correctness of pointer manipulating algorithms illustrated by a verified BDD construction. In: Giannakopoulou, D., Méry, D. (eds.) FM 2012. LNCS, vol. 7436, pp. 202–216. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32759-9_18

    Chapter  Google Scholar 

  11. Groen, F., Smidts, C., Mosleh, A., Swaminathan, S.: Qras - the quantitative risk assessment system. In: Annual Reliability and Maintainability Symposium. 2002 Proceedings (Cat. No.02CH37318), pp. 349–355 (2002)

    Google Scholar 

  12. Whaley, J.: JavaBDD. http://javabdd.sourceforge.net/

  13. Kawaguchi, M., Rondon, P., Jhala, R.: Type-based data structure verification, pp. 304–315. PLDI 2009 (2009)

    Google Scholar 

  14. Lembachar, Y., Rusich, R., Neamtiu, I., Ciardo, G.: BDDL: a type system for binary decision diagrams. Technical Report, Department of Computer Science, NJIT, May 2022. https://web.njit.edu/~ineamtiu/pubs/bddl-tr.pdf

  15. Loekito, E., Bailey, J., Pei, J.: A binary decision diagram based approach for mining frequent subsequences. Knowl. Inf. Syst. 24(2), 235–268 (2010)

    Article  Google Scholar 

  16. Ortner, V., Schirmer, N.: Verification of BDD normalization. In: Hurd, J., Melham, T. (eds.) Theorem Proving in Higher Order Logics, pp. 261–277 (2005)

    Google Scholar 

  17. Ortner, V., Schirmer, N.: Bdd normalisation. Archive of Formal Proofs, Febuary 2008. https://isa-afp.org/entries/BDD.html, Formal proof development

  18. Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)

    Google Scholar 

  19. Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types, pp. 159–169. PLDI 2008, June 2008

    Google Scholar 

  20. Siminiceanu, R.I., Ciardo, G.: Formal verification of the Nasa runway safety monitor. Int. J. Softw. Tools Technol. Transf. 9(1), 63–76 (2007)

    Article  Google Scholar 

  21. Stanković, S., Astola, J.: Xml framework for various types of decision diagrams for discrete functions. IEICE Trans. 90-D, 1731–1740 (2007)

    Google Scholar 

  22. Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams, PLDI 2004, pp. 131–144 (2004)

    Google Scholar 

  23. Xing, L., Amari, S.V.: Binary Decision Diagrams and Extensions for System Reliability Analysis. Wiley, Hoboken (2015)

    Google Scholar 

  24. Yanushkevich, S.N., Miller, D.M., Shmerko, V.P., Stankovic, R.S.: Decision Diagram Techniques for Micro- and Nanoelectronic Design Handbook (2006)

    Google Scholar 

  25. Yoon, S., De Micheli, G.: An application of zero-suppressed binary decision diagrams to clustering analysis of DNA microarray data, EMBC 2004, pp. 2925–2928 (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Iulian Neamtiu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Lembachar, Y., Rusich, R., Neamtiu, I., Ciardo, G. (2022). Bddl: A Type System for Binary Decision Diagrams. In: Kovács, L., Meinke, K. (eds) Tests and Proofs. TAP 2022. Lecture Notes in Computer Science, vol 13361. Springer, Cham. https://doi.org/10.1007/978-3-031-09827-7_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-09827-7_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-09826-0

  • Online ISBN: 978-3-031-09827-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics