Plan Synthesis for Knowledge and Action Bases