Search in sources :

Example 6 with NaiveGrounder

use of at.ac.tuwien.kr.alpha.core.grounder.NaiveGrounder in project Alpha by alpha-asp.

the class AlphaHeuristicTestAssumptions method setUp.

@BeforeEach
public void setUp() {
    String testProgram = "" + "b1." + "b2." + "{b3}." + "{b4}." + "h :- b1, b2, not b3, not b4.";
    CompiledProgram internalProgram = parseAndPreprocess.apply(testProgram);
    atomStore = new AtomStoreImpl();
    grounder = new NaiveGrounder(internalProgram, atomStore, true);
    assignment = new TrailAssignment(atomStore);
    choiceManager = new TestableChoiceManager(assignment, new NaiveNoGoodStore(assignment));
}
Also used : TestableChoiceManager(at.ac.tuwien.kr.alpha.core.solver.TestableChoiceManager) NaiveGrounder(at.ac.tuwien.kr.alpha.core.grounder.NaiveGrounder) NaiveNoGoodStore(at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore) AtomStoreImpl(at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl) CompiledProgram(at.ac.tuwien.kr.alpha.core.programs.CompiledProgram) TrailAssignment(at.ac.tuwien.kr.alpha.core.solver.TrailAssignment) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AtomStoreImpl (at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl)6 NaiveGrounder (at.ac.tuwien.kr.alpha.core.grounder.NaiveGrounder)6 CompiledProgram (at.ac.tuwien.kr.alpha.core.programs.CompiledProgram)6 TrailAssignment (at.ac.tuwien.kr.alpha.core.solver.TrailAssignment)5 BasicAtom (at.ac.tuwien.kr.alpha.api.programs.atoms.BasicAtom)4 Literal (at.ac.tuwien.kr.alpha.api.programs.literals.Literal)4 AtomStore (at.ac.tuwien.kr.alpha.core.common.AtomStore)4 Test (org.junit.jupiter.api.Test)4 Atom (at.ac.tuwien.kr.alpha.api.programs.atoms.Atom)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 ASPCore2Program (at.ac.tuwien.kr.alpha.api.programs.ASPCore2Program)1 Predicate (at.ac.tuwien.kr.alpha.api.programs.Predicate)1 ProgramParserImpl (at.ac.tuwien.kr.alpha.core.parser.ProgramParserImpl)1 NormalizeProgramTransformation (at.ac.tuwien.kr.alpha.core.programs.transformation.NormalizeProgramTransformation)1 NaiveNoGoodStore (at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore)1 TestableChoiceManager (at.ac.tuwien.kr.alpha.core.solver.TestableChoiceManager)1