Class SemiNaiveEvalManager
java.lang.Object
edu.harvard.seas.pl.abcdatalog.engine.bottomup.sequential.SemiNaiveEvalManager
- All Implemented Interfaces:
EvalManager
,EvalManagerWithProvenance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioneval()
Saturate all facts derivable from the program with which this manager has been initialized.getJustification
(PositiveAtom fact) Return the last rule used in the justification of the given atom.void
initialize
(Set<Clause> program) Initialize this manager with a program.static Clause
-
Constructor Details
-
SemiNaiveEvalManager
public SemiNaiveEvalManager(boolean collectProv)
-
-
Method Details
-
initialize
Description copied from interface:EvalManager
Initialize this manager with a program.- Specified by:
initialize
in interfaceEvalManager
- Parameters:
program
- the program- Throws:
DatalogValidationException
- if the program is invalid
-
eval
Description copied from interface:EvalManager
Saturate all facts derivable from the program with which this manager has been initialized.- Specified by:
eval
in interfaceEvalManager
- Returns:
- the facts
-
getJustification
Description copied from interface:EvalManagerWithProvenance
Return the last rule used in the justification of the given atom. The returned rule should be ground (variable-free). Return null if the given atom is not a fact or was not derived.- Specified by:
getJustification
in interfaceEvalManagerWithProvenance
- Parameters:
fact
- the fact- Returns:
- the last rule used to justify that fact
-
stripSemiNaiveClause
-