Skip to content
Snippets Groups Projects
Commit 708c4c60 authored by Andreas Bayha's avatar Andreas Bayha
Browse files

YELLOW

Issue-ref: 4240
Issue-URL: af3#4240



Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 31235eff
No related branches found
No related tags found
1 merge request!1784240
Pipeline #38686 passed
Pipeline: maven-releng

#38687

    BucketSetMap.java 665a28c80a9693b9b9e31b7ebe59f2de4195d56c YELLOW BucketSetMap.java 665a28c80a9693b9b9e31b7ebe59f2de4195d56c YELLOW
    DualKeyMap.java 75fbe85a54e5a655aaf67108ae004f98ed2879d8 YELLOW DualKeyMap.java 75fbe85a54e5a655aaf67108ae004f98ed2879d8 YELLOW
    EMFProductLineTranslation.java 58487bc6e6f31115ff5388fcc204dd55a545f106 YELLOW EMFProductLineTranslation.java 6fe2de9772ab505ddf002842d4fedddccfc8dd0b YELLOW
    GenericProductLineAnalysis.java 6f6d48544ec2b872fa0a4f747a85657889ad463e YELLOW GenericProductLineAnalysis.java 6f6d48544ec2b872fa0a4f747a85657889ad463e YELLOW
    IProductLineConstraint.java 1b0e1231cc578a6e7e544441ac33533b4feafeb1 YELLOW IProductLineConstraint.java 1b0e1231cc578a6e7e544441ac33533b4feafeb1 YELLOW
    IProductLineTranslation.java 733dae03e2baae237b6f0b33f0dd618a4f47cf73 YELLOW IProductLineTranslation.java 733dae03e2baae237b6f0b33f0dd618a4f47cf73 YELLOW
    ......
    ...@@ -129,35 +129,29 @@ public class EMFProductLineTranslation implements IProductLineTranslation { ...@@ -129,35 +129,29 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    private Map<EReference, EClass> reference2TranslatedEClass; private Map<EReference, EClass> reference2TranslatedEClass;
    /** Mapping of attributes to their translated Z3 function. */ /** Mapping of attributes to their translated Z3 function. */
    private DualKeyMap<EAttribute, EClass, FuncDecl<?>> eAttribute2FunDecl = private DualKeyMap<EAttribute, EClass, FuncDecl<?>> eAttribute2FunDecl;
    new DualKeyMap<EAttribute, EClass, FuncDecl<?>>();
    /** Mapping of references to their translated Z3 function. */ /** Mapping of references to their translated Z3 function. */
    private DualKeyMap<EReference, EClass, FuncDecl<?>> eReference2FunDecl = private DualKeyMap<EReference, EClass, FuncDecl<?>> eReference2FunDecl;
    new DualKeyMap<EReference, EClass, FuncDecl<?>>();
    /* Model related fields */ /* Model related fields */
    /** The mapping of translated {@link EClass} to the objects that have been collected. */
    private BucketSetMap<EClass, EObject> class2TranslatedEObjects;
    /** /**
    * Mapping of objects with types to their translated Z3 expressions. The second key EClass is * Mapping of objects with types to their translated Z3 expressions. The second key EClass is
    * necessary as an object is translated for all classes specified in 'translatedClasses'). * necessary as an object is translated for all classes specified in 'translatedClasses').
    */ */
    private DualKeyMap<EObject, EClass, Expr<?>> eObject2z3Expr = private DualKeyMap<EObject, EClass, Expr<?>> eObject2z3Expr;
    new DualKeyMap<EObject, EClass, Expr<?>>();
    /** /**
    * The mapping from Z3 {@link Expr} back to the respective {@link EObject} to be used for * The mapping from Z3 {@link Expr} back to the respective {@link EObject} to be used for
    * interpreting solver results. * interpreting solver results.
    */ */
    private Map<Expr<?>, EObject> expr2EObject = new HashMap<Expr<?>, EObject>(); private Map<Expr<?>, EObject> z3Expr2EObject;
    /** The mapping of translated {@link EClass} to the objects that have been collected. */
    private BucketSetMap<EClass, EObject> class2TranslatedEObjects;
    /* Variability related fields */ /* Variability related fields */
    /** Mapping of classes to the selection function for this type. */
    private Map<EClass, FuncDecl<?>> eClass2SelectionFunction;
    /** The {@link AbstractFeatureModel} collected by this translation */ /** The {@link AbstractFeatureModel} collected by this translation */
    private AbstractFeatureModel featureModel; private AbstractFeatureModel featureModel;
    /** Mapping of features to corresponding Z3 {@link BoolExpr}. */ /** Mapping of features to corresponding Z3 {@link BoolExpr}. */
    ...@@ -166,6 +160,9 @@ public class EMFProductLineTranslation implements IProductLineTranslation { ...@@ -166,6 +160,9 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    /** The mapping of translated {@link EObject}s to global {@link PresenceCondition}s. */ /** The mapping of translated {@link EObject}s to global {@link PresenceCondition}s. */
    private Map<EObject, PresenceConditionTerm> object2presenceCondition; private Map<EObject, PresenceConditionTerm> object2presenceCondition;
    /** Mapping of classes to the selection function for this type. */
    private Map<EClass, FuncDecl<?>> eClass2SelectionFunction;
    /** /**
    * Constructor. * Constructor.
    */ */
    ...@@ -202,6 +199,12 @@ public class EMFProductLineTranslation implements IProductLineTranslation { ...@@ -202,6 +199,12 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    eClass2SelectionFunction = new HashMap<EClass, FuncDecl<?>>(); eClass2SelectionFunction = new HashMap<EClass, FuncDecl<?>>();
    feature2BoolExpr = new HashMap<AbstractFeature, BoolExpr>(); feature2BoolExpr = new HashMap<AbstractFeature, BoolExpr>();
    eAttribute2FunDecl = new DualKeyMap<EAttribute, EClass, FuncDecl<?>>();
    eReference2FunDecl = new DualKeyMap<EReference, EClass, FuncDecl<?>>();
    eObject2z3Expr = new DualKeyMap<EObject, EClass, Expr<?>>();
    z3Expr2EObject = new HashMap<Expr<?>, EObject>();
    // Initialize model independent base types // Initialize model independent base types
    intSort = ctx.mkIntSort(); intSort = ctx.mkIntSort();
    stringSort = ctx.mkStringSort(); stringSort = ctx.mkStringSort();
    ...@@ -780,7 +783,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation { ...@@ -780,7 +783,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    Expr<?>[] consts = enumSort.getConsts(); Expr<?>[] consts = enumSort.getConsts();
    for(int i = 0; i < objs.size(); i++) { for(int i = 0; i < objs.size(); i++) {
    eObject2z3Expr.put(objs.get(i), cls, consts[i]); eObject2z3Expr.put(objs.get(i), cls, consts[i]);
    expr2EObject.put(consts[i], objs.get(i)); z3Expr2EObject.put(consts[i], objs.get(i));
    } }
    Expr<?> noneExpr = consts[consts.length - 1]; Expr<?> noneExpr = consts[consts.length - 1];
    eClass2NullElement.put(cls, noneExpr); eClass2NullElement.put(cls, noneExpr);
    ...@@ -811,7 +814,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation { ...@@ -811,7 +814,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    /** {@inheritDoc} */ /** {@inheritDoc} */
    @Override @Override
    public EObject getEObjectForExpression(Expr<?> expr) { public EObject getEObjectForExpression(Expr<?> expr) {
    return expr2EObject.get(expr); return z3Expr2EObject.get(expr);
    } }
    /** {@inheritDoc} */ /** {@inheritDoc} */
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment