/vesta/vestasys.org/vesta/eval/98/src/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>

Include dependency graph for Val.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ValC
class  BooleanVC
class  IntegerVC
class  ListVC
class  BindingVC
class  PrimitiveVC
class  TextVC
class  TextVC::TextC
class  ModelVC
class  ModelVC::ModelC
class  ClosureVC
class  ErrorVC
class  FpVC
class  UnbndVC
class  AssocVC

Enumerations

enum  ValueKind {
  BooleanVK, IntegerVK, ListVK, BindingVK,
  PrimitiveVK, TextVK, ClosureVK, ModelVK,
  ErrorVK, FpVK, UnbndVK, 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

Enumerator:
BooleanVK 
IntegerVK 
ListVK 
BindingVK 
PrimitiveVK 
TextVK 
ClosureVK 
ModelVK 
ErrorVK 
FpVK 
UnbndVK 
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 2755 of file Val.C.

References AssignAssoc(), AssignEK, OS::cio(), StmtListEC::elems, OS::ThreadIO::end_err(), Error(), ErrorDetail(), ErrorExpr(), IterateEC::Eval(), Sequence< Elem, elem_ptrfree >::get(), IterateAssoc(), IterateEK, ExprC::loc, Sequence< Elem, elem_ptrfree >::size(), OS::ThreadIO::start_err(), TryEK, and TypedEK.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 2605 of file Val.C.

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

Referenced by BindingEC::Eval().

Here is the call graph for this function:

Here is the caller graph for this function:

DPaths* ClosureDpnd ( ClosureVC cl  ) 

Assoc FindInContext ( const Text id,
const Context c 
)

Definition at line 2388 of file Val.C.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

Val FuncDpnd ( Val  bodyv,
Val  fv,
const Context c 
)

Definition at line 2126 of file Val.C.

References CollectFunc().

Referenced by ApplicationFromCache().

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsEmptyBinding ( Val  v  ) 

Definition at line 1291 of file Val.C.

References BindingVK, and ValC::vKind.

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

Here is the caller graph for this function:

bool IsEmptyList ( Val  v  ) 

Definition at line 1295 of file Val.C.

References ListVK, and ValC::vKind.

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

Here is the caller graph for this function:

bool IsValFalse ( Val  v  ) 

Definition at line 1287 of file Val.C.

References BooleanVK, and ValC::vKind.

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

Here is the caller graph for this function:

bool IsValTrue ( Val  v  ) 

Definition at line 1283 of file Val.C.

References BooleanVK, and ValC::vKind.

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

Here is the caller graph for this function:

Val LetDpnd ( Val  v,
const Context c 
)

Definition at line 1922 of file Val.C.

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

Referenced by BlockEC::Eval().

Here is the call graph for this function:

Here is the caller graph for this function:

Val LookupInContext ( const Text id,
const Context c 
)

Definition at line 2398 of file Val.C.

References FindInContext(), and AssocVC::val.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 2561 of file Val.C.

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

Here is the call graph for this function:

Val LookupPath ( DepPath dp,
const Context c 
)

Definition at line 2488 of file Val.C.

References BangPK, BindingVK, BLenPK, ClosureVK, DepPath::content, ExprPK, ListVK, LLenPK, LookupArc(), LookupInContext(), ModelVK, NEW_CONSTR, path, TypePK, UnbndVK, valFalse, valTrue, ValType(), and ValC::vKind.

Here is the call graph for this function:

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

Definition at line 2435 of file Val.C.

References BangPK, BindingVK, BLenPK, ClosureVK, ExprPK, ListVK, LLenPK, LookupArc(), LookupInContext(), ModelVK, NEW_CONSTR, path, TypePK, UnbndVK, valFalse, valTrue, ValType(), valUnbnd, and ValC::vKind.

Here is the call graph for this function:

void ModelCutOff ( Val  v  ) 

Definition at line 1492 of file Val.C.

References BindingVK, ClosureVK, ClosureVC::con, DepPath::content, ValC::dps, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, ModelCutOff(), FuncEC::name, nameDot, ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), DepPathTbl::DPS::Restrict(), SharedTable< K, V >::T::Size(), ValC::SizeOfDPS(), and ValC::vKind.

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

Here is the call graph for this function:

Here is the caller graph for this function:

Val ModelDpnd ( Val  bodyv,
Val  fv,
const Context c 
)

Definition at line 2233 of file Val.C.

References CollectModel().

Referenced by ModelFromCache().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Text PrintForm ( Val  v  ) 

Definition at line 2381 of file Val.C.

References ValC::PrintD(), and Basics::OBufStream::str().

Referenced by ConvertToBindElem().

Here is the call graph for this function:

Here is the caller graph for this function:

Context Prune ( const Context orig,
const Context remove 
)

Definition at line 2653 of file Val.C.

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

Here is the call graph for this function:

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

Definition at line 2612 of file Val.C.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

Context RestrictContext ( const Context con,
Vars  fv 
)

Definition at line 2619 of file Val.C.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 2630 of file Val.C.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void ValInit (  ) 

Definition at line 2789 of file Val.C.

References ValInit_inner().

Referenced by StartEval().

Here is the call graph for this function:

Here is the caller graph for this function:

Val ValType ( Val  v  ) 

Definition at line 1300 of file Val.C.

References BindingVK, BooleanVK, OS::cio(), ClosureVK, ErrorVK, IntegerVK, InternalError(), ListVK, ModelVK, PrimitiveVK, ValC::PrintD(), OS::ThreadIO::start_err(), TextVK, UnbndVK, valTBinding, valTBool, valTClosure, valTErr, valTInt, valTList, valTText, ValC::VError(), and ValC::vKind.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void ValueDpnd ( Val  v,
DPaths ps 
)

Definition at line 1592 of file Val.C.

References BindingVK, ClosureVK, ClosureVC::con, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, FuncEC::name, ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), SharedTable< K, V >::T::Put(), SharedTable< K, V >::T::Size(), DepPathTbl::DPS::Union(), ValueDpnd(), and ValC::vKind.

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

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Context conEmpty

Definition at line 79 of file Val.C.

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

Context conInitial

Definition at line 79 of file Val.C.

Referenced by Interpret(), and ValInit_inner().

Assoc nullAssoc

Definition at line 56 of file Val.C.

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

Val valErr

Definition at line 54 of file Val.C.

Referenced by ListVC::GetElemNoDpnd(), and BindingVC::GetElemNoDpnd().

Val valFalse

Definition at line 52 of file Val.C.

Referenced by AddToNewStuff(), CollectDefined(), BindingVC::Defined(), NameEC::Eval(), SelectEC::Eval(), Evaluator_Dir_Server_Inner(), BindingVC::GetElem(), Lookup(), LookupPath(), Primary(), BindingVC::RecursiveOverlay(), and BindingVC::SimpleOverlay().

Val valTBinding

Definition at line 59 of file Val.C.

Referenced by CollectDpnd(), RunTool(), and ValType().

Val valTBool

Definition at line 60 of file Val.C.

Referenced by ValType().

Val valTClosure

Definition at line 61 of file Val.C.

Referenced by ValType().

Val valTErr

Definition at line 62 of file Val.C.

Referenced by ValType().

Val valTInt

Definition at line 63 of file Val.C.

Referenced by ValType().

Val valTList

Definition at line 64 of file Val.C.

Referenced by ValType().

Val valTModel

Val valTrue

Definition at line 51 of file Val.C.

Referenced by CollectDefined(), BindingVC::Defined(), LookupPath(), Primary(), and PrimRunToolInit_inner().

Val valTText

Definition at line 65 of file Val.C.

Referenced by ValType().

Val valUnbnd

Definition at line 55 of file Val.C.

Referenced by BindRunToolArgs(), Lookup(), LookupArc(), LookupPath(), RunTool(), RunToolPK(), and RunToolPKFromRoot().

Val valZero

Definition at line 53 of file Val.C.

Referenced by FindInner(), and Sub().


Generated on Fri May 25 00:08:25 2007 for Vesta by  doxygen 1.5.1