aboutsummaryrefslogtreecommitdiff
path: root/SemanticCheckList.txt
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-25 19:49:47 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-25 19:49:47 -0400
commit4f66397e285f7742bdf5bfd9f723e10104486ce2 (patch)
treebd5321fa8025ae0cb23f7f750c3ef9d90827df2a /SemanticCheckList.txt
parent75b7f9b97d9fc1186f7864f46c5e5d383432cfb7 (diff)
Squashed commit of the following:
commit 5feabbc13a2edc8c5088f8a6163c729921f4119b Author: Tucker Evans <tuckerevans24@gmail.com> Date: Wed Sep 25 19:48:52 2019 -0400 Update Semantic Check List after initial testing w/ Tino's tests commit d86de7957451e485c90e2354042e7e6bfb04a13f Author: Tucker Evans <tuckerevans24@gmail.com> Date: Wed Sep 25 19:48:27 2019 -0400 Add variations to Tino's tests commit df5b9a51ce309b76e046aecfedd0960e7fa9984f Author: Tucker Evans <tuckerevans24@gmail.com> Date: Wed Sep 25 19:12:50 2019 -0400 Add Tino's test files Files correspond to semantic check list entries
Diffstat (limited to 'SemanticCheckList.txt')
-rw-r--r--SemanticCheckList.txt38
1 files changed, 20 insertions, 18 deletions
diff --git a/SemanticCheckList.txt b/SemanticCheckList.txt
index f7fb1c7..446a442 100644
--- a/SemanticCheckList.txt
+++ b/SemanticCheckList.txt
@@ -4,38 +4,40 @@ DRAGON Semantic Checklist
[X] 1. Semantic rules for Scoping
[X] 1.1. Local objects cannot be declared more than once
[X] 1.2. Local objects hide non-local objects with the same name
-[X] 1.3. Non-local objects should be visible from inner scopes (unless a local object of the same name exists)
-[X] 1.4. Function and procedure names exist in the scope they are defined (and not in their own scopes)
+[X] 1.3. Non-local objects should be visible from inner scopes
+ (unless a local object of the same name exists)
+[X] 1.4. Function and procedure names exist in the scope they are
+ defined (and not in their own scopes)
[X] 1.5. Local objects cease to exist once their scopes cease to exist
[X] 2. Semantic rules for Expressions
[X] 2.1. Expressions return typed-values
[X] 2.2. Objects must be declared before they used in expressions
-[X] 2.3. Objects of different types cannot appear in the same expression (no type promotions)
+[X] 2.3. Objects of different types cannot appear in the same
+ expression (no type promotions)
[ ] 3. Semantic rules for Statements
[ ] 3.1. Statements do not return values
- TODO: Add check for return type on statements, parsing
- statement_list?
-[X] 3.2. The test expression for IF-THEN, IF-THEN-ELSE, WHILE-DO must be Boolean-valued;
-[X] note that the Boolean type must be implicitly defined
-[X] 3.3. The ELSE clause always binds to the closest IF (resolution of the dangling ELSE problem)
-[ ] 3.4. The variable type in FOR-DO must match the types of lower bound and upper bound expressions
+[ ] 3.2. The test expression for IF-THEN, IF-THEN-ELSE, WHILE-DO
+ must be Boolean-valued;
+ note that the Boolean type must be implicitly defined
+[X] 3.3. The ELSE clause always binds to the closest IF (resolution
+ of the dangling ELSE problem)
+[X] 3.4. The variable type in FOR-DO must match the types of lower bound and upper bound expressions
-[ ] 4. Semantic rules for Arrays
+[X] 4. Semantic rules for Arrays
[X] 4.1. Non-integer valued expressions cannot be used for indexing arrays
[ ] 5. Semantic rules for Functions
-[X] 5.1. Function calls return values of type Integer or Real
+[ ] 5.1. Function calls return values of type Integer or Real
[ ] 5.2. Function must contain a "return" statement within its own body;
this is of the form: <function_name> := <expression>
-[ ] 5.3. Functions must accept exactly the same number of arguments as is
+[X] 5.3. Functions must accept exactly the same number of arguments as is
declared in its header, with the correct sequence of types
- TODO: Fix array types.
-[X] 5.4. Functions are not allowed to update the value of nonlocal objects (via assignment statements)
+[X] 5.4. Functions are not allowed to update the value of nonlocal
+ objects (via assignment statements)
-[ ] 6. Semantic rules for Procedures
-[ ] 6.1. Procedure calls do not return values
-[ ] 6.2. Procedures must accept exactly the same number of arguments as is
+[X] 6. Semantic rules for Procedures
+[X] 6.1. Procedure calls do not return values
+[X] 6.2. Procedures must accept exactly the same number of arguments as is
declared in its header, with the correct sequence of types
- TODO: Fix array types.