Comments (8)
I try to modify the TreeMuataion.cpp
but it is incompatible:
TreeMutation.cpp:39:34: error: ‘class SQLiteParser’ has no member named ‘program’
tree::ParseTree* tree = parser.program();
^~~~~~~
TreeMutation.cpp:47:33: error: ‘class SQLiteBaseVisitor’ has no member named ‘intervals’
int interval_size = visitor->intervals.size();
^~~~~~~~~
TreeMutation.cpp:49:56: error: ‘class SQLiteBaseVisitor’ has no member named ‘intervals’
if(find(intervals.begin(),intervals.end(),visitor->intervals[i])!=intervals.end()){
^~~~~~~~~
TreeMutation.cpp:50:23: error: ‘class SQLiteBaseVisitor’ has no member named ‘intervals’
}else if(visitor->intervals[i].a<=visitor->intervals[i].b){
^~~~~~~~~
TreeMutation.cpp:50:48: error: ‘class SQLiteBaseVisitor’ has no member named ‘intervals’
}else if(visitor->intervals[i].a<=visitor->intervals[i].b){
^~~~~~~~~
TreeMutation.cpp:51:35: error: ‘class SQLiteBaseVisitor’ has no member named ‘intervals’
intervals.push_back(visitor->intervals[i]);
^~~~~~~~~
TreeMutation.cpp:54:30: error: ‘class SQLiteBaseVisitor’ has no member named ‘texts’
int texts_size = visitor->texts.size();
^~~~~
TreeMutation.cpp:56:48: error: ‘class SQLiteBaseVisitor’ has no member named ‘texts’
if(find(texts.begin(),texts.end(),visitor->texts[i])!=texts.end()){
^~~~~
TreeMutation.cpp:57:23: error: ‘class SQLiteBaseVisitor’ has no member named ‘texts’
}else if(visitor->texts[i].length()>MAXTEXT){
^~~~~
TreeMutation.cpp:59:31: error: ‘class SQLiteBaseVisitor’ has no member named ‘texts’
texts.push_back(visitor->texts[i]);
^~~~~
TreeMutation.cpp:74:38: error: ‘class SQLiteParser’ has no member named ‘program’
tree::ParseTree* treeS = parserS.program();
^~~~~~~
TreeMutation.cpp:79:6: error: ‘SQLiteSecondVisitor’ was not declared in this scope
SQLiteSecondVisitor *visitorS=new SQLiteSecondVisitor();
^~~~~~~~~~~~~~~~~~~
TreeMutation.cpp:79:6: note: suggested alternative: ‘SQLiteBaseVisitor’
SQLiteSecondVisitor *visitorS=new SQLiteSecondVisitor();
^~~~~~~~~~~~~~~~~~~
SQLiteBaseVisitor
TreeMutation.cpp:79:27: error: ‘visitorS’ was not declared in this scope
SQLiteSecondVisitor *visitorS=new SQLiteSecondVisitor();
^~~~~~~~
TreeMutation.cpp:79:27: note: suggested alternative: ‘visitor’
SQLiteSecondVisitor *visitorS=new SQLiteSecondVisitor();
^~~~~~~~
visitor
TreeMutation.cpp:79:40: error: expected type-specifier before ‘SQLiteSecondVisitor’
SQLiteSecondVisitor *visitorS=new SQLiteSecondVisitor();
^~~~~~~~~~~~~~~~~~~
TreeMutation.cpp:89:30: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
delete visitorS;
^~~~~~~~
Could I know the exact version of ANTLR
used in this project?
from superion.
from superion.
So how could I change the file?
from superion.
I exaplained all my steps in this issue and try to fix the problem. I believe I understand what I am doing.
from superion.
My guess is TreeMutator your own mutator.... you need to implement how to to mutate by yourself. And antlr only make a base parser for you, also a parser need to be provided.
from superion.
ANTLR only generates empty BaseVisitor. The authors modified the BaseVisitor to intercept certain intermediate values. Besides, the authors also generate their own SecondVisitor, which is slightly different from BaseVisitor. The TreeMutation.cpp
also requires some minor adaption for different grammars.
Unfortunately, the authors did not disclose any such details. I think I have figured it out and wrote some instructions for this. Please check my fork for details if you are still interested: https://github.com/peng-hui/Superion
from superion.
from superion.
there is a python script under the corresponding folder, which can do the job for you.
Hmmm, do you mean my fork or your own repository? Actually, I don't find such a python script in your code. I would appreciate it if you can add more detailed instructions in your README file to guide other users on how to generate the SecondVisitor and TreeMutation step by step.
from superion.
Related Issues (19)
- c++: error: unrecognized command line option '-stdlib=libc++' HOT 3
- errors
- can't find libantlr-runtime.a HOT 1
- adding a new grammar for a WEB API
- error when compiling afl in llvm mode
- TreeMutation Strategy working?
- AFL stability drops
- How to realize coverage comparison?
- c++: error: unrecognized command line option '-stdlib=libc++' HOT 2
- No instrumentation detected despite setting CC and CXX and AFL_HARDEN HOT 1
- The code about Grammer-Aware
- Low stability and false positives HOT 4
- Is the code for Grammer-Aware Trimming in afL-fuzz.c? I can't find it.
- NIT: Hard-coded shared object in Makefile
- Cannot build Superion HOT 19
- Cannot generate GrammarSecondVisitor HOT 3
- cc: error: ./tree_mutation/php_parser/libTreeMutation.so: No such file or directory HOT 3
- How to add new parsers? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superion.