public override void RunVerification() { if (QueryConstraintType == QueryConstraintType.NONE) { base.RunVerification(); } else { MDP mdp = BuildMDP(); if (!CancelRequested) { switch (QueryConstraintType) { case QueryConstraintType.PROB: Max = 1 - mdp.MinProbability(VerificationOutput); mdp.ResetNonTargetState(); Min = 1 - mdp.MaxProbability(VerificationOutput); break; case QueryConstraintType.PMAX: Max = 1 - mdp.MinProbability(VerificationOutput); break; case QueryConstraintType.PMIN: Min = 1 - mdp.MaxProbability(VerificationOutput); break; } if (Min == 1) { VerificationOutput.VerificationResult = VerificationResultType.VALID; } else if (Max == 0) { VerificationOutput.VerificationResult = VerificationResultType.INVALID; } else { VerificationOutput.VerificationResult = VerificationResultType.WITHPROBABILITY; } } } }
/// <summary> /// Run the verification and get the result. /// </summary> /// <returns></returns> public override void RunVerification() { if (ConstraintType == QueryConstraintType.NONE) { base.RunVerification(); return; } MDP mdp = BuildMDP(); //GetTransitionRelation(); //MDP mdp = BuildDTMCSSZ(); //GetTransitionRelation(); if (!CancelRequested) { switch (ConstraintType) { case QueryConstraintType.PROB: Min = mdp.MinProbability(VerificationOutput); mdp.ResetNonTargetState(); Max = mdp.MaxProbability(VerificationOutput); break; case QueryConstraintType.PMAX: Max = mdp.MaxProbability(VerificationOutput); break; case QueryConstraintType.PMIN: Min = mdp.MinProbability(VerificationOutput); break; } if (Min == 1) { this.VerificationOutput.VerificationResult = VerificationResultType.VALID; } else if (Max == 0) { this.VerificationOutput.VerificationResult = VerificationResultType.INVALID; } else { this.VerificationOutput.VerificationResult = VerificationResultType.WITHPROBABILITY; } } }
/// <summary> /// Run the verification and get the result. /// </summary> /// <returns></returns> public override void RunVerification() { if (ConstraintType == QueryConstraintType.NONE) { base.RunVerification(); return; } MDP mdp = null; if (SelectedEngineName == Constants.ENGINE_MDP_SEARCH) { mdp = BuildMDP(); //GetTransitionRelation(); } else if (SelectedEngineName == Constants.ENGINE_MDP_ANTICHAIN_SEARCH) { mdp = BuildMDPSubset(); //mdp = BuildMDPAntiChain_L(); //mdp = BuildMDPAntiChain_S(); } // if (!CancelRequested) { if (SelectedEngineName == Constants.ENGINE_MDP_SEARCH) { switch (ConstraintType) { case QueryConstraintType.PROB: Min = 1 - mdp.MaxProbability(VerificationOutput); mdp.ResetNonTargetState(); Max = 1 - mdp.MinProbability(VerificationOutput); break; case QueryConstraintType.PMAX: Max = 1 - mdp.MinProbability(VerificationOutput); break; case QueryConstraintType.PMIN: Min = 1 - mdp.MaxProbability(VerificationOutput); break; } } else if (SelectedEngineName == Constants.ENGINE_MDP_ANTICHAIN_SEARCH) { switch (ConstraintType) { case QueryConstraintType.PROB: Min = 1 - mdp.MaxProbability(VerificationOutput, true); mdp.ResetNonTargetState(); Max = 1 - mdp.MinProbability(VerificationOutput, true); break; case QueryConstraintType.PMAX: Max = 1 - mdp.MinProbability(VerificationOutput, true); break; case QueryConstraintType.PMIN: Min = 1 - mdp.MaxProbability(VerificationOutput, true); break; } } if (Min == 1) { VerificationOutput.VerificationResult = VerificationResultType.VALID; } else if (Max == 0) { VerificationOutput.VerificationResult = VerificationResultType.INVALID; } else { VerificationOutput.VerificationResult = VerificationResultType.WITHPROBABILITY; } } }