<!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: sigtyperules.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>sigtyperules.cpp File Reference</h1><code>#include <stdio.h></code><br/> <code>#include <assert.h></code><br/> <code>#include "<a class="el" href="sigtype_8hh_source.html">sigtype.hh</a>"</code><br/> <code>#include "<a class="el" href="sigprint_8hh_source.html">sigprint.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="prim2_8hh_source.html">prim2.hh</a>"</code><br/> <code>#include "<a class="el" href="tlib_8hh_source.html">tlib.hh</a>"</code><br/> <code>#include "<a class="el" href="sigtyperules_8hh_source.html">sigtyperules.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="recursivness_8hh_source.html">recursivness.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for sigtyperules.cpp:</div> <div class="dynsection"> </div> <p><a href="sigtyperules_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">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a83a7b8def43c40265adaf84524cd1b4e">getInferredType</a> (<a class="el" href="classCTree.html">Tree</a> term, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve or infere the type of a term according to its surrounding type environment. <a href="#a83a7b8def43c40265adaf84524cd1b4e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#ab1fbe8c4735851f27be930e33a846599">infereSigType</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of a term according to its surrounding type environment. <a href="#ab1fbe8c4735851f27be930e33a846599"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a7f060b1a31b1d21d0815b2e4347291a9">infereFFType</a> (<a class="el" href="classCTree.html">Tree</a> ff, <a class="el" href="classCTree.html">Tree</a> ls, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of a foreign function call. <a href="#a7f060b1a31b1d21d0815b2e4347291a9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a171b0e69de84d9483d3d569d8cc23394">infereFConstType</a> (<a class="el" href="classCTree.html">Tree</a> type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of a foreign constant. <a href="#a171b0e69de84d9483d3d569d8cc23394"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a5c54e6ba99df9c7fcb72de627ddf7fd9">infereFVarType</a> (<a class="el" href="classCTree.html">Tree</a> type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of a foreign variable. <a href="#a5c54e6ba99df9c7fcb72de627ddf7fd9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#aa041d1d56c608bb597a8c5800e315e4f">infereRecType</a> (<a class="el" href="classCTree.html">Tree</a> var, <a class="el" href="classCTree.html">Tree</a> body, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of e recursive block by trying solutions of increasing generality. <a href="#aa041d1d56c608bb597a8c5800e315e4f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a3c9524550f465657525f0caf16d865c7">infereReadTableType</a> (<a class="el" href="classP.html">Type</a> tbl, <a class="el" href="classP.html">Type</a> ri)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of the result of reading a table. <a href="#a3c9524550f465657525f0caf16d865c7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a199bccaf72659bb6c895f7ea2c280bff">infereWriteTableType</a> (<a class="el" href="classP.html">Type</a> tbl, <a class="el" href="classP.html">Type</a> wi, <a class="el" href="classP.html">Type</a> wd)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of the result of writing into a table. <a href="#a199bccaf72659bb6c895f7ea2c280bff"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a0bb436d7f6a74fec18be9fba6c308505">infereProjType</a> (<a class="el" href="classP.html">Type</a> t, int i, int vec)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of a projection (selection) of a tuplet element. <a href="#a0bb436d7f6a74fec18be9fba6c308505"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a6f5e7a77c81c28d84a8435e225b04e4b">infereXType</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Infere the type of an extended (primitive) block. <a href="#a6f5e7a77c81c28d84a8435e225b04e4b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a1b4fa0bb66e5f8b7723c8cfeb72d251e">infereDocConstantTblType</a> (<a class="el" href="classP.html">Type</a> size, <a class="el" href="classP.html">Type</a> init)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a1ce76d7934a129ca0233ad4dd8202318">infereDocWriteTblType</a> (<a class="el" href="classP.html">Type</a> size, <a class="el" href="classP.html">Type</a> init, <a class="el" href="classP.html">Type</a> widx, <a class="el" href="classP.html">Type</a> wsig)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#ae477ac19d25a9667c6d6bfa9d186d5cf">infereDocAccessTblType</a> (<a class="el" href="classP.html">Type</a> tbl, <a class="el" href="classP.html">Type</a> ridx)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a54cf5041f97486308c49f551deb18b65">setSigType</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classP.html">Type</a> t)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">set the type annotation of sig <a href="#a54cf5041f97486308c49f551deb18b65"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785">getSigType</a> (<a class="el" href="classCTree.html">Tree</a> sig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">retrieve the type annotation of sig <a href="#a1f41188e4150f54b2fb2caf28a948785"></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="sigtyperules_8cpp.html#aff4086d2c051ecf8ce36a37e6faee53f">addEnv</a> (<a class="el" href="classCTree.html">Tree</a> var, <a class="el" href="classP.html">Type</a> tp, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">add a new binding to a type environment <a href="#aff4086d2c051ecf8ce36a37e6faee53f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#ab06de66b22233b4a358ee6642358b2d5">searchEnv</a> (<a class="el" href="classCTree.html">Tree</a> env, <a class="el" href="classCTree.html">Tree</a> var)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">search for the type associated to a variable <a href="#ab06de66b22233b4a358ee6642358b2d5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#abccc3f89cdb1eea6b39f6bab51bc34c8">isInEnv</a> (<a class="el" href="classCTree.html">Tree</a> env, <a class="el" href="classCTree.html">Tree</a> var, <a class="el" href="classP.html">Type</a> &val)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">search for the type associated to a variable <a href="#abccc3f89cdb1eea6b39f6bab51bc34c8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a85dbc6a3f96f643e82a0b45d785ce341">typeAnnotation</a> (<a class="el" href="classCTree.html">Tree</a> sig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">fully annotate every subtree of term with type information <a href="#a85dbc6a3f96f643e82a0b45d785ce341"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#ad57cbb3235b0de80fb7a6634a0e6899b">T</a> (<a class="el" href="classCTree.html">Tree</a> term, <a class="el" href="classCTree.html">Tree</a> env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Shortcut to getSigType, retrieve or infere the type of a term according to its surrounding type environment. <a href="#ad57cbb3235b0de80fb7a6634a0e6899b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structinterval.html">interval</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#a8a7f16ab74cca261e686623388962810">__arithmetic</a> (int opcode, const <a class="el" href="structinterval.html">interval</a> &x, const <a class="el" href="structinterval.html">interval</a> &y)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the resulting interval of an arithmetic operation. <a href="#a8a7f16ab74cca261e686623388962810"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structinterval.html">interval</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#abfa55cc55df9ebf6398414825e7ce423">arithmetic</a> (int opcode, const <a class="el" href="structinterval.html">interval</a> &x, const <a class="el" href="structinterval.html">interval</a> &y)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classP.html">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="sigtyperules_8cpp.html#acb6b95bc1ea2aff2d7c2baa6ef018f3d">initialRecType</a> (<a class="el" href="classCTree.html">Tree</a> t)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute an initial type solution for a recursive block. <a href="#acb6b95bc1ea2aff2d7c2baa6ef018f3d"></a><br/></td></tr> <tr><td colspan="2"><h2>Variables</h2></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="sigtyperules_8cpp.html#adad99b2ed558ba9368d1000c3a0d856b">TYPEPROPERTY</a> = tree(symbol("TypeProperty"))</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="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201">NULLENV</a> = tree(symbol("NullEnv"))</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The empty type environment (also property key for closed term type). <a href="#a7d5c3fa7ca1a87bd549f9d432a20b201"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a8a7f16ab74cca261e686623388962810"></a><!-- doxytag: member="sigtyperules.cpp::__arithmetic" ref="a8a7f16ab74cca261e686623388962810" args="(int opcode, const interval &x, const interval &y)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="structinterval.html">interval</a> __arithmetic </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>opcode</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structinterval.html">interval</a> & </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structinterval.html">interval</a> & </td> <td class="paramname"> <em>y</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compute the resulting interval of an arithmetic operation. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>op</em> </td><td>code of the operation </td></tr> <tr><td valign="top"></td><td valign="top"><em>s1</em> </td><td>interval of the left operand </td></tr> <tr><td valign="top"></td><td valign="top"><em>s2</em> </td><td>interval of the right operand </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the resulting interval </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00234">234</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="binop_8hh_source.html#l00056">kAdd</a>, <a class="el" href="binop_8hh_source.html#l00059">kAND</a>, <a class="el" href="binop_8hh_source.html#l00056">kDiv</a>, <a class="el" href="binop_8hh_source.html#l00058">kEQ</a>, <a class="el" href="binop_8hh_source.html#l00058">kGE</a>, <a class="el" href="binop_8hh_source.html#l00058">kGT</a>, <a class="el" href="binop_8hh_source.html#l00058">kLE</a>, <a class="el" href="binop_8hh_source.html#l00057">kLsh</a>, <a class="el" href="binop_8hh_source.html#l00058">kLT</a>, <a class="el" href="binop_8hh_source.html#l00056">kMul</a>, <a class="el" href="binop_8hh_source.html#l00058">kNE</a>, <a class="el" href="binop_8hh_source.html#l00059">kOR</a>, <a class="el" href="binop_8hh_source.html#l00056">kRem</a>, <a class="el" href="binop_8hh_source.html#l00057">kRsh</a>, <a class="el" href="binop_8hh_source.html#l00056">kSub</a>, and <a class="el" href="binop_8hh_source.html#l00059">kXOR</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00261">arithmetic()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00235"></a>00235 { <a name="l00236"></a>00236 <span class="keywordflow">switch</span> (opcode) { <a name="l00237"></a>00237 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a8d20f6cca2d49a8732f535cfe28812c8">kAdd</a>: <span class="keywordflow">return</span> x+y; <a name="l00238"></a>00238 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04aa8aa42e35eb8248e580bf83ded4311d3">kSub</a>: <span class="keywordflow">return</span> x-y; <a name="l00239"></a>00239 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04ab8488ea0c4c9fd6bf85f12e3ad5eba18">kMul</a>: <span class="keywordflow">return</span> x*y; <a name="l00240"></a>00240 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04aef0a0af82a04caacbdd669707bfe3ab1">kDiv</a>: <span class="keywordflow">return</span> x/y; <a name="l00241"></a>00241 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a6c9b09cd1576fb102b894e94c6fbb50d">kRem</a>: <span class="keywordflow">return</span> x%y; <a name="l00242"></a>00242 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a17541c9042064a5766094cb21004747b">kLsh</a>: <span class="keywordflow">return</span> x<<y; <a name="l00243"></a>00243 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a78bcc3d3a2b051735b0a40913269cc0a">kRsh</a>: <span class="keywordflow">return</span> x>>y; <a name="l00244"></a>00244 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04af173a32f5795cbb2a5925244957e6cfa">kGT</a>: <span class="keywordflow">return</span> x>y; <a name="l00245"></a>00245 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04ae7a542507915cc0c7fa6e1e8f34f63d3">kLT</a>: <span class="keywordflow">return</span> x<y; <a name="l00246"></a>00246 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a720a8d4d4940a77bf3032e8b635b3686">kGE</a>: <span class="keywordflow">return</span> x>=y; <a name="l00247"></a>00247 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a15e96019cd90687e4124d41ac3de868b">kLE</a>: <span class="keywordflow">return</span> x<=y; <a name="l00248"></a>00248 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a563c2f90bb81a7e2d8163a894286c41e">kEQ</a>: <span class="keywordflow">return</span> x==y; <a name="l00249"></a>00249 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04afab4db2de17aa5171d21f7083a22bfe1">kNE</a>: <span class="keywordflow">return</span> x!=y; <a name="l00250"></a>00250 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04aa642aa3f76bf915b63cac652e82132c2">kAND</a>: <span class="keywordflow">return</span> x&y; <a name="l00251"></a>00251 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04a5c06378c2fa6a1bd5533457f763c43a1">kOR</a>: <span class="keywordflow">return</span> x|y; <a name="l00252"></a>00252 <span class="keywordflow">case</span> <a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04ad222de85609d6b20ff3f55ddadf7be5e">kXOR</a>: <span class="keywordflow">return</span> x^y; <a name="l00253"></a>00253 <span class="keywordflow">default</span>: <a name="l00254"></a>00254 cerr << <span class="stringliteral">"Unrecognized opcode : "</span> << opcode << endl; <a name="l00255"></a>00255 exit(1); <a name="l00256"></a>00256 } <a name="l00257"></a>00257 <a name="l00258"></a>00258 <span class="keywordflow">return</span> <a class="code" href="structinterval.html">interval</a>(); <a name="l00259"></a>00259 } </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="aff4086d2c051ecf8ce36a37e6faee53f"></a><!-- doxytag: member="sigtyperules.cpp::addEnv" ref="aff4086d2c051ecf8ce36a37e6faee53f" args="(Tree var, Type tp, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> addEnv </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>var</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>tp</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>add a new binding to a type environment </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>var</em> </td><td>the variable </td></tr> <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the type of the variable </td></tr> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a new environment : [(var,type):env] </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00117">117</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00124">cons()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00577">infereRecType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00118"></a>00118 { <a name="l00119"></a>00119 <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> r = <a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(<a class="code" href="list_8hh.html#ae1ed153946fcfc025009c6d9c9c40bee">cons</a>(var,<a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>((<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*)tp)),env); <a name="l00120"></a>00120 <span class="keywordflow">return</span> r; <a name="l00121"></a>00121 } </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="abfa55cc55df9ebf6398414825e7ce423"></a><!-- doxytag: member="sigtyperules.cpp::arithmetic" ref="abfa55cc55df9ebf6398414825e7ce423" args="(int opcode, const interval &x, const interval &y)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="structinterval.html">interval</a> arithmetic </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>opcode</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structinterval.html">interval</a> & </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structinterval.html">interval</a> & </td> <td class="paramname"> <em>y</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00261">261</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtyperules_8cpp_source.html#l00234">__arithmetic()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00262"></a>00262 { <a name="l00263"></a>00263 <a class="code" href="structinterval.html">interval</a> r = <a class="code" href="sigtyperules_8cpp.html#a8a7f16ab74cca261e686623388962810" title="Compute the resulting interval of an arithmetic operation.">__arithmetic</a>(opcode,x,y); <a name="l00264"></a>00264 <span class="keywordflow">return</span> r; <a name="l00265"></a>00265 } </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="a83a7b8def43c40265adaf84524cd1b4e"></a><!-- doxytag: member="sigtyperules.cpp::getInferredType" ref="a83a7b8def43c40265adaf84524cd1b4e" args="(Tree term, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classP.html">Type</a> getInferredType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>term</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieve or infere the type of a term according to its surrounding type environment. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal to analyze </td></tr> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the type of sig according to environment env </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00184">184</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>, <a class="el" href="tree_8hh_source.html#l00155">CTree::getType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00151">isInEnv()</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00070">setSigType()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, and <a class="el" href="tree_8cpp_source.html#l00302">tree2ptr()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00218">T()</a>, and <a class="el" href="sigtyperules_8cpp_source.html#l00171">typeAnnotation()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00185"></a>00185 { <a name="l00186"></a>00186 <a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>* at = (<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*) term-><a class="code" href="classCTree.html#adfb1030a444053685b84e45c76eabe6a">getType</a>(); <a name="l00187"></a>00187 <span class="keywordflow">if</span> (at) { <a name="l00188"></a>00188 <span class="keywordflow">return</span> at; <a name="l00189"></a>00189 } <span class="keywordflow">else</span> { <a name="l00190"></a>00190 <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> tt; <a name="l00191"></a>00191 <span class="keywordflow">if</span> (!<a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(term, env, tt)) { <a name="l00192"></a>00192 <a class="code" href="classP.html">Type</a> tp; <a name="l00193"></a>00193 <span class="keywordflow">if</span> (!<a class="code" href="sigtyperules_8cpp.html#abccc3f89cdb1eea6b39f6bab51bc34c8" title="search for the type associated to a variable">isInEnv</a>(env, term, tp)) { <a name="l00194"></a>00194 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#ab1fbe8c4735851f27be930e33a846599" title="Infere the type of a term according to its surrounding type environment.">infereSigType</a>(term, env); <a name="l00195"></a>00195 <span class="keywordflow">if</span> (env == <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) { <a name="l00196"></a>00196 <a class="code" href="sigtyperules_8cpp.html#a54cf5041f97486308c49f551deb18b65" title="set the type annotation of sig">setSigType</a>(term, t); <span class="comment">// the result is sure</span> <a name="l00197"></a>00197 } <span class="keywordflow">else</span> { <a name="l00198"></a>00198 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(term, env, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>((<span class="keywordtype">void</span>*)t)); <span class="comment">// the result depends of hypothesis</span> <a name="l00199"></a>00199 } <a name="l00200"></a>00200 <span class="keywordflow">return</span> t; <a name="l00201"></a>00201 } <span class="keywordflow">else</span> { <a name="l00202"></a>00202 <span class="keywordflow">return</span> tp; <a name="l00203"></a>00203 } <a name="l00204"></a>00204 } <a name="l00205"></a>00205 <a class="code" href="classP.html">Type</a> rt((<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*)<a class="code" href="tree_8cpp.html#ad1d692b2c0a86d485a3d096af07632e6" title="if t has a node of type ptr, return it otherwise error">tree2ptr</a>(tt)); <a name="l00206"></a>00206 <span class="keywordflow">return</span> rt; <a name="l00207"></a>00207 } <a name="l00208"></a>00208 } </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="a1f41188e4150f54b2fb2caf28a948785"></a><!-- doxytag: member="sigtyperules.cpp::getSigType" ref="a1f41188e4150f54b2fb2caf28a948785" args="(Tree sig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classP.html">Type</a> getSigType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>retrieve the type annotation of sig </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal we want to know the type </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00082">82</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="tree_8hh_source.html#l00155">CTree::getType()</a>.</p> <p>Referenced by <a class="el" href="doc__compile_8cpp_source.html#l00398">DocCompiler::generateBinOp()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00521">DocCompiler::generateCacheCode()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">ScalarCompiler::generateCacheCode()</a>, <a class="el" href="doc__compile_8cpp_source.html#l01169">DocCompiler::generateDelayVec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01137">ScalarCompiler::generateDelayVec()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00749">DocCompiler::generateDocConstantTbl()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00814">DocCompiler::generateDocWriteTbl()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00298">DocCompiler::generateFConst()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">ScalarCompiler::generateFConst()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00323">DocCompiler::generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">ScalarCompiler::generateFVar()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00701">DocCompiler::generateHBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00572">ScalarCompiler::generateHBargraph()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00278">DocCompiler::generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00295">ScalarCompiler::generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00821">ScalarCompiler::generatePrefix()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00902">DocCompiler::generateRec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00783">ScalarCompiler::generateRec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00874">ScalarCompiler::generateSelect2()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00933">ScalarCompiler::generateSelect3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00674">ScalarCompiler::generateStaticTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00638">ScalarCompiler::generateTable()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00569">DocCompiler::generateVariableStore()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00268">VectorCompiler::generateVariableStore()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00448">ScalarCompiler::generateVariableStore()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00681">DocCompiler::generateVBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00545">ScalarCompiler::generateVBargraph()</a>, <a class="el" href="doc__compile_8cpp_source.html#l01058">DocCompiler::generateXtended()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01007">ScalarCompiler::generateXtended()</a>, <a class="el" href="occurences_8cpp_source.html#l00095">OccMarkup::incOcc()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00218">VectorCompiler::needSeparateLoop()</a>, <a class="el" href="sharing_8cpp_source.html#l00106">ScalarCompiler::sharingAnnotation()</a>, <a class="el" href="doc__sharing_8cpp_source.html#l00117">DocCompiler::sharingAnnotation()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00056">signal2klass()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00083"></a>00083 { <a name="l00084"></a>00084 <a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>* t = (<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*) sig-><a class="code" href="classCTree.html#adfb1030a444053685b84e45c76eabe6a">getType</a>(); <a name="l00085"></a>00085 <span class="keywordflow">if</span> (t==0) { <a name="l00086"></a>00086 cerr << <span class="stringliteral">"ERROR in getSigType : no type information available for signal :"</span> << *sig << endl; <a name="l00087"></a>00087 exit(1); <a name="l00088"></a>00088 } <a name="l00089"></a>00089 <span class="keywordflow">return</span> t; <a name="l00090"></a>00090 } </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="ae477ac19d25a9667c6d6bfa9d186d5cf"></a><!-- doxytag: member="sigtyperules.cpp::infereDocAccessTblType" ref="ae477ac19d25a9667c6d6bfa9d186d5cf" args="(Type tbl, Type ridx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereDocAccessTblType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>tbl</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>ridx</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00547">547</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00548"></a>00548 { <a name="l00549"></a>00549 <a class="code" href="classP.html">Type</a> temp = tbl <a name="l00550"></a>00550 ->promoteVariability(ridx->variability()) <a name="l00551"></a>00551 ->promoteComputability(ridx->computability()) <a name="l00552"></a>00552 ->promoteVectorability(ridx->vectorability()) <a name="l00553"></a>00553 ; <a name="l00554"></a>00554 <span class="keywordflow">return</span> temp; <a name="l00555"></a>00555 } </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="a1b4fa0bb66e5f8b7723c8cfeb72d251e"></a><!-- doxytag: member="sigtyperules.cpp::infereDocConstantTblType" ref="a1b4fa0bb66e5f8b7723c8cfeb72d251e" args="(Type size, Type init)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereDocConstantTblType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>init</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00526">526</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8cpp_source.html#l00249">checkInit()</a>, <a class="el" href="sigtype_8cpp_source.html#l00228">checkInt()</a>, and <a class="el" href="sigtype_8cpp_source.html#l00239">checkKonst()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00527"></a>00527 { <a name="l00528"></a>00528 <a class="code" href="sigtype_8cpp.html#a267208a768c70317830a4f96dfdf9c9b" title="verifie que t est constant">checkKonst</a>(<a class="code" href="sigtype_8cpp.html#aebe495204f7e4e178cfb023eb03c3e24" title="verifie que t est entier">checkInt</a>(<a class="code" href="sigtype_8cpp.html#a69c0edc5ba42dd64e897a77765021258" title="verifie que t est connu a l&#39;initialisation">checkInit</a>(size))); <a name="l00529"></a>00529 <a name="l00530"></a>00530 <span class="keywordflow">return</span> init; <a name="l00531"></a>00531 } </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="a1ce76d7934a129ca0233ad4dd8202318"></a><!-- doxytag: member="sigtyperules.cpp::infereDocWriteTblType" ref="a1ce76d7934a129ca0233ad4dd8202318" args="(Type size, Type init, Type widx, Type wsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereDocWriteTblType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>init</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>widx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>wsig</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00533">533</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8cpp_source.html#l00249">checkInit()</a>, <a class="el" href="sigtype_8cpp_source.html#l00228">checkInt()</a>, <a class="el" href="sigtype_8cpp_source.html#l00239">checkKonst()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, and <a class="el" href="sigtype_8hh_source.html#l00057">kScal</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00534"></a>00534 { <a name="l00535"></a>00535 <a class="code" href="sigtype_8cpp.html#a267208a768c70317830a4f96dfdf9c9b" title="verifie que t est constant">checkKonst</a>(<a class="code" href="sigtype_8cpp.html#aebe495204f7e4e178cfb023eb03c3e24" title="verifie que t est entier">checkInt</a>(<a class="code" href="sigtype_8cpp.html#a69c0edc5ba42dd64e897a77765021258" title="verifie que t est connu a l&#39;initialisation">checkInit</a>(size))); <a name="l00536"></a>00536 <a name="l00537"></a>00537 <a class="code" href="classP.html">Type</a> temp = init <a name="l00538"></a>00538 ->promoteVariability(<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>) <span class="comment">// difficult to tell, therefore kSamp to be safe</span> <a name="l00539"></a>00539 ->promoteComputability(widx->computability()|wsig->computability()) <a name="l00540"></a>00540 ->promoteVectorability(<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac41deebf4ce901ce540736612292f579">kScal</a>) <span class="comment">// difficult to tell, therefore kScal to be safe</span> <a name="l00541"></a>00541 ->promoteNature(wsig->nature()) <span class="comment">// nature of the initial and written signal</span> <a name="l00542"></a>00542 ->promoteBoolean(wsig->boolean()) <span class="comment">// booleanity of the initial and written signal</span> <a name="l00543"></a>00543 ; <a name="l00544"></a>00544 <span class="keywordflow">return</span> temp; <a name="l00545"></a>00545 } </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="a171b0e69de84d9483d3d569d8cc23394"></a><!-- doxytag: member="sigtyperules.cpp::infereFConstType" ref="a171b0e69de84d9483d3d569d8cc23394" args="(Tree type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereFConstType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>type</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of a foreign constant. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00630">630</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8hh_source.html#l00056">kInit</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00054">kNum</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kVect</a>, and <a class="el" href="tree_8cpp_source.html#l00244">tree2int()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00631"></a>00631 { <a name="l00632"></a>00632 <span class="comment">// une constante externe ne peut pas se calculer au plus tot qu'a</span> <a name="l00633"></a>00633 <span class="comment">// l'initialisation. Elle est constante, auquel cas on considere que c'est comme</span> <a name="l00634"></a>00634 <span class="comment">// rand() c'est a dire que le resultat varie a chaque appel.</span> <a name="l00635"></a>00635 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="tree_8cpp.html#a523bce65e2a281fe678f2362496061cf" title="if t has a node of type int, return it otherwise error">tree2int</a>(type),<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a>,<a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da129c5fd2c640e351170c8ede47250479">kInit</a>,<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>,<a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>()); <a name="l00636"></a>00636 } </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="a7f060b1a31b1d21d0815b2e4347291a9"></a><!-- doxytag: member="sigtyperules.cpp::infereFFType" ref="a7f060b1a31b1d21d0815b2e4347291a9" args="(Tree ff, Tree ls, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereFFType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>ff</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>ls</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of a foreign function call. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00601">601</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="prim2_8cpp_source.html#l00064">ffarity()</a>, <a class="el" href="prim2_8cpp_source.html#l00054">ffrestype()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="sigtype_8hh_source.html#l00056">kInit</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00054">kNum</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kVect</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, and <a class="el" href="list_8hh_source.html#l00134">tl()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00602"></a>00602 { <a name="l00603"></a>00603 <span class="comment">// une primitive externe ne peut pas se calculer au plus tot qu'a</span> <a name="l00604"></a>00604 <span class="comment">// l'initialisation. Sa variabilite depend de celle de ses arguments</span> <a name="l00605"></a>00605 <span class="comment">// sauf si elle n'en pas, auquel cas on considere que c'est comme</span> <a name="l00606"></a>00606 <span class="comment">// rand() c'est a dire que le resultat varie a chaque appel.</span> <a name="l00607"></a>00607 <span class="keywordflow">if</span> (<a class="code" href="prim2_8cpp.html#af82147adb6d445cb8f8878f6dcedba64">ffarity</a>(ff)==0) { <a name="l00608"></a>00608 <span class="comment">// case of functions like rand()</span> <a name="l00609"></a>00609 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="prim2_8cpp.html#a2e2c4f1f0dc850e635f1e6a117c95741">ffrestype</a>(ff),<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>,<a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da129c5fd2c640e351170c8ede47250479">kInit</a>,<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>,<a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>()); <a name="l00610"></a>00610 } <span class="keywordflow">else</span> { <a name="l00611"></a>00611 <span class="comment">// otherwise variability and computability depends</span> <a name="l00612"></a>00612 <span class="comment">// arguments (OR of all arg types)</span> <a name="l00613"></a>00613 <a class="code" href="classP.html">Type</a> t = <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>,<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a>,<a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da129c5fd2c640e351170c8ede47250479">kInit</a>,<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>,<a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>()); <a name="l00614"></a>00614 <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(ls)) { t = t|<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(ls),env); ls=<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(ls); } <a name="l00615"></a>00615 <span class="comment">// but the result type is defined by the function</span> <a name="l00616"></a>00616 <a name="l00617"></a>00617 <span class="comment">//return t;</span> <a name="l00618"></a>00618 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>( <a class="code" href="prim2_8cpp.html#a2e2c4f1f0dc850e635f1e6a117c95741">ffrestype</a>(ff), <a name="l00619"></a>00619 t->variability(), <a name="l00620"></a>00620 t->computability(), <a name="l00621"></a>00621 t->vectorability(), <a name="l00622"></a>00622 t->boolean(), <a name="l00623"></a>00623 <a class="code" href="structinterval.html">interval</a>() ); <a name="l00624"></a>00624 } <a name="l00625"></a>00625 } </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="a5c54e6ba99df9c7fcb72de627ddf7fd9"></a><!-- doxytag: member="sigtyperules.cpp::infereFVarType" ref="a5c54e6ba99df9c7fcb72de627ddf7fd9" args="(Tree type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereFVarType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>type</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of a foreign variable. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00641">641</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00056">kExec</a>, <a class="el" href="sigtype_8hh_source.html#l00054">kNum</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kVect</a>, and <a class="el" href="tree_8cpp_source.html#l00244">tree2int()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00642"></a>00642 { <a name="l00643"></a>00643 <span class="comment">// une variable externe ne peut pas se calculer au plus tot qu'a</span> <a name="l00644"></a>00644 <span class="comment">// l'execution. Elle est varie par blocs comme les éléments d'interface utilisateur.</span> <a name="l00645"></a>00645 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="tree_8cpp.html#a523bce65e2a281fe678f2362496061cf" title="if t has a node of type int, return it otherwise error">tree2int</a>(type),<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a>,<a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da16e899f343f7478630c421804745bd95">kExec</a>,<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>,<a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>()); <a name="l00646"></a>00646 } </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="a0bb436d7f6a74fec18be9fba6c308505"></a><!-- doxytag: member="sigtyperules.cpp::infereProjType" ref="a0bb436d7f6a74fec18be9fba6c308505" args="(Type t, int i, int vec)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereProjType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</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>i</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>vec</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of a projection (selection) of a tuplet element. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00423">423</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8cpp_source.html#l00221">isTupletType()</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kVect</a>, and <a class="el" href="sigtype_8hh_source.html#l00252">vecCast()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00424"></a>00424 { <a name="l00425"></a>00425 <a class="code" href="classTupletType.html" title="The type of a tuplet of data.">TupletType</a>* tt = <a class="code" href="sigtype_8cpp.html#a78f2abfce752620d0b4993359f7dcb38">isTupletType</a>(t); <a name="l00426"></a>00426 <span class="keywordflow">if</span> (tt == 0) { <a name="l00427"></a>00427 cerr << <span class="stringliteral">"ERROR infering projection type, not a tuplet type : "</span> << t << endl; <a name="l00428"></a>00428 exit(1); <a name="l00429"></a>00429 } <a name="l00430"></a>00430 <span class="comment">//return (*tt)[i] ->promoteVariability(t->variability())</span> <a name="l00431"></a>00431 <span class="comment">// ->promoteComputability(t->computability());</span> <a name="l00432"></a>00432 <a class="code" href="classP.html">Type</a> temp = (*tt)[i] ->promoteVariability(t->variability()) <a name="l00433"></a>00433 ->promoteComputability(t->computability()) <a name="l00434"></a>00434 ->promoteVectorability(vec<span class="comment">/*t->vectorability()*/</span>); <a name="l00435"></a>00435 <span class="comment">//->promoteBooleanity(t->boolean());</span> <a name="l00436"></a>00436 <a name="l00437"></a>00437 <span class="keywordflow">if</span>(vec==<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a27e55113b0c61172ec83b261f311371a">vecCast</a>(temp); <a name="l00438"></a>00438 <span class="keywordflow">else</span> <span class="keywordflow">return</span> temp; <a name="l00439"></a>00439 } </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="a3c9524550f465657525f0caf16d865c7"></a><!-- doxytag: member="sigtyperules.cpp::infereReadTableType" ref="a3c9524550f465657525f0caf16d865c7" args="(Type tbl, Type ri)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereReadTableType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>tbl</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>ri</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of the result of reading a table. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00483">483</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8hh_source.html#l00104">AudioType::boolean()</a>, <a class="el" href="sigtype_8hh_source.html#l00102">AudioType::computability()</a>, <a class="el" href="sigtype_8hh_source.html#l00298">TableType::content()</a>, <a class="el" href="sigtype_8cpp_source.html#l00219">isSimpleType()</a>, <a class="el" href="sigtype_8cpp_source.html#l00220">isTableType()</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, <a class="el" href="sigtype_8hh_source.html#l00100">AudioType::nature()</a>, <a class="el" href="sigtype_8hh_source.html#l00101">AudioType::variability()</a>, and <a class="el" href="sigtype_8hh_source.html#l00103">AudioType::vectorability()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00484"></a>00484 { <a name="l00485"></a>00485 <a class="code" href="classTableType.html" title="The type of a table of audio data.">TableType</a>* tt = <a class="code" href="sigtype_8cpp.html#ac8b4c7377bb99f19596db76c5a674d03">isTableType</a>(tbl); <a name="l00486"></a>00486 <span class="keywordflow">if</span> (tt == 0) { <a name="l00487"></a>00487 cerr << <span class="stringliteral">"ERROR infering read table type, wrong table type : "</span> << tbl << endl; <a name="l00488"></a>00488 exit(1); <a name="l00489"></a>00489 } <a name="l00490"></a>00490 <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>* st = <a class="code" href="sigtype_8cpp.html#ab37344c874f1fa0e61ca34cab640e7f5">isSimpleType</a>(ri); <a name="l00491"></a>00491 <span class="keywordflow">if</span> (st == 0 || st-><a class="code" href="classAudioType.html#ac4b23dd240ebd38c365d7b75cd075a4d" title="returns the kind of values (integre or floating point)">nature</a>() > <a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>) { <a name="l00492"></a>00492 cerr << <span class="stringliteral">"ERROR infering read table type, wrong write index type : "</span> << ri << endl; <a name="l00493"></a>00493 exit(1); <a name="l00494"></a>00494 } <a name="l00495"></a>00495 <a name="l00496"></a>00496 <span class="comment">//cerr<<"Read Table type avant promote: "<<*tt<<endl;</span> <a name="l00497"></a>00497 <span class="comment">//cerr<<"Indice avant promote: "<<ri<<endl;</span> <a name="l00498"></a>00498 <a name="l00499"></a>00499 <span class="comment">//Type temp = tt->content()->promoteVariability(ri->variability()|tt->variability())</span> <a name="l00500"></a>00500 <span class="comment">// ->promoteComputability(ri->computability()|tt->computability());</span> <a name="l00501"></a>00501 <a name="l00502"></a>00502 <span class="comment">//cerr<<"Read Table type: "<<temp<<endl;</span> <a name="l00503"></a>00503 <a name="l00504"></a>00504 <span class="comment">//return temp;</span> <a name="l00505"></a>00505 <a name="l00506"></a>00506 <a class="code" href="classP.html">Type</a> temp = tt-><a class="code" href="classTableType.html#af3800dbe6a31d62ea4fd2ee7fb928ade" title="return the type of data store in the table">content</a>()->promoteVariability(ri->variability()|tt-><a class="code" href="classAudioType.html#a277c842d4e013df519b0cfc61e9729a2" title="returns how fast values change (constant, by blocks, by samples)">variability</a>()) <a name="l00507"></a>00507 ->promoteComputability(ri->computability()|tt-><a class="code" href="classAudioType.html#a7a0713fc2daba47c0c307fa63a3f4ed6" title="returns when values are available (compilation, initialisation, execution)">computability</a>()) <a name="l00508"></a>00508 ->promoteVectorability(ri->vectorability()|tt-><a class="code" href="classAudioType.html#affb91ae3491bdcfb94f0a00995e6f0e3" title="returns when a signal can be vectorized">vectorability</a>()) <a name="l00509"></a>00509 ->promoteBoolean(ri->boolean()|tt-><a class="code" href="classAudioType.html#a1cc9edd50c57622aa80e5c48bf67e66e" title="returns when a signal stands for a boolean value">boolean</a>()) <a name="l00510"></a>00510 ; <a name="l00511"></a>00511 <a name="l00512"></a>00512 <span class="comment">//cerr<<"Read Table type: "<<temp<<endl;</span> <a name="l00513"></a>00513 <a name="l00514"></a>00514 <a name="l00515"></a>00515 <span class="keywordflow">return</span> temp; <a name="l00516"></a>00516 <a name="l00517"></a>00517 <span class="comment">//return tt->content(); // pas completement correct !!!</span> <a name="l00518"></a>00518 <span class="comment">//return tt->content()->promoteVariability(ri->variability())</span> <a name="l00519"></a>00519 <span class="comment">// ->promoteComputability(ri->computability())</span> <a name="l00520"></a>00520 <span class="comment">//->promoteVectorability(ri->vectorability())</span> <a name="l00521"></a>00521 <span class="comment">// ->promoteBoolean(ri->boolean())</span> <a name="l00522"></a>00522 <span class="comment">// ;</span> <a name="l00523"></a>00523 } </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="aa041d1d56c608bb597a8c5800e315e4f"></a><!-- doxytag: member="sigtyperules.cpp::infereRecType" ref="aa041d1d56c608bb597a8c5800e315e4f" args="(Tree var, Tree body, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereRecType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>var</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>body</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of e recursive block by trying solutions of increasing generality. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00577">577</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtyperules_8cpp_source.html#l00117">addEnv()</a>, <a class="el" href="recursivness_8cpp_source.html#l00064">getRecursivness()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00560">initialRecType()</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00070">setSigType()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00578"></a>00578 { <a name="l00579"></a>00579 <a class="code" href="classP.html">Type</a> t0, t1; <a name="l00580"></a>00580 <a name="l00581"></a>00581 t1 = <a class="code" href="sigtyperules_8cpp.html#acb6b95bc1ea2aff2d7c2baa6ef018f3d" title="Compute an initial type solution for a recursive block.">initialRecType</a>(body); <a name="l00582"></a>00582 <span class="keywordflow">do</span> { <a name="l00583"></a>00583 t0 = t1; <a name="l00584"></a>00584 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(var, env, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>((<span class="keywordtype">void</span>*)t0)); <a name="l00585"></a>00585 t1 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(body, <a class="code" href="sigtyperules_8cpp.html#aff4086d2c051ecf8ce36a37e6faee53f" title="add a new binding to a type environment">addEnv</a>(var, t0, env)); <a name="l00586"></a>00586 } <span class="keywordflow">while</span> (t1 > t0); <a name="l00587"></a>00587 <a name="l00588"></a>00588 assert (t1 == t0); <a name="l00589"></a>00589 <a name="l00590"></a>00590 <span class="keywordflow">if</span> (<a class="code" href="recursivness_8cpp.html#a5e771832d204d89a67f42e4a0b9b15a5" title="Return the recursivness of a previously annotated signal.">getRecursivness</a>(body) == 1 || env == <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) { <a name="l00591"></a>00591 <a class="code" href="sigtyperules_8cpp.html#a54cf5041f97486308c49f551deb18b65" title="set the type annotation of sig">setSigType</a>(var, t1); <a name="l00592"></a>00592 <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(body, <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>); <a name="l00593"></a>00593 } <a name="l00594"></a>00594 <span class="keywordflow">return</span> t1; <a name="l00595"></a>00595 } </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="ab1fbe8c4735851f27be930e33a846599"></a><!-- doxytag: member="sigtyperules.cpp::infereSigType" ref="ab1fbe8c4735851f27be930e33a846599" args="(Tree sig, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereSigType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of a term according to its surrounding type environment. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal to aanlyze </td></tr> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the type of sig according to environment env </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00275">275</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtyperules_8cpp_source.html#l00261">arithmetic()</a>, <a class="el" href="sigtype_8hh_source.html#l00104">AudioType::boolean()</a>, <a class="el" href="sigtype_8hh_source.html#l00256">castInterval()</a>, <a class="el" href="sigtype_8cpp_source.html#l00249">checkInit()</a>, <a class="el" href="sigtype_8cpp_source.html#l00228">checkInt()</a>, <a class="el" href="sigtype_8hh_source.html#l00102">AudioType::computability()</a>, <a class="el" href="sigtype_8hh_source.html#l00248">floatCast()</a>, <a class="el" href="sigtype_8hh_source.html#l00106">AudioType::getInterval()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00547">infereDocAccessTblType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00526">infereDocConstantTblType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00533">infereDocWriteTblType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00630">infereFConstType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00601">infereFFType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00641">infereFVarType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00423">infereProjType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00483">infereReadTableType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00577">infereRecType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00446">infereWriteTableType()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00654">infereXType()</a>, <a class="el" href="sigtype_8hh_source.html#l00247">intCast()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="signals_8cpp_source.html#l00151">isProj()</a>, <a class="el" href="recursive-tree_8cpp_source.html#l00059">isRec()</a>, <a class="el" href="signals_8cpp_source.html#l00286">isSigAttach()</a>, <a class="el" href="signals_8cpp_source.html#l00126">isSigBinOp()</a>, <a class="el" href="signals_8cpp_source.html#l00199">isSigButton()</a>, <a class="el" href="signals_8cpp_source.html#l00205">isSigCheckbox()</a>, <a class="el" href="signals_8cpp_source.html#l00058">isSigDelay1()</a>, <a class="el" href="signals_8cpp_source.html#l00107">isSigDocAccessTbl()</a>, <a class="el" href="signals_8cpp_source.html#l00099">isSigDocConstantTbl()</a>, <a class="el" href="signals_8cpp_source.html#l00103">isSigDocWriteTbl()</a>, <a class="el" href="signals_8cpp_source.html#l00138">isSigFConst()</a>, <a class="el" href="signals_8cpp_source.html#l00133">isSigFFun()</a>, <a class="el" href="signals_8cpp_source.html#l00062">isSigFixDelay()</a>, <a class="el" href="signals_8cpp_source.html#l00187">isSigFloatCast()</a>, <a class="el" href="signals_8cpp_source.html#l00144">isSigFVar()</a>, <a class="el" href="signals_8cpp_source.html#l00091">isSigGen()</a>, <a class="el" href="signals_8cpp_source.html#l00274">isSigHBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00212">isSigHSlider()</a>, <a class="el" href="signals_8cpp_source.html#l00048">isSigInput()</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="signals_8cpp_source.html#l00184">isSigIntCast()</a>, <a class="el" href="signals_8cpp_source.html#l00252">isSigNumEntry()</a>, <a class="el" href="signals_8cpp_source.html#l00052">isSigOutput()</a>, <a class="el" href="signals_8cpp_source.html#l00066">isSigPrefix()</a>, <a class="el" href="signals_8cpp_source.html#l00077">isSigRDTbl()</a>, <a class="el" href="signals_8cpp_source.html#l00044">isSigReal()</a>, <a class="el" href="signals_8cpp_source.html#l00116">isSigSelect2()</a>, <a class="el" href="signals_8cpp_source.html#l00119">isSigSelect3()</a>, <a class="el" href="signals_8cpp_source.html#l00085">isSigTable()</a>, <a class="el" href="signals_8cpp_source.html#l00280">isSigVBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00232">isSigVSlider()</a>, <a class="el" href="signals_8cpp_source.html#l00081">isSigWRTbl()</a>, <a class="el" href="sigtype_8cpp_source.html#l00219">isSimpleType()</a>, <a class="el" href="sigtype_8hh_source.html#l00056">kComp</a>, <a class="el" href="sigtype_8hh_source.html#l00056">kExec</a>, <a class="el" href="binop_8hh_source.html#l00058">kGT</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="binop_8hh_source.html#l00058">kNE</a>, <a class="el" href="sigtype_8hh_source.html#l00054">kNum</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kReal</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kScal</a>, <a class="el" href="sigtype_8hh_source.html#l00057">kVect</a>, <a class="el" href="interval_8hh_source.html#l00039">interval::lo</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="symbol_8hh_source.html#l00098">name()</a>, <a class="el" href="sigtype_8hh_source.html#l00100">AudioType::nature()</a>, <a class="el" href="list_8cpp_source.html#l00154">print()</a>, <a class="el" href="interval_8hh_source.html#l00064">reunion()</a>, <a class="el" href="sigtype_8hh_source.html#l00249">sampCast()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, <a class="el" href="sigtype_8cpp_source.html#l00121">TGUI</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8cpp_source.html#l00260">tree2float()</a>, <a class="el" href="interval_8hh_source.html#l00038">interval::valid</a>, <a class="el" href="sigtype_8hh_source.html#l00101">AudioType::variability()</a>, and <a class="el" href="sigtype_8hh_source.html#l00103">AudioType::vectorability()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00184">getInferredType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00276"></a>00276 { <a name="l00277"></a>00277 <span class="keywordtype">int</span> i; <a name="l00278"></a>00278 <span class="keywordtype">double</span> r; <a name="l00279"></a>00279 <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> sel, s1, s2, s3, ff, id, ls, l, x, y, z, u, var, body, type, <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>, file; <a name="l00280"></a>00280 <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> label, cur, <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>, <a class="code" href="interval_8hh.html#a1c45761573e6cbc97cfacac78d905016">max</a>, step; <a name="l00281"></a>00281 <a name="l00282"></a>00282 <a name="l00283"></a>00283 <span class="keywordflow">if</span> ( <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(sig) ) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a6f5e7a77c81c28d84a8435e225b04e4b" title="Infere the type of an extended (primitive) block.">infereXType</a>(sig, env); <a name="l00284"></a>00284 <a name="l00285"></a>00285 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(sig, &i)) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>, <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a>, <a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da360460476ae5f48b0e6125c0b2e6bf73">kComp</a>, <a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>, <a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>(i)); <a name="l00286"></a>00286 <a name="l00287"></a>00287 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a305497ed8593020624204f9d359743f2">isSigReal</a>(sig, &r)) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06cabd8b038fc1f31f03f96a41107d3ac13d">kReal</a>, <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a>, <a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da360460476ae5f48b0e6125c0b2e6bf73">kComp</a>, <a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>, <a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>(r)); <a name="l00288"></a>00288 <a name="l00289"></a>00289 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a38254d67a0541d98c6097fd51b22ea45">isSigInput</a>(sig, &i)) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>(<a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06cabd8b038fc1f31f03f96a41107d3ac13d">kReal</a>, <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>, <a class="code" href="sigtype_8hh.html#a0411cd49bb5b71852cecd93bcbf0ca2da16e899f343f7478630c421804745bd95">kExec</a>, <a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac0cc86b199bf7e441423650c6e7e9118">kVect</a>, <a class="code" href="sigtype_8hh.html#a61dadd085c1777f559549e05962b2c9ea0136f5ab04e2f1d76afdb6b347b49059">kNum</a>, <a class="code" href="structinterval.html">interval</a>(-1,1)); <a name="l00290"></a>00290 <a name="l00291"></a>00291 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a1415deb58619ab50a536d7f2ce425f22">isSigOutput</a>(sig, &i, s1)) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a129e519d8ee39aa753cc6df4085e6c82">sampCast</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env)); <a name="l00292"></a>00292 <a name="l00293"></a>00293 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a0899d7e2a69a467b0dcf62242397367f">isSigDelay1</a>(sig, s1)) { <a name="l00294"></a>00294 <a class="code" href="classP.html">Type</a> t = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00295"></a>00295 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8hh.html#a129e519d8ee39aa753cc6df4085e6c82">sampCast</a>(t), <a class="code" href="interval_8hh.html#add8dd76587e1fc6361f39259a690f701">reunion</a>(t->getInterval(), <a class="code" href="structinterval.html">interval</a>(0,0))); <a name="l00296"></a>00296 } <a name="l00297"></a>00297 <a name="l00298"></a>00298 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a18895c816779682006a84aede438af29">isSigPrefix</a>(sig, s1, s2)) { <a name="l00299"></a>00299 <a class="code" href="classP.html">Type</a> t1 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00300"></a>00300 <a class="code" href="classP.html">Type</a> t2 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env); <a name="l00301"></a>00301 <a class="code" href="sigtype_8cpp.html#a69c0edc5ba42dd64e897a77765021258" title="verifie que t est connu a l&#39;initialisation">checkInit</a>(t1); <a name="l00302"></a>00302 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8hh.html#a129e519d8ee39aa753cc6df4085e6c82">sampCast</a>(t1|t2), <a class="code" href="interval_8hh.html#add8dd76587e1fc6361f39259a690f701">reunion</a>(t1->getInterval(), t2->getInterval())); <a name="l00303"></a>00303 } <a name="l00304"></a>00304 <a name="l00305"></a>00305 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#af55cdefee258834b3b8f6c070d4970c9">isSigFixDelay</a>(sig, s1, s2)) { <a name="l00306"></a>00306 <a class="code" href="classP.html">Type</a> t1 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00307"></a>00307 <a class="code" href="classP.html">Type</a> t2 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env); <a name="l00308"></a>00308 <a class="code" href="structinterval.html">interval</a> i = t2->getInterval(); <a name="l00309"></a>00309 <a name="l00310"></a>00310 <span class="comment">/* cerr << "for sig fix delay : s1 = " </span> <a name="l00311"></a>00311 <span class="comment"> << t1 << ':' << ppsig(s1) << ", s2 = " </span> <a name="l00312"></a>00312 <span class="comment"> << t2 << ':' << ppsig(s2) << endl; */</span> <a name="l00313"></a>00313 <span class="keywordflow">if</span> (!i.<a class="code" href="structinterval.html#a96c78d5d63b319bc354c0ba728305e68" title="true if it is a valid interval">valid</a>) { <a name="l00314"></a>00314 cerr << <span class="stringliteral">"ERROR : can't compute the min and max values of : "</span> << <a class="code" href="classppsig.html">ppsig</a>(s2) << endl; <a name="l00315"></a>00315 cerr << <span class="stringliteral">" used in delay expression : "</span> << <a class="code" href="classppsig.html">ppsig</a>(sig) << endl; <a name="l00316"></a>00316 cerr << <span class="stringliteral">" (probably a recursive signal)"</span> << endl; <a name="l00317"></a>00317 exit(1); <a name="l00318"></a>00318 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i.<a class="code" href="structinterval.html#a097d8cc2067534f1fe88d6a8386af0cd" title="minimal value">lo</a> < 0) { <a name="l00319"></a>00319 cerr << <span class="stringliteral">"ERROR : possible negative values of : "</span> << <a class="code" href="classppsig.html">ppsig</a>(s2) << endl; <a name="l00320"></a>00320 cerr << <span class="stringliteral">" used in delay expression : "</span> << <a class="code" href="classppsig.html">ppsig</a>(sig) << endl; <a name="l00321"></a>00321 cerr << <span class="stringliteral">" "</span> << i << endl; <a name="l00322"></a>00322 exit(1); <a name="l00323"></a>00323 } <a name="l00324"></a>00324 <a name="l00325"></a>00325 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8hh.html#a129e519d8ee39aa753cc6df4085e6c82">sampCast</a>(t1), <a class="code" href="interval_8hh.html#add8dd76587e1fc6361f39259a690f701">reunion</a>(t1->getInterval(), <a class="code" href="structinterval.html">interval</a>(0,0))); <a name="l00326"></a>00326 } <a name="l00327"></a>00327 <a name="l00328"></a>00328 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a8705584c3c319be54be73dc391d25634">isSigBinOp</a>(sig, &i, s1, s2)) { <a name="l00329"></a>00329 <span class="comment">//Type t = T(s1,env)|T(s2,env);</span> <a name="l00330"></a>00330 <a class="code" href="classP.html">Type</a> t1 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00331"></a>00331 <a class="code" href="classP.html">Type</a> t2 = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env); <a name="l00332"></a>00332 <a class="code" href="classP.html">Type</a> t3 = <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(t1 | t2, <a class="code" href="sigtyperules_8cpp.html#abfa55cc55df9ebf6398414825e7ce423">arithmetic</a>(i, t1->getInterval(), t2->getInterval())); <a name="l00333"></a>00333 <span class="comment">//cerr <<"type rule for : " << ppsig(sig) << " -> " << *t3 << endl;</span> <a name="l00334"></a>00334 <span class="comment">//return (!gVectorSwitch && (i>=kGT) && (i<=kNE)) ? intCast(t3) : t3; // for comparaison operation the result is int</span> <a name="l00335"></a>00335 <span class="keywordflow">return</span> ((i>=<a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04af173a32f5795cbb2a5925244957e6cfa">kGT</a>) && (i<=<a class="code" href="binop_8hh.html#abc6126af1d45847bc59afa0aa3216b04afab4db2de17aa5171d21f7083a22bfe1">kNE</a>)) ? <a class="code" href="sigtype_8hh.html#a6af0c2cc4dee601ecf1dd082f633f706">intCast</a>(t3) : t3; <span class="comment">// for comparaison operation the result is int</span> <a name="l00336"></a>00336 } <a name="l00337"></a>00337 <a name="l00338"></a>00338 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a3ef48f0da2ef5b8e3ee7371a1e4059ae">isSigIntCast</a>(sig, s1)) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a6af0c2cc4dee601ecf1dd082f633f706">intCast</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env)); <a name="l00339"></a>00339 <a name="l00340"></a>00340 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a52448156d86125bbc8de23d641217de2">isSigFloatCast</a>(sig, s1)) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a77cfb136d0b19316d3f95c700d4262f8">floatCast</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env)); <a name="l00341"></a>00341 <a name="l00342"></a>00342 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a7d60b2c9da70fb0a2edff9593d38c573">isSigFFun</a>(sig, ff, ls)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a7f060b1a31b1d21d0815b2e4347291a9" title="Infere the type of a foreign function call.">infereFFType</a>(ff,ls,env); <a name="l00343"></a>00343 <a name="l00344"></a>00344 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a71788aa9ccfc0aa598243fbef2a88f68">isSigFConst</a>(sig,type,name,file)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a171b0e69de84d9483d3d569d8cc23394" title="Infere the type of a foreign constant.">infereFConstType</a>(type); <a name="l00345"></a>00345 <a name="l00346"></a>00346 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a13d7a7178d98383c309b0e4a45dfc96b">isSigFVar</a>(sig,type,name,file)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a5c54e6ba99df9c7fcb72de627ddf7fd9" title="Infere the type of a foreign variable.">infereFVarType</a>(type); <a name="l00347"></a>00347 <a name="l00348"></a>00348 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a9cb8af593289d910a1f8ec8a9c8d880f">isSigButton</a>(sig)) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8cpp.html#a23c558594cc9063e0289e21dd4687fac">TGUI</a>,<a class="code" href="structinterval.html">interval</a>(0,1)); <a name="l00349"></a>00349 <a name="l00350"></a>00350 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a48996c1ce74258d499baae3d267078bc">isSigCheckbox</a>(sig)) <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8cpp.html#a23c558594cc9063e0289e21dd4687fac">TGUI</a>,<a class="code" href="structinterval.html">interval</a>(0,1)); <a name="l00351"></a>00351 <a name="l00352"></a>00352 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#aac990f39e6a1d50e8e1de3b6f7701cfe">isSigVSlider</a>(sig,label,cur,min,max,step)) <a name="l00353"></a>00353 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8cpp.html#a23c558594cc9063e0289e21dd4687fac">TGUI</a>,<a class="code" href="structinterval.html">interval</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(min),<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(max))); <a name="l00354"></a>00354 <a name="l00355"></a>00355 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#aaa72c718314a1ba2cee25a95c153e37d">isSigHSlider</a>(sig,label,cur,min,max,step)) <a name="l00356"></a>00356 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8cpp.html#a23c558594cc9063e0289e21dd4687fac">TGUI</a>,<a class="code" href="structinterval.html">interval</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(min),<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(max))); <a name="l00357"></a>00357 <a name="l00358"></a>00358 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#aa8476971aba67dfc3af7b5d11f974ef3">isSigNumEntry</a>(sig,label,cur,min,max,step)) <a name="l00359"></a>00359 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#a4a00d24cc30a4924d2df9b56d577bd16">castInterval</a>(<a class="code" href="sigtype_8cpp.html#a23c558594cc9063e0289e21dd4687fac">TGUI</a>,<a class="code" href="structinterval.html">interval</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(min),<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(max))); <a name="l00360"></a>00360 <a name="l00361"></a>00361 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a5acf9dd03d1d0032e9486867876f1806">isSigHBargraph</a>(sig, l, x, y, s1)) <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00362"></a>00362 <a name="l00363"></a>00363 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a667a345cf4efcba00fce5a06bc1e8299">isSigVBargraph</a>(sig, l, x, y, s1)) <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); <a name="l00364"></a>00364 <a name="l00365"></a>00365 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#ad717966fe25735c5cf799e04338192b4">isSigAttach</a>(sig, s1, s2)) { <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env); <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env); } <a name="l00366"></a>00366 <a name="l00367"></a>00367 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="recursive-tree_8cpp.html#a4cb44c6e41e21da830e748dc35f16ba5" title="is t a de Bruijn recursive tree">isRec</a>(sig, var, body)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#aa041d1d56c608bb597a8c5800e315e4f" title="Infere the type of e recursive block by trying solutions of increasing generality...">infereRecType</a>(sig, body, env); <a name="l00368"></a>00368 <a name="l00369"></a>00369 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a9b54e9177bb3726e06700649c3e5c05d">isProj</a>(sig, &i, s1)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a0bb436d7f6a74fec18be9fba6c308505" title="Infere the type of a projection (selection) of a tuplet element.">infereProjType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env),i,<a class="code" href="sigtype_8hh.html#abed82baf7f470b522273a3e37c24c600ac41deebf4ce901ce540736612292f579">kScal</a>); <a name="l00370"></a>00370 <a name="l00371"></a>00371 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#aa9b2ad7a65566fbc382d60e315b42740">isSigTable</a>(sig, <span class="keywordtype">id</span>, s1, s2)) { <a class="code" href="sigtype_8cpp.html#aebe495204f7e4e178cfb023eb03c3e24" title="verifie que t est entier">checkInt</a>(<a class="code" href="sigtype_8cpp.html#a69c0edc5ba42dd64e897a77765021258" title="verifie que t est connu a l&#39;initialisation">checkInit</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env))); <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classTableType.html" title="The type of a table of audio data.">TableType</a>(<a class="code" href="sigtype_8cpp.html#a69c0edc5ba42dd64e897a77765021258" title="verifie que t est connu a l&#39;initialisation">checkInit</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env))); } <a name="l00372"></a>00372 <a name="l00373"></a>00373 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#ab5b22110acbd38b7d4634dc94bcc8d22">isSigWRTbl</a>(sig, <span class="keywordtype">id</span>, s1, s2, s3)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a199bccaf72659bb6c895f7ea2c280bff" title="Infere the type of the result of writing into a table.">infereWriteTableType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s3,env)); <a name="l00374"></a>00374 <a name="l00375"></a>00375 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a9d9cbd375c200fa4e666de6ffb72dbca">isSigRDTbl</a>(sig, s1, s2)) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a3c9524550f465657525f0caf16d865c7" title="Infere the type of the result of reading a table.">infereReadTableType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env)); <a name="l00376"></a>00376 <a name="l00377"></a>00377 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a771720237ca174a55a6823cc6623d602">isSigGen</a>(sig, s1)) <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,<a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>); <a name="l00378"></a>00378 <a name="l00379"></a>00379 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a95620993ef284f3e29f20ebcc3b0a08e">isSigDocConstantTbl</a>(sig, x, y) ) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a1b4fa0bb66e5f8b7723c8cfeb72d251e">infereDocConstantTblType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(x,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(y,env)); <a name="l00380"></a>00380 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a4d843f58a403cb0802c2255489977396">isSigDocWriteTbl</a>(sig,x,y,z,u) ) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#a1ce76d7934a129ca0233ad4dd8202318">infereDocWriteTblType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(x,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(y,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(z,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(u,env)); <a name="l00381"></a>00381 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#aec3b01f2f3ae693b4422142a22e4d0af">isSigDocAccessTbl</a>(sig, x, y) ) <span class="keywordflow">return</span> <a class="code" href="sigtyperules_8cpp.html#ae477ac19d25a9667c6d6bfa9d186d5cf">infereDocAccessTblType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(x,env), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(y,env)); <a name="l00382"></a>00382 <a name="l00383"></a>00383 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a55f14d5c4b5bc07285840f93d380b422">isSigSelect2</a>(sig,sel,s1,s2)) { <a name="l00384"></a>00384 <a name="l00385"></a>00385 <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a> *st1, *st2, *stsel; <a name="l00386"></a>00386 <a name="l00387"></a>00387 st1 = <a class="code" href="sigtype_8cpp.html#ab37344c874f1fa0e61ca34cab640e7f5">isSimpleType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env)); <a name="l00388"></a>00388 st2 = <a class="code" href="sigtype_8cpp.html#ab37344c874f1fa0e61ca34cab640e7f5">isSimpleType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env)); <a name="l00389"></a>00389 stsel = <a class="code" href="sigtype_8cpp.html#ab37344c874f1fa0e61ca34cab640e7f5">isSimpleType</a>(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(sel,env)); <a name="l00390"></a>00390 <a name="l00391"></a>00391 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>( st1-><a class="code" href="classAudioType.html#ac4b23dd240ebd38c365d7b75cd075a4d" title="returns the kind of values (integre or floating point)">nature</a>()|st2-><a class="code" href="classAudioType.html#ac4b23dd240ebd38c365d7b75cd075a4d" title="returns the kind of values (integre or floating point)">nature</a>(), <a name="l00392"></a>00392 st1-><a class="code" href="classAudioType.html#a277c842d4e013df519b0cfc61e9729a2" title="returns how fast values change (constant, by blocks, by samples)">variability</a>()|st2-><a class="code" href="classAudioType.html#a277c842d4e013df519b0cfc61e9729a2" title="returns how fast values change (constant, by blocks, by samples)">variability</a>()|stsel-><a class="code" href="classAudioType.html#a277c842d4e013df519b0cfc61e9729a2" title="returns how fast values change (constant, by blocks, by samples)">variability</a>(), <a name="l00393"></a>00393 st1-><a class="code" href="classAudioType.html#a7a0713fc2daba47c0c307fa63a3f4ed6" title="returns when values are available (compilation, initialisation, execution)">computability</a>()|st2-><a class="code" href="classAudioType.html#a7a0713fc2daba47c0c307fa63a3f4ed6" title="returns when values are available (compilation, initialisation, execution)">computability</a>()|stsel-><a class="code" href="classAudioType.html#a7a0713fc2daba47c0c307fa63a3f4ed6" title="returns when values are available (compilation, initialisation, execution)">computability</a>(), <a name="l00394"></a>00394 st1-><a class="code" href="classAudioType.html#affb91ae3491bdcfb94f0a00995e6f0e3" title="returns when a signal can be vectorized">vectorability</a>()|st2-><a class="code" href="classAudioType.html#affb91ae3491bdcfb94f0a00995e6f0e3" title="returns when a signal can be vectorized">vectorability</a>()|stsel-><a class="code" href="classAudioType.html#affb91ae3491bdcfb94f0a00995e6f0e3" title="returns when a signal can be vectorized">vectorability</a>(), <a name="l00395"></a>00395 st1-><a class="code" href="classAudioType.html#a1cc9edd50c57622aa80e5c48bf67e66e" title="returns when a signal stands for a boolean value">boolean</a>()|st2-><a class="code" href="classAudioType.html#a1cc9edd50c57622aa80e5c48bf67e66e" title="returns when a signal stands for a boolean value">boolean</a>(), <a name="l00396"></a>00396 <a class="code" href="interval_8hh.html#add8dd76587e1fc6361f39259a690f701">reunion</a>(st1-><a class="code" href="classAudioType.html#ac86c1c2c04b6e7f74fed7c727b68619e" title="returns the interval (min dn max values) of a signal">getInterval</a>(), st2-><a class="code" href="classAudioType.html#ac86c1c2c04b6e7f74fed7c727b68619e" title="returns the interval (min dn max values) of a signal">getInterval</a>()) <a name="l00397"></a>00397 ); <a name="l00398"></a>00398 <a name="l00399"></a>00399 <span class="comment">//return T(sel,env)|T(s1,env)|T(s2,env);</span> <a name="l00400"></a>00400 <a name="l00401"></a>00401 } <a name="l00402"></a>00402 <a name="l00403"></a>00403 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a33cf5ac61f2ad8244394ce1e59914bbc">isSigSelect3</a>(sig,sel,s1,s2,s3)) { <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(sel,env)|<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s1,env)|<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s2,env)|<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(s3,env); } <a name="l00404"></a>00404 <a name="l00405"></a>00405 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(sig)) <a name="l00406"></a>00406 { <a name="l00407"></a>00407 vector<Type> v; <a name="l00408"></a>00408 <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(sig)) { v.push_back(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(sig),env)); sig = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(sig); } <a name="l00409"></a>00409 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classTupletType.html" title="The type of a tuplet of data.">TupletType</a>(v); <a name="l00410"></a>00410 } <a name="l00411"></a>00411 <a name="l00412"></a>00412 <span class="comment">// unrecognized signal here</span> <a name="l00413"></a>00413 fprintf(stderr, <span class="stringliteral">"ERROR infering signal type : unrecognized signal : "</span>); <a class="code" href="list_8cpp.html#a850f2e459a901e0c9908d3a3a54b306e">print</a>(sig, stderr); fprintf(stderr, <span class="stringliteral">"\n"</span>); <a name="l00414"></a>00414 exit(1); <a name="l00415"></a>00415 <span class="keywordflow">return</span> 0; <a name="l00416"></a>00416 } </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="a199bccaf72659bb6c895f7ea2c280bff"></a><!-- doxytag: member="sigtyperules.cpp::infereWriteTableType" ref="a199bccaf72659bb6c895f7ea2c280bff" args="(Type tbl, Type wi, Type wd)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereWriteTableType </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>tbl</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>wi</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>wd</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of the result of writing into a table. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00446">446</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtype_8hh_source.html#l00298">TableType::content()</a>, <a class="el" href="sigtype_8cpp_source.html#l00219">isSimpleType()</a>, <a class="el" href="sigtype_8cpp_source.html#l00220">isTableType()</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, and <a class="el" href="sigtype_8hh_source.html#l00100">AudioType::nature()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00447"></a>00447 { <a name="l00448"></a>00448 <a class="code" href="classTableType.html" title="The type of a table of audio data.">TableType</a>* tt = <a class="code" href="sigtype_8cpp.html#ac8b4c7377bb99f19596db76c5a674d03">isTableType</a>(tbl); <a name="l00449"></a>00449 <span class="keywordflow">if</span> (tt == 0) { <a name="l00450"></a>00450 cerr << <span class="stringliteral">"ERROR infering write table type, wrong table type : "</span> << tbl << endl; <a name="l00451"></a>00451 exit(1); <a name="l00452"></a>00452 } <a name="l00453"></a>00453 <a class="code" href="classSimpleType.html" title="The type of a simple numeric audio signal.">SimpleType</a>* st = <a class="code" href="sigtype_8cpp.html#ab37344c874f1fa0e61ca34cab640e7f5">isSimpleType</a>(wi); <a name="l00454"></a>00454 <span class="keywordflow">if</span> (st == 0 || st-><a class="code" href="classAudioType.html#ac4b23dd240ebd38c365d7b75cd075a4d" title="returns the kind of values (integre or floating point)">nature</a>() > <a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>) { <a name="l00455"></a>00455 cerr << <span class="stringliteral">"ERROR infering write table type, wrong write index type : "</span> << wi << endl; <a name="l00456"></a>00456 exit(1); <a name="l00457"></a>00457 } <a name="l00458"></a>00458 <a name="l00459"></a>00459 <span class="keywordtype">int</span> n = tt-><a class="code" href="classAudioType.html#ac4b23dd240ebd38c365d7b75cd075a4d" title="returns the kind of values (integre or floating point)">nature</a>(); <a name="l00460"></a>00460 <span class="keywordtype">int</span> v = wi->variability() | wd->variability(); <a name="l00461"></a>00461 <span class="keywordtype">int</span> c = wi->computability() | wd->computability(); <a name="l00462"></a>00462 <span class="keywordtype">int</span> vec = wi->vectorability() | wd->vectorability(); <a name="l00463"></a>00463 <a name="l00464"></a>00464 <span class="comment">//Type temp = tt->content();</span> <a name="l00465"></a>00465 <span class="comment">//cerr<<"Write table content: "<<temp<<endl;</span> <a name="l00466"></a>00466 <a name="l00467"></a>00467 <span class="comment">//Type tempbis = new TableType(/*tt->content()*/temp, v, c);</span> <a name="l00468"></a>00468 <span class="comment">//cerr<<"Write table ap� promotion: "<<tempbis<<endl;</span> <a name="l00469"></a>00469 <a name="l00470"></a>00470 <span class="comment">//return tempbis;</span> <a name="l00471"></a>00471 <a name="l00472"></a>00472 <span class="comment">//return new TableType(/*tt->content()*/temp, v, c);</span> <a name="l00473"></a>00473 <a name="l00474"></a>00474 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classTableType.html" title="The type of a table of audio data.">TableType</a>(tt-><a class="code" href="classTableType.html#af3800dbe6a31d62ea4fd2ee7fb928ade" title="return the type of data store in the table">content</a>(), n, v, c, vec); <a name="l00475"></a>00475 <a name="l00476"></a>00476 } </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="a6f5e7a77c81c28d84a8435e225b04e4b"></a><!-- doxytag: member="sigtyperules.cpp::infereXType" ref="a6f5e7a77c81c28d84a8435e225b04e4b" args="(Tree sig, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> infereXType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Infere the type of an extended (primitive) block. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00654">654</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="tree_8hh_source.html#l00142">CTree::arity()</a>, <a class="el" href="tree_8hh_source.html#l00143">CTree::branch()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, <a class="el" href="classxtended.html#a33f973979adf2dd4f7287590535e3c9f">xtended::infereSigType()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00275">infereSigType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00655"></a>00655 { <a name="l00656"></a>00656 <span class="comment">//cerr << "infereXType :" << endl;</span> <a name="l00657"></a>00657 <span class="comment">//cerr << "infereXType of " << *sig << endl;</span> <a name="l00658"></a>00658 <a class="code" href="classxtended.html">xtended</a>* p = (<a class="code" href="classxtended.html">xtended</a>*) <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(sig); <a name="l00659"></a>00659 vector<Type> vt; <a name="l00660"></a>00660 <a name="l00661"></a>00661 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < sig-><a class="code" href="classCTree.html#a68f2be5e845407bc956a2893fe6f0d03" title="return the number of branches (subtrees) of a tree">arity</a>(); i++) vt.push_back(<a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(sig-><a class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5" title="return the ith branch (subtree) of a tree">branch</a>(i), env)); <a name="l00662"></a>00662 <span class="keywordflow">return</span> p-><a class="code" href="classxtended.html#a33f973979adf2dd4f7287590535e3c9f">infereSigType</a>(vt); <a name="l00663"></a>00663 } </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="acb6b95bc1ea2aff2d7c2baa6ef018f3d"></a><!-- doxytag: member="sigtyperules.cpp::initialRecType" ref="acb6b95bc1ea2aff2d7c2baa6ef018f3d" args="(Tree t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classP.html">Type</a> initialRecType </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> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compute an initial type solution for a recursive block. </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00560">560</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, and <a class="el" href="sigtype_8cpp_source.html#l00124">TREC</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00577">infereRecType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00561"></a>00561 { <a name="l00562"></a>00562 <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(t)) { <a name="l00563"></a>00563 vector<Type> v; <a name="l00564"></a>00564 <span class="keywordflow">do</span> { v.push_back(<a class="code" href="sigtyperules_8cpp.html#acb6b95bc1ea2aff2d7c2baa6ef018f3d" title="Compute an initial type solution for a recursive block.">initialRecType</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(t))); t = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(t); } <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(t)); <a name="l00565"></a>00565 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classTupletType.html" title="The type of a tuplet of data.">TupletType</a>(v); <a name="l00566"></a>00566 } <span class="keywordflow">else</span> { <a name="l00567"></a>00567 <span class="keywordflow">return</span> <a class="code" href="sigtype_8cpp.html#ade278a93e3fbeed9cb7216e9623ecd08">TREC</a>; <a name="l00568"></a>00568 } <a name="l00569"></a>00569 } </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="abccc3f89cdb1eea6b39f6bab51bc34c8"></a><!-- doxytag: member="sigtyperules.cpp::isInEnv" ref="abccc3f89cdb1eea6b39f6bab51bc34c8" args="(Tree env, Tree var, Type &val)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool isInEnv </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>env</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>var</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> & </td> <td class="paramname"> <em>val</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>search for the type associated to a variable </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment (a list of pair(var,type)) </td></tr> <tr><td valign="top"></td><td valign="top"><em>var</em> </td><td>the variable to search </td></tr> <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td>where to put his type </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true when var has an associated type in env </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00151">151</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, and <a class="el" href="tree_8cpp_source.html#l00302">tree2ptr()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00184">getInferredType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00152"></a>00152 { <a name="l00153"></a>00153 <span class="keywordflow">while</span> ( (env != <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) && (<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(env)) != var) ) { env = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(env); } <a name="l00154"></a>00154 <span class="keywordflow">if</span> (env == <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00155"></a>00155 val = <a class="code" href="sigtype_8hh.html#acf4688369b8733cd10ae18fb50eaec6e">Type</a>((<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*)<a class="code" href="tree_8cpp.html#ad1d692b2c0a86d485a3d096af07632e6" title="if t has a node of type ptr, return it otherwise error">tree2ptr</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(env)))); <a name="l00156"></a>00156 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00157"></a>00157 } </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="ab06de66b22233b4a358ee6642358b2d5"></a><!-- doxytag: member="sigtyperules.cpp::searchEnv" ref="ab06de66b22233b4a358ee6642358b2d5" args="(Tree env, Tree var)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classP.html">Type</a> searchEnv </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>env</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>var</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>search for the type associated to a variable </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment </td></tr> <tr><td valign="top"></td><td valign="top"><em>var</em> </td><td>the variable to search </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the type associated to var in env </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00130">130</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00154">print()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, and <a class="el" href="tree_8cpp_source.html#l00302">tree2ptr()</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="l00131"></a>00131 { <a name="l00132"></a>00132 <span class="keywordflow">while</span> ( (env != <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) && (<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(env)) != var) ) { env = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(env); } <a name="l00133"></a>00133 <span class="keywordflow">if</span> (env == <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>) { <a name="l00134"></a>00134 cerr << <span class="stringliteral">"Problem in searchEnv "</span>; <a class="code" href="list_8cpp.html#a850f2e459a901e0c9908d3a3a54b306e">print</a>(var, stderr); <a name="l00135"></a>00135 cerr << <span class="stringliteral">" was not found"</span> << endl; <a name="l00136"></a>00136 assert(env != <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>); <span class="comment">// we should have found the data</span> <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="keywordflow">return</span> <a class="code" href="sigtype_8hh.html#acf4688369b8733cd10ae18fb50eaec6e">Type</a>((<a class="code" href="classAudioType.html" title="The Root class for all audio data types.">AudioType</a>*)<a class="code" href="tree_8cpp.html#ad1d692b2c0a86d485a3d096af07632e6" title="if t has a node of type ptr, return it otherwise error">tree2ptr</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(env)))); <a name="l00140"></a>00140 } </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="a54cf5041f97486308c49f551deb18b65"></a><!-- doxytag: member="sigtyperules.cpp::setSigType" ref="a54cf5041f97486308c49f551deb18b65" args="(Tree sig, Type t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setSigType </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>t</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>set the type annotation of sig </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal we want to type </td></tr> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>the type of the signal </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00070">70</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="tree_8hh_source.html#l00154">CTree::setType()</a>.</p> <p>Referenced by <a class="el" href="sigtyperules_8cpp_source.html#l00184">getInferredType()</a>, and <a class="el" href="sigtyperules_8cpp_source.html#l00577">infereRecType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00071"></a>00071 { <a name="l00072"></a>00072 <span class="comment">//cerr << "setSigType(" << *sig << ", " << t << ")" << endl;</span> <a name="l00073"></a>00073 <span class="comment">//setProperty(sig, TYPEPROPERTY, tree((void*)t));</span> <a name="l00074"></a>00074 sig-><a class="code" href="classCTree.html#ac8a19f4ef59fae1449e60dbd990eb90f">setType</a>(t); <a name="l00075"></a>00075 } </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="ad57cbb3235b0de80fb7a6634a0e6899b"></a><!-- doxytag: member="sigtyperules.cpp::T" ref="ad57cbb3235b0de80fb7a6634a0e6899b" args="(Tree term, Tree env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classP.html">Type</a> T </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>term</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>env</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Shortcut to getSigType, retrieve or infere the type of a term according to its surrounding type environment. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal to analyze </td></tr> <tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>the type environment </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the type of sig according to environment env </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="sigtyperules_8hh.html#a529976a47185a443101cba19600a6e6a" title="retrieve the type annotation of sig">getSigType</a> </dd></dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00218">218</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtyperules_8cpp_source.html#l00184">getInferredType()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00219"></a>00219 { <a name="l00220"></a>00220 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a83a7b8def43c40265adaf84524cd1b4e" title="Retrieve or infere the type of a term according to its surrounding type environment...">getInferredType</a>(term, env); <a name="l00221"></a>00221 <span class="keywordflow">return</span> t; <a name="l00222"></a>00222 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a85dbc6a3f96f643e82a0b45d785ce341"></a><!-- doxytag: member="sigtyperules.cpp::typeAnnotation" ref="a85dbc6a3f96f643e82a0b45d785ce341" args="(Tree sig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void typeAnnotation </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>fully annotate every subtree of term with type information </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal term tree to annotate </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00171">171</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> <p>References <a class="el" href="sigtyperules_8cpp_source.html#l00184">getInferredType()</a>.</p> <p>Referenced by <a class="el" href="doc__compile_8cpp_source.html#l00091">DocCompiler::annotate()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00096">ScalarCompiler::prepare()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00113">ScalarCompiler::prepare2()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00172"></a>00172 { <a name="l00173"></a>00173 <a class="code" href="sigtyperules_8cpp.html#a83a7b8def43c40265adaf84524cd1b4e" title="Retrieve or infere the type of a term according to its surrounding type environment...">getInferredType</a>(sig, <a class="code" href="sigtyperules_8cpp.html#a7d5c3fa7ca1a87bd549f9d432a20b201" title="The empty type environment (also property key for closed term type).">NULLENV</a>); <a name="l00174"></a>00174 } </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> <hr/><h2>Variable Documentation</h2> <a class="anchor" id="a7d5c3fa7ca1a87bd549f9d432a20b201"></a><!-- doxytag: member="sigtyperules.cpp::NULLENV" ref="a7d5c3fa7ca1a87bd549f9d432a20b201" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> <a class="el" href="sigtyperules_8hh.html#a7d5c3fa7ca1a87bd549f9d432a20b201">NULLENV</a> = tree(symbol("NullEnv"))</td> </tr> </table> </div> <div class="memdoc"> <p>The empty type environment (also property key for closed term type). </p> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00106">106</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> </div> </div> <a class="anchor" id="adad99b2ed558ba9368d1000c3a0d856b"></a><!-- doxytag: member="sigtyperules.cpp::TYPEPROPERTY" ref="adad99b2ed558ba9368d1000c3a0d856b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> <a class="el" href="sigtyperules_8cpp.html#adad99b2ed558ba9368d1000c3a0d856b">TYPEPROPERTY</a> = tree(symbol("TypeProperty"))</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sigtyperules_8cpp_source.html#l00063">63</a> of file <a class="el" href="sigtyperules_8cpp_source.html">sigtyperules.cpp</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:15 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>