Skeleton for rule-based approach.