pd_alg_nb_sub_b.h

Go to the documentation of this file.
00001 /** @file pd_alg_nb_sub_b.h  Nonblock subfunctions, part B*/
00002 
00003 
00004 /* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
00005 
00006    Copyright (C) 2013  Stefan Jacobi, Sven Schneider, Anne-Kathrin Hess
00007 
00008 */
00009 
00010 
00011 #ifndef FAUDES_PD_ALG_NB_SUB_B_H
00012 #define FAUDES_PD_ALG_NB_SUB_B_H
00013 
00014 #include "corefaudes.h"
00015 #include "pd_pdgenerator.h"
00016 
00017 
00018 namespace faudes {
00019   
00020   /**
00021    * Associates each state of the generator with an annotation. Each state's
00022    * merge attribute will be set to a MergeStateAnnotation. The MergeStateAnnotation 
00023    * will contain the annotation.
00024    * 
00025    * @param word
00026    *    word with which the states will be annotated
00027    * @param pd
00028    *    pushdown automaton to be annotated
00029    * @return
00030    *    copy of the parameter automaton with annotated states
00031    */
00032   PushdownGenerator RenQ(const std::string word, const PushdownGenerator& pd);
00033   
00034   /**
00035    * Adds an annotation to each stack symbol of the generator. Each stack symbol will
00036    * be copied and added to to generator with the annotation preceding the original
00037    * name. 
00038    * 
00039    * @param word
00040    *    word with which the stack symbols will be annotated
00041    * @param pd
00042    *    pushdown automaton to be annotated
00043    * @return
00044    *    copy of the parameter automaton with annotated states
00045    */  
00046   PushdownGenerator RenG(const std::string word, const PushdownGenerator& pd);
00047   
00048   /**
00049    * Removes all edges popping lambda.
00050    * 
00051    * @param pd
00052    *    pushdown automaton
00053    * @return
00054    *    pushdown automaton without lambda popping edges
00055    */
00056   PushdownGenerator Rep0(const PushdownGenerator& pd);
00057   
00058     /**
00059    * Restricts a pushdown generator to a pushdown generator with transitions that
00060    * are either read (p,a,lambda,lambda,q), pop (p,lambda,x,lambda,q) or 
00061    * push (p,lambda,x,yx,q)
00062    * 
00063    * @param pd
00064    *    the generator, which must not have transitions that pop more than one stack
00065    * symbol
00066    * @return 
00067    *    generator
00068    */
00069   PushdownGenerator Rpp(const PushdownGenerator& pd);
00070   
00071   /**
00072    * Removes transitions popping more than one stack symbol. Inserts new transitions
00073    * instead that only pop one stack symbol.
00074    * 
00075    * @param pd
00076    *    the generator, which must NOT contain lambda pops
00077    * @return 
00078    *    generator with altered transitions
00079    */
00080   PushdownGenerator Rep2(const PushdownGenerator& pd);
00081   
00082   /**
00083    * For debugging, prints a transitions with their pop and push attributes
00084    *
00085    * @param transitions
00086    *    multimap containing the transitions
00087    */
00088   void PrintTransitions(const std::multimap<Transition, std::pair<std::vector<StackSymbol>, std::vector<StackSymbol> > >& transitions);
00089   
00090   /**
00091    * Input must have passed Rpp!
00092    * remodells the generator to prevent double (or multiple) acceptance of the same
00093    * input string.
00094    * 
00095    * @param pd
00096    *    the generator
00097    * @return
00098    *    remodelled generator without double acceptance
00099    */
00100   PushdownGenerator Nda(const PushdownGenerator& pd);
00101 
00102 
00103 } // namespace faudes
00104 
00105 #endif

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen