public void addHeadLiteral(final Literal literal) throws RuleException {
	//	addHeadLiteral(literal,true);
//	}
//	public void addHeadLiteral(final Literal literal,boolean checkLiteralVariable) throws RuleException {
		if (null == literal || "".equals(literal.getName())) throw new RuleException(ErrorMessage.LITERAL_NAME_MISSING);

		if ((ruleType != RuleType.DEFEASIBLE) && head.size() > 0) {
			// only defeasible rule is allowed to have
			// more than one head literal
			throw new RuleException(ErrorMessage.RULE_NON_DEFEASIBLE_RULE_WITH_MULTIPLE_HEADS, new Object[] { label });
		} else if (literal instanceof LiteralVariable) {
			throw new RuleException(ErrorMessage.RULE_THEORY_VARIABLE_IN_HEAD, new Object[] { literal });
		} else {
			head.add(literal);
		}
	}