jaccokrijnen / plutus-cert

0 stars 2 forks source link

Use-case for folds/attribute grammars: efficient rename decision procedure #19

Open jaccokrijnen opened 1 year ago

jaccokrijnen commented 1 year ago

Deciding appears_free_in v t, which is used in no_capture in the rename relation, requires traversing the whole term t, which results in quadratic run-time when checked throughout the AST.

A more efficient approach would be to maintain a set of free variables in the sub-term, and compute that recursively (synthesized). Deciding can then be done in terms of that set. This approach does require an equivalence between appears_free_in v t and In v (fv t) to construct the soundness proof.

jaccokrijnen commented 1 year ago

Same problem in Unique: need to decide ~ bound_in for every binder