That's about a debugger | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

That's about a debugger

hi guys do you have any idea that how to use AI for debugging our programs which have logical bugs and passed through a compiler before? i've been writting down some codes and i need to figure it out how help this idea! any helps will be appriciated.

11th Jan 2017, 3:54 AM
poorya.ai
4 Answers
+ 2
ehm ... what? pls rewrite your question, i don't get what you want
13th Jan 2017, 1:04 AM
Abraham Soeyler
Abraham Soeyler - avatar
+ 2
alright i'm thinking about a program that can help in debugging after that program passed compiler phases here is an example: int arr[3]; for(int i=0;i<5;i++) arr[i]=1; these simple codes have a bug which will not be found by compiler the bug as you can see is that "for" loop puts 5 values in arr but it can contain only 3 integers and this loop may change smt else saved in memory. i have to help debugging such simple things by implementing an artificial intelligence.listing these bugs is not a good idea i just know this fact.
13th Jan 2017, 4:30 AM
poorya.ai
+ 1
hmm so you want to implement a program which fixes bugs? won't happen that easily. if you just want something for easier debugging use gdb (i guess you are writing/debugging C stylish code). and forget the other thing. i mean, that just wont happen in a solo project btw: your example is a buffer overflow, which is something that has to be thought of while programming. on that matter:read about safe and unsafe functions (gets and fgets is a good example), i dont know if there is such a thing for loops.
13th Jan 2017, 7:38 AM
Abraham Soeyler
Abraham Soeyler - avatar
+ 1
thanks for mentioning gdb .it has the same strategy as my program called"LittleDebugger" has,and it is helping the human by cooperating with him/her .to the best of my knowledge this kinda program is not even really necessary to be implemented.a smart AI would help us in it therefore i need to categorize the bugs first of all and i believe this is the most impotant part which is not done by anyone still as it seems.would you pls think over this and maybe we get to some better ideas!
13th Jan 2017, 8:06 AM
poorya.ai