A Top-Down Compiler for Sentential Decision Diagrams