Skip to content

[Question][Hw6, 7] Format of input programs, expected result in hw7 #113

@p51lee

Description

@p51lee

Hello,

I have two three questions about hw6 and hw7:

  1. Hw6
    1. In hw6, do we have to handle boolean values applied to the sink function, like sink ( x < y )?
  2. Hw7
    1. Do all functions have only one parameter?
    2. When checking example1.ll, what my implementation prints is not identical to example1.expected:
    -|ID 11: (= (type_env \|  %w = alloca i32, align 4\|) (ptr i32))|
    -|ID 12: (= (type_env \|  %v = alloca i8, align 1\|) (ptr i8))|
    -|ID 27: (= (ptr (type_env \|  %div = sdiv i32 %2, %3\|))
    -   (type_env \|  %w = alloca i32, align 4\|))|
    -|ID 28: (= (ptr (type_env \|  %div = sdiv i32 %2, %3\|))
    -   (type_env \|  %v = alloca i8, align 1\|))|
    +|ID 13: (= (ptr i32) (type_env \|  %w = alloca i32, align 4\|))|
    +|ID 14: (= (ptr i8) (type_env \|  %v = alloca i8, align 1\|))|
    +|ID 41: (= (type_env \|  %w = alloca i32, align 4\|)
    +   (ptr (type_env \|  %div = sdiv i32 %2, %3\|)))|
    +|ID 43: (= (type_env \|  %v = alloca i8, align 1\|)
    Is it important to equalize IDs or the order of lhs and rhs for each equation between implementation result and example1.expected?

Thank you.

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