Search in sources :

Example 6 with GrounderHeuristicsConfiguration

use of at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration in project Alpha by alpha-asp.

the class GrounderHeuristicConfigurationTest method testGetInstanceStrictStrict.

@Test
public void testGetInstanceStrictStrict() {
    GrounderHeuristicsConfiguration grounderHeuristicsConfiguration = GrounderHeuristicsConfiguration.getInstance(STRICT_STRING, STRICT_STRING);
    assertFalse(grounderHeuristicsConfiguration.isPermissive(true));
    assertFalse(grounderHeuristicsConfiguration.isPermissive(false));
    assertEquals(0, grounderHeuristicsConfiguration.getToleranceConstraints());
    assertEquals(0, grounderHeuristicsConfiguration.getToleranceRules());
}
Also used : GrounderHeuristicsConfiguration(at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration) Test(org.junit.jupiter.api.Test)

Example 7 with GrounderHeuristicsConfiguration

use of at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration in project Alpha by alpha-asp.

the class GrounderHeuristicConfigurationTest method testGetInstancePermissivePermissive.

@Test
public void testGetInstancePermissivePermissive() {
    GrounderHeuristicsConfiguration grounderHeuristicsConfiguration = GrounderHeuristicsConfiguration.getInstance(PERMISSIVE_STRING, PERMISSIVE_STRING);
    assertTrue(grounderHeuristicsConfiguration.isPermissive(true));
    assertTrue(grounderHeuristicsConfiguration.isPermissive(false));
    assertEquals(-1, grounderHeuristicsConfiguration.getToleranceConstraints());
    assertEquals(-1, grounderHeuristicsConfiguration.getToleranceRules());
}
Also used : GrounderHeuristicsConfiguration(at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration) Test(org.junit.jupiter.api.Test)

Example 8 with GrounderHeuristicsConfiguration

use of at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration in project Alpha by alpha-asp.

the class GrounderHeuristicConfigurationTest method testGetInstanceIntInt.

@Test
public void testGetInstanceIntInt() {
    GrounderHeuristicsConfiguration grounderHeuristicsConfiguration = GrounderHeuristicsConfiguration.getInstance(5, 1);
    assertTrue(grounderHeuristicsConfiguration.isPermissive(true));
    assertTrue(grounderHeuristicsConfiguration.isPermissive(false));
    assertEquals(5, grounderHeuristicsConfiguration.getToleranceConstraints());
    assertEquals(1, grounderHeuristicsConfiguration.getToleranceRules());
}
Also used : GrounderHeuristicsConfiguration(at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

GrounderHeuristicsConfiguration (at.ac.tuwien.kr.alpha.api.config.GrounderHeuristicsConfiguration)8 Test (org.junit.jupiter.api.Test)7 AtomStore (at.ac.tuwien.kr.alpha.core.common.AtomStore)2 AtomStoreImpl (at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl)2 SystemConfig (at.ac.tuwien.kr.alpha.api.config.SystemConfig)1 Substitution (at.ac.tuwien.kr.alpha.api.grounder.Substitution)1 ASPCore2Program (at.ac.tuwien.kr.alpha.api.programs.ASPCore2Program)1 NormalProgram (at.ac.tuwien.kr.alpha.api.programs.NormalProgram)1 ProgramParser (at.ac.tuwien.kr.alpha.api.programs.ProgramParser)1 Literal (at.ac.tuwien.kr.alpha.api.programs.literals.Literal)1 BasicSubstitution (at.ac.tuwien.kr.alpha.commons.substitutions.BasicSubstitution)1 Instance (at.ac.tuwien.kr.alpha.commons.substitutions.Instance)1 Terms (at.ac.tuwien.kr.alpha.commons.terms.Terms)1 Literals (at.ac.tuwien.kr.alpha.core.atoms.Literals)1 Assignment (at.ac.tuwien.kr.alpha.core.common.Assignment)1 NoGood (at.ac.tuwien.kr.alpha.core.common.NoGood)1 Grounder (at.ac.tuwien.kr.alpha.core.grounder.Grounder)1 BindingResult (at.ac.tuwien.kr.alpha.core.grounder.instantiation.BindingResult)1 ProgramParserImpl (at.ac.tuwien.kr.alpha.core.parser.ProgramParserImpl)1 ProgramPartParser (at.ac.tuwien.kr.alpha.core.parser.ProgramPartParser)1