/// <summary> /// Set v to a new value that is abstracted by av /// </summary> /// <param name="v"></param> /// <param name="av"></param> private void AssignAVal(Variable v, Lattice.AVal av) { ISymValue sv = this.egraph.FreshSymbol(); this.egraph[v] = sv; this.egraph[sv] = av; }
public void AssignFrameForExposable(ISymValue guard) { ISymValue guardedObject = this.egraph[FrameFor, guard]; ISymValue guardTypeObject = this.egraph[StaticTypeOf, guard]; Lattice.AVal guardsType = (Lattice.AVal) this.egraph[guardTypeObject]; this.egraph[guardedObject] = new Lattice.AVal(guardsType.lowerBound, guardsType.upperBound); }
public void AssignFrameForExposed(ISymValue guard) { ISymValue guardedObject = this.egraph[FrameFor, guard]; ISymValue dummy = this.egraph[StaticTypeOf, guard]; Lattice.AVal guardsType = (Lattice.AVal) this.egraph[dummy]; this.egraph[guardedObject] = new Lattice.AVal(guardsType.lowerBound.BaseType, guardsType.upperBound.BaseType); }
internal TypeNode LowerBoundOfObjectPointedToByFrame(Variable guardVariable) { ISymValue guard = this.egraph[guardVariable]; ISymValue guardedObject = this.egraph[FrameFor, guard]; Lattice.AVal invLevel = (Lattice.AVal) this.egraph[guardedObject]; return(invLevel.lowerBound); }
public void AssignFrameForNotExposed(Variable guardVariable) { ISymValue guard = this.egraph[guardVariable]; ISymValue guardTypeObject = this.egraph[StaticTypeOf, guard]; Lattice.AVal guardsType = (Lattice.AVal) this.egraph[guardTypeObject]; ISymValue guardedObject = this.egraph[FrameFor, guard]; this.egraph[guardedObject] = guardsType; }
public bool IsFrameExposable(Variable guardVariable) { ISymValue guard = this.egraph[guardVariable]; ISymValue guardedObject = this.egraph[FrameFor, guard]; ISymValue guardTypeObject = this.egraph[StaticTypeOf, guard]; Lattice.AVal guardsType = (Lattice.AVal) this.egraph[guardTypeObject]; Lattice.AVal guardedObjectsType = (Lattice.AVal) this.egraph[guardedObject]; return(guardsType.lowerBound == guardedObjectsType.lowerBound); }
public bool IsNotExposed(Variable v) { Lattice.AVal valueOfV = GetAVal(v); return(valueOfV == Lattice.AVal.IsNotExposed); }