Path: utzoo!attcan!uunet!cs.utexas.edu!asuvax!ncar!boulder!uswat!naim From: naim@uswat.uswest.com (Naim Abdullah) Newsgroups: comp.lang.prolog Subject: Running backwards Message-ID: <11138@uswat.UUCP> Date: 17 Sep 90 16:35:51 GMT Sender: news@uswat.UUCP Organization: US WEST Advanced Technologies, CO, USA Lines: 21 Jonathan.Bowen@prg.oxford.ac.uk (Jonathan Bowen) writes of a compiler that he has written in Prolog and speculates of using it as a disassembler: >Prolog in principle >can run backwards, so it may be possible to supply some object code and >produce a high-level program or programs as output. The main problem is >running the necessary arithmetic backwards (i.e. avoiding the use of >"is") and I am currently looking into this. Has anyone else done any >similar work or can anyone supply any useful references? The CLP(R) interpreter can do a better job of running backwards than vanilla Prolog interpreters. This is because it views arithmetic predicates as constraints rather than unidirectional special predicates. Try using CLP(R) in order to go backwards. You may be surprised. The CLP(R) interpreter can be obtained from Monash University. A CLP(R) compiler has also been written at IBM and is available free of charge for academic research (this is recollection of the license; do not quote me on it). Naim