package ec.gp.syntactic.simplification;

import ec.Setup;
import ec.gp.GPNode;

public interface IRule extends Setup {

	/**
	 * Determines if the rule matches the given subtree, so it can be simplified.
	 * 
	 * @param subtree
	 * @return
	 */
	boolean match(GPNode subtree);

	/**
	 * Replaces the given subtree with it's simplified version.
	 * 
	 * @param subtree
	 * @return
	 */
	GPNode replace(GPNode subtree);

}
