Binary decision diagrams

Design an abstract datatype for binary decision diagrams (BDDs).
A BDD is a representation of a Boolean function of several variables. It can be defined recursively as 0 (false) or 1 (true) or a decision structure of the form "if v then f1 else f0" where f1 and f0 are themselves BDDs, with some additional constraints:

Define a data structure to represent a BDD. For simplification, choose a simple set of variable names: characters ('a', 'b', 'p', 'q', etc.) or numbered variables: v0, v1, v2, ...
Your abstract datatype should have


Marius Minea
Last modified: Fri Mar 18 21:00:00 EET 2016