public override Process ClearConstant(Dictionary<string, Expression> constMapping) { Expression[] newArgs = new Expression[Args.Length]; for (int i = 0; i < Args.Length; i++) { Expression arg = Args[i].ClearConstant(constMapping); if (!arg.HasVar) newArgs[i] = EvaluatorDenotational.Evaluate(arg, null); else newArgs[i] = arg; } DefinitionRef newRef = new DefinitionRef(Name, newArgs); //this is a special cases happened in the middle of parsing, where the current Def is not initialized in the parser. //so need to put the newRef into the def list to initialize the Def once the parsing is done. if (Def == null) { //TreeWalker.dlist.Add(newRef); //TreeWalker.dtokens.Add(null); } else { newRef.Def = Def; } return newRef; }
public override Process ClearConstant(Dictionary <string, Expression> constMapping) { Expression[] newArgs = new Expression[Args.Length]; for (int i = 0; i < Args.Length; i++) { Expression arg = Args[i].ClearConstant(constMapping); if (!arg.HasVar) { newArgs[i] = EvaluatorDenotational.Evaluate(arg, null); } else { newArgs[i] = arg; } } DefinitionRef newRef = new DefinitionRef(Name, newArgs); //this is a special cases happened in the middle of parsing, where the current Def is not initialized in the parser. //so need to put the newRef into the def list to initialize the Def once the parsing is done. if (Def == null) { //TreeWalker.dlist.Add(newRef); //TreeWalker.dtokens.Add(null); } else { newRef.Def = Def; } return(newRef); }
public static void Initialize(AssertionBase Assertion, DefinitionRef Process, SpecificationBase spec) { Specification Spec = spec as Specification; //get the relevant global variables; remove irrelevant variables so as to save memory; Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(Process.GetGlobalVariables(), Process.GetChannels()); //Initialize InitialStep Assertion.InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false); Assertion.MustAbstract = Process.MustBeAbstracted(); }
public static void Initialize(AssertionRefinement Assertion, DefinitionRef ImplementationProcess, DefinitionRef SpecificationProcess, SpecificationBase spec) { Specification Spec = spec as Specification; //get the relevant global variables; remove irrelevant variables so as to save memory; List<string> varList = ImplementationProcess.GetGlobalVariables(); varList.AddRange(SpecificationProcess.GetGlobalVariables()); Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, ImplementationProcess.GetChannels()); //Initialize InitialStep Assertion.InitialStep = new Configuration(ImplementationProcess, Constants.INITIAL_EVENT, null, GlobalEnv, false); Assertion.InitSpecStep = new Configuration(SpecificationProcess, Constants.INITIAL_EVENT, null, GlobalEnv, false); Assertion.MustAbstract = ImplementationProcess.MustBeAbstracted(); if (SpecificationProcess.MustBeAbstracted()) { throw new ParsingException( "Process " + Assertion.SpecProcess + " has infinite states and therefore can not be used as a property model for refinement checking!", Assertion.AssertToken); } }
public KWSNAssertionDivergence(DefinitionRef processDef) : base() { Process = processDef; }
public KWSNAssertionReachability(DefinitionRef processDef, string reachableState) : base(reachableState) { Process = processDef; }
public KWSNAssertionRefinement(DefinitionRef processDef, DefinitionRef target) : base() { ImplementationProcess = processDef; SpecificationProcess = target; }
public KWSNAssertionReachabilityWith(DefinitionRef processDef, string reachableState, QueryConstraintType cont, Expression constraintCondition) : base(reachableState, cont, constraintCondition) { Process = processDef; }
public KWSNAssertionLTL(DefinitionRef processDef, string ltl) : base(ltl) { Process = processDef; }
public KWSNAssertionDeterminism(DefinitionRef processDef) : base() { Process = processDef; }
public KWSNAssertionDeadLock(DefinitionRef processDef, bool isNontermination) : base(isNontermination) { Process = processDef; }
public KWSNAssertionDeadLock(DefinitionRef processDef) : base() { Process = processDef; }