Rule Formats for Determinism and Idempotence