Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!sdd.hp.com!uakari.primate.wisc.edu!aplcen!aplcomm!uunet!mcsun!ukc!newcastle.ac.uk!colman!des0mpw From: des0mpw@colman.newcastle.ac.uk (M.P. Ward) Newsgroups: comp.lang.lisp Subject: Looking for an expression simplifier Message-ID: <1991Jan23.121653.3607@newcastle.ac.uk> Date: 23 Jan 91 12:16:53 GMT Sender: news@newcastle.ac.uk Organization: Computing Laboratory, University of Newcastle upon Tyne, UK, NE1 7RU Lines: 27 I am looking for some CL code to simplify expressions (input as lisp structures eg: (+ B A (+ C B))). Nothing very clever, just the sort of expressions found in simple programs. This is for our research project on programs transformation/analysis. Some examples: (+ B A (+ C B)) simplifies to (+ A B C) (* (+ A B) (- A B)) simplifies to (- (^ A 2) (^ B 2)) (- (* (+ A B) (- A B)) (- (^ A 2) (^ B 2))) simplifies to 0 I hope you get the idea. Ideally it would be extensible, based on a list of rules which could be added to. I have the source for the Boyer-Moore Theorem Prover and Maxima, but we are finding it a bit difficult to dig out the parts we could make use of. Please email replies as I don't often read this list. Many thanks! Martin. JANET: Martin.Ward@uk.ac.durham Internet (eg US): Martin.Ward@DURHAM.AC.UK or if that fails: Martin.Ward%uk.ac.durham@nfsnet-relay.ac.uk or even: Martin.Ward%DURHAM.AC.UK@CUNYVM.CUNY.EDU BITNET: IN%"Martin.Ward@DURHAM.AC.UK" UUCP:...!mcvax!ukc!durham!Martin.Ward