CLP(BN): Constraint Logic Programming for Probabilistic Knowledge