Verification and Planning in Agent-Based Systems