Logic Programs as Term Rewriting Systems
Massimo Marchiori
Department of Pure and Applied Mathematics
University of Padova
Via Belzoni Padova Italy
max hilbert math unipd it
Abstract
This pap er studies the relationship b etween logic programs and term rewrit
ing systems TRSs A comp ositional transform is de ned whichgiven a logic
program computes a TRS For a relevant class of logic programs called Simply
Well Mo ded SWM there is a one to one corresp ondence b etween computed
answer substitutions of the logic program and normal forms of the corresp ond
ing TRS Moreover the transform preserves termination i e a logic program
terminates i the corresp onding TRS terminates This transform is re ned in
suchaway that the ab ove results hold for a relevant class of uni cation free
programs containing SWM the class of Flatly Well Mo ded FWM programs
Note This work was done during an author s stay at CWI Amsterdam