PPDP '04: Principles and Practice of Declarative Programming