VictorCMiraldo / hdiff

Hash-based Diffing for AST's
MIT License
74 stars 3 forks source link

Thinning loops if terms are not alpha-renamed #27

Closed VictorCMiraldo closed 4 years ago

VictorCMiraldo commented 4 years ago
a = "i" :>: []
b = "l" :>: ["i" :>: [],"c" :>: []]
c = "b" :>: ["c" :>: [],"f" :>: []]

ab = distrCChange $ hdiffRTree a b
bc = distrCChange $ hdiffRTree b c

infinite_loop_in = ab `after` bc

That's because as of c7d4232cc3499d734e69287bf5ec2a705d51a631 , after is implemented with thinning; and thinning loops when variable names are repeated; I need to look into this and make it better.

VictorCMiraldo commented 4 years ago

Understanding thinning in terms of unification makes this go away