org.ggp.base.util.ruleengine.prover.ProverRuleEngineFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alloy-ggp-base Show documentation
Show all versions of alloy-ggp-base Show documentation
A modified version of the GGP-Base library for Alloy.
The newest version!
package org.ggp.base.util.ruleengine.prover;
import java.util.List;
import org.ggp.base.util.gdl.grammar.Gdl;
import org.ggp.base.util.gdl.transforms.DistinctAndNotMover2;
import org.ggp.base.util.ruleengine.RuleEngineFactory;
public class ProverRuleEngineFactory implements RuleEngineFactory {
private final boolean experimental;
public ProverRuleEngineFactory(boolean experimental) {
this.experimental = experimental;
}
public static ProverRuleEngineFactory createNormal() {
return new ProverRuleEngineFactory(false);
}
public static ProverRuleEngineFactory createWithDisjuncts() {
return new ProverRuleEngineFactory(true);
}
@Override
public ProverRuleEngine buildEngineForRules(List rules) {
if (experimental) {
rules = DistinctAndNotMover2.run(rules);
}
return ProverRuleEngine.create(rules, experimental);
}
}