Synthesis of functions by transformations and constraints (poster)
暂无分享,去创建一个
The unfold/fold system [BD77] is a simple to use and yet general program transformation system. We are trying to extend it to make synthesis of functions. ln this way, we would have a simple and useful tool to design naive algorithms, which could later be transformed into efficient ones. Several extensions of the Unfoldifold system have been proposed. For irtetance, Chin [ChiW] used constraints to be able to transform programs while taking into account additional properties such as preconditions or invariants. Following Chin [Cbi90], we specify relations (i.e. constraints) with a clause such that (written st ) [Chi90]. Such constraints are not executable, but are only used for annotation and transformation mumrees. However. we make a . . more general use of them as preand post-con~tions. We integrate them in Haskell, although the choice of the base functional language is largely irrelevant for our synthesis. For instance, a function can be typically specified in the following way: f x st P[xl = y st REx, y] where P [xJ is a precondition to be satisfied by input x and R [x, y] is a relation to be hold by input x and output y. We use the term }unction synthesis in the restricted sense of a process where general equalities with constraints are transformed into functional equations after constraint removal. We have extended the unfold/fold transformation rules to be able to operate over general equalities instead of equations. Besides, we have introduced several transformation rules to handle constraints. err. the conversion between ,“
[1] Wei-Ngan Chin,et al. Automatic methods for program transformation , 1990 .
[2] John Darlington,et al. A Transformation System for Developing Recursive Programs , 1977, J. ACM.