optgen rulenames test.opt
define And {
    Left  Expr
    Right Expr
}

define True {}

define Join {
    Left  RelExpr
    Right RelExpr
}

[SimplifyTrueAnd, Normalize]
(And (True) $right:*) => $right

[NormalizeNestedAnds, Normalize]
(And $left:* (And $innerLeft:* $innerRight:*))
=>
(And (ConcatLeftDeepAnds $left $innerLeft) $innerRight)

[CommuteJoin, Explore]
(Join $r:* $s:*) => (Join $s $r)
----
----
// Code generated by optgen; [omitted]

package opt

const (
	startAutoRule RuleName = iota + NumManualRuleNames

	// ------------------------------------------------------------
	// Normalize Rule Names
	// ------------------------------------------------------------
	SimplifyTrueAnd
	NormalizeNestedAnds

	// startExploreRule tracks the number of normalization rules;
	// all rules greater than this value are exploration rules.
	startExploreRule

	// ------------------------------------------------------------
	// Explore Rule Names
	// ------------------------------------------------------------
	CommuteJoin

	// NumRuleNames tracks the total count of rule names.
	NumRuleNames
)
----
----
