Leonardo de Moura
7cc3dd0b4d
chore(kernel/replace_fn): "name" constant
2014-10-17 14:20:35 -07:00
Leonardo de Moura
b6afbcb7f5
perf(kernel/replace_fn): use 'recursive' replace_fn for "small" terms
2014-10-17 14:15:09 -07:00
Leonardo de Moura
1f2099e298
perf(kernel/for_each_fn): use cache stack trick at for_each_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 19:32:11 -07:00
Leonardo de Moura
7d25158254
fix(kernel/replace_fn): bug in the cache
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 18:33:15 -07:00
Leonardo de Moura
8798fa4419
fix(kernel/replace): make sure 'replace' is reentrant
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 04:37:27 +01:00
Leonardo de Moura
999782d89d
refactor(kernel/replace_fn): use thread local cache
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 05:34:45 +01:00
Leonardo de Moura
603dafbaf7
refactor(kernel): remove 'let'-expressions
...
We simulate it in the following way:
1- An opaque 'let'-expressions (let x : t := v in b) is encoded as
((fun (x : t), b) v)
We also use a macro (let-macro) to mark this pattern.
Thus, the pretty-printer knows how to display it correctly.
2- Transparent 'let'-expressions are eagerly expanded by the parser.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 16:27:27 -07:00
Leonardo de Moura
5ce134e24e
chore(kernel): binder => binding where appropriate
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 11:37:27 -07:00
Leonardo de Moura
40b3129e7b
refactor(kernel): improve names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 11:28:05 -07:00
Leonardo de Moura
4842ae4fc7
refactor(kernel): store macro arguments in the macro_expr
...
Before this commit, we "stored" macro arguments using applications.
This representation had some issues. Suppose we use [m a] to denote a macro
application. In the old representation, ([m a] b) and [m a b] would have
the same representation. Another problem is that some procedures (e.g., type inference)
would not have a clean implementation.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-25 15:02:56 -07:00
Leonardo de Moura
bc8379256a
refactor(kernel): remove pairs from kernel
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-17 10:52:07 -07:00
Leonardo de Moura
3651b4ecd0
refactor(kernel): replace_fn functional object
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:57 -07:00
Leonardo de Moura
eb046c11fb
refactor(kernel): the type in let-exprs is not optional anymore, if the user does not provide it, we use a metavariable
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
d17990ed78
refactor(kernel): add formatter and simplify contexts
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
533f44e224
refactor(kernel/expr): for_each_fn, replace_fn, and find_fn without templates
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00