njit-jerse / specimin

SPECIfication MINimizer. A different kind of slicer for Java.
MIT License
0 stars 5 forks source link

Re-organizing and documenting UnsolvedSymbolVisitor #281

Closed LoiNguyenCS closed 2 months ago

LoiNguyenCS commented 2 months ago

Professor,

I've made some updates so that UnsolvedSymbolVisitor can be more accessible for future programmers.

Initially, I attempted to write perfect specifications so that the UnsolvedSymbolVisitor's functionality could be understood without the need to read the code at all. However, I found this to be more challenging than anticipated—Leslie Lamport makes it sound deceptively simple! As an alternative approach, I've added comments to clarify potentially confusing sections of the code.

Additionally, I've removed the portion of the code responsible for updating parameter types and return types of methods. That functionality is already handled within the visit method for ClassOrInterfaceType. (Note: The code for updating parameter types had a useful feature that checked if the parameter was within a catch clause and set the synthetic type to extend Exception. To replicate this, I've introduced a local variable, insideACatchClause.)

Please review the changes and let me know if there are any further adjustments needed.

LoiNguyenCS commented 2 months ago

Professor,

I have updated the codes and corrected my previous confusion regarding the different between a catch clause and the parameters part of a catch clause. Please review again and let me know if anything needs to be adjusted.