Le 12/02/2014 14:40, Camille Teruel a écrit :
Hello,
Here are my proposals,
=================================================== Title: Generic rewriting engine
Context: Rewriting is an useful technique that has a lot of applications in many functional programming language. A rewriting engine that can rewrite arbitrary graph of objects would have a lot of useful applications like code refactoring and migration of instances in an alive program.
Goal: The goal of this proposal is to implement a rewriting engine for arbitrary tree/graph of object. A rewriting rule must be able to define: - Patterns to match a part of the graph possibly including metavariables (variables that match subparts of the matched part) - Transformation of the matched part using the metavariables The engine is parametrized with a set of rules an a traversal of the graph (look at http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects for ideas). Inspirations can be found in the pattern-matching library of Newspeak: (http://www.hpi.uni-potsdam.de/hirschfeld/publications/media/GellerHirschfeld...).
Skill level: intermediate Dialect: Free Mentor: Camille Teruel
I think that SmaCC 2.0.3[1] has already a language agnostic generic rewriting engine[2] (including a client/server and batch implementation if you have a few hundreds of thousands of lines to rewrite:)). [1] http://www.refactoryworkers.com/SmaCC.html [2] http://www.refactoryworkers.com/SmaCC/Transformations.html I'd say that for such things, the approach is usually to define a DSL, either the refactoring pattern language of RB, or, a bit newer, the SmPL of Coccinelle[3]. [3] http://coccinelle.lip6.fr/ The similarities between Coccinelle and RB are surprising on that level. Regards, Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95