private bool InternalValidate(Expr expr, Query query, out object trace) { trace = null; RelationGraph.AddNode(query); var queryExpr = new AGQueryExpr(expr, query); queryExpr.RetrieveRenderKnowledge(); if (queryExpr.RenderKnowledge == null) { return(false); } if (queryExpr.RenderKnowledge.Count == 0) { return(false); } var agEquationExpr = queryExpr.RenderKnowledge[0] as AGEquationExpr; if (agEquationExpr == null) { return(false); } agEquationExpr.IsSelected = true; agEquationExpr.GenerateSolvingTrace(); if (agEquationExpr.AutoTrace == null) { return(false); } trace = agEquationExpr.AutoTrace; RelationGraph.DeleteNode(query); return(true); }
/// <summary> /// Relation Input Pattern Match /// </summary> /// <param name="expr"></param> /// <param name="str"></param> /// <param name="st"></param> /// <param name="query"></param> /// <param name="output"></param> /// <returns></returns> private bool EvalExprPatterns(Expr expr, Query query, out object output, bool userInput = false) { object obj = null; if (!userInput) { obj = RelationGraph.AddNode(query); } output = new AGQueryExpr(expr, query); return(obj != null); //return EvalNonDeterministic(expr, obj, out output); }