Exemple #1
0
tribool JunctionAggrLit::accumulate(Grounder *g, const Val &weight, Lit &lit) throw(const Val*)
{
	(void)weight;
	if(!lit.testUnique(uniques_)) { return true; }
	if(lit.isFalse(g))
	{
		// no head literal can be false
		// because only atoms are allowed
		assert(!head());
		hasFalse_ = true;
		return false;
	}
	if(!lit.fact()) { factOnly_ = false; }
	else            { hasFact_  = true; }
	return lit.fact() && !head() ? tribool(true) : unknown;
}