Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Consistency of Symbolic Expression Ordering: Mitigating Reliance on Hashing #667

Open
bowenszhu opened this issue Oct 27, 2024 · 0 comments

Comments

@bowenszhu
Copy link
Member

I'm writing to raise a concern about the reliance on hash values for ordering symbolic expressions within SymbolicUtils.jl. While hashing can provide efficiency for certain operations, using it for ordering introduces potential problems for the reliability and predictability of a computer algebra system (CAS), especially given the difficulty of modifying the hash function itself without causing breaking changes.

Potential Issues:

  • Non-Deterministic Behavior: In principle hash functions can produce varying results across different Julia versions, system architectures, or even different runs on the same machine, although the current hash function implementation is deterministic.
  • Debugging Challenges: Identifying and resolving issues stemming from hash collisions can be exceptionally difficult to debug and reason about.

Challenges of Modifying the Hash Function:

Directly modifying the hash function to address these issues is likely infeasible due to:

  • Extensive Test Breakage: Existing tests in SymbolicUtils.jl and downstream likely rely on the current hash-based ordering.
  • Backwards Incompatibility: Changes could break serialization and external dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant