Constructing Conditional Plans by a Theorem-Prover