occurences.cpp File Reference

#include <assert.h>
#include <stdlib.h>
#include "recursivness.hh"
#include "occurences.hh"
#include "sigtype.hh"
#include "sigtyperules.hh"
#include <iostream>
Include dependency graph for occurences.cpp:

Go to the source code of this file.

Functions

static int xVariability (int v, int r)
 Extended Variability with recursiveness indication.
static int position (Tree env, Tree t, int p)
 return the position of a signal in the current recursive environment

Function Documentation

static int position ( Tree  env,
Tree  t,
int  p 
) [static]

return the position of a signal in the current recursive environment

Parameters:
env the current recursive environment of the signal
t signal we want to know the position
Returns:
the position in the recursive environment

Definition at line 168 of file occurences.cpp.

References hd(), isNil(), and tl().

00169 {
00170     if (isNil(env)) return 0;   // was not in the environment
00171     if (hd(env) == t) return p;
00172     else return position (tl(env), t, p+1);
00173 }

Here is the call graph for this function:

static int xVariability ( int  v,
int  r 
) [static]

Extended Variability with recursiveness indication.

Definition at line 14 of file occurences.cpp.

References min().

Referenced by Occurences::incOccurences().

00015 {
00016     //cerr << "xVariability (" << v << ", " <<  r << ")" << endl;
00017     //assert (v < 3);               // kKonst=0, kBlock=1, kSamp=2
00018     //assert(r==0 | v==2);
00019     if (r>1) r=1;
00020     return min(3, v + r);
00021 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Tue Aug 10 08:04:14 2010 for FAUST compiler by  doxygen 1.6.3