Skip to content

Latest commit

 

History

History
65 lines (59 loc) · 7.8 KB

development_notes.md

File metadata and controls

65 lines (59 loc) · 7.8 KB

Notes Regarding WizToolKit Development and Stability

WizToolKit is under constant development and attempts to track the SIEVE IR Specification. As such, some APIs are subject to change. If an API is to be considered "stable" it is stable only until the IR changes, at which point it may change, either to mirror the IR, or for other API improvements This document will attempt to explain API changes and declare the status of various APIs.

IR Version 1.0.0

The following APIs are stable. Links currently go to header-files with documentation-like commentary. More recently, a manual has been added.

The following APIs are somewhat stable, but I can't promise they won't change.

  • wtk/utils/ These are helper functions and classes. Some are pretty generic while others are SIEVE IR specific.
  • wtk/firealarm/TreeAlarm.h This is the implementation of the wtk-firealarm tool. It traverses the IR syntax tree (wtk/IRTree.h) to check for spec-compliance and check if evaluation is successful (without actual ZK). Most methods are virtual, incase extensions of this might be useful, but it may also be used as a validity-predicate for relations. The following helper classes are used.
  • wtk/firealarm/TraceTreeAlarm.h is a subclass of wtk/firealarm/TreeAlarm.h which prints out an execution trace.
  • wtk/viz/TreeVisualizer.h translates a relation to Graphviz.
  • wtk/converters/Multiplex.h This takes a syntax tree and produces another syntax tree removed of switch-case statements using multiplexor logic implemented with for-loops and function-gates.
  • wtk::bolt is a collection of interpreters for the IR which utilize a pluggable ZK Backend API.
    • wtk/bolt/Backend.h An abstract class for ZK Backends to implement.
    • The BOLT (Betteer Optimization via Lookup-reuse and Two-pass) Interpreter uses a multi-pass optimization pipeline to accelerate IR evaluation.
      • wtk/bolt/Builder.h The first pass of wtk::bolt rebuilds the syntax-tree with pointers directly to wire storage.
      • wtk/bolt/Evaluator.h The second pass of wtk::bolt traverses the rebuilt tree, invoking the ZK Backend as necessary.
    • The PLASMASnooze (Practical Local Acceleration with Malleable Assumptions Snooze (opposite of FIREALARM)) interpreter is a single pass interpreter which relaxes conformace to the IR specification as much as is safe to improve performance (compared to FIREALARM).

APIs and tools which we would like to have but haven't quite begun yet, and likely won't implement for IR v.1.x.x (e.g. wait for IR v2.0.0):

  • "TA1 Builder" This should be an API for building an IR syntax tree in-memory. Ideally where instance/short witness wires are needed, stubs could be stored to generate the correct value upon a traversal of the tree.
  • IR1 -> IR0 converter (API and tool). These are described in section 6 of the spec. Odds are we will implement only the @switch conversion for Phase I testing.
  • Naive Circuit Optimizer: just a tool for removing duplicate and unused gates.

Credits

WizToolKit was developed by Stealth Software Technologies, Inc., and the primary and corresponding author is Kimberlee Model. We would also like to acknowledge the efforts of Tarik Riviere and Xiao Wang in reviewing API designs and subsequently discovering bugs.