The outer BDD loop