Ejemplo n.º 1
0
        /// <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;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
 public bool IsNotExposed(Variable v)
 {
     Lattice.AVal valueOfV = GetAVal(v);
     return(valueOfV == Lattice.AVal.IsNotExposed);
 }