html5-img
1 / 20

Type Inference Example -- 1 source text: x:=1; z := y < x Abstract Syntax Tree:

;. :=. :=. x. 1. z. <. x. y. Type Inference Example -- 1 source text: x:=1; z := y < x Abstract Syntax Tree:. stmts = stmts ‘;’ stmt;. assignment = vars ‘:=‘ exprs;. relation = sum ‘<‘ sum;. b logical i integer r real. ;. :=. :=. x. 1. z. <. x. y.

landen
Télécharger la présentation

Type Inference Example -- 1 source text: x:=1; z := y < x Abstract Syntax Tree:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ; := := x 1 z < x y Type Inference Example -- 1 source text: x:=1; z := y < x Abstract Syntax Tree: stmts = stmts ‘;’ stmt; assignment = vars ‘:=‘ exprs; relation = sum ‘<‘ sum; b logical i integer r real

  2. ; := := x 1 z < x y Type Inference Example -- 2 source text: x:=1; z := y < x initial state: symbol table

  3. ; := := x 1 z < x y Type Inference Example -- 3 source text: x:=1; z := y < x visit 1: symbol table

  4. ; := := x 1 z < x y Type Inference Example -- 4 source text: x:=1; z := y < x visit 1: x/left/bir symbol table

  5. ; := := x 1 z < x y Type Inference Example -- 5 source text: x:=1; z := y < x return: bir x/left/bir symbol table

  6. ; := := x 1 z < x y Type Inference Example -- 6 source text: x:=1; z := y < x visit 2: x/left/bir symbol table i

  7. ; := := x 1 z < x y Type Inference Example -- 7 source text: x:=1; z := y < x return: i x/left/i symbol table

  8. ; := := x 1 z < x y Type Inference Example -- 8 source text: x:=1; z := y < x return: x/left/i symbol table

  9. ; := := x 1 z < x y Type Inference Example -- 9 source text: x:=1; z := y < x visit 2: x/left/i symbol table

  10. ; := := x 1 z < x y Type Inference Example -- 10 source text: x:=1; z := y < x visit 1: z/left/bir x/left/i symbol table

  11. ; := := x 1 z < x y Type Inference Example -- 11 source text: x:=1; z := y < x return: bir z/left/bir x/left/i symbol table

  12. ; := := x 1 z < x y Type Inference Example -- 12 source text: x:=1; z := y < x visit 2: z/left/bir x/left/i symbol table

  13. ; := := x 1 z < x y Type Inference Example -- 13 source text: x:=1; z := y < x visit 1: y/right/ir z/left/bir x/left/i symbol table

  14. ; := := x 1 z < x y Type Inference Example -- 14 source text: x:=1; z := y < x return: y/right/ir z/left/bir x/left/i ir symbol table

  15. ; := := x 1 z < x y Type Inference Example -- 15 source text: x:=1; z := y < x visit 2: y/right/ir z/left/bir x/leftright/i i symbol table

  16. ; := := x 1 z < x y Type Inference Example -- 16 source text: x:=1; z := y < x return: y/right/ir z/left/bir x/leftright/i i~=ir symbol table

  17. ; := := x 1 z < x y Type Inference Example -- 17 source text: x:=1; z := y < x visit 1 (again): y/right/i z/left/bir x/leftright/i symbol table

  18. ; := := x 1 z < x y Type Inference Example -- 18 source text: x:=1; z := y < x return: b y/right/i z/left/bir x/leftright/i symbol table

  19. ; := := x 1 z < x y Type Inference Example -- 19 source text: x:=1; z := y < x return: b y/right/i z/left/b x/leftright/i symbol table

  20. ; := := x 1 z < x y Type Inference Example -- 20 source text: x:=1; z := y < x return: y/right/i z/left/b x/leftright/i symbol table

More Related