De Mosses a given c code
- Download the zip, and extract the folder.
- save the code to be DeMossed in the file named input.c
- on the terminal, change the working directory to the extracted directory
- run the command -
chmod +x shell.sh
(only for the first time)
./shell.sh
- the output will be stored in final_output.c and final_output_with_hashtag.c
- the link for the Moss results will be displayed in the terminal
- Array_heap_declaration.py - converts all the arrays declared in the given c program into heap allocations of respective datatype
- CharTypeChange.py - converts all the variables of datatype char into unsigned char
- FloatTypeChange.py - converts all the variables of float datatype into double
- IntTypeChange.py - converts all variables of integer datatype into long long
- ReFormat.py - formats the given c code according to usual standard
- Mul_1_Add_zero.py - during variable declarations, the RHS is multipled by 1 and 0 is added
- changeIncrement.py - increments done through the i++ method are changed to i+=1
- struct.py - creates random structures in the c program
- if1.py - randomly adds if(1) before statements that are certainly executed
- add_this.c - has random sort functions which will be used to implement sorting in the program
- add_random_stuff.py - uses the random sort function, to implement sorting in the program
- whileToFor.py - converts all the while loops into for loops
- ifToSwitch.py - converts if-else statements into switch-case conditions
- Convert while to for
- change int to long long, (+other datatype changes)
- convert if-else into switch-case
- convert arrays into mallocs (freeing not implemented)
- create a sort algorithm and use
- #define random values
- added a structure
- Reformat the c file
- Create an interface to add the code to be demossed (half tick maybe ??)
- random testcase generator to review the final output
- split a function into multiple parts using program flow graph (PFG)
- change the order of execution of the program (PFG)
- Comments need to be handled.