Solver.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.

Functions

static TypeSet getDomain (shared_ptr< Typeclass > t)
static TypeSet getDomVars (const TypeSet &dom)
static bool mustSolve (const TypeSet &dom)
static void rigidify (TypeSet &vars)
static void unrigidify (TypeSet &vars)
bool handlePcst (std::ostream &errStream, shared_ptr< Trail > trail, shared_ptr< Constraint > ct, shared_ptr< Constraints > cset, bool &handled, bool &handlable)
bool handleSpecialPred (std::ostream &errStream, shared_ptr< Trail > trail, shared_ptr< Constraint > pred, shared_ptr< Constraints > cset, bool &handled, bool &handlable)
bool handleTCPred (std::ostream &errStream, shared_ptr< Trail > trail, shared_ptr< Typeclass > pred, shared_ptr< TCConstraints > tcc, shared_ptr< const InstEnvironment > instEnv, bool must_solve, bool trial_mode, bool &handled)
static bool handleEquPreds (std::ostream &errStream, shared_ptr< Trail > trail, shared_ptr< Typeclass > pred, shared_ptr< TCConstraints > tcc, TypeSet &vars, bool &handled)


Function Documentation

static TypeSet getDomain ( shared_ptr< Typeclass t  )  [static]

Definition at line 65 of file Solver.cxx.

static TypeSet getDomVars ( const TypeSet dom  )  [static]

Definition at line 90 of file Solver.cxx.

static bool handleEquPreds ( std::ostream &  errStream,
shared_ptr< Trail trail,
shared_ptr< Typeclass pred,
shared_ptr< TCConstraints tcc,
TypeSet vars,
bool &  handled 
) [static]

Definition at line 515 of file Solver.cxx.

References DEBUG, Options::debugTvP, rigidify(), and unrigidify().

bool handlePcst ( std::ostream &  errStream,
shared_ptr< Trail trail,
shared_ptr< Constraint ct,
shared_ptr< Constraints cset,
bool &  handled,
bool &  handlable 
)

Definition at line 136 of file Solver.cxx.

References assert(), CHKERR, DEBUG, Options::debugTvP, Type::Kmono, and Type::Kpoly.

bool handleSpecialPred ( std::ostream &  errStream,
shared_ptr< Trail trail,
shared_ptr< Constraint pred,
shared_ptr< Constraints cset,
bool &  handled,
bool &  handlable 
)

Definition at line 256 of file Solver.cxx.

References assert(), CHKERR, COMP_INVALID, DEBUG, Options::debugTvP, boost::GC_NULL, Type::make(), SpecialNames::sp_has_field, SpecialNames::sp_ref_types, and SpecialNames::spNames.

bool handleTCPred ( std::ostream &  errStream,
shared_ptr< Trail trail,
shared_ptr< Typeclass pred,
shared_ptr< TCConstraints tcc,
shared_ptr< const InstEnvironment instEnv,
bool  must_solve,
bool  trial_mode,
bool &  handled 
)

Definition at line 417 of file Solver.cxx.

References assert(), DEBUG, Options::debugTvP, boost::GC_NULL, and MBF().

static bool mustSolve ( const TypeSet dom  )  [static]

Definition at line 103 of file Solver.cxx.

static void rigidify ( TypeSet vars  )  [static]

Definition at line 115 of file Solver.cxx.

References assert(), and TY_RIGID.

Referenced by handleEquPreds().

static void unrigidify ( TypeSet vars  )  [static]

Definition at line 125 of file Solver.cxx.

References assert(), and TY_RIGID.

Referenced by handleEquPreds().


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