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
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 ParallelTraceExpansion[F field.Element[F]](batchsize uint, schema sc.AnySchema[F], trace *tr.ArrayTrace[F]) error
- func ParallelTraceValidation[F field.Element[F]](schema sc.AnySchema[F], trace tr.Trace[F]) []error
- func SequentialTraceExpansion[F field.Element[F]](schema sc.AnySchema[F], trace *trace.ArrayTrace[F]) error
- func SequentialTraceValidation[F field.Element[F]](schema sc.AnySchema[F], tr trace.Trace[F]) []error
- func TraceExpansion[F field.Element[F]](parallel bool, batchsize uint, schema sc.AnySchema[F], trace *tr.ArrayTrace[F]) error
- func TraceLowering[F field.Element[F]](parallel bool, tf lt.TraceFile) (array.Builder[F], []lt.Module[F])
- func TraceSplitting[F field.Element[F]](parallel bool, tf lt.TraceFile, mapping module.LimbsMap) (array.Builder[F], []lt.Module[F], []error)
- func TraceValidation[F field.Element[F]](parallel bool, schema sc.AnySchema[F], tr tr.Trace[F]) []error
- type Expander
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParallelTraceExpansion ¶
func ParallelTraceExpansion[F field.Element[F]](batchsize uint, schema sc.AnySchema[F], trace *tr.ArrayTrace[F]) error
ParallelTraceExpansion performs trace expansion using concurrently executing jobs. The chosen algorithm operates in waves, rather than using an continuous approach. This is for two reasons: firstly, the latter would require locks that would slow down evaluation performance; secondly, the vast majority of jobs are run in the very first wave.
func ParallelTraceValidation ¶
ParallelTraceValidation validates that values held in trace columns match the expected type. This is really a sanity check that the trace is not malformed.
func SequentialTraceExpansion ¶
func SequentialTraceExpansion[F field.Element[F]](schema sc.AnySchema[F], trace *trace.ArrayTrace[F]) error
SequentialTraceExpansion expands a given trace according to a given schema. More specifically, that means computing the actual values for any assignments. This is done using a straightforward sequential algorithm.
func SequentialTraceValidation ¶
func SequentialTraceValidation[F field.Element[F]](schema sc.AnySchema[F], tr trace.Trace[F]) []error
SequentialTraceValidation validates that values held in trace columns match the expected type. This is really a sanity check that the trace is not malformed.
func TraceExpansion ¶
func TraceExpansion[F field.Element[F]](parallel bool, batchsize uint, schema sc.AnySchema[F], trace *tr.ArrayTrace[F]) error
TraceExpansion expands a given trace according to a given schema. More specifically, that means computing the actual values for any assignments. This is done using a straightforward sequential algorithm.
func TraceLowering ¶
func TraceLowering[F field.Element[F]](parallel bool, tf lt.TraceFile) (array.Builder[F], []lt.Module[F])
TraceLowering simply converts columns from their current big endian word representation into the appropriate field representation without performing any splitting. This is only required for traces which are "pre-expanded". Such traces typically arise in testing, etc.
Types ¶
type Expander ¶
type Expander[F any] struct { // contains filtered or unexported fields }
Expander encapsulates key state required in order to expand traces safely (whether or not this is done sequentially or in parallel). The intuition behind this algorithm is that each assignment will only be run exactly once. However, some assignments must be run before others. For example, if one assignment depends upon a column which is computed by another, then the latter must go first.
func NewExpander ¶
NewExpander constructs a new trace expander for a given set of assignments.
func (*Expander[F]) Next ¶
func (p *Expander[F]) Next(n uint) []sc.Assignment[F]
Next returns at most n assignments which are ready for execution. An assignment is ready for execution if all of the columns on which it depends have been processed already. Observe that all assignments returned here are removed from the worklist and will not be returned again. Specifically, they are assumed to have been processed before any subsequent call is made to this method.