diff --git a/ScopeProgramAnalysis/Analysis/InterproceduralManager.cs b/ScopeProgramAnalysis/Analysis/InterproceduralManager.cs index 0bbd9f6..01b5218 100644 --- a/ScopeProgramAnalysis/Analysis/InterproceduralManager.cs +++ b/ScopeProgramAnalysis/Analysis/InterproceduralManager.cs @@ -117,8 +117,7 @@ namespace ScopeProgramAnalysis public InterProceduralReturnInfo DoInterProcWithCallee(InterProceduralCallInfo callInfo) { - - if (callInfo.Callee.Body.Operations.Any()) + if ((!callInfo.Callee.IsExternal) && callInfo.Callee.Body.Operations.Any()) { if (previousResult.ContainsKey(callInfo)) { diff --git a/ScopeProgramAnalysis/Analysis/IteratorAnalysis.cs b/ScopeProgramAnalysis/Analysis/IteratorAnalysis.cs index 52603c8..9a55f47 100644 --- a/ScopeProgramAnalysis/Analysis/IteratorAnalysis.cs +++ b/ScopeProgramAnalysis/Analysis/IteratorAnalysis.cs @@ -1451,7 +1451,8 @@ namespace Backend.Analyses } } - this.State = callStates.Aggregate((s1, s2) => s1.Join(s2)); + if(callStates.Any()) + this.State = callStates.Aggregate((s1, s2) => s1.Join(s2)); } } @@ -2142,7 +2143,7 @@ namespace Backend.Analyses || specialMethods.Any(sm => sm.Item1 == methodInvoked.ContainingType.GetFullName() && sm.Item2 == methodInvoked.Name.Value)); - if (methodInvoked.ResolvedMethod != null && (MemberHelper.IsGetter(methodInvoked.ResolvedMethod) || + if (methodInvoked.ResolvedMethod != null && method.ResolvedMethod!=Dummy.Method && (MemberHelper.IsGetter(methodInvoked.ResolvedMethod) || MemberHelper.IsSetter(methodInvoked.ResolvedMethod) && hasTraceables)) { return true; @@ -2518,7 +2519,7 @@ namespace Backend.Analyses { this.processToAnalyze = processToAnalyze; this.method = method; - this.iteratorClass = method.ContainingType as INamedTypeDefinition; + this.iteratorClass = processToAnalyze.ProcessorClass as INamedTypeDefinition; // method.ContainingType as INamedTypeDefinition; // this.specialFields = specialFields; this.ptgs = pta.Result; this.equalities = equalitiesMap;