diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.vampire.test')
11 files changed, 102 insertions, 32 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp index f55667e4..265e7762 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp | |||
@@ -1,10 +1,15 @@ | |||
1 | % This is an initial Test Comment | 1 | % This is an initial Test Comment |
2 | fof ( typeDef_FunctionType , axiom , ! [ A ] : ( t_FunctionType ( A ) <=> ( e_Root_FunctionType ( A ) | ( e_Intermediate_FunctionType ( A ) | e_Leaf_FunctionType ( A ) ) ) ) ) . | 2 | fof ( typeDef_FunctionType , axiom , ! [ A ] : ( t_FunctionType ( A ) <=> ( e_Root_FunctionType ( A ) | ( e_Intermediate_FunctionType ( A ) | e_Leaf_FunctionType ( A ) ) ) ) ) . |
3 | fof ( enumScope_FunctionType , axiom , e_Root_FunctionType ( eo1 ) & ( ~ e_Intermediate_FunctionType ( eo1 ) & ( ~ e_Leaf_FunctionType ( eo1 ) & ( e_Intermediate_FunctionType ( eo2 ) & ( ~ e_Root_FunctionType ( eo2 ) & ( ~ e_Leaf_FunctionType ( eo2 ) & ( e_Leaf_FunctionType ( eo3 ) & ( ~ e_Root_FunctionType ( eo3 ) & ~ e_Intermediate_FunctionType ( eo3 ) ) ) ) ) ) ) ) ) . | 3 | fof ( enumScope_FunctionType , axiom , e_Root_FunctionType ( eo1 ) & ( ~ e_Intermediate_FunctionType ( eo1 ) & ( ~ e_Leaf_FunctionType ( eo1 ) & ( e_Intermediate_FunctionType ( eo2 ) & ( ~ e_Root_FunctionType ( eo2 ) & ( ~ e_Leaf_FunctionType ( eo2 ) & ( e_Leaf_FunctionType ( eo3 ) & ( ~ e_Root_FunctionType ( eo3 ) & ~ e_Intermediate_FunctionType ( eo3 ) ) ) ) ) ) ) ) ) . |
4 | fof ( inheritanceHierarchyHandler , axiom , ! [ A ] : ( object ( A ) <=> ( ( ~ t_FunctionType ( A ) & ( t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & ~ t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & ~ t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & ~ t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( t_FunctionalElement ( A ) & ~ t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & ~ t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) | ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( t_FunctionalOutput ( A ) & ( ~ t_FunctionalElement ( A ) & t_FunctionalData ( A ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . | 4 | fof ( inheritanceHierarchyHandler , axiom , ! [ A ] : ( object ( A ) <=> ( ( t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionalInput ( A ) & ( t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( t_Function ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalData ( A ) & ( t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( t_FAMTerminator ( A ) & ( ~ t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) | ( ~ t_FunctionalInput ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalOutput ( A ) & ( ~ t_Function ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_FAMTerminator ( A ) & ( t_InformationLink ( A ) & ~ t_FunctionType ( A ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . |
5 | fof ( typeScope_min_object , axiom , ! [ A ] : ( ( A = o1 | ( A = o2 | A = o3 ) ) => object ( A ) ) ) . | 5 | fof ( typeScope_min_object , axiom , ! [ A ] : ( ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | A = o6 ) ) ) ) ) => object ( A ) ) ) . |
6 | fof ( typeScope_max_object , axiom , ! [ A ] : ( object ( A ) => ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | A = o6 ) ) ) ) ) ) ) . | 6 | fof ( typeScope_max_object , axiom , ! [ A ] : ( object ( A ) => ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | ( A = o6 | ( A = o7 | A = o8 ) ) ) ) ) ) ) ) ) . |
7 | fof ( typeUniqueness , axiom , eo1 != eo2 & ( eo1 != eo3 & ( eo2 != eo3 & ( eo1 != o1 & ( eo2 != o1 & ( eo3 != o1 & ( eo1 != o2 & ( eo2 != o2 & ( eo3 != o2 & ( o1 != o2 & ( eo1 != o3 & ( eo2 != o3 & ( eo3 != o3 & ( o1 != o3 & ( o2 != o3 & ( eo1 != o4 & ( eo2 != o4 & ( eo3 != o4 & ( o1 != o4 & ( o2 != o4 & ( o3 != o4 & ( eo1 != o5 & ( eo2 != o5 & ( eo3 != o5 & ( o1 != o5 & ( o2 != o5 & ( o3 != o5 & ( o4 != o5 & ( eo1 != o6 & ( eo2 != o6 & ( eo3 != o6 & ( o1 != o6 & ( o2 != o6 & ( o3 != o6 & ( o4 != o6 & o5 != o6 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . | 7 | fof ( typeScope_min_t_FunctionalOutput , axiom , ! [ A ] : ( A = o1 => t_FunctionalOutput ( A ) ) ) . |
8 | fof ( typeScope_min_t_Function , axiom , ! [ A ] : ( ( A = o2 | ( A = o3 | A = o4 ) ) => t_Function ( A ) ) ) . | ||
9 | fof ( typeScope_min_t_FunctionalInterface , axiom , ! [ A ] : ( ( A = o5 | A = o6 ) => t_FunctionalInterface ( A ) ) ) . | ||
10 | fof ( typeScope_max_t_FunctionalOutput , axiom , ! [ A ] : ( t_FunctionalOutput ( A ) => ( A = o1 | ( A = o7 | A = o8 ) ) ) ) . | ||
11 | fof ( typeScope_max_t_Function , axiom , ! [ A ] : ( t_Function ( A ) => ( A = o2 | ( A = o3 | ( A = o4 | ( A = o7 | A = o8 ) ) ) ) ) ) . | ||
12 | fof ( typeUniqueness , axiom , eo1 != eo2 & ( eo1 != eo3 & ( eo2 != eo3 & ( eo1 != o1 & ( eo2 != o1 & ( eo3 != o1 & ( eo1 != o2 & ( eo2 != o2 & ( eo3 != o2 & ( o1 != o2 & ( eo1 != o3 & ( eo2 != o3 & ( eo3 != o3 & ( o1 != o3 & ( o2 != o3 & ( eo1 != o4 & ( eo2 != o4 & ( eo3 != o4 & ( o1 != o4 & ( o2 != o4 & ( o3 != o4 & ( eo1 != o5 & ( eo2 != o5 & ( eo3 != o5 & ( o1 != o5 & ( o2 != o5 & ( o3 != o5 & ( o4 != o5 & ( eo1 != o6 & ( eo2 != o6 & ( eo3 != o6 & ( o1 != o6 & ( o2 != o6 & ( o3 != o6 & ( o4 != o6 & ( o5 != o6 & ( eo1 != o7 & ( eo2 != o7 & ( eo3 != o7 & ( o1 != o7 & ( o2 != o7 & ( o3 != o7 & ( o4 != o7 & ( o5 != o7 & ( o6 != o7 & ( eo1 != o8 & ( eo2 != o8 & ( eo3 != o8 & ( o1 != o8 & ( o2 != o8 & ( o3 != o8 & ( o4 != o8 & ( o5 != o8 & ( o6 != o8 & o7 != o8 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . | ||
8 | fof ( compliance_interface_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . | 13 | fof ( compliance_interface_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . |
9 | fof ( compliance_model_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_model_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalArchitectureModel ( V_1 ) ) ) ) . | 14 | fof ( compliance_model_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_model_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalArchitectureModel ( V_1 ) ) ) ) . |
10 | fof ( compliance_parent_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_parent_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_Function ( V_1 ) ) ) ) . | 15 | fof ( compliance_parent_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_parent_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_Function ( V_1 ) ) ) ) . |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend index 40e305aa..b67a867a 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend | |||
@@ -31,6 +31,7 @@ import org.eclipse.emf.ecore.resource.Resource | |||
31 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 31 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
32 | import org.eclipse.viatra.query.runtime.api.IQueryGroup | 32 | import org.eclipse.viatra.query.runtime.api.IQueryGroup |
33 | import org.eclipse.emf.ecore.EClassifier | 33 | import org.eclipse.emf.ecore.EClassifier |
34 | import functionalarchitecture.FunctionalOutput | ||
34 | 35 | ||
35 | class GeneralTest { | 36 | class GeneralTest { |
36 | def static String createAndSolveProblem(EcoreMetamodelDescriptor metamodel, List<EObject> partialModel, | 37 | def static String createAndSolveProblem(EcoreMetamodelDescriptor metamodel, List<EObject> partialModel, |
@@ -45,43 +46,70 @@ class GeneralTest { | |||
45 | var problem = modelGenerationProblem.output | 46 | var problem = modelGenerationProblem.output |
46 | // problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output | 47 | // problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output |
47 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output | 48 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output |
48 | |||
49 | workspace.writeModel(problem, "Fam.logicproblem") | 49 | workspace.writeModel(problem, "Fam.logicproblem") |
50 | 50 | ||
51 | println("Problem created") | 51 | println("Problem created") |
52 | 52 | ||
53 | var LogicResult solution | 53 | var LogicResult solution |
54 | var LogicReasoner reasoner | 54 | var LogicReasoner reasoner |
55 | 55 | ||
56 | //* | 56 | // * |
57 | reasoner = new VampireSolver | 57 | reasoner = new VampireSolver |
58 | // val typeMap = new HashMap<Type, Integer> | 58 | |
59 | // val n = Function.simpleName | 59 | // Setting up scope |
60 | // val classif = factory.vampireLanguagePackage.getEClassifier(n) as EClass | 60 | val typeMapMin = new HashMap<Type, Integer> |
61 | // val x = ecore2Logic.TypeofEClass(modelGenerationProblem.trace, classif) | 61 | val typeMapMax = new HashMap<Type, Integer> |
62 | // typeMap.put(x, 3) | 62 | val list2MapMin = metamodel.classes.toMap[s|s.name] |
63 | val list2MapMax = metamodel.classes.toMap[s|s.name] | ||
64 | |||
65 | // Minimum Scope | ||
66 | typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, | ||
67 | list2MapMin.get(Function.simpleName) | ||
68 | ), 3) | ||
69 | typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, | ||
70 | list2MapMin.get(functionalarchitecture.FunctionalInterface.simpleName) | ||
71 | ), 2) | ||
72 | typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, | ||
73 | list2MapMin.get(FunctionalOutput.simpleName) | ||
74 | ), 1) | ||
75 | |||
76 | // Maximum Scope | ||
77 | typeMapMax.put(ecore2Logic.TypeofEClass( | ||
78 | modelGenerationProblem.trace, | ||
79 | list2MapMax.get(Function.simpleName) | ||
80 | ), 5) | ||
81 | typeMapMax.put(ecore2Logic.TypeofEClass( | ||
82 | modelGenerationProblem.trace, | ||
83 | list2MapMax.get(functionalarchitecture.FunctionalInterface.simpleName) | ||
84 | ), 2) | ||
85 | typeMapMax.put(ecore2Logic.TypeofEClass( | ||
86 | modelGenerationProblem.trace, | ||
87 | list2MapMax.get(FunctionalOutput.simpleName) | ||
88 | ), 4) | ||
89 | |||
90 | // Configuration | ||
63 | val vampireConfig = new VampireSolverConfiguration => [ | 91 | val vampireConfig = new VampireSolverConfiguration => [ |
64 | // add configuration things, in config file first | 92 | // add configuration things, in config file first |
65 | it.documentationLevel = DocumentationLevel::FULL | 93 | it.documentationLevel = DocumentationLevel::FULL |
66 | it.typeScopes.minNewElements = 3 | 94 | it.typeScopes.minNewElements = 6 |
67 | it.typeScopes.maxNewElements = 6 | 95 | it.typeScopes.maxNewElements = 8 |
68 | // it.typeScopes.minNewElementsByType = typeMap | 96 | it.typeScopes.minNewElementsByType = typeMapMin |
97 | it.typeScopes.maxNewElementsByType = typeMapMax | ||
69 | ] | 98 | ] |
70 | solution = reasoner.solve(problem, vampireConfig, workspace) | 99 | solution = reasoner.solve(problem, vampireConfig, workspace) |
71 | |||
72 | /*/ | ||
73 | |||
74 | reasoner = new AlloySolver | ||
75 | val alloyConfig = new AlloySolverConfiguration => [ | ||
76 | it.typeScopes.maxNewElements = 7 | ||
77 | it.typeScopes.minNewElements = 3 | ||
78 | it.solutionScope.numberOfRequiredSolution = 1 | ||
79 | it.typeScopes.maxNewIntegers = 0 | ||
80 | it.documentationLevel = DocumentationLevel::NORMAL | ||
81 | ] | ||
82 | solution = reasoner.solve(problem, alloyConfig, workspace) | ||
83 | //*/ | ||
84 | 100 | ||
101 | /*/ | ||
102 | * | ||
103 | * reasoner = new AlloySolver | ||
104 | * val alloyConfig = new AlloySolverConfiguration => [ | ||
105 | * it.typeScopes.maxNewElements = 7 | ||
106 | * it.typeScopes.minNewElements = 3 | ||
107 | * it.solutionScope.numberOfRequiredSolution = 1 | ||
108 | * it.typeScopes.maxNewIntegers = 0 | ||
109 | * it.documentationLevel = DocumentationLevel::NORMAL | ||
110 | * ] | ||
111 | * solution = reasoner.solve(problem, alloyConfig, workspace) | ||
112 | //*/ | ||
85 | println("Problem solved") | 113 | println("Problem solved") |
86 | } | 114 | } |
87 | 115 | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin index 620541af..57fe8c2d 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin index 38c38fcd..41284af1 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin index dbe2934c..36f2c6e1 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin index 86f98ad3..ff2a8e18 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin index 91e71b1b..270ac043 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java index c902bd10..7d3be50d 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java | |||
@@ -5,6 +5,8 @@ import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; | |||
5 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; | 5 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; |
6 | import com.google.common.base.Objects; | 6 | import com.google.common.base.Objects; |
7 | import com.google.common.collect.Iterables; | 7 | import com.google.common.collect.Iterables; |
8 | import functionalarchitecture.Function; | ||
9 | import functionalarchitecture.FunctionalOutput; | ||
8 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; | 10 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; |
9 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration; | 11 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration; |
10 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; | 12 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; |
@@ -12,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; | |||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; | 14 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; |
13 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | 15 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; |
14 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; | 16 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; |
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | 18 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; |
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; | 19 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; |
17 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore; | 20 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore; |
@@ -21,6 +24,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.Insta | |||
21 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; | 24 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; |
22 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; | 25 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; |
23 | import java.util.Collections; | 26 | import java.util.Collections; |
27 | import java.util.HashMap; | ||
24 | import java.util.List; | 28 | import java.util.List; |
25 | import java.util.Map; | 29 | import java.util.Map; |
26 | import java.util.Set; | 30 | import java.util.Set; |
@@ -69,13 +73,46 @@ public class GeneralTest { | |||
69 | LogicReasoner reasoner = null; | 73 | LogicReasoner reasoner = null; |
70 | VampireSolver _vampireSolver = new VampireSolver(); | 74 | VampireSolver _vampireSolver = new VampireSolver(); |
71 | reasoner = _vampireSolver; | 75 | reasoner = _vampireSolver; |
76 | final HashMap<Type, Integer> typeMapMin = new HashMap<Type, Integer>(); | ||
77 | final HashMap<Type, Integer> typeMapMax = new HashMap<Type, Integer>(); | ||
78 | final Function1<EClass, String> _function = (EClass s) -> { | ||
79 | return s.getName(); | ||
80 | }; | ||
81 | final Map<String, EClass> list2MapMin = IterableExtensions.<String, EClass>toMap(metamodel.getClasses(), _function); | ||
82 | final Function1<EClass, String> _function_1 = (EClass s) -> { | ||
83 | return s.getName(); | ||
84 | }; | ||
85 | final Map<String, EClass> list2MapMax = IterableExtensions.<String, EClass>toMap(metamodel.getClasses(), _function_1); | ||
86 | typeMapMin.put( | ||
87 | ecore2Logic.TypeofEClass(modelGenerationProblem.getTrace(), | ||
88 | list2MapMin.get(Function.class.getSimpleName())), Integer.valueOf(3)); | ||
89 | typeMapMin.put( | ||
90 | ecore2Logic.TypeofEClass(modelGenerationProblem.getTrace(), | ||
91 | list2MapMin.get(functionalarchitecture.FunctionalInterface.class.getSimpleName())), Integer.valueOf(2)); | ||
92 | typeMapMin.put( | ||
93 | ecore2Logic.TypeofEClass(modelGenerationProblem.getTrace(), | ||
94 | list2MapMin.get(FunctionalOutput.class.getSimpleName())), Integer.valueOf(1)); | ||
95 | typeMapMax.put( | ||
96 | ecore2Logic.TypeofEClass( | ||
97 | modelGenerationProblem.getTrace(), | ||
98 | list2MapMax.get(Function.class.getSimpleName())), Integer.valueOf(5)); | ||
99 | typeMapMax.put( | ||
100 | ecore2Logic.TypeofEClass( | ||
101 | modelGenerationProblem.getTrace(), | ||
102 | list2MapMax.get(functionalarchitecture.FunctionalInterface.class.getSimpleName())), Integer.valueOf(2)); | ||
103 | typeMapMax.put( | ||
104 | ecore2Logic.TypeofEClass( | ||
105 | modelGenerationProblem.getTrace(), | ||
106 | list2MapMax.get(FunctionalOutput.class.getSimpleName())), Integer.valueOf(4)); | ||
72 | VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration(); | 107 | VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration(); |
73 | final Procedure1<VampireSolverConfiguration> _function = (VampireSolverConfiguration it) -> { | 108 | final Procedure1<VampireSolverConfiguration> _function_2 = (VampireSolverConfiguration it) -> { |
74 | it.documentationLevel = DocumentationLevel.FULL; | 109 | it.documentationLevel = DocumentationLevel.FULL; |
75 | it.typeScopes.minNewElements = 3; | 110 | it.typeScopes.minNewElements = 6; |
76 | it.typeScopes.maxNewElements = 6; | 111 | it.typeScopes.maxNewElements = 8; |
112 | it.typeScopes.minNewElementsByType = typeMapMin; | ||
113 | it.typeScopes.maxNewElementsByType = typeMapMax; | ||
77 | }; | 114 | }; |
78 | final VampireSolverConfiguration vampireConfig = ObjectExtensions.<VampireSolverConfiguration>operator_doubleArrow(_vampireSolverConfiguration, _function); | 115 | final VampireSolverConfiguration vampireConfig = ObjectExtensions.<VampireSolverConfiguration>operator_doubleArrow(_vampireSolverConfiguration, _function_2); |
79 | solution = reasoner.solve(problem, vampireConfig, workspace); | 116 | solution = reasoner.solve(problem, vampireConfig, workspace); |
80 | _xblockexpression = InputOutput.<String>println("Problem solved"); | 117 | _xblockexpression = InputOutput.<String>println("Problem solved"); |
81 | } | 118 | } |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin index 2fac977d..693ee01d 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin index 1c3ec2f4..7e61c0ef 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin index d479a2aa..8a554a42 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin | |||
Binary files differ | |||