Commit graph

26 commits

Author SHA1 Message Date
Théophile Bastian 2319414786 Fix rec_fibo's syntax — now works perfectly 2018-02-16 02:06:45 +01:00
Théophile Bastian a67b0ee1c3 Add two passing tests 2018-02-16 01:58:24 +01:00
Théophile Bastian 450595ab57 Add complicated recursion and nesting -- fail 2018-02-16 01:40:23 +01:00
Théophile Bastian c84a1ac169 Fix: recursive functions correctly defunctionalized 2018-02-16 01:29:01 +01:00
Théophile Bastian 29a2ef43a1 Fix: self is no longer considered free var
For recursive functions, the self-reference was considered a free
variable wrt. defunctionalization
2018-02-16 01:13:06 +01:00
Théophile Bastian 6f75134474 Add test rec_factorial (computes 7!) -- fails 2018-02-16 01:09:21 +01:00
Théophile Bastian ca790364b6 Add test if_func_branch 2018-02-16 00:59:39 +01:00
Théophile Bastian faa31d90dd Add test if_func 2018-02-16 00:56:35 +01:00
Théophile Bastian 7c6e2e390e Fix C code production, add ifzero basic test 2018-02-16 00:52:07 +01:00
Théophile Bastian 3141ce6fde Implement IfZero everywhere, untested 2018-02-16 00:43:44 +01:00
Théophile Bastian 2a65d41cd8 Add IfZero construct to lexer + parser 2018-02-16 00:21:29 +01:00
Théophile Bastian 7bc7921fc3 Add IfZero in the syntax + placeholders
Also add (* TODO ifzero *) all around as placeholders
2018-02-16 00:19:44 +01:00
Théophile Bastian b00976d359 Fix scope error in CPS application 2018-02-15 22:43:15 +01:00
Théophile Bastian 38148932f7 Fix pretty printer line breaks at toplevel 2018-02-15 22:28:26 +01:00
Théophile Bastian 324e32c15e Add option --light-debug 2018-02-15 22:19:14 +01:00
Théophile Bastian 6c5580d550 Explicit exit continuation's name 2018-02-15 22:02:04 +01:00
Théophile Bastian 2643118045 Add pretty printer for Top 2018-02-15 22:01:46 +01:00
Théophile Bastian 67701ea721 Refactor PrettyTail parts into PrettyCommon 2018-02-15 22:01:14 +01:00
Théophile Bastian 3262846faf Add human-readable pretty printer for Tail 2018-02-15 21:26:15 +01:00
Théophile Bastian 4ec822cfda Add test simple_call 2018-02-15 19:46:16 +01:00
Théophile Bastian 438a875cea Attempt to have better variable names in CPS 2018-01-29 15:46:53 +01:00
Théophile Bastian 4419abf57d Fix free vars of a lambda in Defun 2018-01-29 15:46:34 +01:00
Théophile Bastian 2e5e691cfe First try for defun, produces bad code
Block variables accessed out of scope
2018-01-22 12:29:59 +01:00
Théophile Bastian d0ff07998f Prevent IDs in variables from being trimmed 2018-01-18 16:03:29 +01:00
Théophile Bastian 6619941770 First attempt to implement CPS naively 2018-01-17 17:15:23 +01:00
Théophile Bastian 3b5c4cb996 Keep only project-related files; reroot to project/ 2017-12-19 13:35:04 +01:00