# Polynomial calculator specs ## Input sources * Array of polynomials (size $n$) * Array of variables ## Outputs * Array of polynomials ## Program A list of expressions using the following operations: * Add * Mul * Sub * Neg References: * Poly(n) - refers to the current value of the $n$th input polyomial. * Poly_next(n) - refers to the next value of the $n$th input polynomial. * Var(n) - refers to the $n$th input variable * Const(n) - refers to the $n$th constant. * Ref(n) - refers to a perviously defined expression at the $n$th index. A node reference: ``` { type: POL, POL_NEXT, VAR, CONST, REF id: integer } ``` An expression node: ``` { op: ADD | SUB | MUL, lhs: node_reference, rhs: node_reference, } ``` Program: ``` { num_of_polys: integer, num_of_variables: integer, consts: [ arry of field elements], exprs: [ array of expression nodes], outputs: [array of node_reference] } ``` Inputs: * Array of polynomials * Length of polynomials * Array of variables * Next row offset Outputs: * Array of polynomials