public static RefId GetNamedId(string name) { var retId = RefId.CreateRefId(); retId.SetProperty(nameTag, StringId.CreateStringId(name)); return(retId); }
public static IId getCombinedFunctionDefinition(IId parameterSet, IId functionCallList) { var ret = RefId.CreateRefId(); ret.SetProperty(parameters, parameterSet); ret.SetProperty(subFunctionCalls, functionCallList); return(ret); }
public static IId GetFunctionCall(IId valueDictionary, IId callee) { var ret = RefId.CreateRefId(); ret.SetProperty(parameterValues, valueDictionary); ret.SetProperty(functionCalled, callee); return(ret); }
public RefId RegisterAndCreateUniqueIId(string uniqueName) { if (environment.NameToId.ContainsKey(uniqueName)) { throw new Exception(); } var ret = RefId.CreateRefId(); environment.NameToId.Add(uniqueName, ret); return(ret); }
public static RefId CreateList(IId[] elements) { var list = RefId.CreateRefId(); var rawList = BareListId.CreateBareListId(); list.SetProperty(listId, rawList); for (int i = 0; i < elements.Length; i++) { rawList.SetProperty(IntId.CreateId(i), elements[i]); } return(list); }
public static IId CreateSet(ISet <IId> values) { var set = RefId.CreateRefId(); var rawSet = BareSetId.CreateBareSetId(); set.SetProperty(setId, rawSet); foreach (var value in values) { set.SetProperty(value, value); } return(set); }
public IEnumerable <string> StreamAllIIds() { var isStreaming = RefId.CreateRefId(); var streamList = new List <string>() { "IID" }; AddIdAndMark(environment.GetRoot(), streamList, isStreaming); UnMark(environment.GetRoot(), isStreaming); streamList.Add("NAMES"); WriteUniqueNames(environment.NameToId, streamList); return(streamList); }