public SyntacticInformation(IDisjunctiveExpressionRefiner <Variable, BoxedExpression> refiner, IEnumerable <SyntacticTest> codeTests, IEnumerable <RightExpression> codeExpressions, Dictionary <Variable, APC> variableDefinitions, IEnumerable <Field> mayUpdateFields, IEnumerable <MethodCallInfo <Method, Variable> > methodCalls, List <Tuple <Pair <APC, APC>, Dictionary <Variable, HashSet <Variable> > > > renamingsInfo, List <Tuple <Pair <APC, APC>, int> > renamingsLength, bool HasThrow, bool HasExceptionHandlers) { Contract.Requires(refiner != null); Contract.Requires(codeTests != null); Contract.Requires(codeExpressions != null); Contract.Requires(variableDefinitions != null); Contract.Requires(mayUpdateFields != null); Contract.Requires(methodCalls != null); Contract.Requires(renamingsInfo != null); Contract.Requires(renamingsLength != null); this.DisjunctionRefiner = refiner; this.TestsInTheMethod = codeTests.Where(t => t.Guard != null); this.RightExpressions = codeExpressions.Where(t => t.RValueExpression != null); this.VariableDefinitions = variableDefinitions; this.MayUpdatedFields = mayUpdateFields; this.MethodCalls = methodCalls; this.HasThrow = HasThrow; this.HasExceptionHandlers = HasExceptionHandlers; this.Renamings = new Renamings <Variable>(renamingsLength, renamingsInfo); }
public Dictionary <BoxedVariable <Variable>, FList <BoxedVariable <Variable> > > GetRefinedMap( APC from, APC to, IFunctionalMap <Variable, FList <Variable> > sourceTargetMap, Renamings <Variable> renamings, int maxVarsInOneRenaming = Int32.MaxValue) { Contract.Requires(sourceTargetMap != null); Dictionary <BoxedVariable <Variable>, FList <BoxedVariable <Variable> > > result; if (!this.RefinedMappingCache.TryGetValue(from, to, out result)) { result = sourceTargetMap.RefineMapToBoxedVariables(renamings, maxVarsInOneRenaming); this.RefinedMappingCache.Add(from, to, result); } return(result); }