|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.model.constraints.automaton.DFA
public class DFA
Created by IntelliJ IDEA. User: Hadrien A structure of DFA defined by a table of Transitions and a set of final states. The algorithm is based on the interesting paper: Gilles Pesant, A Regular Language Membership Constraint for Finite Sequences of Variables, CP 2004. Pages 482-495, LNCS 3258, Springer-Verlag, 2004. The layered graph used by the algorithm of Pesant is computed from the DFA. The algorithm is a bit less incremental : the lists of outgoing and ingoing edges are not stored upon backtracking. The size of the ingoing egdes is indeed bounded by the number of states of the previous layer which can be very big. An acyclic DFA is only defined by its layeredgraph attribute.
Field Summary | |
---|---|
protected Transition[] |
automaton
The table of transitions |
protected List<Integer> |
finalStates
The set of final states |
protected LayeredDFA |
graph
The layered graph build according to that dfa |
LightLayeredDFA |
lightGraph
|
protected int |
nbState
Number of states |
protected int |
sizeword
Only words of size sizeword will be recognized |
Constructor Summary | |
---|---|
DFA(List<int[]> tuples)
Build a DFA based on a list of FEASIBLE tuples |
|
DFA(List<int[]> tuples,
int[] min,
int[] max)
Build a DFA based on a list of INFEASIBLE tuples As the relation is defined by infeasible tuples and we build the feasible automaton, we need to know the range of values by the max and min fields... |
|
DFA(List<Transition> trans,
List<Integer> finalStates,
int sizeword)
Build a DFA (deterministic finite automaton) to enforce a set of sizeword variables to be assigned to a word recognized by that dfa. |
|
DFA(String strRegExp,
int sizeword)
Build a DFA (deterministic finite automaton) to enforce a set of sizeword variables to be assigned to a word matching the given regexp. |
Method Summary | |
---|---|
protected void |
buildLayeredGraph(int nbvar)
|
protected void |
forwardPhase(Hashtable<Integer,State>[] N,
int nbvar)
Build the layered graph made of all states reachable from the start state |
LayeredDFA |
getGraph()
|
LightLayeredDFA |
getLightGraph()
|
List<Transition> |
getOutEdges(int s)
|
void |
setGraph(LayeredDFA graph)
|
void |
setLightGraph(LightLayeredDFA lightGraph)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Transition[] automaton
protected int nbState
protected List<Integer> finalStates
protected int sizeword
protected LayeredDFA graph
public LightLayeredDFA lightGraph
Constructor Detail |
---|
public DFA(List<int[]> tuples)
tuples
- : a list of int[] corresponding to tuplepublic DFA(List<int[]> tuples, int[] min, int[] max)
tuples
- : a list of int[] corresponding to tuplemax
- : The maximum value of the alphabet used for each layer (upper bound of each variables).min
- : The minimum value of the alphabet used for each layer (lower bound of each variables).public DFA(List<Transition> trans, List<Integer> finalStates, int sizeword)
trans
- : the list of transitions defining the dfa.finalStates
- : the set of final states.sizeword
- : Only words of size sizeword will be recognizedpublic DFA(String strRegExp, int sizeword)
strRegExp
- :sizeword
- : Only words of size sizeword will be recognizedMethod Detail |
---|
public LayeredDFA getGraph()
public void setGraph(LayeredDFA graph)
public LightLayeredDFA getLightGraph()
public void setLightGraph(LightLayeredDFA lightGraph)
public List<Transition> getOutEdges(int s)
protected void buildLayeredGraph(int nbvar)
protected void forwardPhase(Hashtable<Integer,State>[] N, int nbvar)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |