Skip to content

labs/lab-07: Modify checkers regexes to account for comments and edge cases #93

@Alexander1752

Description

@Alexander1752
  • Modify checker regexes of (ideally all) tasks to ignore commented lines in the students' solutions, to avoid false positive detection of instructions usage. Some examples include:
    • [1] the comment at line 12 tricks the checker into believing that both a push and a pop instruction have been used
    • [2] the comment at line 17 matches the regex used to detect the pop instruction being used on the output array
  • Fix and enhance the regex used in [3], line 24, for detecting a mov operation on the stack: at the moment, matching "[esp]" does not work properly due to the fact grep treats the square brackets as a regex character class, so it actually tries to match a single letter inside the brackets. Aside from this, the regex should match a broader spectrum of stack accesses, e.g. "[esp + 4 * edx + eax]", in case the student happens to not use the current access type at all.

Read the contributor guidelines before making contributions [4].
Add Fixes #93 at the end of your commit message to automatically link your PR with this issue.

[1] https://github.com/cs-pub-ro/hardware-software-interface/blob/5231b9f14b33964a5f8f05507703fcb9c3cf83d2/labs/lab-07/tasks/max/support/max.asm
[2] https://github.com/cs-pub-ro/hardware-software-interface/blob/5231b9f14b33964a5f8f05507703fcb9c3cf83d2/labs/lab-07/tasks/reverse-array/support/reverse-array.asm
[3] https://github.com/cs-pub-ro/hardware-software-interface/blob/5231b9f14b33964a5f8f05507703fcb9c3cf83d2/labs/lab-07/tasks/local-var/tests/test.sh
[4] https://github.com/cs-pub-ro/hardware-software-interface/blob/main/CONTRIBUTING.md#pull-requests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions