Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT Editing code

Try to find examples in cdt code of ast rewrite and follow the example

On Tue, Mar 10, 2015 at 4:06 PM, Gonçalo Pereira <gpereira_9@xxxxxxxxxxx> wrote:
Hello, 
my goal is inject faults in software to evaluate the robustness of cloud. I need to apply some operators in code C or C++ and compile some programs to view how they react to modifications.

My problem now is get my modifications in AST, in code, but I have NullPointerException using ASTrewrite, I know the meaning of NullPointerException, but I don't understood how to rewrite the tree to get the code after one node remotion. How I can do it?

Thanks in advance :D
Gonçalo Silva Pereira

2015-03-10 17:50 GMT+00:00 Austin Morgan <admorgan@xxxxxxxxxxxxxxxxxxx>:
What is your goal? Using the AST to rewrite code to have random errors doesn't seem very beneficial on the surface. Usually when I have had others ask me similar questions the answer has always ended up with something like CSmiths https://embed.cs.utah.edu/csmith/

Austin Morgan

On Mar 10, 2015, "Gonçalo Pereira" <gpereira_9@xxxxxxxxxxx> wrote:
Hello everyone,

I'am studing Informatics Engeneering, and I need to create one tool to inject faults in C or C++ code. I think that i can use CDT to do that, but I having some troubles with the rewriteAST(), I can't do my modifications to the code, for example, remove one IfStatement node. Is that impossible? How I remove one node and get the code with modifications?

Greetings
Gonçalo Silva Pereira 



cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top