~ubuntu-branches/ubuntu/saucy/faust/saucy

« back to all changes in this revision

Viewing changes to compiler/signals/sigtyperules.hh

  • Committer: Package Import Robot
  • Author(s): Mario Lang
  • Date: 2012-04-04 13:52:01 UTC
  • mfrom: (1.1.6) (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120404135201-hpsrk87x3hga94tc
Tags: 0.9.46-2
* Fix "ftbfs with GCC-4.7":
  - debian/patches/unistd: Include <unistd.h> where necessary.
    (Closes: #667163)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "sigtype.hh"
29
29
 
30
30
 
31
 
//--------------------------------------------------------------------------
32
 
// NULLENV : empty type environment (also property key for closed term type)
33
 
 
34
 
extern Tree NULLENV;
35
31
extern bool gVectorSwitch;
36
32
 
37
33
 
38
 
//--------------------------------------------------------------------------
39
 
// addEnv : add a new binding to a type environment
40
 
 
41
 
Tree addEnv(Tree var, Type tp, Tree env);
42
 
 
43
 
 
44
 
//--------------------------------------------------------------------------
45
 
// searchEnv : search var binding in env
46
 
 
47
 
Type searchEnv(Tree env, Tree var);
48
 
 
49
 
 
50
 
//--------------------------------------------------------------------------
51
 
//      getSigType : return or infere the type of a term
52
 
 
53
 
Type getSigType(Tree term);
54
 
 
55
 
 
56
 
//--------------------------------------------------------------------------
57
 
//      typeAnnotation : annotate a term with type information
58
 
 
 
34
/** \file sigtyperules.hh
 
35
 * API to the typing system of signals
 
36
 *
 
37
 * Two functions are provided :
 
38
 *
 
39
 * \li void typeAnnotation(Tree term)       : annotates a signal term and its subterms with type information
 
40
 * \li Type getCertifiedSigType(Tree term)  : return the type of a previously annotated signal term
 
41
 *
 
42
 * TypeAnnotation must be called first to annotate a signal or a list of signals, before being able to
 
43
 * call getCertifiedType on any subterms. GetCertifiedType will produce an error if a term was not
 
44
 * previously annotated.
 
45
 *
 
46
 **/
 
47
 
 
48
 
 
49
 
 
50
 
 
51
/**
 
52
 *      Annotates a signal term and its subterms with type information
 
53
 */
59
54
void typeAnnotation(Tree term);
60
55
 
61
56
 
62
 
//--------------------------------------------------------------------------
63
 
//      sigType : return the type information of a term
64
 
 
65
 
//Type sigType(Tree term);
 
57
 
 
58
/**
 
59
 *      Return the type of a previously annotated signal term
 
60
 */
 
61
Type getCertifiedSigType(Tree term);
 
62
 
 
63
 
 
64
/**
 
65
 *      print annotation statistics
 
66
 */
 
67
void annotationStatistics();
66
68
 
67
69
#endif
68
70