Ejemplo n.º 1
0
                public INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> EdgeConversion(APC from, APC to, bool isJoin, IFunctionalMap <Variable, FList <Variable> > sourceTargetMap, INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> state)
                {
                    if (sourceTargetMap == null)
                    {
                        return(state);
                    }

                    var edge       = new Pair <APC, APC>(from, to);
                    var refinedMap = RefineMapToExpressions(edge.One, sourceTargetMap);

                    state.AssignInParallel(refinedMap,
                                           delegate(BoxedVariable <Variable> v)
                    {
                        Variable tmp;
                        if (v.TryUnpackVariable(out tmp))
                        {
                            return(ToBoxedExpression(edge.One, tmp));
                        }
                        else
                        {
                            return(default(BoxedExpression));
                        }
                    });
                    return(state);
                }
                public INumericalAbstractDomain <BoxedExpression> ParallelAssign(Pair <APC, APC> edge, IFunctionalMap <Variable, FList <Variable> > sourceTargetMap, INumericalAbstractDomain <BoxedExpression> state)
                {
                    var refinedMap = RefineMapToExpressions(edge.One, sourceTargetMap);

                    state.AssignInParallel(refinedMap);
                    return(state);
                }
Ejemplo n.º 3
0
        public bool AssignInParallel(IMethodResult<Variable> mr, ref INumericalAbstractDomain<BoxedVariable<Variable>, BoxedExpression> astate, Dictionary<BoxedVariable<Variable>, FList<BoxedVariable<Variable>>> mapping, Converter<BoxedVariable<Variable>, BoxedExpression> convert)
        {
          BufferAnalysis an = mr as BufferAnalysis;
          if (an == null)
            return false;

          astate.AssignInParallel(mapping, convert);
          return true;
        }
Ejemplo n.º 4
0
                public bool AssignInParallel(IMethodResult <Variable> mr, ref INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> astate, Dictionary <BoxedVariable <Variable>, FList <BoxedVariable <Variable> > > mapping, Converter <BoxedVariable <Variable>, BoxedExpression> convert)
                {
                    NumericalAnalysis <Options> an = mr as NumericalAnalysis <Options>;

                    if (an == null)
                    {
                        return(false);
                    }

                    astate.AssignInParallel(mapping, convert);
                    return(true);
                }