Technically once a parser returns an abstract term, there should no longer be any need to check if any term is an abstract one. Additionally, during unification, abstract terms can be preserved so there's no longer a need to enforce the canonical form even if it's still useful to implement.
Thus by implementing ITerm directly and doing away with explicit canonical forms, abstract terms will become real first class citizens, and parsing should become much faster too.
This issue implies a complete removal of the problematic abstract term cache, which has always been a hack. This change will eliminate the question of whether the cache should be static or lugged around by all consumers.
Technically once a parser returns an abstract term, there should no longer be any need to check if any term is an abstract one. Additionally, during unification, abstract terms can be preserved so there's no longer a need to enforce the canonical form even if it's still useful to implement.
Thus by implementing ITerm directly and doing away with explicit canonical forms, abstract terms will become real first class citizens, and parsing should become much faster too.
This issue implies a complete removal of the problematic abstract term cache, which has always been a hack. This change will eliminate the question of whether the cache should be static or lugged around by all consumers.