Bottom-up evaluation of logic programs using binary decision diagrams

Binary decision diagram (BDD) is a data structure to manipulate Boolean functions and recognized as a powerful tool in the VLSI CAD area. We consider that compactness and efficient operations of BDDs can be utilized for storing temporary relations in bottom-up evaluation of logic queries. We show two methods of encoding relations into BDDs, called logarithmic encoding and linear encoding, define relational operations on BDDs and discuss optimizations in ordering BDD variables to construct memory and time efficient BDDs. Our experiments show that our BDD-based bottom-up evaluator has remarkable performance against traditional hash table-based methods for transitive closure queries on dense graphs.<<ETX>>