A simple start on program repair #1225
Replies: 1 comment
-
Great idea, but logic about the programs must live on the Python side of things. I think it would be best to create a new module ProgramRepair in a new file and place this logic there. A very simple start could be to refactor first, by placing the very limited repair that we already have (where we remove leading spaces) and put that there to se if it all keeps working? That is easier than adding new logic straight away, |
Beta Was this translation helpful? Give feedback.
-
The Hedy error messages already provide the users with useful suggestions and hints. As a start on program repair I will focus on the following error messages:
With number 4 we have to do an (intelligent) guess on where the missing quotation mark should be, this is a little more complicated than just a simple insertion/deletion (especially if the closing one is missing), so I might save this problem for later.
But with the other error messages, the key information is already provided, so it should be easy to repair the program with just simple deletions and/or insertions.
I was thinking of making 2 general functions (in app.js?) to manipulate the editor that can also be used for other stuff later on, something like:
insert(row, column, string)
→ insertsstring
at position (row
,column
)delete(row, column, length)
→ deleteslength
characters at position (row
,column
)Each of the above error messages will have a corresponding repair with insertions and/or deletions.
The focus will be mostly on the functionality of those repairs and not so much on the front-end, since there is already a group working on that.
Beta Was this translation helpful? Give feedback.
All reactions