Documentation
¶
Overview ¶
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Index ¶
- func NewTraceIoMap[F field.Element[F]](trace tr.Trace[F]) io.Map
- type Assignment
- func (p Assignment[F, T]) Bounds(module uint) util.Bounds
- func (p Assignment[F, T]) Compute(trace tr.Trace[F], schema sc.AnySchema[F]) ([]array.MutArray[F], error)
- func (p Assignment[F, T]) Consistent(sc.AnySchema[F]) []error
- func (p Assignment[F, T]) Lisp(schema sc.AnySchema[F]) sexp.SExp
- func (p Assignment[F, T]) RegistersExpanded() []register.Ref
- func (p Assignment[F, T]) RegistersRead() []register.Ref
- func (p Assignment[F, T]) RegistersWritten() []register.Ref
- func (p Assignment[F, T]) Substitute(map[string]F)
- type Constraint
- func (p Constraint[F, T]) Accepts(trace tr.Trace[F], _ sc.AnySchema[F]) (bit.Set, sc.Failure)
- func (p Constraint[F, T]) Bounds(module uint) util.Bounds
- func (p Constraint[F, T]) Consistent(sc.AnySchema[F]) []error
- func (p Constraint[F, T]) Contexts() []sc.ModuleId
- func (p Constraint[F, T]) Lisp(schema sc.AnySchema[F]) sexp.SExp
- func (p Constraint[F, T]) Name() string
- func (p Constraint[F, T]) Substitute(map[string]F)
- type ConstraintFailure
- type Module
- func (p *Module[F, T]) AllowPadding() bool
- func (p *Module[F, T]) Assignments() iter.Iterator[schema.Assignment[F]]
- func (p *Module[F, T]) Consistent(fieldWidth uint, schema schema.AnySchema[F]) []error
- func (p *Module[F, T]) Constraints() iter.Iterator[schema.Constraint[F]]
- func (p *Module[F, T]) Function() io.Component[T]
- func (p *Module[F, T]) HasRegister(name string) (register.Id, bool)
- func (p *Module[F, T]) IsNative() bool
- func (p *Module[F, T]) IsPublic() bool
- func (p *Module[F, T]) IsStatic() bool
- func (p *Module[F, T]) IsSynthetic() bool
- func (p *Module[F, T]) Keys() uint
- func (p *Module[F, T]) LengthMultiplier() uint
- func (p *Module[F, T]) Name() module.Name
- func (p *Module[F, T]) Register(id register.Id) register.Register
- func (p *Module[F, T]) Registers() []register.Register
- func (p *Module[F, T]) StaticContents() [][]F
- func (p *Module[F, T]) String() string
- func (p *Module[F, T]) Substitute(mapping map[string]F)
- func (p *Module[F, T]) Width() uint
- type TraceIoMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assignment ¶
type Assignment[F field.Element[F], T io.Instruction] struct { // contains filtered or unexported fields }
Assignment represents a wrapper around an instruction in order for it to conform to the schema.Assignment interface.
func NewAssignment ¶
func NewAssignment[F field.Element[F], T io.Instruction](id sc.ModuleId, fn *io.Function[T], ) *Assignment[F, T]
NewAssignment constructs a new assignment capable of trace filling for a given function.
func (Assignment[F, T]) Bounds ¶
func (p Assignment[F, T]) Bounds(module uint) util.Bounds
Bounds implementation for schema.Assignment interface.
func (Assignment[F, T]) Compute ¶
func (p Assignment[F, T]) Compute(trace tr.Trace[F], schema sc.AnySchema[F]) ([]array.MutArray[F], error)
Compute implementation for schema.Assignment interface.
func (Assignment[F, T]) Consistent ¶
func (p Assignment[F, T]) Consistent(sc.AnySchema[F]) []error
Consistent implementation for schema.Assignment interface.
func (Assignment[F, T]) Lisp ¶
func (p Assignment[F, T]) Lisp(schema sc.AnySchema[F]) sexp.SExp
Lisp implementation for schema.Assignment interface.
func (Assignment[F, T]) RegistersExpanded ¶
func (p Assignment[F, T]) RegistersExpanded() []register.Ref
RegistersExpanded implementation for schema.Assignment interface.
func (Assignment[F, T]) RegistersRead ¶
func (p Assignment[F, T]) RegistersRead() []register.Ref
RegistersRead implementation for schema.Assignment interface.
func (Assignment[F, T]) RegistersWritten ¶
func (p Assignment[F, T]) RegistersWritten() []register.Ref
RegistersWritten implementation for schema.Assignment interface.
func (Assignment[F, T]) Substitute ¶
func (p Assignment[F, T]) Substitute(map[string]F)
Substitute implementation for schema.Assignment interface.
type Constraint ¶
type Constraint[F field.Element[F], T io.Instruction] struct { // contains filtered or unexported fields }
Constraint represents a wrapper around an instruction in order for it to conform to the constraint interface.
func (Constraint[F, T]) Bounds ¶
func (p Constraint[F, T]) Bounds(module uint) util.Bounds
Bounds implementation for schema.Constraint interface.
func (Constraint[F, T]) Consistent ¶
func (p Constraint[F, T]) Consistent(sc.AnySchema[F]) []error
Consistent implementation for schema.Constraint interface.
func (Constraint[F, T]) Contexts ¶
func (p Constraint[F, T]) Contexts() []sc.ModuleId
Contexts implementation for schema.Constraint interface.
func (Constraint[F, T]) Lisp ¶
func (p Constraint[F, T]) Lisp(schema sc.AnySchema[F]) sexp.SExp
Lisp implementation for schema.Constraint interface.
func (Constraint[F, T]) Name ¶
func (p Constraint[F, T]) Name() string
Name implementation for schema.Constraint interface.
func (Constraint[F, T]) Substitute ¶
func (p Constraint[F, T]) Substitute(map[string]F)
Substitute implementation for schema.Constraint interface.
type ConstraintFailure ¶
type ConstraintFailure[F field.Element[F]] struct { // Module where constraint failed Context schema.ModuleId // Row on which the constraint failed Row uint // Message Msg string }
ConstraintFailure provides structural information about a failing vanishing constraint.
func (*ConstraintFailure[F]) Message ¶
func (p *ConstraintFailure[F]) Message() string
Message provides a suitable error message
func (*ConstraintFailure[F]) RequiredCells ¶
func (p *ConstraintFailure[F]) RequiredCells(tr trace.Trace[F]) *set.AnySortedSet[trace.CellRef]
RequiredCells identifies the cells required to evaluate the failing constraint at the failing row.
func (*ConstraintFailure[F]) String ¶
func (p *ConstraintFailure[F]) String() string
type Module ¶
type Module[F field.Element[F], T io.Instruction] struct { // contains filtered or unexported fields }
Module programs a wrapper around an io.Function which makes it look like a schema.Module.
func NewModule ¶
func NewModule[F field.Element[F], T io.Instruction](id sc.ModuleId, function io.Component[T]) *Module[F, T]
NewModule constructs a new wrapper around a given io.Function instance.
func (*Module[F, T]) AllowPadding ¶
AllowPadding implementation for schema.Module interface.
func (*Module[F, T]) Assignments ¶
func (p *Module[F, T]) Assignments() iter.Iterator[schema.Assignment[F]]
Assignments implementation for schema.Module interface.
func (*Module[F, T]) Consistent ¶
Consistent implementation for schema.Module interface.
func (*Module[F, T]) Constraints ¶
func (p *Module[F, T]) Constraints() iter.Iterator[schema.Constraint[F]]
Constraints implementation for schema.Module interface.
func (*Module[F, T]) HasRegister ¶
HasRegister implementation for register.RegisterMap interface.
func (*Module[F, T]) IsNative ¶
IsNative implementation for schema.Module interface. Modules originating from the assembly pipeline are never native.
func (*Module[F, T]) IsStatic ¶
IsStatic implementation for schema.Module interface. Modules originating from the assembly pipeline are never static.
func (*Module[F, T]) IsSynthetic ¶
IsSynthetic implementation for schema.Module interface.
func (*Module[F, T]) LengthMultiplier ¶
LengthMultiplier implementation for schema.Module interface.
func (*Module[F, T]) StaticContents ¶
func (p *Module[F, T]) StaticContents() [][]F
StaticContents implementation for schema.Module interface. Modules originating from the assembly pipeline are never static, hence this function always panics.
func (*Module[F, T]) Substitute ¶
Substitute any matchined labelled constants within this module
type TraceIoMap ¶
TraceIoMap adapts a trace to look like an instance of io.Map. This assumes all function instances are already recorded in the trace (i.e. trace propagation has already occurred).