From: Baptiste L. <gai...@fr...> - 2002-12-15 09:32:01
|
----- Original Message ----- From: "Andre Baresel" <and...@gm...> To: <Cpp...@li...> Sent: Friday, December 13, 2002 11:10 PM Subject: [Cpptool-develop] I'm still there - working through all these sources > I started getting into the sources, but I'm still not usefull for the > project :-( > > i think it will take some time to get all the ideas. However I started > to play arround with > this Mutator concept and tried to implement this ToDo Item "Adding a > variable declaration in > if/while statement" ... not to make this for the public, but this is > something I can check against > later on, when you Baptiste have checked your sources in. With luck, I will be able to commit this evening... > I got something working, but well, I'm not sure if this is ok and > there's a question: > The introduction of a new nodetype for the conditions makes some of the > tests failing, so how is this situation > handled ? Is it ok than to change the tests, too - since the assertion > only reports the new ast-node-type not > beeing expected. Some unit tests of the If parser should failed because they expect a different node type for the condition. Changing the node type in the check methods should fix the If parser tests. You also get a few tests failing in ScopeGeneratorTest because of the new declaration that was introduced. > Another thing is the MaxLODMutator ... In the beginning I stumbled > accross two things: > - the methods "mutate" and "doMutate" sound like the same action and > take the same parameters but they > do completely different things ... I would suggest some better naming > here ... maybe doMutate is just "doMultipleMutate" ? > - this MaxLODMutatorVisitor, what about that class, is this really needed ? > As I understand this class is only used to be instanciated in each > recursion of the mutation operation. > Is there anything I can't see ? The use of this class confused me > a little bit. With this class the recursion comes > Invisible for a person reading the source.... Just my opinion. The current mutator stuff are a 'hack' to get the stuff working. It is not very clear to me what it should be exactly. I expect things to become clearer when we'll have a more complete parser and some form a AST rewriting (the current mutation scheme prevent the use of polymorphism in ASTNode). Sven already covered the other points I believe. > I'll next go into these Scope things - Don't bother with the current implementation. It's have been completly rewritten (IdentifierResolver stuffs). It's a lot more simple and easier to extend, to resolve unqualified identifier as attribute or member function for example. I'm in the process of adding test for this. Baptiste. > and in parallel i'm still collecting the useful infos from the forum and > the mailing list. > > See you later, > Andre |