use of abs.frontend.ast.Model in project abstools by abstools.
the class FeatureModel method attributeBounded.
@Test
public void attributeBounded() throws DeltaModellingException, WrongProgramArgumentException {
Model model = assertParseOk("productline PL; features FM;" + "product P();" + "root FM { Int attr in [0..99]; }");
model.flattenForProduct("P");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class FeatureModel method attributeUnbounded2.
@Test
public void attributeUnbounded2() throws DeltaModellingException, WrongProgramArgumentException {
Model model = assertParseOk("productline PL; features FM;" + "product P();" + "root FM { Int attr in [*..*]; }");
model.flattenForProduct("P");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class FeatureModel method attributeUnbounded.
@Test
public void attributeUnbounded() throws DeltaModellingException, WrongProgramArgumentException {
Model model = assertParseOk("productline PL; features FM;" + "product P();" + "root FM { Int attr; }");
model.flattenForProduct("P");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class SearchSolutionsTest method SearchSolutions.
@Test
public void SearchSolutions() throws Exception {
Model model = assertParseOk(helloprogram);
model.setNullPrintStream();
ChocoSolver s = model.instantiateCSModel();
model.evaluateAllProductDeclarations();
assertEquals(78, s.countSolutions());
assertTrue(checkSol(s, model, "P1"));
assertTrue(checkSol(s, model, "P2"));
assertTrue(checkSol(s, model, "P3"));
assertTrue(!checkSol(s, model, "P4"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class SearchSolutionsTest method SearchSolutionsNoAttr.
@Test
public void SearchSolutionsNoAttr() {
Model model = assertParseOk(helloprogram);
model.dropAttributes();
ChocoSolver s = model.instantiateCSModel();
assertEquals(8, s.countSolutions());
}
Aggregations