From 590ae94e9f8ff6250a4bd1a4363c6a0fa79f7c3c Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Tue, 21 Jul 2015 11:53:15 +0000 Subject: [PATCH] Refactor explicit engine product construction. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10398 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/explicit/LTLModelChecker.java | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/prism/src/explicit/LTLModelChecker.java b/prism/src/explicit/LTLModelChecker.java index d019723b..cca48098 100644 --- a/prism/src/explicit/LTLModelChecker.java +++ b/prism/src/explicit/LTLModelChecker.java @@ -311,6 +311,33 @@ public class LTLModelChecker extends PrismComponent return product; } + /** + * Generate a deterministic automaton for the given LTL formula + * and construct the product of this automaton with an STPG. + * + * @param mc a ProbModelChecker, used for checking maximal state formulas + * @param model the model + * @param expr a path expression + * @param statesOfInterest the set of states for which values should be calculated (null = all states) + * @param allowedAcceptance the allowed acceptance conditions + * @return the product with the DA + * @throws PrismException + */ + public LTLProduct constructProductSTPG(ProbModelChecker mc, STPG model, Expression expr, BitSet statesOfInterest, AcceptanceType... allowedAcceptance) throws PrismException + { + // Convert LTL formula to automaton + Vector labelBS = new Vector(); + DA da; + da = constructDAForLTLFormula(mc, model, expr, labelBS, allowedAcceptance); + + // Build product of model and automaton + mainLog.println("\nConstructing STPG-"+da.getAutomataType()+" product..."); + LTLProduct product = constructProductModel(da, model, labelBS, statesOfInterest); + mainLog.print("\n" + product.getProductModel().infoStringTable()); + + return product; + } + /** * Generate a deterministic automaton for the given LTL formula * and construct the product of this automaton with a model. @@ -323,7 +350,7 @@ public class LTLModelChecker extends PrismComponent * @return the product with the DA * @throws PrismException */ - public LTLProduct constructProductSTPG(ProbModelChecker mc, M model, Expression expr, BitSet statesOfInterest, AcceptanceType... allowedAcceptance) throws PrismException + public LTLProduct constructProductModel(ProbModelChecker mc, M model, Expression expr, BitSet statesOfInterest, AcceptanceType... allowedAcceptance) throws PrismException { // Convert LTL formula to automaton Vector labelBS = new Vector();