TypePoly.cxx File Reference

#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
#include <libsherpa/UExcept.hxx>
#include "Options.hxx"
#include "UocInfo.hxx"
#include "AST.hxx"
#include "Type.hxx"
#include "TypeInfer.hxx"
#include "TypeScheme.hxx"
#include "TypeMut.hxx"
#include "Typeclass.hxx"
#include "inter-pass.hxx"
#include "Unify.hxx"

Go to the source code of this file.

Defines

#define GEN_STEP(m, s)   if (genSteps[m][s])
#define GEN_STEP2(m, s1, s2)   if (genSteps[m][s1] || genSteps[m][s2])

Enumerations

enum  GenSteps {
  gs_fixAll = 0, gs_solve = 1, gs_pcst = 2, gs_fixTop = 3,
  gs_valRes = 4, gs_genFtvs = 5, gs_ctrNorm = 6, gs_fnNorm = 7,
  gs_dummy = 8, gs_migrate = 9, gs_ambgCheck = 10
}

Functions

bool isExpansive (std::ostream &errStream, shared_ptr< const TSEnvironment > gamma, shared_ptr< const AST > ast)
bool isExpansive (std::ostream &errStream, shared_ptr< const TSEnvironment > gamma, shared_ptr< Type > typ)
static void remftvsWrtFnDeps (TypeSet &ftvs, TypeSet fnDeps, shared_ptr< const TSEnvironment > gamma)
static void updateSigmas (shared_ptr< const AST > bp, const TypeSet &ftvs, shared_ptr< TCConstraints > tcc)
bool generalizePat (std::ostream &errStream, const LexLoc &errLoc, shared_ptr< TSEnvironment > gamma, shared_ptr< const InstEnvironment > instEnv, shared_ptr< AST > bp, shared_ptr< AST > expr, shared_ptr< TCConstraints > tcc, shared_ptr< TCConstraints > parentTCC, shared_ptr< Trail > trail)

Variables

static bool genSteps [6][11]


Define Documentation

#define GEN_STEP ( m,
s   )     if (genSteps[m][s])

Definition at line 486 of file TypePoly.cxx.

#define GEN_STEP2 ( m,
s1,
s2   )     if (genSteps[m][s1] || genSteps[m][s2])

Definition at line 487 of file TypePoly.cxx.


Enumeration Type Documentation

enum GenSteps

Enumerator:
gs_fixAll 
gs_solve 
gs_pcst 
gs_fixTop 
gs_valRes 
gs_genFtvs 
gs_ctrNorm 
gs_fnNorm 
gs_dummy 
gs_migrate 
gs_ambgCheck 

Definition at line 446 of file TypePoly.cxx.


Function Documentation

bool generalizePat ( std::ostream &  errStream,
const LexLoc errLoc,
shared_ptr< TSEnvironment gamma,
shared_ptr< const InstEnvironment instEnv,
shared_ptr< AST bp,
shared_ptr< AST expr,
shared_ptr< TCConstraints tcc,
shared_ptr< TCConstraints parentTCC,
shared_ptr< Trail trail 
)

Definition at line 773 of file TypePoly.cxx.

References CHKERR, gen_local, TypeScheme::make(), and updateSigmas().

Referenced by typeInfer().

bool isExpansive ( std::ostream &  errStream,
shared_ptr< const TSEnvironment gamma,
shared_ptr< Type typ 
)

Definition at line 507 of file TypeValRes.cxx.

References assert(), CHKEXP, isExpansive(), and MARK_PREDICATE.

bool isExpansive ( std::ostream &  errStream,
shared_ptr< const TSEnvironment gamma,
shared_ptr< const AST ast 
)

Definition at line 87 of file TypeValRes.cxx.

static void remftvsWrtFnDeps ( TypeSet ftvs,
TypeSet  fnDeps,
shared_ptr< const TSEnvironment gamma 
) [static]

Definition at line 217 of file TypePoly.cxx.

References TCConstraints::close().

static void updateSigmas ( shared_ptr< const AST bp,
const TypeSet ftvs,
shared_ptr< TCConstraints tcc 
) [static]

Definition at line 724 of file TypePoly.cxx.

References assert(), at_identPattern, and at_letGather.

Referenced by generalizePat().


Variable Documentation

bool genSteps[6][11] [static]

Initial value:

 {
  


  {false, false, false, false, true, true, false, false,  false, true, true},


  {false, true, true,  true, true, true, true,   true,   true, true, true},


  {false, true, true,  false, true, true, true,  false,  false, true, true},

  


  {true, false, false, false, true, true, false, false,  false, true, true},


  {true, true,  false, false, true, true, true,  true,   true,  true, true},


  {true, true,  false, false, true, true, true,  false,  false, true, true},
}

Definition at line 462 of file TypePoly.cxx.


Generated on Thu May 17 23:59:16 2012 for BitC Compiler by  doxygen 1.4.7