Beispiel #1
0
        public string GetFieldDef(IMethodReference method)
        {
            FieldTranslator field      = new FieldTranslator();
            var             boogieName = field.BoogieNameForField(method.ContainingType, GetFieldName(method));

            Helpers.BoogieType boogieType = Helpers.BoogieType.Object;
            if (method.Name.Value.StartsWith("get_"))
            {
                boogieType = Helpers.GetBoogieType(method.Type);
            }
            else
            {
                boogieType = Helpers.GetBoogieType(method.Parameters.ElementAt(0));
            }
            //var boogieType = Helpers.GetBoogieType(method.Type);
            return(String.Format("var {0} : [Ref]{1};", boogieName, boogieType));
        }
Beispiel #2
0
 public static bool IsBoogieRefType(Helpers.BoogieType type)
 {
     return(type.Equals(Helpers.BoogieType.Ref) || type.Equals(Helpers.BoogieType.Object) || type.Equals(Helpers.BoogieType.Union));
 }