kirancodes.me
To Proof Maintenance & Beyond!

Efficient nondestructive equality checking for trees and graphs

Michael D. Adams, R. Kent Dybvig

Abstract

The Revised6 Report on Scheme requires its generic equivalence predicate, equal?, to terminate even on cyclic inputs. While the terminating equal? can be implemented via a DFA-equivalence or union-find algorithm, these algorithms usually require an additional pointer to be stored in each object, are not suitable for multithreaded code due to their destructive nature, and may be unacceptably slow for the small acyclic values that are the most likely inputs to the predicate.

DOI 10.1145/1411204.1411230

Related papers