internal STModel GetST(Identifier name) { STModel st = null; if (stMap.TryGetValue(name.Name, out st)) return st; else { BekProgram prog = null; if (bekMap.TryGetValue(name.Name, out prog)) { if (converter == null) //same local functions for all bek programs converter = BekConverter.MkBekToSTbConverter(solver, prog.ast.funcs, prog.ast.name); st = converter.Convert(prog).ExploreBools().ToST(); st.Name = name.Name; stMap[name.Name] = st; return st; } else { throw new QueryParseException(name.Line, name.Pos, string.Format("Undefined transducer: {0}", name)); } } }
internal Expression(Identifier symb, ExpressionKind kind, params Expression[] exprs) { this.symbol = symb; this.kind = kind; this.subexpressions = new List<Expression>(exprs); }
internal SFAModel GetSFA(Identifier name) { SFAModel sfa = null; if (sfaMap.TryGetValue(name.Name, out sfa)) return sfa; else throw new QueryParseException(name.Line, name.Pos, string.Format("Undefined automaton '{0}'", name.Name)); }
internal Expression(string symb, ExpressionKind kind, params Expression[] exprs) { this.symbol = new Identifier(symb,1,1) ; this.kind = kind; this.subexpressions = new List<Expression>(exprs); }
public DotExpression(Expression expr, Identifier count) : base("dot", ExpressionKind.Query, expr) { int k; if (!int.TryParse(count.Name, out k)) throw new Bek.Query.QueryParseException(count.Line, count.Pos, "Invalid element count"); NrOfElements = k; }
public VariableExpression(Identifier s) : base(s, ExpressionKind.Variable) { }
internal static StringExpression Mk(Identifier id) { return new StringExpression(id, PreProcessString(id.Name)); }
StringExpression(Identifier id, string s_val) : base(id, ExpressionKind.Automaton) { this.s_value = s_val; }