<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>FAUST compiler: Automaton Struct Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>Automaton Struct Reference</h1><!-- doxytag: class="Automaton" --> <p><a href="structAutomaton-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a5d2b6e09517175faea87c5724cc3edea">Automaton</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#ac244771866c62c3bbca1ec5201d5ed54">n_rules</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const list< <a class="el" href="structRule.html">Rule</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#adb969b0985e71dd5415ed70369b937f4">rules</a> (int <a class="el" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const list< <a class="el" href="structTrans.html">Trans</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a0f1678cbdb43070122bb9d6caa841697">trans</a> (int <a class="el" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a92020994f3a89b85ac0f8f6ccd3273ff">final</a> (int <a class="el" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a3305f434c8c0e6b2d3e446da7cd4ec74">build</a> (<a class="el" href="structState.html">State</a> *st)</td></tr> <tr><td colspan="2"><h2>Public Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">vector< <a class="el" href="structState.html">State</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">state</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">vector< <a class="el" href="classCTree.html">Tree</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a11d18ab1675e9d32433e799a2b20d26e">rhs</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00187">187</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a5d2b6e09517175faea87c5724cc3edea"></a><!-- doxytag: member="Automaton::Automaton" ref="a5d2b6e09517175faea87c5724cc3edea" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Automaton::Automaton </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00191">191</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00191"></a>00191 : <a class="code" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">state</a>(vector<State*>()), <a class="code" href="structAutomaton.html#a11d18ab1675e9d32433e799a2b20d26e">rhs</a>(vector<Tree>()), <a class="code" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>(0) {} </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a3305f434c8c0e6b2d3e446da7cd4ec74"></a><!-- doxytag: member="Automaton::build" ref="a3305f434c8c0e6b2d3e446da7cd4ec74" args="(State *st)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Automaton::build </td> <td>(</td> <td class="paramtype"><a class="el" href="structState.html">State</a> * </td> <td class="paramname"> <em>st</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00211">211</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>References <a class="el" href="boxes_8cpp_source.html#l00077">isBoxInt()</a>, <a class="el" href="boxes_8cpp_source.html#l00078">isBoxReal()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00135">State::match_num</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00203">s</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00134">State::s</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00188">state</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00137">State::trans</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00479">make_pattern_matcher()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00212"></a>00212 { <a name="l00213"></a>00213 <a class="code" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">state</a>.push_back(st); <a name="l00214"></a>00214 st-><a class="code" href="structState.html#a6145c011cb54cbc1f482a40892225f02">s</a> = <a class="code" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>++; <a name="l00215"></a>00215 list<Trans>::const_iterator t; <a name="l00216"></a>00216 <span class="keywordflow">for</span> (t = st-><a class="code" href="structState.html#ac263d79bcd1c0055a3b49e7259f0136e">trans</a>.begin(); t != st-><a class="code" href="structState.html#ac263d79bcd1c0055a3b49e7259f0136e">trans</a>.end(); t++) { <a name="l00217"></a>00217 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> x; <a name="l00218"></a>00218 <span class="keywordtype">double</span> f; <a name="l00219"></a>00219 <span class="keywordtype">int</span> i; <a name="l00220"></a>00220 <span class="keywordflow">if</span> (t->is_cst_trans(x) && <a name="l00221"></a>00221 (<a class="code" href="boxes_8cpp.html#a7904414896442fcfa0947156b6563d52">isBoxInt</a>(x, &i) || <a class="code" href="boxes_8cpp.html#a292a68d93ea73f703bc880cca4d01bc2">isBoxReal</a>(x, &f))) <a name="l00222"></a>00222 st-><a class="code" href="structState.html#a2225f67349e58c22f65984327e0928da">match_num</a> = <span class="keyword">true</span>; <a name="l00223"></a>00223 <a class="code" href="structAutomaton.html#a3305f434c8c0e6b2d3e446da7cd4ec74">build</a>(t->state); <a name="l00224"></a>00224 } <a name="l00225"></a>00225 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a92020994f3a89b85ac0f8f6ccd3273ff"></a><!-- doxytag: member="Automaton::final" ref="a92020994f3a89b85ac0f8f6ccd3273ff" args="(int s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Automaton::final </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>s</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00200">200</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>References <a class="el" href="patternmatcher_8cpp_source.html#l00203">s</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00198">trans()</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00479">make_pattern_matcher()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00200"></a>00200 { <span class="keywordflow">return</span> <a class="code" href="structAutomaton.html#a0f1678cbdb43070122bb9d6caa841697">trans</a>(<a class="code" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>).empty(); } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac244771866c62c3bbca1ec5201d5ed54"></a><!-- doxytag: member="Automaton::n_rules" ref="ac244771866c62c3bbca1ec5201d5ed54" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Automaton::n_rules </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00194">194</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>References <a class="el" href="patternmatcher_8cpp_source.html#l00189">rhs</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00194"></a>00194 { <span class="keywordflow">return</span> <a class="code" href="structAutomaton.html#a11d18ab1675e9d32433e799a2b20d26e">rhs</a>.size(); } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="adb969b0985e71dd5415ed70369b937f4"></a><!-- doxytag: member="Automaton::rules" ref="adb969b0985e71dd5415ed70369b937f4" args="(int s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const list<<a class="el" href="structRule.html">Rule</a>>& Automaton::rules </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>s</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00196">196</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>References <a class="el" href="patternmatcher_8cpp_source.html#l00188">state</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00580">add_subst()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00479">make_pattern_matcher()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00196"></a>00196 { <span class="keywordflow">return</span> <a class="code" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">state</a>[<a class="code" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>]->rules; } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a0f1678cbdb43070122bb9d6caa841697"></a><!-- doxytag: member="Automaton::trans" ref="a0f1678cbdb43070122bb9d6caa841697" args="(int s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const list<<a class="el" href="structTrans.html">Trans</a>>& Automaton::trans </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>s</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00198">198</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>References <a class="el" href="patternmatcher_8cpp_source.html#l00188">state</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00593">apply_pattern_matcher_internal()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00200">final()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00198"></a>00198 { <span class="keywordflow">return</span> <a class="code" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">state</a>[<a class="code" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">s</a>]->trans; } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="a11d18ab1675e9d32433e799a2b20d26e"></a><!-- doxytag: member="Automaton::rhs" ref="a11d18ab1675e9d32433e799a2b20d26e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vector<<a class="el" href="classCTree.html">Tree</a>> <a class="el" href="structAutomaton.html#a11d18ab1675e9d32433e799a2b20d26e">Automaton::rhs</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00189">189</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00660">apply_pattern_matcher()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00479">make_pattern_matcher()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00194">n_rules()</a>.</p> </div> </div> <a class="anchor" id="a12b5aa75d9587716b139bc41fbb5d695"></a><!-- doxytag: member="Automaton::s" ref="a12b5aa75d9587716b139bc41fbb5d695" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="structAutomaton.html#a12b5aa75d9587716b139bc41fbb5d695">Automaton::s</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00203">203</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00211">build()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00200">final()</a>, and <a class="el" href="boxtype_8cpp_source.html#l00097">infereBoxType()</a>.</p> </div> </div> <a class="anchor" id="ae12943b3fadba9d0c0984cc0fa839efb"></a><!-- doxytag: member="Automaton::state" ref="ae12943b3fadba9d0c0984cc0fa839efb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vector<<a class="el" href="structState.html">State</a>*> <a class="el" href="structAutomaton.html#ae12943b3fadba9d0c0984cc0fa839efb">Automaton::state</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="patternmatcher_8cpp_source.html#l00188">188</a> of file <a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a>.</p> <p>Referenced by <a class="el" href="patternmatcher_8cpp_source.html#l00593">apply_pattern_matcher_internal()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00211">build()</a>, <a class="el" href="patternmatcher_8cpp_source.html#l00196">rules()</a>, and <a class="el" href="patternmatcher_8cpp_source.html#l00198">trans()</a>.</p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li><a class="el" href="patternmatcher_8cpp_source.html">patternmatcher.cpp</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:17 2010 for FAUST compiler by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>