public override void Replay(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.sv1) || !merge.IsCommon(this.sv2) || (!merge.Graph1.IsEqual(this.sv1, this.sv2) || merge.Result.IsEqual(this.sv1, this.sv2))) { return; } if (merge.Graph2.IsEqual(this.sv1, this.sv2)) { merge.Result.AssumeEqual(this.sv1, this.sv2); } else { merge.Changed = true; } }
public override void Replay(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.sv)) { return; } TAbstractDomain val1 = merge.Graph1 [this.sv]; TAbstractDomain val2 = merge.Graph2 [this.sv]; bool weaker; TAbstractDomain join = val1.Join(val2, merge.Widen, out weaker); TAbstractDomain wasInResult = merge.Result [this.sv]; if (weaker) { if (DebugOptions.Debug) { Console.WriteLine("----SymGraph changed during AbstractDomainUpdate of {3} " + "due to weaker abstractValue join (val1 = {0}, val2 = {1}, wasInResult = {2}", val1, val2, wasInResult, this.sv); } merge.Changed = true; } if (join.Equals(wasInResult)) { return; } merge.Result [this.sv] = join; }
public override void Replay(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.from)) { return; } SymValue sv1 = merge.Graph1.LookupWithoutManifesting(this.from, this.function); SymValue sv2 = merge.Graph2.LookupWithoutManifesting(this.from, this.function); if (sv1 != null && sv2 != null) { return; } if (sv1 != null) { if (DebugOptions.Debug) { Console.WriteLine("---SymGraph changed due to EliminateEdgeUpdate {0}-{1} " + "-> that is only in G1", this.from, this.function); } merge.Changed = true; } bool noEdgeInResult = merge.Result.LookupWithoutManifesting(this.from, this.function) == null; if (noEdgeInResult) { return; } merge.Result.Eliminate(this.function, this.from); }
public override void ReplayElimination(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.from)) { return; } merge.Result.Eliminate(this.function, this.from); }
public override void Replay(MergeInfo <TFunc, TAbstractDomain> merge) { int len = this.from.Length; for (int i = 0; i < len; i++) { SymValue sv = this.from [i]; if (merge.IsCommon(sv)) { merge.JoinMultiEdge(sv, sv, new MultiEdge <TFunc, TAbstractDomain> (this.function, i, len)); } } }
public override void ReplayElimination(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.sv)) { return; } TAbstractDomain val1 = merge.Graph1 [this.sv]; if (val1.IsTop) { merge.Result [this.sv] = val1; } else { TAbstractDomain val2 = merge.Graph2 [this.sv]; if (val2.IsTop) { merge.Result [this.sv] = val2; } } }
public override void Replay(MergeInfo <TFunc, TAbstractDomain> merge) { if (!merge.IsCommon(this.from)) { return; } SymValue sv1 = merge.Graph1.LookupWithoutManifesting(this.from, this.function); SymValue sv2 = merge.Graph2.LookupWithoutManifesting(this.from, this.function); if (DebugOptions.Debug) { Console.WriteLine("Replay edge update: {0} -{1} -> [ {2}, {3} ]", this.from, this.function, sv1, sv2); } if (sv1 == null) { if (this.function.KeepAsBottomField && merge.Graph1.HasAllBottomFields(this.from)) { sv1 = merge.Graph1.BottomPlaceHolder; } else { if (sv2 == null || merge.Widen || !this.function.ManifestField) { return; } if (DebugOptions.Debug) { Console.WriteLine("---SymGraph changed due to manifestation of a top edge in Graph1"); } merge.Changed = true; } } if (sv2 == null) { if (this.function.KeepAsBottomField && merge.Graph2.HasAllBottomFields(this.from)) { sv2 = merge.Graph2.BottomPlaceHolder; } else { if (merge.Widen || !this.function.ManifestField) { return; } if (DebugOptions.Debug) { Console.WriteLine("---SymGraph changed due to manifestation of due to missing target in Graph2"); } merge.Changed = true; return; } } SymValue r = merge.AddJointEdge(sv1, sv2, this.function, this.from); if (r == null || r.UniqueId <= merge.LastCommonVariable) { return; } merge.JoinSymbolicValue(sv1, sv2, r); }