Logic-Programming Schemes and Their Implementation