Class SiftingOptimization.Builder
java.lang.Object
software.amazon.smithy.rulesengine.logic.bdd.SiftingOptimization.Builder
- All Implemented Interfaces:
SmithyBuilder<SiftingOptimization>
- Enclosing class:
- SiftingOptimization
public static final class SiftingOptimization.Builder
extends Object
implements SmithyBuilder<SiftingOptimization>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates an immutable object that is created from the properties that have been set on the builder.Sets the required control flow graph to optimize.coarseEffort
(int minNodeCount, int maxPasses) Sets the coarse optimization parameters.granularEffort
(int maxNodeCount, int maxPasses) Sets the granular optimization parameters.mediumEffort
(int minNodeCount, int maxPasses) Sets the medium optimization parameters.
-
Method Details
-
cfg
Sets the required control flow graph to optimize.- Parameters:
cfg
- the control flow graph- Returns:
- this builder
-
coarseEffort
Sets the coarse optimization parameters.Coarse optimization runs until the BDD has fewer than minNodeCount nodes or maxPasses have been completed.
- Parameters:
minNodeCount
- the target size to stop coarse optimization (default: 4,000)maxPasses
- the maximum number of coarse passes (default: 6)- Returns:
- this builder
-
mediumEffort
Sets the medium optimization parameters.Medium optimization runs until the BDD has fewer than minNodeCount nodes or maxPasses have been completed.
- Parameters:
minNodeCount
- the target size to stop medium optimization (default: 1,000)maxPasses
- the maximum number of medium passes (default: 6)- Returns:
- this builder
-
granularEffort
Sets the granular optimization parameters.Granular optimization only runs if the BDD has fewer than maxNodeCount nodes, and runs for at most maxPasses.
- Parameters:
maxNodeCount
- the maximum size to attempt granular optimization (default: 8,000)maxPasses
- the maximum number of granular passes (default: 12)- Returns:
- this builder
-
build
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<SiftingOptimization>
- Returns:
- an instance of T
-