<!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: propagate.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>propagate.cpp File Reference</h1><code>#include "<a class="el" href="propagate_8cpp_source.html">propagate.hh</a>"</code><br/> <code>#include <vector></code><br/> <code>#include "<a class="el" href="boxes_8hh_source.html">boxes.hh</a>"</code><br/> <code>#include "<a class="el" href="signals_8hh_source.html">signals.hh</a>"</code><br/> <code>#include "<a class="el" href="prim2_8hh_source.html">prim2.hh</a>"</code><br/> <code>#include <assert.h></code><br/> <code>#include "<a class="el" href="ppbox_8hh_source.html">ppbox.hh</a>"</code><br/> <code>#include "<a class="el" href="xtended_8hh_source.html">xtended.hh</a>"</code><br/> <code>#include "<a class="el" href="labels_8hh_source.html">labels.hh</a>"</code><br/> <code>#include "<a class="el" href="Text_8hh_source.html">Text.hh</a>"</code><br/> <code>#include "<a class="el" href="ppsig_8hh_source.html">ppsig.hh</a>"</code><br/> <code>#include "<a class="el" href="names_8hh_source.html">names.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for propagate.cpp:</div> <div class="dynsection"> </div> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> </div> <p><a href="propagate_8cpp_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a843c724dbe9c31aad6f71082bea60517">mix</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &lsig, int nbus)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">propagate : box listOfSignal-> listOfSignal' <a href="#a843c724dbe9c31aad6f71082bea60517"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#aa8f61c4d2af359e91ef8dbd56e3d19c0">split</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &inputs, int nbus)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">split une liste de signaux sur n bus <a href="#aa8f61c4d2af359e91ef8dbd56e3d19c0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a8d657cdf7de88852e540d10cb0ee9af6">makeSigProjList</a> (<a class="el" href="classCTree.html">Tree</a> t, int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fabrique une liste de n projections d'un groupe récursif. <a href="#a8d657cdf7de88852e540d10cb0ee9af6"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a269e90be9adbd2d498fa4ea9d5a44eef">makeMemSigProjList</a> (<a class="el" href="classCTree.html">Tree</a> t, int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fabrique une liste de n mem projections d'un groupe récursif. <a href="#a269e90be9adbd2d498fa4ea9d5a44eef"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a06328b74db9d4726b9144cf9da9a3a17">makeSigInputList</a> (int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fabrique une liste de n entrées. <a href="#a06328b74db9d4726b9144cf9da9a3a17"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a> (<a class="el" href="classCTree.html">Tree</a> t)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &l, int i, int j)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a791e83b671b0063ef48d334e9095c107">listConcat</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &a, const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &b)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#aeabd0458f8fce1fe30aa91e86fccc35f">listConvert</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &a)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#ade9e448f96873ea507b57e9125c96507">listLift</a> (const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &l)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7">propagate</a> (<a class="el" href="classCTree.html">Tree</a> slotenv, <a class="el" href="classCTree.html">Tree</a> path, <a class="el" href="classCTree.html">Tree</a> box, const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &lsig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Propagate computes the outputs signals of a block-diagram according to a list of input signals. <a href="#a90254b1a3fea877c3a439e5af4594dd7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a2c94521fac4766648f41758d1be4b089">boxPropagateSig</a> (<a class="el" href="classCTree.html">Tree</a> path, <a class="el" href="classCTree.html">Tree</a> box, const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> &lsig)</td></tr> <tr><td colspan="2"><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="propagate_8cpp.html#a100d4c47bc2591165381e3d40bcb34fb">gDummyInput</a> = 10000</td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a2c94521fac4766648f41758d1be4b089"></a><!-- doxytag: member="propagate.cpp::boxPropagateSig" ref="a2c94521fac4766648f41758d1be4b089" args="(Tree path, Tree box, const siglist &lsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> boxPropagateSig </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>box</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>lsig</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00442">442</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="propagate_8cpp_source.html#l00128">listConvert()</a>, <a class="el" href="list_8cpp_source.html#l00116">nil</a>, and <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p>Referenced by <a class="el" href="eval_8cpp_source.html#l00677">eval2double()</a>, <a class="el" href="eval_8cpp_source.html#l00706">eval2int()</a>, <a class="el" href="eval_8cpp_source.html#l00618">isBoxNumeric()</a>, <a class="el" href="main_8cpp_source.html#l00475">main()</a>, <a class="el" href="doc_8cpp_source.html#l00645">mapPrepareEqSig()</a>, and <a class="el" href="eval_8cpp_source.html#l00569">replaceBoxNumeric()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00443"></a>00443 { <a name="l00444"></a>00444 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#aeabd0458f8fce1fe30aa91e86fccc35f">listConvert</a>(<a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(<a class="code" href="list_8cpp.html#a538b704dd07794b7237108f1917c471e">nil</a>, path, box, lsig)); <a name="l00445"></a>00445 } </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="a791e83b671b0063ef48d334e9095c107"></a><!-- doxytag: member="propagate.cpp::listConcat" ref="a791e83b671b0063ef48d334e9095c107" args="(const siglist &a, const siglist &b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> listConcat </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00117">117</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00118"></a>00118 { <a name="l00119"></a>00119 <span class="keywordtype">int</span> n1 = a.size(); <a name="l00120"></a>00120 <span class="keywordtype">int</span> n2 = b.size(); <a name="l00121"></a>00121 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> r(n1+n2); <a name="l00122"></a>00122 <a name="l00123"></a>00123 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=0; x<n1; x++) r[x] = a[x]; <a name="l00124"></a>00124 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=0; x<n2; x++) r[x+n1] = b[x]; <a name="l00125"></a>00125 <span class="keywordflow">return</span> r; <a name="l00126"></a>00126 } </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="aeabd0458f8fce1fe30aa91e86fccc35f"></a><!-- doxytag: member="propagate.cpp::listConvert" ref="aeabd0458f8fce1fe30aa91e86fccc35f" args="(const siglist &a)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> listConvert </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>a</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00128">128</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00124">cons()</a>, and <a class="el" href="list_8cpp_source.html#l00116">nil</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00442">boxPropagateSig()</a>, and <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00129"></a>00129 { <a name="l00130"></a>00130 <span class="keywordtype">int</span> n = a.size(); <a name="l00131"></a>00131 <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> t=<a class="code" href="list_8cpp.html#a538b704dd07794b7237108f1917c471e">nil</a>; <a name="l00132"></a>00132 <span class="keywordflow">while</span> (n--) t = <a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(a[n],t); <a name="l00133"></a>00133 <span class="keywordflow">return</span> t; <a name="l00134"></a>00134 } </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="ade9e448f96873ea507b57e9125c96507"></a><!-- doxytag: member="propagate.cpp::listLift" ref="ade9e448f96873ea507b57e9125c96507" args="(const siglist &l)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> listLift </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>l</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00143">143</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="recursive-tree_8cpp_source.html#l00149">lift()</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00144"></a>00144 { <a name="l00145"></a>00145 <span class="keywordtype">int</span> n = l.size(); <a name="l00146"></a>00146 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> r(n); <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i<n; i++) r[i] = <a class="code" href="recursive-tree_8cpp.html#abf6659f19a0e48b81af0b0fb39ede302">lift</a>(l[i]); <a name="l00149"></a>00149 <span class="keywordflow">return</span> r; <a name="l00150"></a>00150 } </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="a0228acb49e02e9fe3ff168d7a8ca36ac"></a><!-- doxytag: member="propagate.cpp::listRange" ref="a0228acb49e02e9fe3ff168d7a8ca36ac" args="(const siglist &l, int i, int j)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> listRange </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>l</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>j</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00110">110</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00111"></a>00111 { <a name="l00112"></a>00112 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> r(j-i); <a name="l00113"></a>00113 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = i; x < j; x++) r[x-i] = l[x]; <a name="l00114"></a>00114 <span class="keywordflow">return</span> r; <a name="l00115"></a>00115 } </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="a848e6e511f9e598f40f732b5a31372d4"></a><!-- doxytag: member="propagate.cpp::makeList" ref="a848e6e511f9e598f40f732b5a31372d4" args="(Tree t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> makeList </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00103">103</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00104"></a>00104 { <a name="l00105"></a>00105 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l(1); <a name="l00106"></a>00106 l[0] = t; <a name="l00107"></a>00107 <span class="keywordflow">return</span> l; <a name="l00108"></a>00108 } </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="a269e90be9adbd2d498fa4ea9d5a44eef"></a><!-- doxytag: member="propagate.cpp::makeMemSigProjList" ref="a269e90be9adbd2d498fa4ea9d5a44eef" args="(Tree t, int n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> makeMemSigProjList </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>n</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Fabrique une liste de n mem projections d'un groupe récursif. </p> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00087">87</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="signals_8cpp_source.html#l00057">sigDelay1()</a>, and <a class="el" href="signals_8cpp_source.html#l00150">sigProj()</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00088"></a>00088 { <a name="l00089"></a>00089 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l(n); <a name="l00090"></a>00090 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; i++) l[i] = <a class="code" href="signals_8cpp.html#aa329e904f79949f635b5e7ee472c7976">sigDelay1</a>(<a class="code" href="signals_8cpp.html#a179e69f65c0cd6f6b9e855cbd9ae5e08">sigProj</a>(i, t)); <a name="l00091"></a>00091 <span class="keywordflow">return</span> l; <a name="l00092"></a>00092 } </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="a06328b74db9d4726b9144cf9da9a3a17"></a><!-- doxytag: member="propagate.cpp::makeSigInputList" ref="a06328b74db9d4726b9144cf9da9a3a17" args="(int n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> makeSigInputList </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>n</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Fabrique une liste de n entrées. </p> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00096">96</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="signals_8cpp_source.html#l00047">sigInput()</a>.</p> <p>Referenced by <a class="el" href="eval_8cpp_source.html#l00677">eval2double()</a>, <a class="el" href="eval_8cpp_source.html#l00706">eval2int()</a>, <a class="el" href="eval_8cpp_source.html#l00618">isBoxNumeric()</a>, <a class="el" href="main_8cpp_source.html#l00475">main()</a>, <a class="el" href="doc_8cpp_source.html#l00645">mapPrepareEqSig()</a>, and <a class="el" href="eval_8cpp_source.html#l00569">replaceBoxNumeric()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00097"></a>00097 { <a name="l00098"></a>00098 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l(n); <a name="l00099"></a>00099 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; i++) l[i] = <a class="code" href="signals_8cpp.html#ae3a5a7f9252911027be0d0293fb33822">sigInput</a>(i); <a name="l00100"></a>00100 <span class="keywordflow">return</span> l; <a name="l00101"></a>00101 } </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="a8d657cdf7de88852e540d10cb0ee9af6"></a><!-- doxytag: member="propagate.cpp::makeSigProjList" ref="a8d657cdf7de88852e540d10cb0ee9af6" args="(Tree t, int n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> makeSigProjList </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>n</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Fabrique une liste de n projections d'un groupe récursif. </p> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00079">79</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="signals_8cpp_source.html#l00055">sigDelay0()</a>, and <a class="el" href="signals_8cpp_source.html#l00150">sigProj()</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00080"></a>00080 { <a name="l00081"></a>00081 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l(n); <a name="l00082"></a>00082 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; i++) l[i] = <a class="code" href="signals_8cpp.html#a7aa37ff66e3460409ea9bebd5c3c0e19">sigDelay0</a>(<a class="code" href="signals_8cpp.html#a179e69f65c0cd6f6b9e855cbd9ae5e08">sigProj</a>(i, t)); <a name="l00083"></a>00083 <span class="keywordflow">return</span> l; <a name="l00084"></a>00084 } </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="a843c724dbe9c31aad6f71082bea60517"></a><!-- doxytag: member="propagate.cpp::mix" ref="a843c724dbe9c31aad6f71082bea60517" args="(const siglist &lsig, int nbus)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> mix </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>lsig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nbus</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>propagate : box listOfSignal-> listOfSignal' </p> <p>Propage une liste de signaux de l'entrée vers la sortie d'une boite La boite a été annotée aec son type mix une liste de signaux sur n bus </p> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00049">49</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="signals_8hh_source.html#l00148">sigAdd()</a>, and <a class="el" href="signals_8cpp_source.html#l00040">sigInt()</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00050"></a>00050 { <a name="l00051"></a>00051 <span class="keywordtype">int</span> nlines = lsig.size(); <a name="l00052"></a>00052 <a name="l00053"></a>00053 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> dst(nbus); <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> b=0; b<nbus; b++) { <a name="l00056"></a>00056 <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> t = (b<nlines) ? lsig[b] : <a class="code" href="signals_8cpp.html#a43ce107ac086c8ef608e0cd7aeb606a4" title="Signals.">sigInt</a>(0); <a name="l00057"></a>00057 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=b+nbus; i<nlines; i+=nbus) { <a name="l00058"></a>00058 t = <a class="code" href="signals_8hh.html#ab914de7e6da0eea04636dd51ad35240a">sigAdd</a>(t, lsig[i]); <a name="l00059"></a>00059 } <a name="l00060"></a>00060 dst[b] = t; <a name="l00061"></a>00061 } <a name="l00062"></a>00062 <span class="keywordflow">return</span> dst; <a name="l00063"></a>00063 } </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="a90254b1a3fea877c3a439e5af4594dd7"></a><!-- doxytag: member="propagate.cpp::propagate" ref="a90254b1a3fea877c3a439e5af4594dd7" args="(Tree slotenv, Tree path, Tree box, const siglist &lsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> propagate </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>slotenv</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>box</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>lsig</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Propagate computes the outputs signals of a block-diagram according to a list of input signals. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>slotenv</em> </td><td>input signals associated with symbolic slots </td></tr> <tr><td valign="top"></td><td valign="top"><em>path</em> </td><td>stack of user interface groups : (type,label)* </td></tr> <tr><td valign="top"></td><td valign="top"><em>box</em> </td><td>block-diagram where we propagate the signals </td></tr> <tr><td valign="top"></td><td valign="top"><em>lsig</em> </td><td>list of signals to be propagated into box </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>list of resulting signals Old try for names propagation. </dd></dl> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00196">196</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>References <a class="el" href="classxtended.html#ad709963a78f1b630e44ff518134487b5">xtended::arity()</a>, <a class="el" href="classxtended.html#a0a088a599b3cdd9bcd1854446f145af8">xtended::computeSigOutput()</a>, <a class="el" href="list_8hh_source.html#l00124">cons()</a>, <a class="el" href="prim2_8cpp_source.html#l00064">ffarity()</a>, <a class="el" href="propagate_8cpp_source.html#l00152">gDummyInput</a>, <a class="el" href="boxtype_8cpp_source.html#l00063">getBoxType()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, <a class="el" href="boxes_8cpp_source.html#l00326">isBoxButton()</a>, <a class="el" href="boxes_8cpp_source.html#l00332">isBoxCheckbox()</a>, <a class="el" href="boxes_8cpp_source.html#l00090">isBoxCut()</a>, <a class="el" href="boxes_8cpp_source.html#l00310">isBoxFConst()</a>, <a class="el" href="boxes_8cpp_source.html#l00304">isBoxFFun()</a>, <a class="el" href="boxes_8cpp_source.html#l00316">isBoxFVar()</a>, <a class="el" href="boxes_8cpp_source.html#l00417">isBoxHBargraph()</a>, <a class="el" href="boxes_8cpp_source.html#l00399">isBoxHGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00339">isBoxHSlider()</a>, <a class="el" href="boxes_8cpp_source.html#l00077">isBoxInt()</a>, <a class="el" href="boxes_8cpp_source.html#l00137">isBoxMerge()</a>, <a class="el" href="boxes_8cpp_source.html#l00380">isBoxNumEntry()</a>, <a class="el" href="boxes_8cpp_source.html#l00125">isBoxPar()</a>, <a class="el" href="boxes_8cpp_source.html#l00270">isBoxPrim0()</a>, <a class="el" href="boxes_8cpp_source.html#l00275">isBoxPrim1()</a>, <a class="el" href="boxes_8cpp_source.html#l00280">isBoxPrim2()</a>, <a class="el" href="boxes_8cpp_source.html#l00285">isBoxPrim3()</a>, <a class="el" href="boxes_8cpp_source.html#l00290">isBoxPrim4()</a>, <a class="el" href="boxes_8cpp_source.html#l00295">isBoxPrim5()</a>, <a class="el" href="boxes_8cpp_source.html#l00078">isBoxReal()</a>, <a class="el" href="boxes_8cpp_source.html#l00129">isBoxRec()</a>, <a class="el" href="boxes_8cpp_source.html#l00121">isBoxSeq()</a>, <a class="el" href="boxes_8cpp_source.html#l00104">isBoxSlot()</a>, <a class="el" href="boxes_8cpp_source.html#l00133">isBoxSplit()</a>, <a class="el" href="boxes_8cpp_source.html#l00111">isBoxSymbolic()</a>, <a class="el" href="boxes_8cpp_source.html#l00411">isBoxTGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00423">isBoxVBargraph()</a>, <a class="el" href="boxes_8cpp_source.html#l00405">isBoxVGroup()</a>, <a class="el" href="boxes_8cpp_source.html#l00359">isBoxVSlider()</a>, <a class="el" href="boxes_8cpp_source.html#l00094">isBoxWire()</a>, <a class="el" href="recursive-tree_8cpp_source.html#l00149">lift()</a>, <a class="el" href="propagate_8cpp_source.html#l00117">listConcat()</a>, <a class="el" href="propagate_8cpp_source.html#l00128">listConvert()</a>, <a class="el" href="propagate_8cpp_source.html#l00143">listLift()</a>, <a class="el" href="propagate_8cpp_source.html#l00110">listRange()</a>, <a class="el" href="propagate_8cpp_source.html#l00103">makeList()</a>, <a class="el" href="propagate_8cpp_source.html#l00087">makeMemSigProjList()</a>, <a class="el" href="propagate_8cpp_source.html#l00079">makeSigProjList()</a>, <a class="el" href="interval_8hh_source.html#l00060">max()</a>, <a class="el" href="interval_8hh_source.html#l00059">min()</a>, <a class="el" href="propagate_8cpp_source.html#l00049">mix()</a>, <a class="el" href="symbol_8hh_source.html#l00098">name()</a>, <a class="el" href="labels_8cpp_source.html#l00132">normalizePath()</a>, <a class="el" href="list_8cpp_source.html#l00351">pushEnv()</a>, <a class="el" href="recursive-tree_8cpp_source.html#l00054">rec()</a>, <a class="el" href="recursive-tree_8cpp_source.html#l00064">ref()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00130">searchEnv()</a>, <a class="el" href="signals_8cpp_source.html#l00198">sigButton()</a>, <a class="el" href="signals_8cpp_source.html#l00204">sigCheckbox()</a>, <a class="el" href="signals_8cpp_source.html#l00137">sigFConst()</a>, <a class="el" href="signals_8cpp_source.html#l00132">sigFFun()</a>, <a class="el" href="signals_8cpp_source.html#l00143">sigFVar()</a>, <a class="el" href="signals_8cpp_source.html#l00273">sigHBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00210">sigHSlider()</a>, <a class="el" href="signals_8cpp_source.html#l00047">sigInput()</a>, <a class="el" href="signals_8cpp_source.html#l00040">sigInt()</a>, <a class="el" href="signals_8cpp_source.html#l00250">sigNumEntry()</a>, <a class="el" href="signals_8cpp_source.html#l00043">sigReal()</a>, <a class="el" href="signals_8cpp_source.html#l00279">sigVBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00230">sigVSlider()</a>, <a class="el" href="propagate_8cpp_source.html#l00066">split()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00442">boxPropagateSig()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00197"></a>00197 { <a name="l00198"></a>00198 <span class="keywordtype">int</span> i; <a name="l00199"></a>00199 <span class="keywordtype">double</span> r; <a name="l00200"></a>00200 <a class="code" href="boxes_8hh.html#a52afc5e73408f761d5d61926ced73eef">prim0</a> p0; <a name="l00201"></a>00201 <a class="code" href="boxes_8hh.html#ad7497a9790f9d05878096b459487a510">prim1</a> p1; <a name="l00202"></a>00202 <a class="code" href="boxes_8hh.html#abc5863a46190002232036f027c5acfdb">prim2</a> p2; <a name="l00203"></a>00203 <a class="code" href="boxes_8hh.html#a2769ccced25ffcb2997204594bb52f0e">prim3</a> p3; <a name="l00204"></a>00204 <a class="code" href="boxes_8hh.html#a55608c6610d13a8ccd575de80c191b31">prim4</a> p4; <a name="l00205"></a>00205 <a class="code" href="boxes_8hh.html#ae228ee0345249785e8f74cce21162037">prim5</a> p5; <a name="l00206"></a>00206 <a name="l00207"></a>00207 <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> t1, t2, ff, label, cur, <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>, <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>, step, type, <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>, file, slot, body; <a name="l00208"></a>00208 <a name="l00209"></a>00209 <a name="l00210"></a>00210 <a class="code" href="classxtended.html">xtended</a>* xt = (<a class="code" href="classxtended.html">xtended</a>*)<a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(box); <a name="l00211"></a>00211 <a name="l00212"></a>00212 <span class="comment">// Extended Primitives</span> <a name="l00213"></a>00213 <a name="l00214"></a>00214 <span class="keywordflow">if</span> (xt) { <a name="l00215"></a>00215 assert(lsig.size() == xt-><a class="code" href="classxtended.html#ad709963a78f1b630e44ff518134487b5">arity</a>()); <a name="l00216"></a>00216 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(xt-><a class="code" href="classxtended.html#a0a088a599b3cdd9bcd1854446f145af8">computeSigOutput</a>(lsig)); <a name="l00217"></a>00217 } <a name="l00218"></a>00218 <a name="l00219"></a>00219 <span class="comment">// Numbers and Constants</span> <a name="l00220"></a>00220 <a name="l00221"></a>00221 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7904414896442fcfa0947156b6563d52">isBoxInt</a>(box, &i)) { <a name="l00222"></a>00222 assert(lsig.size()==0); <a name="l00223"></a>00223 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a43ce107ac086c8ef608e0cd7aeb606a4" title="Signals.">sigInt</a>(i)); <a name="l00224"></a>00224 } <a name="l00225"></a>00225 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a292a68d93ea73f703bc880cca4d01bc2">isBoxReal</a>(box, &r)) { <a name="l00226"></a>00226 assert(lsig.size()==0); <a name="l00227"></a>00227 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a06d286e07f982addcce4b187e9b60374">sigReal</a>(r)); <a name="l00228"></a>00228 } <a name="l00229"></a>00229 <a name="l00230"></a>00230 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8744a0451eacde8e56290b3fd74bc0b1">isBoxFConst</a>(box, type, name, file)) { <a name="l00231"></a>00231 assert(lsig.size()==0); <a name="l00232"></a>00232 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#ab1bd1bc9b0fb496e11de72152994dbee">sigFConst</a>(type, name, file)); <a name="l00233"></a>00233 } <a name="l00234"></a>00234 <a name="l00235"></a>00235 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aed6793582932079092255c2643b45f91">isBoxFVar</a>(box, type, name, file)) { <a name="l00236"></a>00236 assert(lsig.size()==0); <a name="l00237"></a>00237 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a418ca95309a0d48e34ebd94360fb1f69">sigFVar</a>(type, name, file)); <a name="l00238"></a>00238 } <a name="l00239"></a>00239 <a name="l00240"></a>00240 <span class="comment">// Wire and Cut</span> <a name="l00241"></a>00241 <a name="l00242"></a>00242 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#acf54df78e7e909644907619a03b3f695">isBoxCut</a>(box)) { <a name="l00243"></a>00243 assert(lsig.size()==1); <a name="l00244"></a>00244 <span class="keywordflow">return</span> <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a>(); <a name="l00245"></a>00245 } <a name="l00246"></a>00246 <a name="l00247"></a>00247 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ac32713127f8c8c3cb26e28a31580b257">isBoxWire</a>(box)) { <a name="l00248"></a>00248 assert(lsig.size()==1); <a name="l00249"></a>00249 <span class="keywordflow">return</span> lsig; <a name="l00250"></a>00250 } <a name="l00251"></a>00251 <a name="l00252"></a>00252 <span class="comment">// Slots and Symbolic Boxes</span> <a name="l00253"></a>00253 <a name="l00254"></a>00254 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af4b23a35faec0884c4591ff92576c3d4">isBoxSlot</a>(box)) { <a name="l00255"></a>00255 <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> sig; <a name="l00256"></a>00256 assert(lsig.size()==0); <a name="l00257"></a>00257 <span class="keywordflow">if</span> (!<a class="code" href="sigtyperules_8cpp.html#ab06de66b22233b4a358ee6642358b2d5" title="search for the type associated to a variable">searchEnv</a>(box,sig,slotenv)) { <a name="l00258"></a>00258 <span class="comment">// test YO simplification des diagrames</span> <a name="l00259"></a>00259 <span class="comment">//fprintf(stderr, "propagate : internal error (slot undefined)\n");</span> <a name="l00260"></a>00260 <span class="comment">//exit(1);</span> <a name="l00261"></a>00261 sig = <a class="code" href="signals_8cpp.html#ae3a5a7f9252911027be0d0293fb33822">sigInput</a>(++<a class="code" href="propagate_8cpp.html#a100d4c47bc2591165381e3d40bcb34fb">gDummyInput</a>); <a name="l00262"></a>00262 } <a name="l00263"></a>00263 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(sig); <a name="l00264"></a>00264 } <a name="l00265"></a>00265 <a name="l00266"></a>00266 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ab73899d732fd2181be3d72f28c11ab3d">isBoxSymbolic</a>(box, slot, body)) { <a name="l00267"></a>00267 assert(lsig.size()>0); <a name="l00268"></a>00268 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(<a class="code" href="list_8cpp.html#af63a1b4b86dae30cb00e12297204509b">pushEnv</a>(slot,lsig[0],slotenv), path, body, <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lsig, 1, lsig.size())); <a name="l00269"></a>00269 } <a name="l00270"></a>00270 <a name="l00271"></a>00271 <span class="comment">// Primitives</span> <a name="l00272"></a>00272 <a name="l00273"></a>00273 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#af6596889fd117b00a85ca9ee837f2988">isBoxPrim0</a>(box, &p0)) { <a name="l00274"></a>00274 assert(lsig.size()==0); <a name="l00275"></a>00275 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p0() ); <a name="l00276"></a>00276 } <a name="l00277"></a>00277 <a name="l00278"></a>00278 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a261369dc82c96fbfa1978859ca4cf2e3">isBoxPrim1</a>(box, &p1)) { <a name="l00279"></a>00279 assert(lsig.size()==1); <a name="l00280"></a>00280 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p1(lsig[0]) ); <a name="l00281"></a>00281 } <a name="l00282"></a>00282 <a name="l00283"></a>00283 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a9c79105875b22a5b09a0b6f768375d09">isBoxPrim2</a>(box, &p2)) { <a name="l00284"></a>00284 <span class="comment">// printf("prim2 recoit : "); print(lsig); printf("\n");</span> <a name="l00285"></a>00285 assert(lsig.size()==2); <a name="l00286"></a>00286 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p2(lsig[0],lsig[1]) ); <a name="l00287"></a>00287 } <a name="l00288"></a>00288 <a name="l00289"></a>00289 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a826142cbc8a1a762612f22273303794e">isBoxPrim3</a>(box, &p3)) { <a name="l00290"></a>00290 assert(lsig.size()==3); <a name="l00291"></a>00291 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p3(lsig[0],lsig[1],lsig[2]) ); <a name="l00292"></a>00292 } <a name="l00293"></a>00293 <a name="l00294"></a>00294 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5cae175b6153210d76c153feb2af908c">isBoxPrim4</a>(box, &p4)) { <a name="l00295"></a>00295 assert(lsig.size()==4); <a name="l00296"></a>00296 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p4(lsig[0],lsig[1],lsig[2],lsig[3]) ); <a name="l00297"></a>00297 } <a name="l00298"></a>00298 <a name="l00299"></a>00299 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aba4a65a9f30e78759da0796c55b13e8e">isBoxPrim5</a>(box, &p5)) { <a name="l00300"></a>00300 assert(lsig.size()==5); <a name="l00301"></a>00301 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>( p5(lsig[0],lsig[1],lsig[2],lsig[3],lsig[4]) ); <a name="l00302"></a>00302 } <a name="l00303"></a>00303 <a name="l00304"></a>00304 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a70f7ab7aecc722355d6096ca89a7658f">isBoxFFun</a>(box, ff)) { <a name="l00305"></a>00305 <span class="comment">//cerr << "propagate en boxFFun of arity " << ffarity(ff) << endl;</span> <a name="l00306"></a>00306 assert(<span class="keywordtype">int</span>(lsig.size())==<a class="code" href="prim2_8cpp.html#af82147adb6d445cb8f8878f6dcedba64">ffarity</a>(ff)); <a name="l00307"></a>00307 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a5c6e4a91a934fb4568c0f8fa23ff873e">sigFFun</a>(ff, <a class="code" href="propagate_8cpp.html#aeabd0458f8fce1fe30aa91e86fccc35f">listConvert</a>(lsig))); <a name="l00308"></a>00308 } <a name="l00309"></a>00309 <a name="l00310"></a>00310 <span class="comment">// User Interface Widgets</span> <a name="l00311"></a>00311 <a name="l00312"></a>00312 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a83b021a73e7c4af2535efcfe0832c690">isBoxButton</a>(box, label)) { <a name="l00313"></a>00313 assert(lsig.size()==0); <a name="l00314"></a>00314 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a327112b28308d9b4fe901460d3374b50">sigButton</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)))); <a name="l00315"></a>00315 } <a name="l00316"></a>00316 <a name="l00317"></a>00317 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a635dcccb574f9a9c911b89a756126473">isBoxCheckbox</a>(box, label)) { <a name="l00318"></a>00318 assert(lsig.size()==0); <a name="l00319"></a>00319 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a47620af04c857dc88339dfdfe48c6480">sigCheckbox</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)))); <a name="l00320"></a>00320 } <a name="l00321"></a>00321 <a name="l00322"></a>00322 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a4bf55c2d9a65d986d0d19da98d14db16">isBoxVSlider</a>(box, label, cur, min, max, step)) { <a name="l00323"></a>00323 assert(lsig.size()==0); <a name="l00324"></a>00324 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a6f4f7ff965986d0c4b972e4b78397c6e">sigVSlider</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)), cur, min, max, step)); <a name="l00325"></a>00325 } <a name="l00326"></a>00326 <a name="l00327"></a>00327 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#adf3ec537a021d2a50ddc8e029d540451">isBoxHSlider</a>(box, label, cur, min, max, step)) { <a name="l00328"></a>00328 assert(lsig.size()==0); <a name="l00329"></a>00329 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a381ceb23680c932aeb376fa1ab49200b">sigHSlider</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)), cur, min, max, step)); <a name="l00330"></a>00330 } <a name="l00331"></a>00331 <a name="l00332"></a>00332 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa135a488b7d54dcce1249f5761ab014a">isBoxNumEntry</a>(box, label, cur, min, max, step)) { <a name="l00333"></a>00333 assert(lsig.size()==0); <a name="l00334"></a>00334 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#aa525ca530089477ae6c19615d2c8602b">sigNumEntry</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)), cur, min, max, step)); <a name="l00335"></a>00335 } <a name="l00336"></a>00336 <a name="l00337"></a>00337 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1f17c731544a73f907993681b57e7461">isBoxVBargraph</a>(box, label, min, max)) { <a name="l00338"></a>00338 assert(lsig.size()==1); <a name="l00339"></a>00339 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a2ac832dcf8578384e807364c6a28bb51">sigVBargraph</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)), min, max, lsig[0])); <a name="l00340"></a>00340 } <a name="l00341"></a>00341 <a name="l00342"></a>00342 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#aa34cc27fbf6e04a6825ba4461af2a9e0">isBoxHBargraph</a>(box, label, min, max)) { <a name="l00343"></a>00343 assert(lsig.size()==1); <a name="l00344"></a>00344 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a848e6e511f9e598f40f732b5a31372d4">makeList</a>(<a class="code" href="signals_8cpp.html#a281a22031cdd673e3d6d90d4381478af">sigHBargraph</a>(<a class="code" href="labels_8cpp.html#a8118f87a9c00e0b0fca7eb97e52bde95">normalizePath</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(label, path)), min, max, lsig[0])); <a name="l00345"></a>00345 } <a name="l00346"></a>00346 <a name="l00347"></a>00347 <span class="comment">// User Interface Groups</span> <a name="l00348"></a>00348 <a name="l00349"></a>00349 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a5643302db2568cf9eaa48fd6f7d336a9">isBoxVGroup</a>(box, label, t1)) { <a name="l00350"></a>00350 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv,<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(0),label), path), t1, lsig); <a name="l00351"></a>00351 } <a name="l00352"></a>00352 <a name="l00353"></a>00353 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a1b73cc14722de085e72c0a008fa56af3">isBoxHGroup</a>(box, label, t1)) { <a name="l00354"></a>00354 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, <a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(1),label), path), t1, lsig); <a name="l00355"></a>00355 } <a name="l00356"></a>00356 <a name="l00357"></a>00357 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a3e76d86869cc8b1df759a4bcb972cf2d">isBoxTGroup</a>(box, label, t1)) { <a name="l00358"></a>00358 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, <a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(2),label), path), t1, lsig); <a name="l00359"></a>00359 } <a name="l00360"></a>00360 <a name="l00361"></a>00361 <span class="comment">// Block Diagram Composition Algebra</span> <a name="l00362"></a>00362 <a name="l00363"></a>00363 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#ad7c79f7a1c0aa3109ab0548e59194d48">isBoxSeq</a>(box, t1, t2)) { <a name="l00364"></a>00364 <span class="keywordtype">int</span> in1, out1, in2, out2; <a name="l00365"></a>00365 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t1, &in1, &out1); <a name="l00366"></a>00366 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t2, &in2, &out2); <a name="l00367"></a>00367 <a name="l00368"></a>00368 assert(out1==in2); <a name="l00369"></a>00369 <a name="l00370"></a>00370 <span class="keywordflow">if</span> (out1 == in2) { <a name="l00371"></a>00371 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path,t1,lsig)); <a name="l00372"></a>00372 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (out1 > in2) { <a name="l00373"></a>00373 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> lr = <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t1,lsig); <a name="l00374"></a>00374 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a791e83b671b0063ef48d334e9095c107">listConcat</a>(<a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lr, 0, in2)), <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lr, in2, out1)); <a name="l00375"></a>00375 } <span class="keywordflow">else</span> { <a name="l00376"></a>00376 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, <a class="code" href="propagate_8cpp.html#a791e83b671b0063ef48d334e9095c107">listConcat</a>( <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t1, <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lsig,0,in1)), <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lsig,in1,in1+in2-out1) ) ); <a name="l00377"></a>00377 } <a name="l00378"></a>00378 } <a name="l00379"></a>00379 <a name="l00380"></a>00380 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a8a24d365092cfdabb32218ab8e446dc6">isBoxPar</a>(box, t1, t2)) { <a name="l00381"></a>00381 <span class="keywordtype">int</span> in1, out1, in2, out2; <a name="l00382"></a>00382 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t1, &in1, &out1); <a name="l00383"></a>00383 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t2, &in2, &out2); <a name="l00384"></a>00384 <a name="l00385"></a>00385 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a791e83b671b0063ef48d334e9095c107">listConcat</a>( <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t1, <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lsig, 0, in1)), <a name="l00386"></a>00386 <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, <a class="code" href="propagate_8cpp.html#a0228acb49e02e9fe3ff168d7a8ca36ac">listRange</a>(lsig, in1, in1+in2)) ); <a name="l00387"></a>00387 } <a name="l00388"></a>00388 <a name="l00389"></a>00389 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a654a2a97bdc734448e669899976bdbd0">isBoxSplit</a>(box, t1, t2)) { <a name="l00390"></a>00390 <span class="keywordtype">int</span> in1, out1, in2, out2; <a name="l00391"></a>00391 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t1, &in1, &out1); <a name="l00392"></a>00392 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t2, &in2, &out2); <a name="l00393"></a>00393 <a name="l00394"></a>00394 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l1 = <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t1, lsig); <a name="l00395"></a>00395 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l2 = <a class="code" href="propagate_8cpp.html#aa8f61c4d2af359e91ef8dbd56e3d19c0" title="split une liste de signaux sur n bus">split</a>(l1, in2); <a name="l00396"></a>00396 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, l2); <a name="l00397"></a>00397 } <a name="l00398"></a>00398 <a name="l00399"></a>00399 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a7b7d0ce5bacf1a799517f7b50dfe7a3e">isBoxMerge</a>(box, t1, t2)) { <a name="l00400"></a>00400 <span class="keywordtype">int</span> in1, out1, in2, out2; <a name="l00401"></a>00401 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t1, &in1, &out1); <a name="l00402"></a>00402 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t2, &in2, &out2); <a name="l00403"></a>00403 <a name="l00404"></a>00404 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l1 = <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t1, lsig); <a name="l00405"></a>00405 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l2 = <a class="code" href="propagate_8cpp.html#a843c724dbe9c31aad6f71082bea60517" title="propagate : box listOfSignal-&gt; listOfSignal&#39;">mix</a>(l1, in2); <a name="l00406"></a>00406 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv, path, t2, l2); <a name="l00407"></a>00407 } <a name="l00408"></a>00408 <span class="comment">/* </span> <a name="l00409"></a>00409 <span class="comment"> else if (isBoxRec(box, t1, t2)) { </span> <a name="l00410"></a>00410 <span class="comment"> int in1, out1, in2, out2;</span> <a name="l00411"></a>00411 <span class="comment"> getBoxType(t1, &in1, &out1);</span> <a name="l00412"></a>00412 <span class="comment"> getBoxType(t2, &in2, &out2);</span> <a name="l00413"></a>00413 <span class="comment"> </span> <a name="l00414"></a>00414 <span class="comment"> siglist l0 = makeSigProjList(ref(1), in2);</span> <a name="l00415"></a>00415 <span class="comment"> siglist l1 = propagate(slotenv, path, t2, l0);</span> <a name="l00416"></a>00416 <span class="comment"> siglist l2 = propagate(slotenv, path, t1, listConcat(l1,listLift(lsig)));</span> <a name="l00417"></a>00417 <span class="comment"> Tree g = rec(listConvert(l2));</span> <a name="l00418"></a>00418 <span class="comment"> return makeSigProjList(g, out1);</span> <a name="l00419"></a>00419 <span class="comment"> }</span> <a name="l00420"></a>00420 <span class="comment">*/</span> <a name="l00421"></a>00421 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="boxes_8cpp.html#a97de4dc9680e2d0820a5d1d18255fa35">isBoxRec</a>(box, t1, t2)) { <a name="l00422"></a>00422 <span class="comment">// Bug Corrected</span> <a name="l00423"></a>00423 <span class="keywordtype">int</span> in1, out1, in2, out2; <a name="l00424"></a>00424 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t1, &in1, &out1); <a name="l00425"></a>00425 <a class="code" href="boxes_8hh.html#ac5c10eb592a85ecba6d6990f9f78010d" title="Return the type (number of inputs and outputs) of a box or false if undefined.">getBoxType</a>(t2, &in2, &out2); <a name="l00426"></a>00426 <a name="l00427"></a>00427 <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> slotenv2 = <a class="code" href="recursive-tree_8cpp.html#abf6659f19a0e48b81af0b0fb39ede302">lift</a>(slotenv); <span class="comment">// the environment must also be lifted</span> <a name="l00428"></a>00428 <a name="l00429"></a>00429 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l0 = <a class="code" href="propagate_8cpp.html#a269e90be9adbd2d498fa4ea9d5a44eef" title="Fabrique une liste de n mem projections d&#39;un groupe récursif.">makeMemSigProjList</a>(<a class="code" href="recursive-tree_8cpp.html#ab93ecee07e77e314fe39e3199d06437a" title="create a de Bruijn recursive reference">ref</a>(1), in2); <a name="l00430"></a>00430 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l1 = <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv2, path, t2, l0); <a name="l00431"></a>00431 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> l2 = <a class="code" href="propagate_8cpp.html#a90254b1a3fea877c3a439e5af4594dd7" title="Propagate computes the outputs signals of a block-diagram according to a list of...">propagate</a>(slotenv2, path, t1, <a class="code" href="propagate_8cpp.html#a791e83b671b0063ef48d334e9095c107">listConcat</a>(l1,<a class="code" href="propagate_8cpp.html#ade9e448f96873ea507b57e9125c96507">listLift</a>(lsig))); <a name="l00432"></a>00432 <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> g = <a class="code" href="recursive-tree_8cpp.html#aa598f21268aa7198407d2eb6929d09ab" title="create a de Bruijn recursive tree">rec</a>(<a class="code" href="propagate_8cpp.html#aeabd0458f8fce1fe30aa91e86fccc35f">listConvert</a>(l2)); <a name="l00433"></a>00433 <span class="keywordflow">return</span> <a class="code" href="propagate_8cpp.html#a8d657cdf7de88852e540d10cb0ee9af6" title="Fabrique une liste de n projections d&#39;un groupe récursif.">makeSigProjList</a>(g, out1); <a name="l00434"></a>00434 } <a name="l00435"></a>00435 <a name="l00436"></a>00436 cout << <span class="stringliteral">"ERROR in file "</span> << __FILE__ << <span class="charliteral">':'</span> << __LINE__ << <span class="stringliteral">", unrecognised box expression : "</span> << <a class="code" href="classboxpp.html">boxpp</a>(box) << endl; <a name="l00437"></a>00437 exit(1); <a name="l00438"></a>00438 <span class="keywordflow">return</span> <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a>(); <a name="l00439"></a>00439 } </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="aa8f61c4d2af359e91ef8dbd56e3d19c0"></a><!-- doxytag: member="propagate.cpp::split" ref="aa8f61c4d2af359e91ef8dbd56e3d19c0" args="(const siglist &inputs, int nbus)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> split </td> <td>(</td> <td class="paramtype">const <a class="el" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> & </td> <td class="paramname"> <em>inputs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nbus</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>split une liste de signaux sur n bus </p> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00066">66</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00067"></a>00067 { <a name="l00068"></a>00068 <span class="keywordtype">int</span> nlines = inputs.size(); <a name="l00069"></a>00069 <a name="l00070"></a>00070 <a class="code" href="propagate_8hh.html#a36ceb385470a329128be8d712a166543">siglist</a> outputs(nbus); <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> b=0; b<nbus; b++) { <a name="l00073"></a>00073 outputs[b] = inputs[b % nlines]; <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <span class="keywordflow">return</span> outputs; <a name="l00076"></a>00076 } </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>Variable Documentation</h2> <a class="anchor" id="a100d4c47bc2591165381e3d40bcb34fb"></a><!-- doxytag: member="propagate.cpp::gDummyInput" ref="a100d4c47bc2591165381e3d40bcb34fb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="propagate_8cpp.html#a100d4c47bc2591165381e3d40bcb34fb">gDummyInput</a> = 10000<code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="propagate_8cpp_source.html#l00152">152</a> of file <a class="el" href="propagate_8cpp_source.html">propagate.cpp</a>.</p> <p>Referenced by <a class="el" href="propagate_8cpp_source.html#l00196">propagate()</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:10 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>