Skip to content
Snippets Groups Projects
Commit dcc387ff authored by Johannes Mey's avatar Johannes Mey
Browse files

tests for eris

parent e9be4cea
No related branches found
No related tags found
No related merge requests found
......@@ -208,4 +208,16 @@ public abstract class HandwrittenTestSuite {
Assignment a0 = assertAssignment(modelAndSolution, 0, "ap4", "r0");
Assignment a1 = assertAssignment(modelAndSolution, 1, "ap2", "r0");
}
@Test
public void test_multi_eris_02() throws IOException, Parser.Exception, SolvingException {
Tuple<Root, Solution> modelAndSolution = loadAndSolve("test_eris_02.txt");
assertValidSolution(modelAndSolution);
}
@Test
public void test_multi_eris_04() throws IOException, Parser.Exception, SolvingException {
Tuple<Root, Solution> modelAndSolution = loadAndSolve("test_eris_04.txt");
assertValidSolution(modelAndSolution);
}
}
container resource type AccessPath {
property dynamic [boolean]
property attributeCount [#]
property attributeNull [boolean]
property attributeUndefined [boolean]
property dynamicAttributeSize [boolean]
property indexAttributeCount [boolean]
property indexOrderPreserving [boolean]
}
resource ap1:AccessPath * 5 {
dynamic = 0
attributeCount = 1
attributeNull = 0
attributeUndefined = 0
dynamicAttributeSize = 0
indexAttributeCount = 0
indexOrderPreserving = 0
}
resource ap2:AccessPath * 5 {
dynamic = 0
attributeCount = 999
attributeNull = 1
attributeUndefined = 1
dynamicAttributeSize = 0
indexAttributeCount = 0
indexOrderPreserving = 0
}
property runtime [ms]
meta scan
component node0_lp0_10 {
using property runtime
contract ap1 {
requires resource access_pattern of type AccessPath with {
}
requiring access_pattern.attributeCount >= 1
requiring access_pattern.attributeNull = 1
providing runtime = (scan * 2.1)
}
}
request for node0_lp0_10 {
meta scan = 3
}
minimize sum(runtime)
container resource type AccessPathObject {
property dynamic [boolean]
property attributeCount [#]
property attributeNull [boolean]
property attributeUndefined [boolean]
property dynamicAttributeSize [boolean]
property indexAttributeCount [boolean]
property indexOrderPreserving [boolean]
}
resource ap1:AccessPathObject * 5 {
dynamic = 0
attributeCount = 1
attributeNull = 0
attributeUndefined = 0
dynamicAttributeSize = 0
indexAttributeCount = 0
indexOrderPreserving = 0
}
resource ap2:AccessPathObject * 5 {
dynamic = 0
attributeCount = 999
attributeNull = 1
attributeUndefined = 1
dynamicAttributeSize = 0
indexAttributeCount = 0
indexOrderPreserving = 0
}
property runtime [ms]
meta scan
component node0_lp0_10 {
using property runtime
contract ap1 {
requires resource access_pattern of type AccessPath with {
}
requiring access_pattern.attributeCount >= 1
requiring access_pattern.attributeNull = 1
providing runtime = (scan * 2.1)
}
}
request for node0_lp0_10 {
meta scan = 3
}
minimize sum(runtime)
container resource type ComputeNode {
// empty, just a dummy type
}
resource r0:ComputeNode * 5 {
// empty
}
property runtime [ms]
property system [boolean]
meta scan
component lp0_node0_row0 {
using property runtime
using property system
contract ap1 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = (scan * 2.1)
}
contract ap2 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 2
}
contract ap3 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
}
contract ap4 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
providing system = 1
providing attributeCount = 1
providing attributeNull = 0
providing attributeUndefined = 0
providing dynamicAttributeSize = 0
providing indexAttributeCount = 0
providing indexOrderPreserving = 0
}
}
component lp0_node0_row1 {
using property runtime
using property system
contract ap1 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = (scan * 2.1)
}
contract ap2 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 2
}
contract ap3 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
}
contract ap4 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
providing system = 1
providing attributeCount = 1
providing attributeNull = 0
providing attributeUndefined = 0
providing dynamicAttributeSize = 0
providing indexAttributeCount = 0
providing indexOrderPreserving = 0
}
}
request for lp0_node0_row0 {
requiring system = 1
meta scan = 3
}
request for lp0_node0_row0 {
meta scan = 3
}
request for lp0_node0_row1 {
requiring system = 1
meta scan = 2
}
request for lp0_node0_row1 {
meta scan = 2
}
minimize sum(runtime)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment