Browse Source
Some refactoring of explicit model classes, to introduce NondetModel interface.
Some refactoring of explicit model classes, to introduce NondetModel interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6998 bbc10eb1-c90d-0410-af57-cb519fbb1720master
15 changed files with 338 additions and 200 deletions
-
7prism/src/explicit/DTMCSimple.java
-
2prism/src/explicit/Distribution.java
-
36prism/src/explicit/DistributionSet.java
-
33prism/src/explicit/MDP.java
-
2prism/src/explicit/MDPModelChecker.java
-
46prism/src/explicit/MDPSimple.java
-
84prism/src/explicit/MDPSparse.java
-
5prism/src/explicit/Model.java
-
3prism/src/explicit/ModelExplicit.java
-
73prism/src/explicit/NondetModel.java
-
35prism/src/explicit/NondetModelSimple.java
-
2prism/src/explicit/QuantAbstractRefine.java
-
7prism/src/explicit/STPG.java
-
58prism/src/explicit/STPGAbstrSimple.java
-
145prism/src/param/ParamModel.java
@ -0,0 +1,73 @@ |
|||
//============================================================================== |
|||
// |
|||
// Copyright (c) 2002- |
|||
// Authors: |
|||
// * Dave Parker <d.a.parker@cs.bham.ac.uk> (University of Birmingham/Oxford) |
|||
// |
|||
//------------------------------------------------------------------------------ |
|||
// |
|||
// This file is part of PRISM. |
|||
// |
|||
// PRISM is free software; you can redistribute it and/or modify |
|||
// it under the terms of the GNU General Public License as published by |
|||
// the Free Software Foundation; either version 2 of the License, or |
|||
// (at your option) any later version. |
|||
// |
|||
// PRISM is distributed in the hope that it will be useful, |
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
// GNU General Public License for more details. |
|||
// |
|||
// You should have received a copy of the GNU General Public License |
|||
// along with PRISM; if not, write to the Free Software Foundation, |
|||
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|||
// |
|||
//============================================================================== |
|||
|
|||
package explicit; |
|||
|
|||
import java.util.BitSet; |
|||
|
|||
/** |
|||
* Interface for (abstract) classes that provide (read-only) access to an explicit-state model with nondeterminism. |
|||
*/ |
|||
public interface NondetModel extends Model |
|||
{ |
|||
// Accessors |
|||
|
|||
/** |
|||
* Get the number of nondeterministic choices in state s. |
|||
*/ |
|||
public int getNumChoices(int s); |
|||
|
|||
/** |
|||
* Get the maximum number of nondeterministic choices in any state. |
|||
*/ |
|||
public int getMaxNumChoices(); |
|||
|
|||
/** |
|||
* Get the total number of nondeterministic choices over all states. |
|||
*/ |
|||
public int getNumChoices(); |
|||
|
|||
/** |
|||
* Get the action label (if any) for choice {@code i} of state {@code s}. |
|||
*/ |
|||
public Object getAction(int s, int i); |
|||
|
|||
/** |
|||
* Check if all the successor states from choice {@code i} of state {@code s} are in the set {@code set}. |
|||
* @param s The state to check |
|||
* @param i Choice index |
|||
* @param set The set to test for inclusion |
|||
*/ |
|||
public boolean allSuccessorsInSet(int s, int i, BitSet set); |
|||
|
|||
/** |
|||
* Check if some successor state from choice {@code i} of state {@code s} is in the set {@code set}. |
|||
* @param s The state to check |
|||
* @param i Choice index |
|||
* @param set The set to test for inclusion |
|||
*/ |
|||
public boolean someSuccessorsInSet(int s, int i, BitSet set); |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
//============================================================================== |
|||
// |
|||
// Copyright (c) 2002- |
|||
// Authors: |
|||
// * Dave Parker <d.a.parker@cs.bham.ac.uk> (University of Birmingham/Oxford) |
|||
// |
|||
//------------------------------------------------------------------------------ |
|||
// |
|||
// This file is part of PRISM. |
|||
// |
|||
// PRISM is free software; you can redistribute it and/or modify |
|||
// it under the terms of the GNU General Public License as published by |
|||
// the Free Software Foundation; either version 2 of the License, or |
|||
// (at your option) any later version. |
|||
// |
|||
// PRISM is distributed in the hope that it will be useful, |
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
// GNU General Public License for more details. |
|||
// |
|||
// You should have received a copy of the GNU General Public License |
|||
// along with PRISM; if not, write to the Free Software Foundation, |
|||
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|||
// |
|||
//============================================================================== |
|||
|
|||
package explicit; |
|||
|
|||
/** |
|||
* Interface for simple mutable explicit-state nondeterministic model representations |
|||
* (i.e. classes that implement both {@link explicit.NondetModel} and {@link explicit.ModelSimple}). |
|||
*/ |
|||
public interface NondetModelSimple extends NondetModel, ModelSimple |
|||
{ |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue