Class S3TreeRewriter
This is a BDD pre-processing transform that makes the decision tree larger but enables dramatically reduced BDD artifact size. It solves the "SSA Trap" problem where semantically identical operations appear as syntactically different expressions.
This class composes three separate transforms, each selectable via S3TreeRewriter.Transform:
S3TreeRewriter.Transform.AZ_CANONICALIZATION- Canonicalizes AZ extraction:substring(Bucket, N, M)→split(Bucket, "--")[1]S3TreeRewriter.Transform.REGION_UNIFICATION- Unifies region references:Region/bucketArn#region→_signing_region/_effective_regionS3TreeRewriter.Transform.S3EXPRESS_ENDPOINTS- Canonicalizes S3Express endpoints: FIPS/DualStack URL variants → ITE-computed segments
By default all transforms are applied. Use transform(EndpointRuleSet, Transform, Transform...)
to select a subset.
This transform isn't stable. While it reduces BDD node count and enables much better sharing and reduces the number of unique results, it comes at the expense of runtime performance in many cases due to adding more complex expressions than before. It's possible we may entirely rewrite this to do different transforms, abandon it entirely, or move to a different kind of optimization altogether. In short, don't rely on this class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndividual transforms that can be enabled or disabled. -
Method Summary
Modifier and TypeMethodDescriptionstatic EndpointRuleSettransform(EndpointRuleSet ruleSet) Transforms the given endpoint rule set by applying the default S3 canonicalization transforms (AZ canonicalization and S3Express endpoints).static EndpointRuleSettransform(EndpointRuleSet ruleSet, S3TreeRewriter.Transform first, S3TreeRewriter.Transform... rest) Transforms the given endpoint rule set by applying only the specified transforms.
-
Method Details
-
transform
Transforms the given endpoint rule set by applying the default S3 canonicalization transforms (AZ canonicalization and S3Express endpoints).- Parameters:
ruleSet- Rules to transform.- Returns:
- the transformed rule set.
-
transform
public static EndpointRuleSet transform(EndpointRuleSet ruleSet, S3TreeRewriter.Transform first, S3TreeRewriter.Transform... rest) Transforms the given endpoint rule set by applying only the specified transforms.- Parameters:
ruleSet- Rules to transform.first- the first transform to apply.rest- additional transforms to apply.- Returns:
- the transformed rule set.
-