Re: Help on disassembler/decompilers

kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell)
14 Sep 90 14:01:59 GMT

          From comp.compilers

Related articles
[11 earlier articles]
Re: Help on disassembler/decompilers freek@fwi.uva.nl (1990-09-12)
Re: Help on disassembler/decompilers dik@cwi.nl (1990-09-10)
Re: Help on disassembler/decompilers markh@csd4.csd.uwm.edu (Mark William Hopkins) (1990-09-10)
Re: Help on disassembler/decompilers Jonathan.Bowen@prg.oxford.ac.uk (Jonathan Bowen) (1990-09-13)
Re: Help on disassembler/decompilers nreadwin@miclon.uucp (1990-09-13)
Re: Help on disassembler/decompilers td@alice.UUCP (1990-09-13)
Re: Help on disassembler/decompilers kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (1990-09-14)
Re: Help on disassembler/decompilers hankd@dynamo.ecn.purdue.edu (1990-09-14)
Re: Help on disassembler/decompilers hawley@icot32.icot.or.jp (1990-09-15)
Re: Help on disassembler/decompilers ch@dce.ie (1990-09-14)
Re: Help on disassembler/decompilers kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (1990-09-15)
Re: Help on disassembler/decompilers roland@ai.mit.edu (1990-09-16)
Re: Help on disassembler/decompilers raulmill@usc.edu (1990-09-16)
[5 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.prolog
From: kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell)
Keywords: debug, prolog
Organization: SUNY Binghamton, NY
References: <HOW.90Sep5173755@sundrops.ucdavis.edu> <2900@network.ucsd.edu> <1990Sep9.010032.23235@sco.COM> <433@necssd.NEC.COM> <679@culhua.prg.ox.ac.uk>
Date: 14 Sep 90 14:01:59 GMT

In article <679@culhua.prg.ox.ac.uk> Jonathan Bowen <Jonathan.Bowen@prg.oxford.ac.uk> writes:
>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?


Funny, I didn't _see_ this in comp.lang.prolog...


To answer your query, arithmetic _can_ be run backward.


One simple, but inefficient, technique is to use ``unary'' arithmetic. (I.e.
zero is 0, 1 is suc(0), 2 is suc(suc(0))). Rewriting the is/2, >/2, etc is a
pain but it _can_ be done.


Quite a lot of interesting work has been done on investigating which Prolog
relations can run backward -- look thru the Int Conf on Logic Prog & similar
things (they only go a few years so why check out the ref for you)?


DHD Warren wrote a nice article in Software Practice and Experience regarding
compiler-writing in Prolog -- check that out too (he writes fairly _neat_
code for one thing, and we're talking about readability here).


-Kym Horsell
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.