|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.bisimulationGame.equiv.ConfigurationGraph
public class ConfigurationGraph
A graph representation of the possible combinations of states from two LTSs (S,T). It is used by an attacker to compute a winning strategy, which is a path from the initial configuration (S_init, T_init) to an accept node. All edges into the accept node represents steps that can only occur in one of the two LTSs, hence will make the defender lose. It is also used by a non-perfect defender to retrieve a set of suspicious nodes (configurations). These are nodes with edges to the accept node. If a defender has more choices at any configuration, it will attempt to avoid going to a suspicious configuration.
In a configuration graph, each node is made up of two nodes, from the left and right LTS. An edge records actions and block numbers of target states. A graph is constructed from a partitioned state space. An attacker uses buildPerfectAttackerStrategy to get a strategy. A defender uses getSuspiciousNodes to try to avoid a set of configurations.
Field Summary | |
---|---|
private CGNode |
accept
The accept node marks a winning configuration for the attacker, i.e. one where the attacker has taken a step that can't be mimicked by the defender. |
private java.util.HashSet<CGEdge> |
edges
The set of edges in the graph. |
private java.util.HashSet<CGNode> |
nodes
The set of nodes in the graph. |
Constructor Summary | |
---|---|
ConfigurationGraph(StateSpace ss)
Constructs a graph from a state space and computes a perfect attacker strategy. |
Method Summary | |
---|---|
private void |
build(StateSpace ss)
Builds a graph from a state space. |
java.util.HashMap<CGNode,Strategy> |
buildPerfectAttackerStrategy()
Computes a strategy for the attacker. |
private CGNode |
getNode(int nodeId)
|
private CGNode |
getNode(att.grappa.Node left,
att.grappa.Node right)
Test if there already exists a PGNode with these left and right nodes. |
private java.util.HashSet<CGEdge> |
getOutEdges(CGNode node)
Returns all out-edges of a node. |
private java.util.HashSet<CGEdge> |
getProperInEdges(CGNode node)
Used for computing an attacker strategy. |
java.util.HashSet<CGNode> |
getSuspiciousNodes()
Used by a defender to get the set of nodes which have edges to the accept node. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.HashSet<CGEdge> edges
private java.util.HashSet<CGNode> nodes
private CGNode accept
Constructor Detail |
---|
public ConfigurationGraph(StateSpace ss)
ss
- A state spaceMethod Detail |
---|
private void build(StateSpace ss)
ss
- A state space.private java.util.HashSet<CGEdge> getProperInEdges(CGNode node)
node
- A node for which to get in-edges
private java.util.HashSet<CGEdge> getOutEdges(CGNode node)
node
- A node for which to get out-edges
private CGNode getNode(int nodeId)
private CGNode getNode(att.grappa.Node left, att.grappa.Node right)
left
- A left noderight
- A right node
public java.util.HashMap<CGNode,Strategy> buildPerfectAttackerStrategy()
public java.util.HashSet<CGNode> getSuspiciousNodes()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |