{"content":[{"text":"A framew with ork for an p application olyt ypic programming to rewriting on terms, \n patrikj@cs.chalm Computing Science, ers .s Chalmers e, P http://www.cs.ch atrik Univ Jansson ersit y of al T ec me hnology rs. se /~p , Sw at eden \n Computer Johan kj/ \n johanj@cs.uu.nl, Science, Utrec http://www.cs.u h t Jeuring ri \n Univ ersit y , u.n the l/ Netherlands ~j oha nj / \n datat Giv en an y v alue of a datat yp Abstract to rewrite v alues \n rewriting izable. yp This e, strategy w e pap w an er t \n rest . a dev \n of It function impro elops a that p olyt e (an rewrites ypic algebra the of v alue terms), to normal and rules form uses if the v alue is normal- of that \n men part tal from w a ys. the Firstly , the the rewriting program. v es up on function our rewriting \n The earlier term uses in w terface a function ork term on is in p olyt that terface ypic rewriting the parallel t w o funda- \n gramming calculating implemen tation on \n rectness pro with terms. of programs. p olyt This ypism. implies W that e giv , the the e sev of rewriting rewriting eral functions function function and a \n is is dev la framew indep that ork hides for p in innermost \n Secondly the pro ws elop on enden terms, t of the p olyt ypic \n W e just presen t the result whic the olyt \n with h particular ypic pro- \n elsewhere. of. correctness of, the pro ed together of itself is published simplify a cor- \n A 1 \n The term In rewriting tro duction \n A rewrite system describ e is ho an w algebra (a datat yp e \n term rewrite rule rules \n v that matc is hes a the pair left (lhs hand ; rhs to ) of rewrite terms the con terms taining of of terms) the \n b y the matc hes side from (lhs the ) ma left y b hand e rewritten side. v ariables algebra. together with a set of rewrite rules. \n the ariables functional replaced programming language Hask ell 98 [10℄. The to the co with de righ in the t this hand in terpretation pap side er is (rhs expressed ) that with an the in y \n 1.1 An example An example of a term datat rewriting \n data Expr = EV yp ar e is Int the system \n j Z t yp j e S Expr Expr : \n t plusZer yp e R ule t = (t ; t j Expr :+ : Expr j Expr :�: Expr \n plusZer where o o x = = :: EV (x R ule :+ ) \n ar : Expr \n F or example, with the rule plusZer 0 Z ; x ) \n with the substitution f x 7! S Z g. o the Th us left the hand rewritten side x :+ term : Z is matc the hes righ the expression x S after Z :+ \n 1 t hand side the : Z","bbox":{"left":0.147059,"top":-0.011641,"width":0.69136,"height":0.9363630000000001}}],"images_bbox":[],"images_bbox_not_text_overlap":[]}