Bddl: A Type System for Binary Decision Diagrams

Yousra Lembachar, Ryan Rusich, Iulian Neamtiu, Gianfranco Ciardo

Research output: Chapter in Book/Report/Conference proceedingConference contribution

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.

Original languageEnglish (US)
Title of host publicationTests and Proofs - 16th International Conference, TAP 2022, held as Part of STAF 2022, Proceedings
EditorsLaura Kovács, Karl Meinke
PublisherSpringer Science and Business Media Deutschland GmbH
Pages31-47
Number of pages17
ISBN (Print)9783031098260
DOIs
StatePublished - 2022
Event16th International Conference on Tests and Proofs, TAP 2022, held as part of the Federated Conference on Software Technologies: Applications and Foundations, STAF 2022 - Nantes, France
Duration: Jul 5 2022Jul 5 2022

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume13361 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference16th International Conference on Tests and Proofs, TAP 2022, held as part of the Federated Conference on Software Technologies: Applications and Foundations, STAF 2022
Country/TerritoryFrance
CityNantes
Period7/5/227/5/22

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Keywords

  • BDD library
  • Binary Decision Diagrams
  • Correctness by construction
  • Type checking

Fingerprint

Dive into the research topics of 'Bddl: A Type System for Binary Decision Diagrams'. Together they form a unique fingerprint.

Cite this