|
|
|
|
|
by 29athrowaway
717 days ago
|
|
I think "]" requires to be preceded by "[". Depending how to handle "<", and ">" you can have out of bounds errors. And "+" and "-" can lead to overflow/underflow. Unless you wrap or saturate values. Some programs can also lead to infinite loops. So there are "invalid" programs for these purposes. What I do is to mark the program as invalid when these problems are present. For infinite loop detection, I give the program a limited amount of iterations and if it doesn't finish when the max limit is reached the program is marked as invalid. |
|