pmorvalho / multipas Goto Github PK
View Code? Open in Web Editor NEWMultIPAs: Applying Program Transformations to Introductory Programming Assignments for Data Augmentation
License: MIT License
MultIPAs: Applying Program Transformations to Introductory Programming Assignments for Data Augmentation
License: MIT License
Hi, thanks for the contribution! I run your code with "python3 prog_mutator.py -d inputs-demo -o mutated_programs -fw -v" and get:
Dealing with student sum
Traceback (most recent call last):
File "prog_mutator.py", line 847, in <module>
gen_program_mutations(input_dir, output_dir)
File "prog_mutator.py", line 813, in gen_program_mutations
s_muts = instrument_file(p, output_dir+"/"+stu_id)
File "prog_mutator.py", line 659, in instrument_file
n_ast = v.visit(ast)
File "prog_mutator.py", line 78, in visit
return c_ast.NodeVisitor.visit(self, node)
File "/home/liwei/miniconda3/envs/IPA/lib/python3.8/site-packages/pycparser/c_ast.py", line 158, in visit
return visitor(node)
File "prog_mutator.py", line 86, in visit_FileAST
n_ext.append(self.visit(x))
File "prog_mutator.py", line 78, in visit
return c_ast.NodeVisitor.visit(self, node)
File "/home/liwei/miniconda3/envs/IPA/lib/python3.8/site-packages/pycparser/c_ast.py", line 158, in visit
return visitor(node)
File "prog_mutator.py", line 207, in visit_FuncDef
n_body_1 = self.visit(body)
File "prog_mutator.py", line 78, in visit
return c_ast.NodeVisitor.visit(self, node)
File "/home/liwei/miniconda3/envs/IPA/lib/python3.8/site-packages/pycparser/c_ast.py", line 158, in visit
return visitor(node)
File "prog_mutator.py", line 246, in visit_Compound
n_block_items.append(self.visit(x))
File "prog_mutator.py", line 78, in visit
return c_ast.NodeVisitor.visit(self, node)
File "/home/liwei/miniconda3/envs/IPA/lib/python3.8/site-packages/pycparser/c_ast.py", line 158, in visit
return visitor(node)
File "/home/liwei/MultIPAs/helper.py", line 469, in visit_Return
prv_pn = self.pn
AttributeError: 'MutatorVisitor' object has no attribute 'pn'
While I'm using the same environment as mentioned in README. And when I add a 'self.pn' under prog_mutator.py/MutatorVisitor, it works. Is it a correct fix? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.