Exemple #1
0
        public static TypeVariable[] makeTypeVariables(Context context, List <Microsoft.Boogie.TypeVariable> typeVariableSeq)
        {
            var result = new TypeVariable[typeVariableSeq.Count];

            for (int i = 0; i < typeVariableSeq.Count; i++)
            {
                result[i] = context.lookupTypeVariable(typeVariableSeq[i].Name);
                Debug.Assert(result[i] != null);
            }
            return(result);
        }
Exemple #2
0
            public TypeVariable lookupTypeVariable(string name)
            {
                int          i      = contextStack.Count;
                TypeVariable result = null;

                foreach (var f in contextStack)
                {
                    if (f.typeVariables.TryGetValue(name, out result))
                    {
                        return(result);
                    }
                }
                return(null);
            }
Exemple #3
0
 public void add(TypeVariable v)
 {
     contextStack.Peek().typeVariables.Add(v.name, v);
 }