private static string ExtractVariableValueFromModel(string VariableName, Model model) { var func = model.TryGetFunc(VariableName); if (func != null) { return(ExtractValueFromModelElement(func.GetConstant())); } return("<unknown>"); }
private string ArrayOffsetString(Model Model, string StateName, Variable AccessHasOccurredVar, Variable AccessOffsetVar, string RaceyArraySourceName) { Model.Number OffsetElement = (RaceInstrumentationUtil.RaceCheckingMethod == RaceCheckingMethod.ORIGINAL ? GetStateFromModel(StateName, Model).TryGet(AccessOffsetVar.Name) : Model.TryGetFunc(AccessOffsetVar.Name).GetConstant()) as Model.Number; return(GetArrayAccess(ParseOffset(OffsetElement), RaceyArraySourceName, Convert.ToUInt32(QKeyValue.FindIntAttribute(AccessHasOccurredVar.Attributes, "elem_width", -1)), Convert.ToUInt32(QKeyValue.FindIntAttribute(AccessHasOccurredVar.Attributes, "source_elem_width", -1)), QKeyValue.FindStringAttribute(AccessHasOccurredVar.Attributes, "source_dimensions").Split(','))); }
private static int GetGroupIdOneDimension(Model model, string dimension, int thread) { string name = "group_id_" + dimension; if (!((GVCommandLineOptions)CommandLineOptions.Clo).OnlyIntraGroupRaceChecking) { name += "$" + thread; } return(model.TryGetFunc(name).GetConstant().AsInt()); }
public bool IsMyModel(Model m) { return(m.TryGetFunc("$Alloc") != null); }
public bool IsMyModel(Model m) { return(m.TryGetFunc("$$Language$Dafny") != null); }
public bool IsMyModel(Model m) { return m.TryGetFunc("$$Language$Dafny") != null; }
private static int GetGroupSizeOneDimension(Model model, string dimension) { return(model.TryGetFunc("group_size_" + dimension).GetConstant().AsInt()); }
private static int GetLocalIdOneDimension(Model model, string dimension, int thread) { return(model.TryGetFunc("local_id_" + dimension + "$" + thread).GetConstant().AsInt()); }
public bool IsMyModel(Model m) { return m.TryGetFunc("$Alloc") != null; }