Timeline for When writing an interpreter, how should the type inference algorithm change the parsed AST? Should it?
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 8, 2020 at 12:00 | history | tweeted | twitter.com/StackSoftEng/status/1325407726239948800 | ||
| Nov 8, 2020 at 11:51 | history | edited | dawid | CC BY-SA 4.0 |
edited body
|
| Jun 19, 2013 at 14:48 | comment | added | SK-logic | just rebuild an AST with each transform, it's cheap and purely functional. | |
| Jun 19, 2013 at 13:58 | comment | added | dawid | I have found something: a map with ids. | |
| Jun 19, 2013 at 13:46 | comment | added | dawid | What is the functional way to rewrite (or even just copy) an AST? | |
| Jun 19, 2013 at 7:18 | comment | added | SK-logic |
It's common to rewrite an AST in two steps, e.g., replace each expression node with a pair expression = tag * oldexpression, generate and solve your type equations against all the tags, and rewrite an AST again into expression = type * oldexpression.
|
|
| Jun 19, 2013 at 6:57 | vote | accept | dawid | ||
| Jun 19, 2013 at 6:02 | answer | added | Frank | timeline score: 6 | |
| Jun 19, 2013 at 6:02 | comment | added | dawid | ps. I chose the term "type inference" because despite being, at the moment, a "type checking task" the user don't need to, actually, cannot declare types explicitly. | |
| Jun 19, 2013 at 5:53 | review | First posts | |||
| Jun 19, 2013 at 6:05 | |||||
| Jun 19, 2013 at 5:40 | history | edited | dawid | CC BY-SA 3.0 |
added 16 characters in body
|
| Jun 19, 2013 at 5:35 | history | asked | dawid | CC BY-SA 3.0 |