FAUST compiler  0.9.9.6b8
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DocCompiler Class Reference

Compile a list of FAUST signals into a list of LaTeX formulas. More...

#include <doc_compile.hh>

Collaboration diagram for DocCompiler:
Collaboration graph
[legend]

Public Member Functions

 DocCompiler (int numInputs, int numOutputs)
 
 DocCompiler (Lateq *k, int priority)
 
 ~DocCompiler ()
 
LateqcompileLateq (Tree L, Lateq *compiledEqn)
 
Tree annotate (Tree L0)
 
LateqgetLateq ()
 
void setDescription (Description *descr)
 
DescriptiongetDescription ()
 

Protected Member Functions

string CS (Tree sig, int priority)
 Compile a signal. More...
 
string generateCode (Tree sig, int priority)
 Main code generator dispatch. More...
 
string generateCacheCode (Tree sig, const string &exp)
 
string generateVariableStore (Tree sig, const string &exp)
 
string getFreshID (const string &prefix)
 
bool getCompiledExpression (Tree sig, string &name)
 Test if a signal is already compiled. More...
 
string setCompiledExpression (Tree sig, const string &name)
 Set the string of a compiled expression is already compiled. More...
 
void setVectorNameProperty (Tree sig, const string &vecname)
 Set the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. More...
 
bool getVectorNameProperty (Tree sig, string &vecname)
 Get the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. More...
 
int getSharingCount (Tree t)
 
void setSharingCount (Tree t, int count)
 
void sharingAnalysis (Tree t)
 
void sharingAnnotation (int vctxt, Tree t)
 
bool isShortEnough (string &s, unsigned int max)
 
string generateXtended (Tree sig, int priority)
 retrieve the type annotation of sig More...
 
string generateFixDelay (Tree sig, Tree arg, Tree size, int priority)
 Generate code for accessing a delayed signal. More...
 
string generatePrefix (Tree sig, Tree x, Tree e, int priority)
 Generate LaTeX code for "prefix", a 1­sample-delay explicitely initialized. More...
 
string generateIota (Tree sig, Tree arg)
 Generate a "iota" time function, n-cyclical. More...
 
string generateBinOp (Tree sig, int opcode, Tree arg1, Tree arg2, int priority)
 
string generateFFun (Tree sig, Tree ff, Tree largs, int priority)
 
string generateInput (Tree sig, const string &idx)
 
string generateOutput (Tree sig, const string &idx, const string &arg1)
 Unused for the moment ! More...
 
string generateDocConstantTbl (Tree sig, Tree size, Tree content)
 Generate the equation of a constant table (its content is time constant). More...
 
string generateDocWriteTbl (Tree sig, Tree size, Tree content, Tree widx, Tree wsig)
 Generate the equation of a write table, which content is time dependent. More...
 
string generateDocAccessTbl (Tree sig, Tree tbl, Tree ridx)
 Generate the equation of a write table, which content is time dependent. More...
 
string generateSelect2 (Tree sig, Tree sel, Tree s1, Tree s2, int priority)
 Generate a select2 code. More...
 
string generateSelect3 (Tree sig, Tree sel, Tree s1, Tree s2, Tree s3, int priority)
 Generate a select3 code. More...
 
string generateRecProj (Tree sig, Tree exp, int i, int priority)
 Generate code for a projection of a group of mutually recursive definitions. More...
 
void generateRec (Tree sig, Tree var, Tree le, int priority)
 Generate code for a group of mutually recursive definitions. More...
 
string generateIntCast (Tree sig, Tree x, int priority)
 
string generateFloatCast (Tree sig, Tree x, int priority)
 Don't generate float cast ! More...
 
string generateButton (Tree sig, Tree label)
 
string generateCheckbox (Tree sig, Tree label)
 
string generateVSlider (Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
 
string generateHSlider (Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
 
string generateNumEntry (Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
 
string generateVBargraph (Tree sig, Tree label, Tree min, Tree max, const string &exp)
 
string generateHBargraph (Tree sig, Tree label, Tree min, Tree max, const string &exp)
 
string generateAttach (Tree sig, Tree x, Tree y, int priority)
 
string generateNumber (Tree sig, const string &exp)
 
string generateFConst (Tree sig, const string &file, const string &name)
 
string generateFVar (Tree sig, const string &file, const string &name)
 
string generateDelayVec (Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
 Generate code for the delay mecchanism. More...
 
string generateDelayVecNoTemp (Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
 Generate code for the delay mecchanism without using temporary variables. More...
 
void generateDelayLine (const string &ctype, const string &vname, int mxd, const string &exp)
 Generate code for the delay mecchanism without using temporary variables. More...
 
void getTypedNames (Type t, const string &prefix, string &ctype, string &vname)
 
void printGCCall (Tree sig, const string &calledFunction)
 Print calling information of generateCode, for debug purposes. More...
 
void getUIDocInfos (Tree path, string &label, string &unit)
 Get information on a user interface element for documentation. More...
 
string getUIDir (Tree pathname)
 Get the directory of a user interface element. More...
 
string prepareBinaryUI (const string &name, Tree pathname)
 Prepare binary user interface elements (button, checkbox). More...
 
string prepareIntervallicUI (const string &name, Tree path, Tree tcur, Tree tmin, Tree tmax)
 Prepare "intervallic" user interface elements (sliders, nentry). More...
 

Protected Attributes

property< string > fCompileProperty
 
property< string > fVectorProperty
 
LateqfLateq
 
DescriptionfDescription
 
Tree fSharingKey
 
OccMarkup fOccMarkup
 
int fPriority
 math priority context More...
 

Static Protected Attributes

static map< string, int > fIDCounters
 

Detailed Description

Compile a list of FAUST signals into a list of LaTeX formulas.

Definition at line 48 of file doc_compile.hh.

Constructor & Destructor Documentation

DocCompiler::DocCompiler ( int  numInputs,
int  numOutputs 
)
inline

Definition at line 66 of file doc_compile.hh.

67  :
68  fLateq(new Lateq(numInputs, numOutputs)),
69  fDescription(0),
70  fPriority(0)
71  {}
Description * fDescription
Definition: doc_compile.hh:56
Definition: lateq.hh:56
int fPriority
math priority context
Definition: doc_compile.hh:61
Lateq * fLateq
Definition: doc_compile.hh:55
DocCompiler::DocCompiler ( Lateq k,
int  priority 
)
inline

Definition at line 73 of file doc_compile.hh.

74  :
75  fLateq(k),
76  fDescription(0),
77  fPriority(priority)
78  {}
Description * fDescription
Definition: doc_compile.hh:56
int fPriority
math priority context
Definition: doc_compile.hh:61
Lateq * fLateq
Definition: doc_compile.hh:55
DocCompiler::~DocCompiler ( )
inline

Definition at line 80 of file doc_compile.hh.

81  {}

Member Function Documentation

Tree DocCompiler::annotate ( Tree  L0)

Definition at line 88 of file doc_compile.cpp.

References fOccMarkup, OccMarkup::mark(), recursivnessAnnotation(), sharingAnalysis(), and typeAnnotation().

Referenced by annotateSuperList().

89 {
90  recursivnessAnnotation(LS); // Annotate LS with recursivness information
91  typeAnnotation(LS); // Annotate LS with type information
92  sharingAnalysis(LS); // annotate LS with sharing count
93  fOccMarkup.mark(LS); // annotate LS with occurences analysis
94 
95  return LS;
96 }
void sharingAnalysis(Tree t)
Definition: doc_sharing.cpp:96
void mark(Tree root)
start markup of root tree with new unique key
Definition: occurences.cpp:63
void typeAnnotation(Tree sig)
Fully annotate every subtree of term with type information.
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
void recursivnessAnnotation(Tree sig)
Annotate a signal with recursivness.

Here is the call graph for this function:

Here is the caller graph for this function:

Lateq * DocCompiler::compileLateq ( Tree  L,
Lateq compiledEqn 
)

< Dynamic field !

Definition at line 102 of file doc_compile.cpp.

References Lateq::addOutputSigFormula(), CS(), docT(), fLateq, gDocNoticeFlagMap, getFreshID(), getSigNickname(), hd(), isList(), Lateq::outputs(), subst(), tl(), and tree2str().

Referenced by mapCompileDocEqnSigs().

103 {
104  //cerr << "Documentator : compileLateq : L = "; printSignal(L, stdout, 0); cerr << endl;
105 
106  fLateq = compiledEqn;
107  int priority = 0;
108 
109  for (int i = 0; isList(L); L = tl(L), i++) {
110  Tree sig = hd(L);
111  Tree id;
112  if(getSigNickname(sig, id)) {
113  //cerr << "Documentator : compileLateq : NICKNAMEPROPERTY = " << tree2str(id) << endl;
114  fLateq->addOutputSigFormula(subst("$0(t) = $1", tree2str(id), CS(sig, priority), docT(i)));
115  } else {
116  //cerr << "Documentator : compileLateq : NO NICKNAMEPROPERTY" << endl;
117  if (fLateq->outputs() == 1) {
118  fLateq->addOutputSigFormula(subst("y(t) = $0", CS(sig, priority)));
119  gDocNoticeFlagMap["outputsig"] = true;
120  } else {
121  fLateq->addOutputSigFormula(subst("$0(t) = $1", getFreshID("y"), CS(sig, priority)));
122  gDocNoticeFlagMap["outputsigs"] = true;
123  }
124  }
125  }
126  return fLateq;
127 }
string docT(char *c)
Definition: doc_Text.cpp:77
string CS(Tree sig, int priority)
Compile a signal.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree hd(Tree l)
Definition: list.hh:133
bool getSigNickname(Tree t, Tree &id)
Get the nickname property of a signal.
Definition: names.cpp:122
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
bool isList(Tree l)
Definition: list.hh:138
int outputs() const
Definition: lateq.hh:83
Lateq * fLateq
Definition: doc_compile.hh:55
void addOutputSigFormula(const string &str)
Definition: lateq.hh:76
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72
Tree tl(Tree l)
Definition: list.hh:134
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Definition: tree.cpp:278

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::CS ( Tree  sig,
int  priority 
)
protected

Compile a signal.

Parameters
sigthe signal expression to compile.
Returns
the C code translation of sig as a string

Definition at line 165 of file doc_compile.cpp.

References generateCode(), getCompiledExpression(), and setCompiledExpression().

Referenced by compileLateq(), generateAttach(), generateBinOp(), generateCode(), generateDocAccessTbl(), generateDocConstantTbl(), generateDocWriteTbl(), generateFFun(), generateFixDelay(), generateFloatCast(), generateIntCast(), generatePrefix(), generateRec(), generateSelect2(), generateSelect3(), and generateXtended().

166 {
167  string code;
168 
169  if (!getCompiledExpression(sig, code)) { // not compiled yet.
170  code = generateCode(sig, priority);
171  setCompiledExpression(sig, code);
172  }
173  return code;
174 }
string setCompiledExpression(Tree sig, const string &name)
Set the string of a compiled expression is already compiled.
string generateCode(Tree sig, int priority)
Main code generator dispatch.
bool getCompiledExpression(Tree sig, string &name)
Test if a signal is already compiled.

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateAttach ( Tree  sig,
Tree  x,
Tree  y,
int  priority 
)
protected

Definition at line 730 of file doc_compile.cpp.

References CS(), generateCacheCode(), getVectorNameProperty(), and setVectorNameProperty().

Referenced by generateCode().

731 {
732  string vname;
733  string exp;
734 
735  CS(y, priority);
736  exp = CS(x, priority);
737 
738  if(getVectorNameProperty(x, vname)) {
739  setVectorNameProperty(sig, vname);
740  }
741 
742  return generateCacheCode(sig, exp);
743 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateBinOp ( Tree  sig,
int  opcode,
Tree  arg1,
Tree  arg2,
int  priority 
)
protected

Definition at line 405 of file doc_compile.cpp.

References associative(), CS(), BinOp::fName, BinOp::fPriority, gBinOpLateqTable, gDocNoticeFlagMap, generateCacheCode(), getCertifiedSigType(), kAdd, kDiv, kInt, kMul, kSub, and subst().

Referenced by generateCode().

406 {
407  string s;
408  int thisPriority = gBinOpLateqTable[opcode]->fPriority;
409 
410  /* Priority parenthesis handling. */
411  string lpar = "";
412  string rpar = "";
413  if ( (thisPriority < priority) || ((thisPriority == priority) && !associative(opcode)) ) {
414  // (a+b)*c or (a/b)/c need parenthesis
415  lpar = " \\left(";
416  rpar = "\\right) ";
417  }
418 
419  Type t1 = getCertifiedSigType(arg1);
420  Type t2 = getCertifiedSigType(arg2);
421  bool intOpDetected = false;
422  if ( (t1->nature() == kInt) && (t2->nature() == kInt) ) {
423  intOpDetected = true;
424  }
425 
426  string op;
427  if(!intOpDetected) {
428  op = gBinOpLateqTable[opcode]->fName;
429  } else {
430  switch (opcode) {
431  case kAdd:
432  op = "\\oplus";
433  gDocNoticeFlagMap["intplus"] = true;
434  break;
435  case kSub:
436  op = "\\ominus";
437  gDocNoticeFlagMap["intminus"] = true;
438  break;
439  case kMul:
440  op = "\\odot";
441  gDocNoticeFlagMap["intmult"] = true;
442  break;
443  case kDiv:
444  op = "\\oslash";
445  gDocNoticeFlagMap["intdiv"] = true;
446  gDocNoticeFlagMap["intcast"] = true; // "$normalize(int(i/j))$" in the notice.
447  break;
448  default:
449  op = gBinOpLateqTable[opcode]->fName;
450  break;
451  }
452  }
453 
454  /* LaTeX frac{}{} handling VS general case. */
455  if ( (opcode == kDiv) && (!intOpDetected) ) {
456  s = subst("$0\\frac{$1}{$2}$3", lpar, CS(arg1, 0), CS(arg2, 0), rpar);
457  } else {
458  s = subst("$0$1 $2 $3$4", lpar, CS(arg1, thisPriority), op, CS(arg2, thisPriority), rpar);
459  }
460 
461 // if (opcode == kMul) {
462 // gDocNoticeFlagMap["cdot"] = true;
463 // }
464 
465  return generateCacheCode(sig, s);
466 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Definition: sigtype.hh:54
BinOp * gBinOpLateqTable[]
Definition: binop.cpp:52
int fPriority
Definition: binop.hh:40
Definition: binop.hh:56
Definition: binop.hh:56
static bool associative(int opcode)
Generate binary operations, managing priority parenthesis.
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Definition: binop.hh:56
const char * fName
Definition: binop.hh:34
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
Definition: binop.hh:56

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateButton ( Tree  sig,
Tree  label 
)
protected

Definition at line 647 of file doc_compile.cpp.

References Lateq::addUISigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getUIDir(), and prepareBinaryUI().

Referenced by generateCode().

648 {
649  string vname = getFreshID("{u_b}");
650  string varname = vname + "(t)";
651  fLateq->addUISigFormula(getUIDir(path), prepareBinaryUI(varname, path));
652  gDocNoticeFlagMap["buttonsigs"] = true;
653  return generateCacheCode(sig, varname);
654 }
string generateCacheCode(Tree sig, const string &exp)
string prepareBinaryUI(const string &name, Tree pathname)
Prepare binary user interface elements (button, checkbox).
void addUISigFormula(const string &path, const string &str)
Definition: lateq.hh:77
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Lateq * fLateq
Definition: doc_compile.hh:55
string getUIDir(Tree pathname)
Get the directory of a user interface element.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateCacheCode ( Tree  sig,
const string &  exp 
)
protected

Definition at line 530 of file doc_compile.cpp.

References fOccMarkup, gDocNoticeFlagMap, generateDelayVec(), generateVariableStore(), getCertifiedSigType(), getCompiledExpression(), Occurences::getMaxDelay(), getSharingCount(), getTypedNames(), getVectorNameProperty(), isVerySimpleFormula(), and OccMarkup::retrieve().

Referenced by generateAttach(), generateBinOp(), generateButton(), generateCheckbox(), generateDocAccessTbl(), generateFloatCast(), generateFVar(), generateHBargraph(), generateHSlider(), generateInput(), generateIntCast(), generateNumEntry(), generatePrefix(), generateVBargraph(), generateVSlider(), and generateXtended().

531 {
532  //cerr << "!! entering generateCacheCode with sig=\"" << ppsig(sig) << "\"" << endl;
533 
534  string vname, ctype, code, vectorname;
535 
536  int sharing = getSharingCount(sig);
537  Occurences* o = fOccMarkup.retrieve(sig);
538 
539  // check reentrance
540  if (getCompiledExpression(sig, code)) {
541  //cerr << "!! generateCacheCode called a true getCompiledExpression" << endl;
542  return code;
543  }
544 
545  // check for expression occuring in delays
546  if (o->getMaxDelay()>0) {
547  if (getVectorNameProperty(sig, vectorname)) {
548  return exp;
549  }
550  getTypedNames(getCertifiedSigType(sig), "r", ctype, vname);
551  gDocNoticeFlagMap["recursigs"] = true;
552  //cerr << "- r : generateCacheCode : vame=\"" << vname << "\", for sig=\"" << ppsig(sig) << "\"" << endl;
553  if (sharing>1) {
554  //cerr << " generateCacheCode calls generateDelayVec(generateVariableStore) on vame=\"" << vname << "\"" << endl;
555  return generateDelayVec(sig, generateVariableStore(sig,exp), ctype, vname, o->getMaxDelay());
556  } else {
557  //cerr << " generateCacheCode calls generateDelayVec(exp) on vame=\"" << vname << "\"" << endl;
558  return generateDelayVec(sig, exp, ctype, vname, o->getMaxDelay());
559  }
560  }
561  else if (sharing == 1 || getVectorNameProperty(sig, vectorname) || isVerySimpleFormula(sig)) {
562  //cerr << "! generateCacheCode : sharing == 1 : return \"" << exp << "\"" << endl;
563  return exp;
564  }
565  else if (sharing > 1) {
566  //cerr << "! generateCacheCode : sharing > 1 : return \"" << exp << "\"" << endl;
567  return generateVariableStore(sig, exp);
568  }
569  else {
570  cerr << "Error in sharing count (" << sharing << ") for " << *sig << endl;
571  exit(1);
572  }
573 
574  return "Error in generateCacheCode";
575 }
string generateDelayVec(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
Generate code for the delay mecchanism.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
Definition: occurences.cpp:81
static bool isVerySimpleFormula(Tree sig)
Test if exp is very simple that is it can't be considered a real component.
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
int getSharingCount(Tree t)
Definition: doc_sharing.cpp:66
int getMaxDelay() const
return the maximal delay collected
Definition: occurences.cpp:54
bool getCompiledExpression(Tree sig, string &name)
Test if a signal is already compiled.
string generateVariableStore(Tree sig, const string &exp)

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateCheckbox ( Tree  sig,
Tree  label 
)
protected

Definition at line 656 of file doc_compile.cpp.

References Lateq::addUISigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getUIDir(), and prepareBinaryUI().

Referenced by generateCode().

657 {
658  string vname = getFreshID("{u_c}");
659  string varname = vname + "(t)";
660  fLateq->addUISigFormula(getUIDir(path), prepareBinaryUI(varname, path));
661  gDocNoticeFlagMap["checkboxsigs"] = true;
662  return generateCacheCode(sig, varname);
663 }
string generateCacheCode(Tree sig, const string &exp)
string prepareBinaryUI(const string &name, Tree pathname)
Prepare binary user interface elements (button, checkbox).
void addUISigFormula(const string &path, const string &str)
Definition: lateq.hh:77
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Lateq * fLateq
Definition: doc_compile.hh:55
string getUIDir(Tree pathname)
Get the directory of a user interface element.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateCode ( Tree  sig,
int  priority 
)
protected

Main code generator dispatch.

According to the type of the input signal, generateCode calls the appropriate generator with appropriate arguments.

Parameters
sigThe signal expression to compile.
priorityThe environment priority of the expression.
Returns
<string> The LaTeX code translation of the signal.

Definition at line 193 of file doc_compile.cpp.

References CS(), docT(), generateAttach(), generateBinOp(), generateButton(), generateCheckbox(), generateDocAccessTbl(), generateDocConstantTbl(), generateDocWriteTbl(), generateFConst(), generateFFun(), generateFixDelay(), generateFloatCast(), generateFVar(), generateHSlider(), generateInput(), generateIntCast(), generateIota(), generateNumber(), generateNumEntry(), generateOutput(), generatePrefix(), generateRecProj(), generateSelect2(), generateSelect3(), generateVSlider(), generateXtended(), getUserData(), isProj(), isSigAttach(), isSigBinOp(), isSigButton(), isSigCheckbox(), isSigDocAccessTbl(), isSigDocConstantTbl(), isSigDocWriteTbl(), isSigFConst(), isSigFFun(), isSigFixDelay(), isSigFloatCast(), isSigFVar(), isSigHBargraph(), isSigHSlider(), isSigInput(), isSigInt(), isSigIntCast(), isSigIota(), isSigNumEntry(), isSigOutput(), isSigPrefix(), isSigReal(), isSigSelect2(), isSigSelect3(), isSigVBargraph(), isSigVSlider(), name(), printGCCall(), and tree2str().

Referenced by CS().

194 {
195  int i;
196  double r;
197  Tree c, sel, x, y, z, u, label, ff, largs, type, name, file;
198 
199  if ( getUserData(sig) ) { printGCCall(sig,"generateXtended"); return generateXtended (sig, priority); }
200  else if ( isSigInt(sig, &i) ) { printGCCall(sig,"generateNumber"); return generateNumber (sig, docT(i)); }
201  else if ( isSigReal(sig, &r) ) { printGCCall(sig,"generateNumber"); return generateNumber (sig, docT(r)); }
202  else if ( isSigInput(sig, &i) ) { printGCCall(sig,"generateInput"); return generateInput (sig, docT(i+1)); }
203  else if ( isSigOutput(sig, &i, x) ) { printGCCall(sig,"generateOutput"); return generateOutput (sig, docT(i+1), CS(x, priority)); }
204 
205  else if ( isSigFixDelay(sig, x, y) ) { printGCCall(sig,"generateFixDelay"); return generateFixDelay (sig, x, y, priority); }
206  else if ( isSigPrefix(sig, x, y) ) { printGCCall(sig,"generatePrefix"); return generatePrefix (sig, x, y, priority); }
207  else if ( isSigIota(sig, x) ) { printGCCall(sig,"generateIota"); return generateIota (sig, x); }
208 
209  else if ( isSigBinOp(sig, &i, x, y) ) { printGCCall(sig,"generateBinOp"); return generateBinOp (sig, i, x, y, priority); }
210  else if ( isSigFFun(sig, ff, largs) ) { printGCCall(sig,"generateFFun"); return generateFFun (sig, ff, largs, priority); }
211  else if ( isSigFConst(sig, type, name, file) ) { printGCCall(sig,"generateFConst"); return generateFConst (sig, tree2str(file), tree2str(name)); }
212  else if ( isSigFVar(sig, type, name, file) ) { printGCCall(sig,"generateFVar"); return generateFVar (sig, tree2str(file), tree2str(name)); }
213 
214  // new special tables for documentation purposes
215 
216  else if ( isSigDocConstantTbl(sig, x, y) ) { printGCCall(sig,"generateDocConstantTbl"); return generateDocConstantTbl (sig, x, y); }
217  else if ( isSigDocWriteTbl(sig,x,y,z,u) ) { printGCCall(sig,"generateDocWriteTbl"); return generateDocWriteTbl (sig, x, y, z, u); }
218  else if ( isSigDocAccessTbl(sig, x, y) ) { printGCCall(sig, "generateDocAccessTbl"); return generateDocAccessTbl(sig, x, y); }
219 
220 
221  else if ( isSigSelect2(sig, sel, x, y) ) { printGCCall(sig,"generateSelect2"); return generateSelect2 (sig, sel, x, y, priority); }
222  else if ( isSigSelect3(sig, sel, x, y, z) ) { printGCCall(sig,"generateSelect3"); return generateSelect3 (sig, sel, x, y, z, priority); }
223 
224  else if ( isProj(sig, &i, x) ) { printGCCall(sig,"generateRecProj"); return generateRecProj (sig, x, i, priority); }
225 
226  else if ( isSigIntCast(sig, x) ) { printGCCall(sig,"generateIntCast"); return generateIntCast (sig, x, priority); }
227  else if ( isSigFloatCast(sig, x) ) { printGCCall(sig,"generateFloatCast"); return generateFloatCast(sig, x, priority); }
228 
229  else if ( isSigButton(sig, label) ) { printGCCall(sig,"generateButton"); return generateButton (sig, label); }
230  else if ( isSigCheckbox(sig, label) ) { printGCCall(sig,"generateCheckbox"); return generateCheckbox (sig, label); }
231  else if ( isSigVSlider(sig, label,c,x,y,z) ) { printGCCall(sig,"generateVSlider"); return generateVSlider (sig, label, c,x,y,z); }
232  else if ( isSigHSlider(sig, label,c,x,y,z) ) { printGCCall(sig,"generateHSlider"); return generateHSlider (sig, label, c,x,y,z); }
233  else if ( isSigNumEntry(sig, label,c,x,y,z) ) { printGCCall(sig,"generateNumEntry"); return generateNumEntry (sig, label, c,x,y,z); }
234 
235  else if ( isSigVBargraph(sig, label,x,y,z) ) { printGCCall(sig,"generateVBargraph"); return CS(z, priority);}//generateVBargraph (sig, label, x, y, CS(z, priority)); }
236  else if ( isSigHBargraph(sig, label,x,y,z) ) { printGCCall(sig,"generateHBargraph"); return CS(z, priority);}//generateHBargraph (sig, label, x, y, CS(z, priority)); }
237  else if ( isSigAttach(sig, x, y) ) { printGCCall(sig,"generateAttach"); return generateAttach (sig, x, y, priority); }
238 
239  else {
240  cerr << "Error in d signal, unrecognized signal : " << *sig << endl;
241  exit(1);
242  }
243  assert(0);
244  return "error in generate code";
245 }
string generateAttach(Tree sig, Tree x, Tree y, int priority)
bool isSigHSlider(Tree s)
Definition: signals.cpp:217
string docT(char *c)
Definition: doc_Text.cpp:77
string CS(Tree sig, int priority)
Compile a signal.
string generateIntCast(Tree sig, Tree x, int priority)
bool isSigFConst(Tree s)
Definition: signals.cpp:138
bool isSigPrefix(Tree t, Tree &t0, Tree &t1)
Definition: signals.cpp:66
bool isSigCheckbox(Tree s)
Definition: signals.cpp:205
bool isSigFFun(Tree s, Tree &ff, Tree &largs)
Definition: signals.cpp:133
string generateFVar(Tree sig, const string &file, const string &name)
bool isSigNumEntry(Tree s)
Definition: signals.cpp:257
bool isSigSelect2(Tree t, Tree &selector, Tree &s1, Tree &s2)
Definition: signals.cpp:116
string generateSelect2(Tree sig, Tree sel, Tree s1, Tree s2, int priority)
Generate a select2 code.
string generateButton(Tree sig, Tree label)
bool isSigIota(Tree t, Tree &t0)
Definition: signals.cpp:70
string generateXtended(Tree sig, int priority)
retrieve the type annotation of sig
string generateDocConstantTbl(Tree sig, Tree size, Tree content)
Generate the equation of a constant table (its content is time constant).
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isSigInput(Tree t, int *i)
Definition: signals.cpp:48
bool isSigFixDelay(Tree t, Tree &t0, Tree &t1)
Definition: signals.cpp:62
string generateRecProj(Tree sig, Tree exp, int i, int priority)
Generate code for a projection of a group of mutually recursive definitions.
bool isSigVBargraph(Tree s)
Definition: signals.cpp:285
bool isSigSelect3(Tree t, Tree &selector, Tree &s1, Tree &s2, Tree &s3)
Definition: signals.cpp:119
bool isSigVSlider(Tree s)
Definition: signals.cpp:237
string generateDocWriteTbl(Tree sig, Tree size, Tree content, Tree widx, Tree wsig)
Generate the equation of a write table, which content is time dependent.
bool isSigReal(Tree t, double *r)
Definition: signals.cpp:44
string generateSelect3(Tree sig, Tree sel, Tree s1, Tree s2, Tree s3, int priority)
Generate a select3 code.
string generateDocAccessTbl(Tree sig, Tree tbl, Tree ridx)
Generate the equation of a write table, which content is time dependent.
string generateFConst(Tree sig, const string &file, const string &name)
bool isSigHBargraph(Tree s)
Definition: signals.cpp:279
string generateCheckbox(Tree sig, Tree label)
bool isSigDocConstantTbl(Tree t, Tree &n, Tree &sig)
Definition: signals.cpp:99
string generateNumEntry(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
string generateBinOp(Tree sig, int opcode, Tree arg1, Tree arg2, int priority)
string generateIota(Tree sig, Tree arg)
Generate a "iota" time function, n-cyclical.
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
Definition: signals.cpp:126
void printGCCall(Tree sig, const string &calledFunction)
Print calling information of generateCode, for debug purposes.
bool isSigAttach(Tree t, Tree &t0, Tree &t1)
Definition: signals.cpp:291
string generatePrefix(Tree sig, Tree x, Tree e, int priority)
Generate LaTeX code for "prefix", a 1­sample-delay explicitely initialized.
string generateFFun(Tree sig, Tree ff, Tree largs, int priority)
bool isSigDocAccessTbl(Tree t, Tree &tbl, Tree &ridx)
Definition: signals.cpp:107
string generateInput(Tree sig, const string &idx)
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41
string generateFloatCast(Tree sig, Tree x, int priority)
Don't generate float cast !
bool isSigDocWriteTbl(Tree t, Tree &n, Tree &sig, Tree &widx, Tree &wsig)
Definition: signals.cpp:103
bool isSigFloatCast(Tree t)
Definition: signals.cpp:187
bool isSigFVar(Tree s)
Definition: signals.cpp:144
void * getUserData(Symbol *sym)
Returns user data.
Definition: symbol.hh:100
bool isSigIntCast(Tree t)
Definition: signals.cpp:184
string generateVSlider(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
string generateNumber(Tree sig, const string &exp)
string generateOutput(Tree sig, const string &idx, const string &arg1)
Unused for the moment !
bool isProj(Tree t, int *i, Tree &rgroup)
Definition: signals.cpp:151
string generateFixDelay(Tree sig, Tree arg, Tree size, int priority)
Generate code for accessing a delayed signal.
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Definition: tree.cpp:278
string generateHSlider(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)
bool isSigOutput(Tree t, int *i, Tree &t0)
Definition: signals.cpp:52
bool isSigButton(Tree s)
Definition: signals.cpp:199

Here is the caller graph for this function:

void DocCompiler::generateDelayLine ( const string &  ctype,
const string &  vname,
int  mxd,
const string &  exp 
)
protected

Generate code for the delay mecchanism without using temporary variables.

Definition at line 1214 of file doc_compile.cpp.

References Lateq::addRecurSigFormula(), fLateq, and subst().

Referenced by generateRec().

1215 {
1216  //assert(mxd > 0);
1217  if (mxd == 0) {
1218  fLateq->addRecurSigFormula(subst("$0(t) = $1", vname, exp));
1219  } else {
1220  fLateq->addRecurSigFormula(subst("$0(t) = $1", vname, exp));
1221  }
1222 }
void addRecurSigFormula(const string &str)
Definition: lateq.hh:71
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateDelayVec ( Tree  sig,
const string &  exp,
const string &  ctype,
const string &  vname,
int  mxd 
)
protected

Generate code for the delay mecchanism.

The generated code depend of the maximum delay attached to exp and the "less temporaries" switch

Definition at line 1178 of file doc_compile.cpp.

References generateDelayVecNoTemp(), getCertifiedSigType(), and kSamp.

Referenced by generateCacheCode(), generateFConst(), generateFVar(), and generateNumber().

1179 {
1180  string s = generateDelayVecNoTemp(sig, exp, ctype, vname, mxd);
1181  if (getCertifiedSigType(sig)->variability() < kSamp) {
1182  return exp;
1183  } else {
1184  return s;
1185  }
1186 }
string generateDelayVecNoTemp(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
Generate code for the delay mecchanism without using temporary variables.
Definition: sigtype.hh:56
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateDelayVecNoTemp ( Tree  sig,
const string &  exp,
const string &  ctype,
const string &  vname,
int  mxd 
)
protected

Generate code for the delay mecchanism without using temporary variables.

Definition at line 1192 of file doc_compile.cpp.

References Lateq::addRecurSigFormula(), fLateq, getVectorNameProperty(), setVectorNameProperty(), and subst().

Referenced by generateDelayVec().

1193 {
1194  assert(mxd > 0);
1195 
1196  //cerr << " entering generateDelayVecNoTemp" << endl;
1197 
1198  string vectorname;
1199 
1200  // if generateVariableStore has already tagged sig, no definition is needed.
1201  if(getVectorNameProperty(sig, vectorname)) {
1202  return subst("$0(t)", vectorname);
1203  } else {
1204  fLateq->addRecurSigFormula(subst("$0(t) = $1", vname, exp));
1205  setVectorNameProperty(sig, vname);
1206  return subst("$0(t)", vname);
1207  }
1208 }
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
void addRecurSigFormula(const string &str)
Definition: lateq.hh:71
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateDocAccessTbl ( Tree  sig,
Tree  tbl,
Tree  ridx 
)
protected

Generate the equation of a write table, which content is time dependent.

It is basically a signal of vectors.

Definition at line 863 of file doc_compile.cpp.

References CS(), generateCacheCode(), and subst().

Referenced by generateCode().

864 {
865  // the compilation of a table always returns its name
866  string vname = CS(tbl, 0);
867  string result = subst("$0[$1]", vname, CS(ridx,0) );
868 
869  return generateCacheCode(sig, result);
870 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateDocConstantTbl ( Tree  sig,
Tree  size,
Tree  isig 
)
protected

Generate the equation of a constant table (its content is time constant).

Returns the name of the table

Definition at line 758 of file doc_compile.cpp.

References Lateq::addRDTblSigFormula(), CS(), fLateq, gDocNoticeFlagMap, getCertifiedSigType(), getTypedNames(), isSigInt(), subst(), and T().

Referenced by generateCode().

759 {
760  string vname, ctype;
761  string init = CS(isig,0);
762 
763  int n;
764  if (!isSigInt(size, &n)) {
765  cerr << "error in DocCompiler::generateDocConstantTbl() : "
766  << *size
767  << " is not an integer expression and can't be used as a table size' "
768  << endl;
769  }
770 
771  // allocate a name v_i for the table
772  getTypedNames(getCertifiedSigType(isig), "v", ctype, vname);
773 
774  // add a comment on tables in the notice
775  gDocNoticeFlagMap["tablesigs"] = true;
776 
777  // add equation v[t] = isig(t)
778  fLateq->addRDTblSigFormula(subst("$0[t] = $1 \\condition{when $$t \\in [0,$2]$$} ", vname, init, T(n-1)));
779 
780  // note that the name of the table can never be used outside an sigDocTableAccess
781  return vname;
782 }
string CS(Tree sig, int priority)
Compile a signal.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
string T(char *c)
Definition: Text.cpp:158
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
void addRDTblSigFormula(const string &str)
Definition: lateq.hh:72
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateDocWriteTbl ( Tree  sig,
Tree  size,
Tree  isig,
Tree  widx,
Tree  wsig 
)
protected

Generate the equation of a write table, which content is time dependent.

It is basically a signal of vectors.

Definition at line 823 of file doc_compile.cpp.

References Lateq::addRWTblSigFormula(), CS(), fLateq, gDocNoticeFlagMap, getCertifiedSigType(), getTypedNames(), isSigInt(), replaceTimeBy(), subst(), and T().

Referenced by generateCode().

824 {
825  string vname, ctype;
826  string init = CS(isig,0);
827  int n;
828  if (!isSigInt(size, &n)) {
829  cerr << "error in DocCompiler::generateDocWriteTbl() : "
830  << *size
831  << " is not an integer expression and can't be used as a table size' "
832  << endl;
833  }
834 
835 
836  // allocate a name w_i for the table
837  getTypedNames(getCertifiedSigType(isig), "w", ctype, vname);
838 
839  // add a comment on tables in the notice
840  gDocNoticeFlagMap["tablesigs"] = true;
841 
842  // describe the table equation
843  string ltqRWTableDef;
844  ltqRWTableDef += subst("$0(t)[i] = \n", vname);
845  ltqRWTableDef += "\\left\\{\\begin{array}{ll}\n";
846  ltqRWTableDef += subst("$0 & \\mbox{if \\,} t < 0 \\mbox{\\, and \\,} i \\in [0,$1] \\\\\n", replaceTimeBy(init,'i'), T(n-1));
847  ltqRWTableDef += subst("$0 & \\mbox{if \\,} i = $1 \\\\\n", CS(wsig,0), CS(widx,0));
848  ltqRWTableDef += subst("$0(t\\!-\\!1)[i] & \\mbox{otherwise} \\\\\n", vname);
849  ltqRWTableDef += "\\end{array}\\right.";
850 
851  // add the table equation
852  fLateq->addRWTblSigFormula(ltqRWTableDef); //w(t) = initsig(t)
853 
854  // note that the name of the table can never be used outside an sigDocTableAccess
855  return vname;
856 }
string CS(Tree sig, int priority)
Compile a signal.
void addRWTblSigFormula(const string &str)
Definition: lateq.hh:73
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
static string replaceTimeBy(const string &src, char r)
Replaces the occurences of 't' in a formula with another character.
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
string T(char *c)
Definition: Text.cpp:158
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateFConst ( Tree  sig,
const string &  file,
const string &  name 
)
protected

Definition at line 295 of file doc_compile.cpp.

References fOccMarkup, gDocNoticeFlagMap, generateDelayVec(), getCertifiedSigType(), Occurences::getMaxDelay(), getTypedNames(), and OccMarkup::retrieve().

Referenced by generateCode().

296 {
297  string ctype, vname;
298  Occurences* o = fOccMarkup.retrieve(sig);
299 
300  if (o->getMaxDelay()>0) {
301  getTypedNames(getCertifiedSigType(sig), "r", ctype, vname);
302  gDocNoticeFlagMap["recursigs"] = true;
303  //cerr << "- r : generateFConst : \"" << vname << "\"" << endl;
304  generateDelayVec(sig, exp, ctype, vname, o->getMaxDelay());
305  }
306 
307  if (exp == "fSamplingFreq") {
308  //gDocNoticeFlagMap["fsamp"] = true;
309  return "f_S";
310  }
311 
312  return "\\mathrm{"+exp+"}";
313 }
string generateDelayVec(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
Generate code for the delay mecchanism.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
Definition: occurences.cpp:81
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
int getMaxDelay() const
return the maximal delay collected
Definition: occurences.cpp:54

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateFFun ( Tree  sig,
Tree  ff,
Tree  largs,
int  priority 
)
protected

Definition at line 473 of file doc_compile.cpp.

References CS(), ffarity(), ffname(), gDocNoticeFlagMap, and nth().

Referenced by generateCode().

474 {
475  string code = ffname(ff);
476  code += '(';
477  string sep = "";
478  for (int i = 0; i< ffarity(ff); i++) {
479  code += sep;
480  code += CS(nth(largs, i), priority);
481  sep = ", ";
482  }
483  code += ')';
484 
485  gDocNoticeFlagMap["foreignfun"] = true;
486 
487  return "\\mathrm{ff"+code+"}";
488 }
string CS(Tree sig, int priority)
Compile a signal.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
const char * ffname(Tree t)
Definition: prim2.cpp:60
int ffarity(Tree t)
Definition: prim2.cpp:67
Tree nth(Tree l, int i)
Definition: list.cpp:182

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateFixDelay ( Tree  sig,
Tree  exp,
Tree  delay,
int  priority 
)
protected

Generate code for accessing a delayed signal.

The generated code depend of the maximum delay attached to exp and the gLessTempSwitch.

Todo:
Priorités à revoir pour le parenthésage (associativité de - et /), avec gBinOpLateqTable dans binop.cpp.

Definition at line 1152 of file doc_compile.cpp.

References CS(), getVectorNameProperty(), isSigInt(), and subst().

Referenced by generateCode().

1153 {
1154  int d;
1155  string vecname;
1156 
1157  CS(exp, 0); // ensure exp is compiled to have a vector name
1158 
1159  if (! getVectorNameProperty(exp, vecname)) {
1160  cerr << "No vector name for : " << ppsig(exp) << endl;
1161  assert(0);
1162  }
1163 
1164  if (isSigInt(delay, &d) && (d == 0)) {
1165  //cerr << "@ generateFixDelay : d = " << d << endl;
1166  return subst("$0(t)", vecname);
1167  } else {
1168  //cerr << "@ generateFixDelay : d = " << d << endl;
1169  return subst("$0(t\\!-\\!$1)", vecname, CS(delay, 7));
1170  }
1171 }
string CS(Tree sig, int priority)
Compile a signal.
Definition: ppsig.hh:48
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateFloatCast ( Tree  sig,
Tree  x,
int  priority 
)
protected

Don't generate float cast !

It is just a kind of redirection. Calling generateCacheCode ensures to create a new variable name if the input signal expression is shared.

Definition at line 637 of file doc_compile.cpp.

References CS(), generateCacheCode(), and subst().

Referenced by generateCode().

638 {
639  return generateCacheCode(sig, subst("$0", CS(x, priority)));
640 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateFVar ( Tree  sig,
const string &  file,
const string &  name 
)
protected

Definition at line 320 of file doc_compile.cpp.

References fOccMarkup, gDocNoticeFlagMap, generateCacheCode(), generateDelayVec(), getCertifiedSigType(), Occurences::getMaxDelay(), getTypedNames(), OccMarkup::retrieve(), and setVectorNameProperty().

Referenced by generateCode().

321 {
322  string ctype, vname;
323  Occurences* o = fOccMarkup.retrieve(sig);
324 
325  if (o->getMaxDelay()>0) {
326  getTypedNames(getCertifiedSigType(sig), "r", ctype, vname);
327  gDocNoticeFlagMap["recursigs"] = true;
328  //cerr << "- r : generateFVar : \"" << vname << "\"" << endl;
329  setVectorNameProperty(sig, vname);
330  generateDelayVec(sig, exp, ctype, vname, o->getMaxDelay());
331  }
332  return generateCacheCode(sig, exp);
333 }
string generateDelayVec(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
Generate code for the delay mecchanism.
string generateCacheCode(Tree sig, const string &exp)
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
Definition: occurences.cpp:81
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
int getMaxDelay() const
return the maximal delay collected
Definition: occurences.cpp:54

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateHBargraph ( Tree  sig,
Tree  label,
Tree  min,
Tree  max,
const string &  exp 
)
protected

Definition at line 710 of file doc_compile.cpp.

References generateCacheCode(), getCertifiedSigType(), getFreshID(), kBlock, kKonst, and kSamp.

711 {
712  string varname = getFreshID("{u_g}");
713 
714  Type t = getCertifiedSigType(sig);
715  switch (t->variability()) {
716 
717  case kKonst :
718  break;
719 
720  case kBlock :
721  break;
722 
723  case kSamp :
724  break;
725  }
726  return generateCacheCode(sig, varname);
727 }
string generateCacheCode(Tree sig, const string &exp)
Definition: sigtype.hh:56
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

string DocCompiler::generateHSlider ( Tree  sig,
Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)
protected

Definition at line 673 of file doc_compile.cpp.

References Lateq::addUISigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getUIDir(), and prepareIntervallicUI().

Referenced by generateCode().

674 {
675  string varname = getFreshID("{u_s}") + "(t)";
676  fLateq->addUISigFormula(getUIDir(path), prepareIntervallicUI(varname, path, cur, min, max));
677  gDocNoticeFlagMap["slidersigs"] = true;
678  return generateCacheCode(sig, varname);
679 }
string prepareIntervallicUI(const string &name, Tree path, Tree tcur, Tree tmin, Tree tmax)
Prepare "intervallic" user interface elements (sliders, nentry).
string generateCacheCode(Tree sig, const string &exp)
void addUISigFormula(const string &path, const string &str)
Definition: lateq.hh:77
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Lateq * fLateq
Definition: doc_compile.hh:55
string getUIDir(Tree pathname)
Get the directory of a user interface element.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateInput ( Tree  sig,
const string &  idx 
)
protected

Definition at line 341 of file doc_compile.cpp.

References Lateq::addInputSigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), Lateq::inputs(), setVectorNameProperty(), and subst().

Referenced by generateCode().

342 {
343  if (fLateq->inputs() == 1) {
344  setVectorNameProperty(sig, "x");
345  fLateq->addInputSigFormula("x(t)");
346  gDocNoticeFlagMap["inputsig"] = true;
347  return generateCacheCode(sig, "x(t)");
348  } else {
349  setVectorNameProperty(sig, subst("x_{$0}", idx));
350  fLateq->addInputSigFormula(subst("x_{$0}(t)", idx));
351  gDocNoticeFlagMap["inputsigs"] = true;
352  return generateCacheCode(sig, subst("x_{$0}(t)", idx));
353  }
354 }
string generateCacheCode(Tree sig, const string &exp)
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
void addInputSigFormula(const string &str)
Add a line of a latex equation code corresponding to a signal.
Definition: lateq.hh:67
int inputs() const
Definition: lateq.hh:82

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateIntCast ( Tree  sig,
Tree  x,
int  priority 
)
protected

Definition at line 622 of file doc_compile.cpp.

References CS(), gDocNoticeFlagMap, generateCacheCode(), and subst().

Referenced by generateCode().

623 {
624  gDocNoticeFlagMap["intcast"] = true;
625 
626  return generateCacheCode(sig, subst("\\mathrm{int}\\left($0\\right)", CS(x, 0)));
627 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateIota ( Tree  sig,
Tree  arg 
)
protected

Generate a "iota" time function, n-cyclical.

Definition at line 996 of file doc_compile.cpp.

References docT(), isSigInt(), and subst().

Referenced by generateCode().

997 {
998  int size;
999  if (!isSigInt(n, &size)) { fprintf(stderr, "error in generateIota\n"); exit(1); }
1000  //cout << "iota !" << endl;
1001  return subst(" t \\bmod{$0} ", docT(size));
1002 }
string docT(char *c)
Definition: doc_Text.cpp:77
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateNumber ( Tree  sig,
const string &  exp 
)
protected

Definition at line 275 of file doc_compile.cpp.

References fOccMarkup, gDocNoticeFlagMap, generateDelayVec(), getCertifiedSigType(), Occurences::getMaxDelay(), getTypedNames(), and OccMarkup::retrieve().

Referenced by generateCode().

276 {
277  string ctype, vname;
278  Occurences* o = fOccMarkup.retrieve(sig);
279 
280  // check for number occuring in delays
281  if (o->getMaxDelay()>0) {
282  getTypedNames(getCertifiedSigType(sig), "r", ctype, vname);
283  gDocNoticeFlagMap["recursigs"] = true;
284  //cerr << "- r : generateNumber : \"" << vname << "\"" << endl;
285  generateDelayVec(sig, exp, ctype, vname, o->getMaxDelay());
286  }
287  return exp;
288 }
string generateDelayVec(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)
Generate code for the delay mecchanism.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
Definition: occurences.cpp:81
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
int getMaxDelay() const
return the maximal delay collected
Definition: occurences.cpp:54

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateNumEntry ( Tree  sig,
Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)
protected

Definition at line 681 of file doc_compile.cpp.

References Lateq::addUISigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getUIDir(), and prepareIntervallicUI().

Referenced by generateCode().

682 {
683  string varname = getFreshID("{u_n}") + "(t)";
684  fLateq->addUISigFormula(getUIDir(path), prepareIntervallicUI(varname, path, cur, min, max));
685  gDocNoticeFlagMap["nentrysigs"] = true;
686  return generateCacheCode(sig, varname);
687 }
string prepareIntervallicUI(const string &name, Tree path, Tree tcur, Tree tmin, Tree tmax)
Prepare "intervallic" user interface elements (sliders, nentry).
string generateCacheCode(Tree sig, const string &exp)
void addUISigFormula(const string &path, const string &str)
Definition: lateq.hh:77
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Lateq * fLateq
Definition: doc_compile.hh:55
string getUIDir(Tree pathname)
Get the directory of a user interface element.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateOutput ( Tree  sig,
const string &  idx,
const string &  arg1 
)
protected

Unused for the moment !

Definition at line 358 of file doc_compile.cpp.

References Lateq::addOutputSigFormula(), fLateq, gDocNoticeFlagMap, Lateq::outputs(), and subst().

Referenced by generateCode().

359 {
360  string dst;
361 
362  if (fLateq->outputs() == 1) {
363  dst = subst("y(t)", idx);
364  gDocNoticeFlagMap["outputsig"] = true;
365  } else {
366  dst = subst("y_{$0}(t)", idx);
367  gDocNoticeFlagMap["outputsigs"] = true;
368  }
369 
370  fLateq->addOutputSigFormula(subst("$0 = $1", dst, arg));
371  return dst;
372 }
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
int outputs() const
Definition: lateq.hh:83
Lateq * fLateq
Definition: doc_compile.hh:55
void addOutputSigFormula(const string &str)
Definition: lateq.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generatePrefix ( Tree  sig,
Tree  x,
Tree  e,
int  priority 
)
protected

Generate LaTeX code for "prefix", a 1­sample-delay explicitely initialized.

Parameters
sigThe signal expression to treat.
xThe initial value for the delay line.
eThe value for the delay line, after initialization.
priorityThe priority of the environment of the expression.
Returns
<string> The LaTeX code translation of the signal, cached.

Definition at line 963 of file doc_compile.cpp.

References Lateq::addPrefixSigFormula(), CS(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getVectorNameProperty(), and subst().

Referenced by generateCode().

964 {
965  string var = getFreshID("m");
966  string exp0 = CS(x, priority);
967  string exp1 = CS(e, priority); // ensure exp1 is compiled to have a vector name
968  string vecname;
969 
970  if (! getVectorNameProperty(e, vecname)) {
971  cerr << "No vector name for : " << ppsig(e) << endl;
972  assert(0);
973  }
974 
975  string ltqPrefixDef;
976  ltqPrefixDef += subst("$0(t) = \n", var);
977  ltqPrefixDef += "\\left\\{\\begin{array}{ll}\n";
978  ltqPrefixDef += subst("$0 & \\mbox{, when \\,} t = 0\\\\\n", exp0);
979  ltqPrefixDef += subst("$0 & \\mbox{, when \\,} t > 0\n", subst("$0(t\\!-\\!1)", vecname));
980  ltqPrefixDef += "\\end{array}\\right.";
981 
982  fLateq->addPrefixSigFormula(ltqPrefixDef);
983  gDocNoticeFlagMap["prefixsigs"] = true;
984 
985  return generateCacheCode(sig, subst("$0(t)", var));
986 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
void addPrefixSigFormula(const string &str)
Definition: lateq.hh:75
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Definition: ppsig.hh:48
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::generateRec ( Tree  sig,
Tree  var,
Tree  le,
int  priority 
)
protected

Generate code for a group of mutually recursive definitions.

Definition at line 911 of file doc_compile.cpp.

References CS(), fOccMarkup, gDocNoticeFlagMap, generateDelayLine(), getCertifiedSigType(), Occurences::getMaxDelay(), getTypedNames(), len(), nth(), OccMarkup::retrieve(), setVectorNameProperty(), and sigProj().

Referenced by generateRecProj().

912 {
913  int N = len(le);
914 
915  vector<bool> used(N);
916  vector<int> delay(N);
917  vector<string> vname(N);
918  vector<string> ctype(N);
919 
920  // prepare each element of a recursive definition
921  for (int i=0; i<N; i++) {
922  Tree e = sigProj(i,sig); // recreate each recursive definition
923  if (fOccMarkup.retrieve(e)) {
924  // this projection is used
925  used[i] = true;
926  //cerr << "generateRec : used[" << i << "] = true" << endl;
927  getTypedNames(getCertifiedSigType(e), "r", ctype[i], vname[i]);
928  gDocNoticeFlagMap["recursigs"] = true;
929  //cerr << "- r : generateRec setVectorNameProperty : \"" << vname[i] << "\"" << endl;
930  setVectorNameProperty(e, vname[i]);
931  delay[i] = fOccMarkup.retrieve(e)->getMaxDelay();
932  } else {
933  // this projection is not used therefore
934  // we should not generate code for it
935  used[i] = false;
936  //cerr << "generateRec : used[" << i << "] = false" << endl;
937  }
938  }
939 
940  // generate delayline for each element of a recursive definition
941  for (int i=0; i<N; i++) {
942  if (used[i]) {
943  generateDelayLine(ctype[i], vname[i], delay[i], CS(nth(le,i), priority));
944  }
945  }
946 }
string CS(Tree sig, int priority)
Compile a signal.
void generateDelayLine(const string &ctype, const string &vname, int mxd, const string &exp)
Generate code for the delay mecchanism without using temporary variables.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
Definition: occurences.cpp:81
OccMarkup fOccMarkup
Definition: doc_compile.hh:60
Tree sigProj(int i, Tree rgroup)
Definition: signals.cpp:150
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
int getMaxDelay() const
return the maximal delay collected
Definition: occurences.cpp:54
int len(Tree l)
Definition: list.cpp:198
Tree nth(Tree l, int i)
Definition: list.cpp:182

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateRecProj ( Tree  sig,
Tree  exp,
int  i,
int  priority 
)
protected

Generate code for a projection of a group of mutually recursive definitions.

Definition at line 887 of file doc_compile.cpp.

References generateRec(), getVectorNameProperty(), isRec(), and subst().

Referenced by generateCode().

888 {
889  string vname;
890  Tree var, le;
891 
892  //cerr << "*** generateRecProj sig : \"" << ppsig(sig) << "\"" << endl;
893 
894  if ( ! getVectorNameProperty(sig, vname)) {
895  assert(isRec(r, var, le));
896  //cerr << " generateRecProj has NOT YET a vname : " << endl;
897  //cerr << "--> generateRecProj calls generateRec on \"" << ppsig(sig) << "\"" << endl;
898  generateRec(r, var, le, priority);
899  assert(getVectorNameProperty(sig, vname));
900  //cerr << "<-- generateRecProj vname : \"" << subst("$0(t)", vname) << "\"" << endl;
901  } else {
902  //cerr << "(generateRecProj has already a vname : \"" << subst("$0(t)", vname) << "\")" << endl;
903  }
904  return subst("$0(t)", vname);
905 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...
void generateRec(Tree sig, Tree var, Tree le, int priority)
Generate code for a group of mutually recursive definitions.
bool isRec(Tree t, Tree &body)
is t a de Bruijn recursive tree

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateSelect2 ( Tree  sig,
Tree  sel,
Tree  s1,
Tree  s2,
int  priority 
)
protected

Generate a select2 code.

Definition at line 1012 of file doc_compile.cpp.

References Lateq::addSelectSigFormula(), CS(), fLateq, gDocNoticeFlagMap, getFreshID(), setVectorNameProperty(), and subst().

Referenced by generateCode().

1013 {
1014  string var = getFreshID("q");
1015  string expsel = CS(sel, 0);
1016  string exps1 = CS(s1, 0);
1017  string exps2 = CS(s2, 0);
1018 
1019  string ltqSelDef;
1020  ltqSelDef += subst("$0(t) = \n", var);
1021  ltqSelDef += "\\left\\{\\begin{array}{ll}\n";
1022  ltqSelDef += subst("$0 & \\mbox{if \\,} $1 = 0\\\\\n", exps1, expsel);
1023  ltqSelDef += subst("$0 & \\mbox{if \\,} $1 = 1\n", exps2, expsel);
1024  ltqSelDef += "\\end{array}\\right.";
1025 
1026  fLateq->addSelectSigFormula(ltqSelDef);
1027  gDocNoticeFlagMap["selectionsigs"] = true;
1028 
1029  //return generateCacheCode(sig, subst("$0(t)", var));
1030  setVectorNameProperty(sig, var);
1031  return subst("$0(t)", var);
1032 }
string CS(Tree sig, int priority)
Compile a signal.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
void addSelectSigFormula(const string &str)
Definition: lateq.hh:74
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateSelect3 ( Tree  sig,
Tree  sel,
Tree  s1,
Tree  s2,
Tree  s3,
int  priority 
)
protected

Generate a select3 code.

Definition at line 1038 of file doc_compile.cpp.

References Lateq::addSelectSigFormula(), CS(), fLateq, gDocNoticeFlagMap, generateVariableStore(), getFreshID(), setVectorNameProperty(), and subst().

Referenced by generateCode().

1039 {
1040  string var = getFreshID("q");
1041  string expsel = CS(sel, 0);
1042  string exps1 = CS(s1, 0);
1043  string exps2 = CS(s2, 0);
1044  string exps3 = CS(s3, 0);
1045 
1046  string ltqSelDef;
1047  ltqSelDef += subst("$0(t) = \n", var);
1048  ltqSelDef += "\\left\\{\\begin{array}{ll}\n";
1049  ltqSelDef += subst("$0 & \\mbox{if \\,} $1 = 0\\\\\n", generateVariableStore(s1, exps1), expsel);
1050  ltqSelDef += subst("$0 & \\mbox{if \\,} $1 = 1\\\\\n", generateVariableStore(s2, exps2), expsel);
1051  ltqSelDef += subst("$0 & \\mbox{if \\,} $1 = 2\n", generateVariableStore(s3, exps3), expsel);
1052  ltqSelDef += "\\end{array}\\right.";
1053 
1054  fLateq->addSelectSigFormula(ltqSelDef);
1055  gDocNoticeFlagMap["selectionsigs"] = true;
1056 
1057  //return generateCacheCode(sig, subst("$0(t)", var));
1058  setVectorNameProperty(sig, var);
1059  return subst("$0(t)", var);
1060 }
string CS(Tree sig, int priority)
Compile a signal.
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
void addSelectSigFormula(const string &str)
Definition: lateq.hh:74
string generateVariableStore(Tree sig, const string &exp)
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateVariableStore ( Tree  sig,
const string &  exp 
)
protected

< "k" for constants.

< "p" for "parameter".

Definition at line 578 of file doc_compile.cpp.

References Lateq::addConstSigFormula(), Lateq::addParamSigFormula(), Lateq::addStoreSigFormula(), fLateq, gDocNoticeFlagMap, getCertifiedSigType(), getTypedNames(), getVectorNameProperty(), kBlock, kKonst, kSamp, setVectorNameProperty(), and subst().

Referenced by generateCacheCode(), and generateSelect3().

579 {
580  string vname, ctype;
581  Type t = getCertifiedSigType(sig);
582 
583  switch (t->variability()) {
584 
585  case kKonst :
586  getTypedNames(t, "k", ctype, vname);
587  fLateq->addConstSigFormula(subst("$0 = $1", vname, exp));
588  gDocNoticeFlagMap["constsigs"] = true;
589  return vname;
590 
591  case kBlock :
592  getTypedNames(t, "p", ctype, vname);
593  fLateq->addParamSigFormula(subst("$0(t) = $1", vname, exp));
594  gDocNoticeFlagMap["paramsigs"] = true;
595  setVectorNameProperty(sig, vname);
596  return subst("$0(t)", vname);
597 
598  case kSamp :
599  if(getVectorNameProperty(sig, vname)) {
600  return subst("$0(t)", vname);
601  } else {
602  getTypedNames(t, "s", ctype, vname);
603  //cerr << "- generateVariableStore : \"" << subst("$0(t) = $1", vname, exp) << "\"" << endl;
604  fLateq->addStoreSigFormula(subst("$0(t) = $1", vname, exp));
605  gDocNoticeFlagMap["storedsigs"] = true;
606  setVectorNameProperty(sig, vname);
607  return subst("$0(t)", vname);
608  }
609 
610  default:
611  assert(0);
612  return "";
613  }
614 }
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
void addConstSigFormula(const string &str)
Definition: lateq.hh:68
void setVectorNameProperty(Tree sig, const string &vecname)
Set the vector name property of a signal, the name of the vector used to store the previous values of...
void addStoreSigFormula(const string &str)
Definition: lateq.hh:70
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
Lateq * fLateq
Definition: doc_compile.hh:55
Definition: sigtype.hh:56
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
bool getVectorNameProperty(Tree sig, string &vecname)
Get the vector name property of a signal, the name of the vector used to store the previous values of...
void getTypedNames(Type t, const string &prefix, string &ctype, string &vname)
void addParamSigFormula(const string &str)
Definition: lateq.hh:69

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateVBargraph ( Tree  sig,
Tree  label,
Tree  min,
Tree  max,
const string &  exp 
)
protected

Definition at line 690 of file doc_compile.cpp.

References generateCacheCode(), getCertifiedSigType(), getFreshID(), kBlock, kKonst, and kSamp.

691 {
692  string varname = getFreshID("{u_g}");
693 
694  Type t = getCertifiedSigType(sig);
695  switch (t->variability()) {
696 
697  case kKonst :
698  break;
699 
700  case kBlock :
701  break;
702 
703  case kSamp :
704  break;
705  }
706  return generateCacheCode(sig, varname);
707 }
string generateCacheCode(Tree sig, const string &exp)
Definition: sigtype.hh:56
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

string DocCompiler::generateVSlider ( Tree  sig,
Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)
protected

Definition at line 665 of file doc_compile.cpp.

References Lateq::addUISigFormula(), fLateq, gDocNoticeFlagMap, generateCacheCode(), getFreshID(), getUIDir(), and prepareIntervallicUI().

Referenced by generateCode().

666 {
667  string varname = getFreshID("{u_s}") + "(t)";
668  fLateq->addUISigFormula(getUIDir(path), prepareIntervallicUI(varname, path, cur, min, max));
669  gDocNoticeFlagMap["slidersigs"] = true;
670  return generateCacheCode(sig, varname);
671 }
string prepareIntervallicUI(const string &name, Tree path, Tree tcur, Tree tmin, Tree tmax)
Prepare "intervallic" user interface elements (sliders, nentry).
string generateCacheCode(Tree sig, const string &exp)
void addUISigFormula(const string &path, const string &str)
Definition: lateq.hh:77
map< string, bool > gDocNoticeFlagMap
gDocNoticeFlagMap is public to let others turn to "true" flags that one want to print.
Definition: doc_notice.cpp:36
Lateq * fLateq
Definition: doc_compile.hh:55
string getUIDir(Tree pathname)
Get the directory of a user interface element.
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::generateXtended ( Tree  sig,
int  priority 
)
protected

retrieve the type annotation of sig

Parameters
sigthe signal we want to know the type

Definition at line 1067 of file doc_compile.cpp.

References CTree::arity(), CTree::branch(), CS(), fLateq, generateCacheCode(), xtended::generateLateq(), getCertifiedSigType(), getUserData(), and xtended::needCache().

Referenced by generateCode().

1068 {
1069  xtended* p = (xtended*) getUserData(sig);
1070  vector<string> args;
1071  vector<Type> types;
1072 
1073  for (int i=0; i<sig->arity(); i++) {
1074  args.push_back(CS(sig->branch(i), 0));
1075  types.push_back(getCertifiedSigType(sig->branch(i)));
1076  }
1077 
1078  if (p->needCache()) {
1079  //cerr << "!! generateXtended : <needCache> : calls generateCacheCode(sig, p->generateLateq(fLateq, args, types))" << endl;
1080  return generateCacheCode(sig, p->generateLateq(fLateq, args, types));
1081  } else {
1082  //cerr << "!! generateXtended : <do not needCache> : calls p->generateLateq(fLateq, args, types)" << endl;
1083  return p->generateLateq(fLateq, args, types);
1084  }
1085 }
string CS(Tree sig, int priority)
Compile a signal.
string generateCacheCode(Tree sig, const string &exp)
virtual string generateLateq(Lateq *lateq, const vector< string > &args, const vector< Type > &types)=0
virtual bool needCache()=0
Lateq * fLateq
Definition: doc_compile.hh:55
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
int arity() const
return the number of branches (subtrees) of a tree
Definition: tree.hh:144
void * getUserData(Symbol *sym)
Returns user data.
Definition: symbol.hh:100
Tree branch(int i) const
return the ith branch (subtree) of a tree
Definition: tree.hh:145

Here is the call graph for this function:

Here is the caller graph for this function:

bool DocCompiler::getCompiledExpression ( Tree  sig,
string &  cexp 
)
protected

Test if a signal is already compiled.

Parameters
sigthe signal expression to compile.
namethe string representing the compiled expression.
Returns
true is already compiled

Definition at line 141 of file doc_compile.cpp.

References fCompileProperty, and property< P >::get().

Referenced by CS(), and generateCacheCode().

142 {
143  return fCompileProperty.get(sig, cexp);
144 }
bool get(Tree t, P &data)
Definition: property.hh:32
property< string > fCompileProperty
Definition: doc_compile.hh:52

Here is the call graph for this function:

Here is the caller graph for this function:

Description* DocCompiler::getDescription ( )
inline

Definition at line 88 of file doc_compile.hh.

References fDescription.

88 { return fDescription; }
Description * fDescription
Definition: doc_compile.hh:56
string DocCompiler::getFreshID ( const string &  prefix)
protected

Definition at line 72 of file doc_compile.cpp.

References docT(), fIDCounters, and subst().

Referenced by compileLateq(), generateButton(), generateCheckbox(), generateHBargraph(), generateHSlider(), generateNumEntry(), generatePrefix(), generateSelect2(), generateSelect3(), generateVBargraph(), generateVSlider(), and getTypedNames().

73 {
74  if (fIDCounters.find(prefix) == fIDCounters.end()) {
75  fIDCounters[prefix] = 1;
76  }
77  int n = fIDCounters[prefix];
78  fIDCounters[prefix] = n+1;
79 
80  return subst("$0_{$1}", prefix, docT(n));
81 }
string docT(char *c)
Definition: doc_Text.cpp:77
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
static map< string, int > fIDCounters
Definition: doc_compile.hh:58

Here is the call graph for this function:

Here is the caller graph for this function:

Lateq* DocCompiler::getLateq ( )
inline

Definition at line 86 of file doc_compile.hh.

References fLateq.

86 { return (Lateq*)fLateq; }
Definition: lateq.hh:56
Lateq * fLateq
Definition: doc_compile.hh:55
int DocCompiler::getSharingCount ( Tree  t)
protected

Definition at line 66 of file doc_sharing.cpp.

References fSharingKey, Node::getInt(), getProperty(), and CTree::node().

Referenced by generateCacheCode(), and sharingAnnotation().

68 {
69  //cerr << "getSharingCount of : " << *sig << " = ";
70  Tree c;
71  if (getProperty(sig, fSharingKey, c)) {
72  //cerr << c->node().getInt() << endl;
73  return c->node().getInt();
74  } else {
75  //cerr << 0 << endl;
76  return 0;
77  }
78 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Tree fSharingKey
Definition: doc_compile.hh:59
int getInt() const
Definition: node.hh:104
bool getProperty(Tree t, Tree key, Tree &val)
Definition: list.cpp:423

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::getTypedNames ( Type  t,
const string &  prefix,
string &  ctype,
string &  vname 
)
protected

Definition at line 495 of file doc_compile.cpp.

References getFreshID(), ifloat(), kInt, and subst().

Referenced by generateCacheCode(), generateDocConstantTbl(), generateDocWriteTbl(), generateFConst(), generateFVar(), generateNumber(), generateRec(), and generateVariableStore().

496 {
497  if (t->nature() == kInt) {
498  ctype = "int"; vname = subst("$0", getFreshID(prefix));
499  } else {
500  ctype = ifloat(); vname = subst("$0", getFreshID(prefix));
501  }
502 }
Definition: sigtype.hh:54
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
string getFreshID(const string &prefix)
Definition: doc_compile.cpp:72
const char * ifloat()
Definition: floats.cpp:46

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::getUIDir ( Tree  pathname)
protected

Get the directory of a user interface element.

Convert the input reversed path tree into a string. The name of the UI is stripped (the head of the path tree), the rest of the tree is a list of pointed pairs, where the names are contained by the tail of these pointed pairs. Metadatas (begining by '[') are stripped.

Parameters
[in]pathnameThe path tree to convert.
Returns
<string> A directory-like string.

Definition at line 1244 of file doc_compile.cpp.

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

Referenced by generateButton(), generateCheckbox(), generateHSlider(), generateNumEntry(), and generateVSlider().

1245 {
1246  //cerr << "Documentator : getUIDir : print(pathname, stdout) = "; print(pathname, stdout); cerr << endl;
1247  string s;
1248  Tree dir = reverse(tl(pathname));
1249  while (!isNil(dir)) {
1250  string tmp = tree2str(tl(hd(dir)));
1251  if ( (tmp[0] != '[') && (!tmp.empty()) ) {
1252  s += tmp + '/';
1253  }
1254  dir = tl(dir);
1255  }
1256  return s;
1257 }
Tree reverse(Tree l)
Definition: list.cpp:240
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree hd(Tree l)
Definition: list.hh:133
bool isNil(Tree l)
Definition: list.hh:137
Tree tl(Tree l)
Definition: list.hh:134
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Definition: tree.cpp:278

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::getUIDocInfos ( Tree  path,
string &  label,
string &  unit 
)
protected

Get information on a user interface element for documentation.

Parameters
[in]pathThe UI full pathname to parse.
[out]labelThe place to store the UI name.
[out]unitThe place to store the UI unit.

Definition at line 1328 of file doc_compile.cpp.

References extractMetadata(), hd(), and tree2str().

Referenced by prepareBinaryUI(), and prepareIntervallicUI().

1329 {
1330  label = "";
1331  unit = "";
1332 
1333  map<string, set<string> > metadata;
1334  extractMetadata(tree2str(hd(path)), label, metadata);
1335 
1336  set<string> myunits = metadata["unit"];
1337 // for (set<string>::iterator i = myunits.begin(); i != myunits.end(); i++) {
1338 // cerr << "Documentator : getUIDocInfos : metadata[\"unit\"] = " << *i << endl;
1339 // }
1340  for (map<string, set<string> >::iterator i = metadata.begin(); i != metadata.end(); i++) {
1341  const string& key = i->first;
1342  const set<string>& values = i->second;
1343  for (set<string>::const_iterator j = values.begin(); j != values.end(); j++) {
1344  if(key == "unit") unit += *j;
1345  }
1346  }
1347 }
Tree hd(Tree l)
Definition: list.hh:133
void extractMetadata(const string &fulllabel, string &label, map< string, set< string > > &metadata)
Extracts metdata from a label : 'vol [unit: dB]' -> 'vol' + metadata.
Definition: description.cpp:14
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Definition: tree.cpp:278

Here is the call graph for this function:

Here is the caller graph for this function:

bool DocCompiler::getVectorNameProperty ( Tree  sig,
string &  vecname 
)
protected

Get the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay.

Parameters
sigthe signal expression.
vecnamethe string where to store the vector name.
Returns
true if the signal has this property, false otherwise

Definition at line 1117 of file doc_compile.cpp.

References fVectorProperty, and property< P >::get().

Referenced by generateAttach(), generateCacheCode(), generateDelayVecNoTemp(), generateFixDelay(), generatePrefix(), generateRecProj(), and generateVariableStore().

1118 {
1119  return fVectorProperty.get(sig, vecname);
1120 }
property< string > fVectorProperty
Definition: doc_compile.hh:53
bool get(Tree t, P &data)
Definition: property.hh:32

Here is the call graph for this function:

Here is the caller graph for this function:

bool DocCompiler::isShortEnough ( string &  s,
unsigned int  max 
)
protected

Definition at line 872 of file doc_compile.cpp.

References max().

873 {
874  return (s.length() <= max);
875 }
double max(double x, double y)
Definition: interval.hh:60

Here is the call graph for this function:

string DocCompiler::prepareBinaryUI ( const string &  name,
Tree  path 
)
protected

Prepare binary user interface elements (button, checkbox).

  • Format a LaTeX output string as a supertabular row with 3 columns : "\begin{supertabular}{lll}".
    See also
    Lateq::printHierarchy
  • The UI range is only a set of two values : {0, 1}.
  • The UI current value is automatically 0.
Parameters
[in]nameThe LaTeX name of the UI signal (eg. "{u_b}_{i}(t)").
[in]pathThe path tree to parse.
Returns
<string> The LaTeX output string.

Definition at line 1272 of file doc_compile.cpp.

References gDocMathStringMap, and getUIDocInfos().

Referenced by generateButton(), and generateCheckbox().

1273 {
1274  string label, unit;
1275  getUIDocInfos(path, label, unit);
1276  string s = "";
1277  label = (label.size()>0) ? ("\\textsf{\""+label+"\"} ") : "";
1278  unit = (unit.size()>0) ? ("\\ ("+unit+")") : "";
1279  s += label + unit;
1280  s += " & $" + name + "$";
1281  s += " $\\in$ $\\left\\{\\,0, 1\\,\\right\\}$";
1282  s += " & $(\\mbox{" + gDocMathStringMap["defaultvalue"] + "} = 0)$\\\\";
1283  return s;
1284 }
void getUIDocInfos(Tree path, string &label, string &unit)
Get information on a user interface element for documentation.
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51

Here is the call graph for this function:

Here is the caller graph for this function:

string DocCompiler::prepareIntervallicUI ( const string &  name,
Tree  path,
Tree  tcur,
Tree  tmin,
Tree  tmax 
)
protected

Prepare "intervallic" user interface elements (sliders, nentry).

  • Format a LaTeX output string as a supertabular row with 3 columns : "\begin{supertabular}{lll}".
    See also
    Lateq::printHierarchy
  • The UI range is an bounded interval : [tmin, tmax].
  • The UI current value is tcur.
Parameters
[in]nameThe LaTeX name of the UI signal (eg. "{u_s}_{i}(t)").
[in]pathThe path tree to parse.
[in]tcurThe current UI value tree to convert.
[in]tminThe minimum UI value tree to convert.
[in]tmaxThe maximum UI value tree to convert.
Returns
<string> The LaTeX output string.

Definition at line 1302 of file doc_compile.cpp.

References docT(), gDocMathStringMap, getUIDocInfos(), max(), min(), and tree2float().

Referenced by generateHSlider(), generateNumEntry(), and generateVSlider().

1303 {
1304  string label, unit, cur, min, max;
1305  getUIDocInfos(path, label, unit);
1306  cur = docT(tree2float(tcur));
1307  min = docT(tree2float(tmin));
1308  max = docT(tree2float(tmax));
1309 
1310  string s = "";
1311  label = (label.size()>0) ? ("\\textsf{\""+label+"\"} ") : "";
1312  unit = (unit.size()>0) ? ("\\ ("+unit+")") : "";
1313  s += label + unit;
1314  s += " & $" + name + "$";
1315  s += " $\\in$ $\\left[\\," + min + ", " + max + "\\,\\right]$";
1316  s += " & $(\\mbox{" + gDocMathStringMap["defaultvalue"] + "} = " + cur + ")$\\\\";
1317  return s;
1318 }
string docT(char *c)
Definition: doc_Text.cpp:77
double max(double x, double y)
Definition: interval.hh:60
void getUIDocInfos(Tree path, string &label, string &unit)
Get information on a user interface element for documentation.
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98
double min(double x, double y)
Definition: interval.hh:59
double tree2float(Tree t)
if t has a node of type float, return it otherwise error
Definition: tree.cpp:246
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::printGCCall ( Tree  sig,
const string &  calledFunction 
)
protected

Print calling information of generateCode, for debug purposes.

Remarks
To turn printing on, turn the 'printCalls' boolean to true.

Definition at line 254 of file doc_compile.cpp.

Referenced by generateCode().

255 {
256  bool printCalls = false;
257  bool maskSigs = false;
258 
259  if(printCalls) {
260  cerr << " -> generateCode calls " << calledFunction;
261  if(maskSigs) {
262  cerr << endl;
263  } else {
264  cerr << " on " << ppsig(sig) << endl;
265  }
266  }
267 }
Definition: ppsig.hh:48

Here is the caller graph for this function:

string DocCompiler::setCompiledExpression ( Tree  sig,
const string &  cexp 
)
protected

Set the string of a compiled expression is already compiled.

Parameters
sigthe signal expression to compile.
cexpthe string representing the compiled expression.
Returns
the cexp (for commodity)

Definition at line 153 of file doc_compile.cpp.

References fCompileProperty, and property< P >::set().

Referenced by CS().

154 {
155  fCompileProperty.set(sig, cexp);
156  return cexp;
157 }
void set(Tree t, const P &data)
Definition: property.hh:22
property< string > fCompileProperty
Definition: doc_compile.hh:52

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::setDescription ( Description descr)
inline

Definition at line 87 of file doc_compile.hh.

References fDescription.

87 { fDescription= descr; }
Description * fDescription
Definition: doc_compile.hh:56
void DocCompiler::setSharingCount ( Tree  t,
int  count 
)
protected

Definition at line 81 of file doc_sharing.cpp.

References fSharingKey, setProperty(), and tree().

Referenced by sharingAnnotation().

83 {
84  //cerr << "setSharingCount of : " << *sig << " <- " << count << endl;
85  setProperty(sig, fSharingKey, tree(count));
86 }
Tree fSharingKey
Definition: doc_compile.hh:59
Tree tree(const Node &n)
Definition: tree.hh:186
void setProperty(Tree t, Tree key, Tree val)
Definition: list.cpp:418

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::setVectorNameProperty ( Tree  sig,
const string &  vecname 
)
protected

Set the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay.

Parameters
sigthe signal expression.
vecnamethe string representing the vector name.
Returns
true is already compiled

Definition at line 1103 of file doc_compile.cpp.

References fVectorProperty, and property< P >::set().

Referenced by generateAttach(), generateDelayVecNoTemp(), generateFVar(), generateInput(), generateRec(), generateSelect2(), generateSelect3(), and generateVariableStore().

1104 {
1105  fVectorProperty.set(sig, vecname);
1106 }
void set(Tree t, const P &data)
Definition: property.hh:22
property< string > fVectorProperty
Definition: doc_compile.hh:53

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::sharingAnalysis ( Tree  t)
protected

Definition at line 96 of file doc_sharing.cpp.

References fSharingKey, hd(), isList(), kSamp, sharingAnnotation(), shprkey(), and tl().

Referenced by annotate().

98 {
99  fSharingKey = shprkey(t);
100  if (isList(t)) {
101  while (isList(t)) {
103  t = tl(t);
104  }
105  } else {
107  }
108 }
Tree shprkey(Tree t)
Create a specific property key for the sharing count of subtrees of t.
Definition: shlysis.cpp:69
Tree hd(Tree l)
Definition: list.hh:133
void sharingAnnotation(int vctxt, Tree t)
bool isList(Tree l)
Definition: list.hh:138
Tree fSharingKey
Definition: doc_compile.hh:59
Definition: sigtype.hh:56
Tree tl(Tree l)
Definition: list.hh:134

Here is the call graph for this function:

Here is the caller graph for this function:

void DocCompiler::sharingAnnotation ( int  vctxt,
Tree  t 
)
protected

Definition at line 117 of file doc_sharing.cpp.

References getCertifiedSigType(), getSharingCount(), getSubSignals(), isSigGen(), and setSharingCount().

Referenced by sharingAnalysis().

119 {
120  //cerr << "START sharing annotation of " << *sig << endl;
121  int count = getSharingCount(sig);
122 
123  if (count > 0) {
124  // it is not our first visit
125  setSharingCount(sig, count+1);
126 
127  } else {
128  // it is our first visit,
129  int v = getCertifiedSigType(sig)->variability();
130 
131  // check "time sharing" cases
132  if (v < vctxt) {
133  setSharingCount(sig, 2); // time sharing occurence : slower expression in faster context
134  } else {
135  setSharingCount(sig, 1); // regular occurence
136  }
137 
138  // Annotate the sub signals
139  vector<Tree> subsig;
140  int n = getSubSignals(sig, subsig);
141  if (n>0 && ! isSigGen(sig)) {
142  for (int i=0; i<n; i++) sharingAnnotation(v, subsig[i]);
143  }
144  }
145  //cerr << "END sharing annotation of " << *sig << endl;
146 }
bool isSigGen(Tree t, Tree &x)
Definition: signals.cpp:91
void sharingAnnotation(int vctxt, Tree t)
void setSharingCount(Tree t, int count)
Definition: doc_sharing.cpp:81
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
int getSharingCount(Tree t)
Definition: doc_sharing.cpp:66
int getSubSignals(Tree sig, vector< Tree > &vsigs, bool visitgen=true)
Extract the sub signals of a signal expression, that is not necesseraly all the subtrees.
Definition: subsignals.cpp:12

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

property<string> DocCompiler::fCompileProperty
protected

Definition at line 52 of file doc_compile.hh.

Referenced by getCompiledExpression(), and setCompiledExpression().

Description* DocCompiler::fDescription
protected

Definition at line 56 of file doc_compile.hh.

Referenced by getDescription(), and setDescription().

map< string, int > DocCompiler::fIDCounters
staticprotected

Definition at line 58 of file doc_compile.hh.

Referenced by getFreshID().

Lateq* DocCompiler::fLateq
protected
OccMarkup DocCompiler::fOccMarkup
protected
int DocCompiler::fPriority
protected

math priority context

Definition at line 61 of file doc_compile.hh.

Tree DocCompiler::fSharingKey
protected

Definition at line 59 of file doc_compile.hh.

Referenced by getSharingCount(), setSharingCount(), and sharingAnalysis().

property<string> DocCompiler::fVectorProperty
protected

Definition at line 53 of file doc_compile.hh.

Referenced by getVectorNameProperty(), and setVectorNameProperty().


The documentation for this class was generated from the following files: