From e52b59aead9e612155a11b49da6e35c758058b38 Mon Sep 17 00:00:00 2001 From: ar6496 <78793916+ar6496@users.noreply.github.com> Date: Fri, 7 May 2021 20:47:19 +0530 Subject: [PATCH] Update WORKLOG.md --- WORKLOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 18334d2..bc589e8 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -6,13 +6,14 @@ ## Challenges: - Nested structures were a challenge. A function inside a function/class needs us to build correct scoping as well as dealing with dependencies. - - This is dealt by the class:StackVarRuntimeInfo and function:getStackVar. + - This is dealt by the class:StackVarRuntimeInfo and function:getStackVar. - Handling Strings was difficult as storage and access was more complex than lists. - In order for us to easily determine the correctness, we intentionally matches the error messages to the reference implementation. - Creation and use of objects was a major challenge. - - + - Objects required allocation of space on the heap and access to each object required dereferencing the pointer to the objects. - Testing various scenarious with similarly defined variables were time consuming. Instead, we defined certain set of variables in the beginning of the student contributed test programs, and then used the same variables throughout the programs to cover various bad and good scenarious. - Another challenge was to come up with good test cases to have a broader cover. Our approach to this issue was investigating Type Checking rules and writing adverse code to those rules to see if our analyzer can make correct inferences. ## Improvements: + - More checks and error messages like checking if formal parameter type does not match corresponding expression type. - Added more tests to rigorously check program flow. And a test(diff.py) to show a case where our implementation showed better recoverability compared to the reference compiler.