sims.mar
Class Programme

java.lang.Object
  extended by sims.mar.Graphe
      extended by sims.mar.Programme
All Implemented Interfaces:
GrapheInterface

public class Programme
extends Graphe
implements GrapheInterface

Programme de la machine à registre


Constructor Summary
Programme()
           
 
Method Summary
 void allerPremiereInstruction()
          Saute à la preimer instruction (debut)
 java.util.Collection arcs()
          inplementation de l'interface GrapheInterface pour l'affichage du graphe
 Instruction getInstructionCourante()
           
 int getNbrArc()
          Gives the number of edges in the graph, equals to the number of instructions of a Turing Machine.
 int getNbrEtat()
          Gives the number of states of the machine, hence the number of vertices in the graph.
 int getNbrRegistre()
           
 Instruction getPremiereInstruction()
           
 java.lang.Object getRacine()
          Gives the root state of a machine, the start vertex in the graph.
 Registre getRegistre(int indice)
           
 java.util.Collection getRegistres()
           
 void prochaineInstruction()
          Executre l'intruction courante, est saute à la prochaine instruction
 
Methods inherited from class sims.mar.Graphe
ajouterArete, ajouterSommet, clear, getSommets, getSuccesseurs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Programme

public Programme()
Method Detail

getPremiereInstruction

public Instruction getPremiereInstruction()
Returns:
la prochaine instruction (Debut)

prochaineInstruction

public void prochaineInstruction()
                          throws ExceptionPasDeSuccesseur
Executre l'intruction courante, est saute à la prochaine instruction

Throws:
java.lang.Exception - Lorsque la fin du programme est atteinte
ExceptionPasDeSuccesseur

getInstructionCourante

public Instruction getInstructionCourante()
Returns:
l'intruction courante (la prochiane à executer)

getRegistres

public java.util.Collection getRegistres()
Returns:
Ensemble des registres du programme

getRegistre

public Registre getRegistre(int indice)

getNbrRegistre

public int getNbrRegistre()

allerPremiereInstruction

public void allerPremiereInstruction()
Saute à la preimer instruction (debut)


arcs

public java.util.Collection arcs()
inplementation de l'interface GrapheInterface pour l'affichage du graphe

Specified by:
arcs in interface GrapheInterface
Returns:
a collection of Arc instances
See Also:
Arc.java

getNbrEtat

public int getNbrEtat()
Description copied from interface: GrapheInterface
Gives the number of states of the machine, hence the number of vertices in the graph.

Specified by:
getNbrEtat in interface GrapheInterface
Returns:
the number of states of the machine.

getNbrArc

public int getNbrArc()
Description copied from interface: GrapheInterface
Gives the number of edges in the graph, equals to the number of instructions of a Turing Machine.

Specified by:
getNbrArc in interface GrapheInterface
Returns:
the number of edges..

getRacine

public java.lang.Object getRacine()
Description copied from interface: GrapheInterface
Gives the root state of a machine, the start vertex in the graph.

Specified by:
getRacine in interface GrapheInterface
Returns:
the root state.