Example #1
0
bool UfsAggregate::atomSourced(const UfsAtomNode& a) {
	if (lower_ <= 0) {
		// body is already a valid source: do not add further atoms
		// to WS because we cannot be sure that they don't
		// depend on this body.
		return false;
	}
	uint32 idx = findPred(a);
	addToWS(idx, ext_->predWeight(idx), false);
	return lower_ <= 0;
}
Example #2
0
bool UfsAggregate::atomUnsourced(const UfsAtomNode& a)  { 
	bool wasSource = lower_ <= 0;
	uint32 idx = findPred(a);
	if (predMarked(preds[idx])) {
		removeFromWS(idx, ext_->predWeight(idx), false);
		// At this point we could try to extend WS with
		// some external literals. Our internal literals, on the other hand,
		// must be assumed as unsourced because they may now depend on the body.
	}
	return wasSource && lower_ > 0;
}
Example #3
0
Actor BaseActor::find(const std::string& name) const
{
	return findPred([&] (const BaseActor& actor) {return actor.getName() == name; });
}