Writing program as QJ proof and compiling into PROLOG program - Takayama, Yukihide (1987)