This homework is to practice using BDDs to represent Kripke structures and to do symbolic state generation.
Use the CUDD package for the following problems.
The CUDD interface is defined in the obj folder in the CUDD distribution in the file cuddObj.hh. The following following functions are important in that interface:
BDD BDD::SwapVariables(std::vector<BDD> x, std::vector<BDD> y) const; BDD AndAbstract(const BDD& g, const BDD& cube, unsigned int limit = 0) const; double BDD::CountMinterm(int nvars) const; void Cudd::DumpDot( const std::vector<BDD>& nodes, char ** inames = 0, char ** onames = 0, FILE * fp = stdout) const;
For the CUDD interface, BDD::SwapVariables is equivalent to replace and BDD::AndAbstract (or BDD::ClippingAndAbstract) is equivalent to relational product. The cube variable is as expected. BDD::AndAbstract is direct to use and you may ignore the optional limit parameter. If you use to use BDD:ClippingAndAbstract, maxDepth may be set to the number of variables in the BDD manager, and direction to 0. The BDD::CountMinterm is equivalent to SatCount. The Cudd::DumpDot dumps any BDDs in the input vector as dot files. The onames are the names of each function dumped. The inames are the names of the variables in the BDD (be sure to include all of them). As FYI for the dot output, CUDD uses complement edges indicated by the small-dash line (as opposed to the long-dash line). You need to count the number of complement edges to figure out the final value: an odd number means the final value is complemented and an even number means the final value is unchanged. See a simple example of and-ing two variables to see what I mean. Or even look at the dump for a single variable. The first complement edge may be on the pointer naming the function and showing its first node!
Please submit a single file with paper pencil work and your program via the Homework 6 link in Learning Suite.