public RuleMatch matchRule(Rule rule) {
        List<UnificationPair> mgu =
                unifier.unify(new UnificationPair(rule.getHead(), target));
        
        // If there exists a most general unifier, then we have found a suitable rule
        if (mgu != null) {
            return new RuleMatch(rule, mgu);
        } else {
            return null;
        }
    }