Skip to content
Discussion options

You must be logged in to vote
  1. In our final implementation, the types of functions are
eval : Llvm.llvalue -> Memory.t -> Value.t
execute_block : (Llvm.llbasicblock * Memory.t) option -> Llvm.llbasicblock -> Memory.t -> Memory.t
execute_instr : (Llvm.llbasicblock * Memory.t) option -> (Llvm.llbasicblock, Llvm.llvalue) Llvm.llpos -> Memory.t -> Memory.t
transfer : (Llvm.llbasicblock * Memory.t) option -> Llvm.llvalue -> Memory.t -> Memory.t

So I think your type inference is almost correct, and the Memory type in prev will be used for PHI Node evaluation as @workstudy-zero said.

  1. Actually, you don't have to change the structure of the skeleton code. Basically, the transfer function takes instruction and memory, then …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by doit-man
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #21 on May 31, 2024 05:31.