28
28
#include "sigtype.hh"
31
//--------------------------------------------------------------------------
32
// NULLENV : empty type environment (also property key for closed term type)
35
31
extern bool gVectorSwitch;
38
//--------------------------------------------------------------------------
39
// addEnv : add a new binding to a type environment
41
Tree addEnv(Tree var, Type tp, Tree env);
44
//--------------------------------------------------------------------------
45
// searchEnv : search var binding in env
47
Type searchEnv(Tree env, Tree var);
50
//--------------------------------------------------------------------------
51
// getSigType : return or infere the type of a term
53
Type getSigType(Tree term);
56
//--------------------------------------------------------------------------
57
// typeAnnotation : annotate a term with type information
34
/** \file sigtyperules.hh
35
* API to the typing system of signals
37
* Two functions are provided :
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
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.
52
* Annotates a signal term and its subterms with type information
59
54
void typeAnnotation(Tree term);
62
//--------------------------------------------------------------------------
63
// sigType : return the type information of a term
65
//Type sigType(Tree term);
59
* Return the type of a previously annotated signal term
61
Type getCertifiedSigType(Tree term);
65
* print annotation statistics
67
void annotationStatistics();