-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+ Reference node's children #1357
base: dev-v1.0
Are you sure you want to change the base?
Conversation
thx. let me few days to really check if doesn't break anything :) |
Did it break everything? :) |
CIs are ok but they do not really fully test the library :). To be honest, it's quite surprising, and it's a good news, that it did not break the CI :). However, I have to double check all these following lines (the list is probably not exhaustive). My feeling is that for all references to Triton/src/libtriton/ast/ast.cpp Line 3573 in ae652c8
Triton/src/libtriton/ast/ast.cpp Lines 3683 to 3688 in ae652c8
Triton/src/libtriton/ast/ast.cpp Lines 3729 to 3731 in ae652c8
Triton/src/libtriton/ast/ast.cpp Line 3743 in ae652c8
Triton/src/libtriton/engines/symbolic/symbolicEngine.cpp Lines 498 to 502 in ae652c8
Triton/src/libtriton/engines/symbolic/symbolicSimplification.cpp Lines 267 to 282 in ae652c8
Triton/src/libtriton/engines/synthesis/synthesizer.cpp Lines 350 to 352 in ae652c8
Triton/src/libtriton/engines/synthesis/synthesizer.cpp Lines 422 to 424 in ae652c8
Triton/src/libtriton/ast/ast.cpp Lines 3604 to 3623 in ae652c8
|
According to Issue #1356 a child for reference node obviously exists on AST graph, but it doesn't exists in vector with children, so it looks like incorrect work of API for interacting with ASTs.
There were two ways to solve this:
1.) I always have to cast SharedAbstractNode to ReferenceNode then getSymbolicExpresssion from it and then getAst from it again to finally get a real node with children. (jungles)
2.) Use AstContext::unroll(ast_node) to get a real node with children. (cannon)
In this PR I add a real node with its children as a child of Reference node in Constructor. The lifetime of a real node will not change from this, and the API will become consistent and convenient without unnecessary static_cast.