Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Val.H File Reference

#include "ValExpr.H"
#include "Location.H"
#include "Dep.H"
#include "Prim.H"
#include "Err.H"
#include <Generics.H>
#include <CacheC.H>
#include <PrefixTbl.H>
#include <VestaSource.H>
#include <iostream>
#include <fstream>

Go to the source code of this file.

Enumerations

enum  ValueKind {
  BooleanVK, IntegerVK, ListVK, BindingVK,
  PrimitiveVK, TextVK, ClosureVK, ModelVK,
  ErrorVK, FpVK, UnbndVK
}

Functions

bool IsValTrue (Val v)
bool IsValFalse (Val v)
bool IsEmptyBinding (Val v)
bool IsEmptyList (Val v)
Val ValType (Val v)
Val LetDpnd (Val v, const Context &c)
Val FuncDpnd (Val bodyv, Val fv, const Context &c)
Val ModelDpnd (Val bodyv, Val fv, const Context &c)
DPathsClosureDpnd (ClosureVC *cl)
void ModelCutOff (Val v)
void ValueDpnd (Val v, DPaths *ps)
Text PrintForm (Val v)
void PrintContext (std::ostream *os, const Context &c, bool verbose=false, int indent=0)
Assoc FindInContext (const Text &id, const Context &c)
Val LookupInContext (const Text &id, const Context &c)
Val LookupPath (const FV2::T &path, const Context &c)
Val LookupPath (DepPath *dp, const Context &c)
Val LookupPath (Basics::uint16 idx, PathKind pkind, const PrefixTbl &tbl, const Context &c, Val *vals)
void AppendDToContext (const Text &name, Expr elem, const Context &cElem, Context &cc)
Context RestrictContext (const Context &con, Vars fv)
Context Snip (const Context &orig, const Text &remove, bool &found)
Context Prune (const Context &orig, const Context &remove)
void PushToContext (const Text &name, Expr elem, const Context &cElem, Context &in)
Context AddStmtAssocs (StmtListEC *assocs, const Context &c)
void ValInit ()

Variables

Val valTrue
Val valFalse
Val valZero
Val valErr
Val valUnbnd
Val valTBinding
Val valTBool
Val valTClosure
Val valTErr
Val valTInt
Val valTList
Val valTText
Val valTModel
Context conEmpty
Context conInitial
Assoc nullAssoc


Enumeration Type Documentation

enum ValueKind
 

Enumeration values:
BooleanVK 
IntegerVK 
ListVK 
BindingVK 
PrimitiveVK 
TextVK 
ClosureVK 
ModelVK 
ErrorVK 
FpVK 
UnbndVK 

Definition at line 44 of file Val.H.


Function Documentation

Context AddStmtAssocs StmtListEC assocs,
const Context c
 

Definition at line 2838 of file Val.C.

References AssignAssoc(), AssignEK, StmtListEC::elems, Error(), ErrorDetail(), ErrorExpr(), IterateEC::Eval(), Sequence< Elem, elem_ptrfree >::get(), IterateAssoc(), IterateEK, ExprC::kind, ExprC::loc, Basics::mutex::lock(), outputMu, Sequence< Elem, elem_ptrfree >::size(), TryEK, TypedEK, and Basics::mutex::unlock().

Referenced by BlockEC::Eval(), and IterateAssoc().

void AppendDToContext const Text name,
Expr  elem,
const Context cElem,
Context cc
 

Definition at line 2688 of file Val.C.

References ListT< Value >::Append1D(), ExprC::Eval(), ExprC::freeVars, NEW_CONSTR, and RestrictContext().

Referenced by BindingEC::Eval().

DPaths* ClosureDpnd ClosureVC cl  ) 
 

Assoc FindInContext const Text id,
const Context c
 

Definition at line 2471 of file Val.C.

References AssocVC::name, ListT< Value >::Null(), and ListT< Value >::Pop().

Referenced by AllFreeVarsBoundInContext(), BindingVC::Defined(), BindingVC::DefinedNoDpnd(), BindingEC::Eval(), Lookup(), LookupInContext(), Map(), ParMap(), Prune(), and RestrictContext().

Val FuncDpnd Val  bodyv,
Val  fv,
const Context c
 

Definition at line 2203 of file Val.C.

References CollectFunc().

Referenced by ApplicationFromCache().

bool IsEmptyBinding Val  v  ) 
 

Definition at line 1311 of file Val.C.

References BindingVK.

Referenced by Append(), Defined(), EqualVal(), Lookup(), Minus(), Plus(), and PlusPlus().

bool IsEmptyList Val  v  ) 
 

Definition at line 1315 of file Val.C.

References ListVK.

Referenced by Append(), EqualVal(), and Plus().

bool IsValFalse Val  v  ) 
 

Definition at line 1307 of file Val.C.

References BooleanVK.

Referenced by And(), EqualVal(), IfEC::Eval(), Implies(), and NotEq().

bool IsValTrue Val  v  ) 
 

Definition at line 1303 of file Val.C.

References BooleanVK, and ValC::vKind.

Referenced by BindingAppend(), IfEC::Eval(), and Or().

Val LetDpnd Val  v,
const Context c
 

Definition at line 2006 of file Val.C.

References CanonicalDpnd(), CollectLet(), DeleteDuplicatePaths(), AssocVC::name, ListT< Value >::Null(), ListT< Value >::Pop(), and AssocVC::val.

Referenced by BlockEC::Eval().

Val LookupInContext const Text id,
const Context c
 

Definition at line 2481 of file Val.C.

References FindInContext().

Referenced by BindRunToolArgs(), CollectLookup(), NameEC::Eval(), BindingVC::Lookup(), Lookup(), LookupArc(), BindingVC::LookupNoDpnd(), and LookupPath().

Val LookupPath Basics::uint16  idx,
PathKind  pkind,
const PrefixTbl tbl,
const Context c,
Val vals
 

Definition at line 2644 of file Val.C.

References PrefixTbl::Arc(), BangPK, BindingVK, BLenPK, ClosureVK, ExprPK, ListVK, LLenPK, VestaSourceSRPC::Lookup, ModelVK, NEW_CONSTR, PrefixTbl::PrefixIndex(), TypePK, ValType(), and ValC::vKind.

Val LookupPath DepPath dp,
const Context c
 

Definition at line 2571 of file Val.C.

References BangPK, BindingVK, BLenPK, ClosureVK, DepPath::content, ExprPK, Sequence< Elem, elem_ptrfree >::get(), ListVK, LLenPK, LookupArc(), LookupInContext(), ModelVK, NEW_CONSTR, Sequence< Elem, elem_ptrfree >::size(), TypePK, UnbndVK, ValType(), and ValC::vKind.

Val LookupPath const FV2::T path,
const Context c
 

Definition at line 2518 of file Val.C.

References BangPK, BindingVK, BLenPK, ClosureVK, ExprPK, Sequence< Elem, elem_ptrfree >::get(), ListVK, LLenPK, LookupArc(), LookupInContext(), ModelVK, NEW_CONSTR, Sequence< Elem, elem_ptrfree >::size(), TypePK, UnbndVK, ValType(), and ValC::vKind.

void ModelCutOff Val  v  ) 
 

Definition at line 1504 of file Val.C.

References BindingVK, ClosureVK, ClosureVC::con, DepPath::content, ValC::dps, ListVC::elems, BindingVC::elems, ClosureVC::func, SharedTable< K, V >::KVPair::key, ListVC::lenDps, BindingVC::lenDps, ListVK, ModelCutOff(), AssocVC::name, FuncEC::name, nameDot, NEW, SharedTable< K, V >::Iterator::Next(), ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), SharedTable< K, V >::T::Put(), SharedTable< K, V >::T::Size(), ValC::SizeOfDPS(), AssocVC::val, and ValC::vKind.

Referenced by ModelCutOff(), ModelFromCache(), NamesTagsPickle(), and NormalModelFromCache().

Val ModelDpnd Val  bodyv,
Val  fv,
const Context c
 

Definition at line 2310 of file Val.C.

References CollectModel().

Referenced by ModelFromCache().

void PrintContext std::ostream *  os,
const Context c,
bool  verbose = false,
int  indent = 0
 

Text PrintForm Val  v  ) 
 

Definition at line 2464 of file Val.C.

References Basics::OBufStream::str().

Referenced by ConvertToBindElem().

Context Prune const Context orig,
const Context remove
 

Definition at line 2736 of file Val.C.

References ListT< Value >::Append1D(), FindInContext(), AssocVC::name, ListT< Value >::Null(), and ListT< Value >::Pop().

void PushToContext const Text name,
Expr  elem,
const Context cElem,
Context in
 

Definition at line 2695 of file Val.C.

References ExprC::Eval(), ExprC::freeVars, NEW_CONSTR, ListT< Value >::Push(), and RestrictContext().

Referenced by ApplyModel(), BindApplicationArgs(), ModelEC::Eval(), and ProcessModelHead().

Context RestrictContext const Context con,
Vars  fv
 

Definition at line 2702 of file Val.C.

References ListT< Value >::Append1D(), FindInContext(), ListT< Value >::Null(), and ListT< Value >::Pop().

Referenced by AppendDToContext(), AssignAssoc(), FuncEC::Eval(), Map(), ParMap(), and PushToContext().

Context Snip const Context orig,
const Text remove,
bool &  found
 

Definition at line 2713 of file Val.C.

References ListT< Value >::Append1D(), AssocVC::name, ListT< Value >::Null(), and ListT< Value >::Pop().

Referenced by PickleC::PickleVal(), and BindingVC::RemoveBindingAssoc().

void ValInit  ) 
 

Definition at line 2868 of file Val.C.

References nameDot, NEW, NEW_CONSTR, and ListT< Value >::Push().

Referenced by StartEval().

Val ValType Val  v  ) 
 

Definition at line 1320 of file Val.C.

References BindingVK, BooleanVK, ClosureVK, ErrorVK, IntegerVK, InternalError(), ListVK, Basics::mutex::lock(), ModelVK, outputMu, PrimitiveVK, TextVK, UnbndVK, and Basics::mutex::unlock().

Referenced by IfEC::Eval(), ComputedEC::Eval(), BindingEC::Eval(), SelectEC::Eval(), ApplyEC::Eval(), IsType(), LookupPath(), ValC::MergeAndTypeDPS(), and TypeOfVal().

void ValueDpnd Val  v,
DPaths ps
 

Definition at line 1627 of file Val.C.

References BindingVK, ClosureVK, ClosureVC::con, ValC::dps, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, DepPathTbl::DPS::Merge(), AssocVC::name, FuncEC::name, SharedTable< K, V >::Iterator::Next(), ListT< Value >::Null(), ListT< Value >::Pop(), SharedTable< K, V >::T::Put(), SharedTable< K, V >::T::Size(), AssocVC::val, and ValueDpnd().

Referenced by CollectDpnd(), MergeArgsDpnd(), NamesTagsPickle(), and ValueDpnd().


Variable Documentation

Context conEmpty
 

Definition at line 81 of file Val.C.

Referenced by ApplyFunction(), BindApplicationArgs(), ModelFromCache(), NormalModelFromCache(), ProcessModelHead(), and RunToolFromCache().

Context conInitial
 

Definition at line 81 of file Val.C.

Referenced by Interpret().

Assoc nullAssoc
 

Definition at line 58 of file Val.C.

Referenced by AllFreeVarsBoundInContext(), BindingEC::Eval(), Lookup(), Map(), and ParMap().

Val valErr
 

Definition at line 56 of file Val.C.

Val valFalse
 

Definition at line 54 of file Val.C.

Referenced by AddToNewStuff(), NameEC::Eval(), SelectEC::Eval(), Evaluator_Dir_Server_Inner(), Lookup(), and Primary().

Val valTBinding
 

Definition at line 61 of file Val.C.

Referenced by RunTool().

Val valTBool
 

Definition at line 62 of file Val.C.

Val valTClosure
 

Definition at line 63 of file Val.C.

Val valTErr
 

Definition at line 64 of file Val.C.

Val valTInt
 

Definition at line 65 of file Val.C.

Val valTList
 

Definition at line 66 of file Val.C.

Val valTModel
 

Val valTrue
 

Definition at line 53 of file Val.C.

Referenced by Primary().

Val valTText
 

Definition at line 67 of file Val.C.

Val valUnbnd
 

Definition at line 57 of file Val.C.

Val valZero
 

Definition at line 55 of file Val.C.

Referenced by Find(), FindR(), and Sub().


Generated on Mon May 8 00:49:03 2006 for Vesta by  doxygen 1.4.2