Skip to content

Migrating Symbolic from V1 to V2#731

Draft
TurtlePU wants to merge 2 commits intomainfrom
TurtlePU/symbolic-v1-to-v2
Draft

Migrating Symbolic from V1 to V2#731
TurtlePU wants to merge 2 commits intomainfrom
TurtlePU/symbolic-v1-to-v2

Conversation

@TurtlePU
Copy link
Contributor

No description provided.

@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 3 times, most recently from 213e806 to cfd4410 Compare December 17, 2025 14:59
@TurtlePU TurtlePU linked an issue Dec 18, 2025 that may be closed by this pull request
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 7 times, most recently from 26683ed to e072687 Compare December 24, 2025 17:47
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 8 times, most recently from 5e33845 to 0f27506 Compare January 2, 2026 15:00
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 2 times, most recently from e95fc92 to 4d658a5 Compare January 12, 2026 12:51
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 3 times, most recently from b496cb0 to 14556c9 Compare January 22, 2026 15:10
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch 2 times, most recently from 21e3e0c to 24ca699 Compare January 26, 2026 14:24
@TurtlePU TurtlePU force-pushed the TurtlePU/symbolic-v1-to-v2 branch from cdc3cc5 to 4fa48eb Compare January 27, 2026 15:13
@TurtlePU
Copy link
Contributor Author

TurtlePU commented Jan 29, 2026

Tasks done in this PR:

  • cleanup: remove SymbolicFold and all its dependencies, including Symbolic List, UPLC, IVC and redundant modules after deletion (ZkFold.Data.List.Infinite). Also remove acFold field from CircuitContext datatype and remove extra constructors from Vars
  • cleanup: remove redundant ZkFold.Algebra.VectorSpace module (superseded by new SymbolicData class), ZkFold.Data.Type
  • algebra refactoring: introduce new StrictNum class for strict ops with instances for Natural and Symbolic.Data.UInt
  • algebra refactoring: introduce new Decidable type alias for prime fields with IntegralOf a ~ Integer and a bunch of instances which follow from this fact
  • Eq refactoring: move (/=) out from class definition and make it into a function
  • Ord refactoring: improve interface so that binary comparison operations are functions requiring only Ord constraint, and compare is the only method in Ord class
  • Hashing algorithms refactoring for Symbolic: new Collect class in order to not rely on Foldable layouts
  • Unification of Layout and Payload for Symbolic data
  • Remove OrdWord stuff from UInt, perform desugaring after compilation instead
  • Split UInt type into two types: UIntData for fixed register sizes and UInt for variable register sizes, absolving the need for RegSize and cleaning up the public API
  • Generic interpolation algorithm, without dependency on Symbolic
  • Backwards traveling state for ergonomic UInt implementation
  • Refactor to type-specific conversions instead of generic from function of Iso class
  • Get rid of Symbolic Combinators module, moving functions to their place
  • Primitive Register module
  • Symbolic testing framework

Things to be careful about:

  • Elem backend seems to be losing constraints in compiler tests
  • UIntData often has 0-size high register, consider optimizing

Also possible:

  • merge SymbolicData and SymbolicInput into a single class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment