integraal.services.concrete.InteGraal_RuleCompilation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brunner-integraal Show documentation
Show all versions of brunner-integraal Show documentation
InteGraal module for the BRunner project
package integraal.services.concrete;
import org.slf4j.LoggerFactory;
import fr.boreal.component_builder.api.IAlgorithmParameters;
import fr.boreal.component_builder.api.IInputDataScenario;
import fr.boreal.component_builder.utils.ComponentPrinter;
import fr.boreal.query_evaluation.component.QueryEvaluationOutput;
import fr.boreal.query_evaluation.component.QueryEvaluator;
import integraal.services.AbstractInteGraalService;
import tools.service.CommonOps;
/**
* Rule compilation.
*/
public class InteGraal_RuleCompilation extends AbstractInteGraalService {
QueryEvaluator evaluator;
Iterable query_answers;
/**
* @param ids input data scenario
* @param iap algorithm parameters
*/
public InteGraal_RuleCompilation(IInputDataScenario ids, IAlgorithmParameters iap) {
super(ids, iap);
LOG = LoggerFactory.getLogger(InteGraal_RuleCompilation.class);
}
public void prepareServiceSpecificOperations() {
setup(CommonOps.RULE_LOADING, builder::trySetRuleBase);
operation(CommonOps.COMPILE_RULES, builder::tryCompileRuleset);
}
@Override
protected void postProcessingTrial() {
ComponentPrinter.writeUCQAnswersCountToLog(query_answers);
}
}