defs.tex 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. \newcommand{\itm}[1]{\ensuremath{\mathit{#1}}}
  3. \newcommand{\Stmt}{\itm{stmt}}
  4. \newcommand{\Exp}{\itm{exp}}
  5. \newcommand{\Def}{\itm{def}}
  6. \newcommand{\Type}{\itm{type}}
  7. \newcommand{\FType}{\itm{ftype}}
  8. \newcommand{\Instr}{\itm{instr}}
  9. \newcommand{\Block}{\itm{block}}
  10. \newcommand{\Tail}{\itm{tail}}
  11. \newcommand{\Prog}{\itm{prog}}
  12. \newcommand{\Arg}{\itm{arg}}
  13. \newcommand{\Atm}{\itm{atm}}
  14. \newcommand{\Reg}{\itm{reg}}
  15. \newcommand{\Int}{\itm{int}}
  16. \newcommand{\Var}{\itm{var}}
  17. \newcommand{\Op}{\itm{op}}
  18. \newcommand{\key}[1]{\texttt{#1}}
  19. \newcommand{\code}[1]{\texttt{#1}}
  20. \newcommand{\LP}[0]{\key{(}}
  21. \newcommand{\RP}[0]{\key{)}}
  22. \newcommand{\LS}[0]{\key{[}}
  23. \newcommand{\RS}[0]{\key{]}}
  24. \newcommand{\INT}[1]{\key{(Int}\;#1\key{)}}
  25. \newcommand{\BOOL}[1]{\key{(Bool}\;#1\key{)}}
  26. \newcommand{\READ}{\key{(Prim}\;\code{'read}\;\key{'())}}
  27. \newcommand{\NEG}[1]{\key{(Prim}\;\code{'-}\;\code{(list}\;#1\;\code{))}}
  28. \newcommand{\PROGRAM}[2]{\code{(Program}\;#1\;#2\code{)}}
  29. \newcommand{\PROGRAMDEFSEXP}[3]{\code{(ProgramDefsExp}~#1~#2~#3\code{)}}
  30. \newcommand{\PROGRAMDEFS}[2]{\code{(ProgramDefs}~#1~#2\code{)}}
  31. \newcommand{\ADD}[2]{\key{(Prim}\;\code{'+}\;\code{(list}\;#1\;#2\code{))}}
  32. \newcommand{\AND}[2]{\key{(Prim}\;\code{'and}\;\code{(list}\;#1\;#2\code{))}}
  33. \newcommand{\OR}[2]{\key{(Prim}\;\code{'or}\;\code{(list}\;#1\;#2\code{))}}
  34. \newcommand{\NOT}[1]{\key{(Prim}\;\code{'not}\;\code{(list}\;#1\;\code{))}}
  35. \newcommand{\UNIOP}[2]{\key{(Prim}\;#1\;\code{(list}\;#2\;\code{))}}
  36. \newcommand{\BINOP}[3]{\key{(Prim}\;#1\;\code{(list}\;#2\;#3\code{))}}
  37. \newcommand{\VAR}[1]{\key{(Var}\;#1\key{)}}
  38. \newcommand{\LET}[3]{\key{(Let}~#1~#2~#3\key{)}}
  39. \newcommand{\IF}[3]{\key{(If}\,#1\;#2\;#3\key{)}}
  40. \newcommand{\VECTOR}[1]{\key{(Prim}\;\code{'vector}\;\code{(list}\;#1^{*}\code{))}}
  41. \newcommand{\VECREF}[2]{\key{(Prim}\;\code{'vector-ref}\;\code{(list}\;#1\;#2\code{))}}
  42. \newcommand{\VECSET}[3]{\key{(Prim}\;\code{'vector-set}\;\code{(list}\;#1\;#2\;#3\code{))}}
  43. \newcommand{\VOID}[1]{\key{(Void)}}
  44. \newcommand{\APPLY}[2]{\key{(Apply}\;#1\;#2\code{)}}
  45. \newcommand{\FUNDEF}[5]{\key{(Def}~#1~#2~#3~#4~#5\code{)}}
  46. \newcommand{\ASSIGN}[2]{\key{(Assign}~#1\;#2\key{)}}
  47. \newcommand{\RETURN}[1]{\key{(Return}~#1\key{)}}
  48. \newcommand{\SEQ}[2]{\key{(Seq}~#1~#2\key{)}}
  49. \newcommand{\GOTO}[1]{\key{(Goto}~#1\key{)}}
  50. \newcommand{\IFSTMT}[3]{\key{(IfStmt}\,#1\;#2\;#3\key{)}}
  51. \newcommand{\IMM}[1]{\key{(Imm}\;#1\key{)}}
  52. \newcommand{\REG}[1]{\key{(Reg}\;#1\key{)}}
  53. \newcommand{\BYTEREG}[1]{\key{(ByteReg}\;#1\key{)}}
  54. \newcommand{\DEREF}[2]{\key{(Deref}~#1~#2\key{)}}
  55. \newcommand{\CFG}[1]{\key{(CFG}\;#1\key{)}}
  56. \newcommand{\BLOCK}[2]{\key{(Block}\;#1\;#2\key{)}}
  57. \newcommand{\STACKLOC}[1]{(\key{stack}\;#1)}
  58. \newcommand{\BININSTR}[3]{\key{(Instr}\;#1\;\key{(list}\;#2\;#3\key{))}}
  59. \newcommand{\UNIINSTR}[2]{\key{(Instr}\;#1\;\key{(list}\;#2\key{))}}
  60. \newcommand{\CALLQ}[1]{\key{(Callq}~#1\key{)}}
  61. \newcommand{\RETQ}{\key{(Retq)}}
  62. \newcommand{\PUSHQ}[1]{\key{(Pushq}~#1\key{)}}
  63. \newcommand{\POPQ}[1]{\key{(Popq}~#1\key{)}}
  64. \newcommand{\JMP}[1]{\key{(Jmp}~#1\key{)}}
  65. \newcommand{\JMPIF}[2]{\key{(JmpIf}~#1~#2\key{)}}
  66. \newcommand{\TTKEY}[1]{{\normalfont\tt #1}}