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
    DualKeyMap.java 75fbe85a54e5a655aaf67108ae004f98ed2879d8 YELLOW
    EMFProductLineTranslation.java 58487bc6e6f31115ff5388fcc204dd55a545f106 YELLOW
    EMFProductLineTranslation.java 6fe2de9772ab505ddf002842d4fedddccfc8dd0b YELLOW
    GenericProductLineAnalysis.java 6f6d48544ec2b872fa0a4f747a85657889ad463e YELLOW
    IProductLineConstraint.java 1b0e1231cc578a6e7e544441ac33533b4feafeb1 YELLOW
    IProductLineTranslation.java 733dae03e2baae237b6f0b33f0dd618a4f47cf73 YELLOW
    ......
    ......@@ -129,35 +129,29 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    private Map<EReference, EClass> reference2TranslatedEClass;
    /** Mapping of attributes to their translated Z3 function. */
    private DualKeyMap<EAttribute, EClass, FuncDecl<?>> eAttribute2FunDecl =
    new DualKeyMap<EAttribute, EClass, FuncDecl<?>>();
    private DualKeyMap<EAttribute, EClass, FuncDecl<?>> eAttribute2FunDecl;
    /** Mapping of references to their translated Z3 function. */
    private DualKeyMap<EReference, EClass, FuncDecl<?>> eReference2FunDecl =
    new DualKeyMap<EReference, EClass, FuncDecl<?>>();
    private DualKeyMap<EReference, EClass, FuncDecl<?>> eReference2FunDecl;
    /* 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
    * necessary as an object is translated for all classes specified in 'translatedClasses').
    */
    private DualKeyMap<EObject, EClass, Expr<?>> eObject2z3Expr =
    new DualKeyMap<EObject, EClass, Expr<?>>();
    private DualKeyMap<EObject, EClass, Expr<?>> eObject2z3Expr;
    /**
    * The mapping from Z3 {@link Expr} back to the respective {@link EObject} to be used for
    * interpreting solver results.
    */
    private Map<Expr<?>, EObject> expr2EObject = new HashMap<Expr<?>, EObject>();
    /** The mapping of translated {@link EClass} to the objects that have been collected. */
    private BucketSetMap<EClass, EObject> class2TranslatedEObjects;
    private Map<Expr<?>, EObject> z3Expr2EObject;
    /* 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 */
    private AbstractFeatureModel featureModel;
    /** Mapping of features to corresponding Z3 {@link BoolExpr}. */
    ......@@ -166,6 +160,9 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    /** The mapping of translated {@link EObject}s to global {@link PresenceCondition}s. */
    private Map<EObject, PresenceConditionTerm> object2presenceCondition;
    /** Mapping of classes to the selection function for this type. */
    private Map<EClass, FuncDecl<?>> eClass2SelectionFunction;
    /**
    * Constructor.
    */
    ......@@ -202,6 +199,12 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    eClass2SelectionFunction = new HashMap<EClass, FuncDecl<?>>();
    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
    intSort = ctx.mkIntSort();
    stringSort = ctx.mkStringSort();
    ......@@ -780,7 +783,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    Expr<?>[] consts = enumSort.getConsts();
    for(int i = 0; i < objs.size(); 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];
    eClass2NullElement.put(cls, noneExpr);
    ......@@ -811,7 +814,7 @@ public class EMFProductLineTranslation implements IProductLineTranslation {
    /** {@inheritDoc} */
    @Override
    public EObject getEObjectForExpression(Expr<?> expr) {
    return expr2EObject.get(expr);
    return z3Expr2EObject.get(expr);
    }
    /** {@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