#include "Val.H"
#include "Expr.H"
#include "Parser.H"
#include "Location.H"
#include "ModelState.H"
#include "PrimRunTool.H"
#include "Files.H"
#include "Debug.H"
#include <CacheC.H>
#include <VestaSource.H>
#include <UniqueId.H>
#include <sstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <BufStream.H>
Go to the source code of this file.
Functions | |
Val | CollectLet (const Text &name, Val v1, Val v2) |
void | CollectLet (const Text &name, Val v1, DPaths *ps, Val res, DPaths *&nps) |
Val | CollectFunc (Val bodyv, Val fv, const Context &c) |
void | CollectFunc (DPaths *ps, Val fv, const Context &c, Val res, DPaths *&nps) |
Val | CollectModel (Val bodyv, Val fv, const Context &c) |
void | CollectModel (DPaths *ps, const Context &c, Val res, DPaths *&nps) |
FP::Tag | FingerPrintContext (const Context &c) |
FP::Tag | FingerPrintContext (const Context &c, const Text &id) |
void | PrintContext (ostream *os, const Context &c, bool verbose, int indent) |
void | PrintContext (ostream *os, const Context &c, const Text &id, bool verbose, int indent) |
bool | IsValTrue (Val v) |
bool | IsValFalse (Val v) |
bool | IsEmptyBinding (Val v) |
bool | IsEmptyList (Val v) |
Val | ValType (Val v) |
void | DeleteDuplicatePathsInner (Val v, DPaths *ps) |
void | DeleteDuplicatePaths (Val v) |
void | PromoteCommonPaths (DPaths *ps, DPaths *psList[], int len) |
Val | CanonicalDpnd (Val v) |
void | ModelCutOff (Val v) |
void | CollectDefined (BindingVC *bv, const Text &id, DPaths *ps) |
Val | CollectLookup (BindingVC *bv, const Text &id, DepPath *&path, DPaths *ps) |
void | ValueDpnd (Val v, DPaths *ps) |
DepPath * | CollectDpnd (Val v, DepPath *dp, DPaths *ps, bool all=true) |
Val | CollectLetS (const Text &name, Val v1, Val v2) |
Val | LetDpnd (Val v, const Context &c) |
Val | CollectFuncS (Val bodyv, Val fv, const Context &c) |
Val | FuncDpnd (Val bodyv, Val fv, const Context &c) |
Val | CollectModelS (Val bodyv, Val fv, const Context &c) |
Val | ModelDpnd (Val bodyv, Val fv, const Context &c) |
Text | PrintForm (Val v) |
Assoc | FindInContext (const Text &id, const Context &c) |
Val | LookupInContext (const Text &id, const Context &c) |
Val | LookupArc (const Text &arc, Val v) |
Val | LookupPath (const FV2::T &path, const Context &c) |
Val | LookupPath (DepPath *dp, const Context &c) |
Val | Lookup (Basics::uint16 idx, const PrefixTbl &tbl, const Context &c, Val *vals) |
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) |
void | PushToContext (const Text &name, Expr elem, const Context &cElem, Context &in) |
Context | RestrictContext (const Context &con, Vars fv) |
Context | Snip (const Context &orig, const Text &name, bool &found) |
Context | Prune (const Context &orig, const Context &remove) |
void | AssignAssoc (AssignEC *ae, Context &con) |
void | IterateAssoc (IterateEC *it, Context &c) |
Context | AddStmtAssocs (StmtListEC *assocs, const Context &c) |
void | ValInit () |
Variables | |
Val | valTrue = NEW_CONSTR(BooleanVC, (true)) |
Val | valFalse = NEW_CONSTR(BooleanVC, (false)) |
Val | valZero = NEW_CONSTR(IntegerVC, (0)) |
Val | valErr = NEW_CONSTR(ErrorVC, (true)) |
Val | valUnbnd = NEW(UnbndVC) |
Assoc | nullAssoc = NEW_CONSTR(AssocVC, (nameDot, valUnbnd)) |
Val | valTBinding = NEW_CONSTR(TextVC, ("t_binding")) |
Val | valTBool = NEW_CONSTR(TextVC, ("t_bool")) |
Val | valTClosure = NEW_CONSTR(TextVC, ("t_closure")) |
Val | valTErr = NEW_CONSTR(TextVC, ("t_err")) |
Val | valTInt = NEW_CONSTR(TextVC, ("t_int")) |
Val | valTList = NEW_CONSTR(TextVC, ("t_list")) |
Val | valTText = NEW_CONSTR(TextVC, ("t_text")) |
FP::Tag | booleanTag ("Bool") |
FP::Tag | integerTag ("Int") |
FP::Tag | listTag ("List") |
FP::Tag | bindingTag ("Binding") |
FP::Tag | primitiveTag ("Prim") |
FP::Tag | textTag ("Text") |
FP::Tag | closureTag ("Closure") |
FP::Tag | modelTag ("Model") |
FP::Tag | errorTag ("Error") |
FP::Tag | unbndTag ("Unbnd") |
Context | conEmpty |
Context | conInitial |
|
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(). |
|
Definition at line 2688 of file Val.C. References ListT< Value >::Append1D(), ExprC::Eval(), ExprC::freeVars, NEW_CONSTR, and RestrictContext(). Referenced by BindingEC::Eval(). |
|
Definition at line 2749 of file Val.C. References BaseTEK, BindingTEK, ClosureVC::con, ExprC::Eval(), ExprC::freeVars, FuncTEK, ExprC::kind, ListTEK, NEW_CONSTR, ListT< Value >::Push(), and RestrictContext(). Referenced by AddStmtAssocs(). |
|
Definition at line 1450 of file Val.C. References BindingVK, ValC::dps, ListT< Value >::Length(), ListVK, min(), NEW_ARRAY, ValC::path, ListT< Value >::Pop(), PromoteCommonPaths(), SharedTable< K, V >::T::Size(), and ValC::vKind. Referenced by LetDpnd(). |
|
Definition at line 1582 of file Val.C. References DepPathTbl::DPS::AddExtend(), BangPK, BindingVC::DefinedNoDpnd(), SharedTable< K, V >::KVPair::key, BindingVC::lenDps, SharedTable< K, V >::Iterator::Next(), ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), and SharedTable< K, V >::KVPair::val. Referenced by CollectDpnd(). |
|
|
|
Definition at line 2077 of file Val.C. References DepPathTbl::DPS::Add(), CollectDpnd(), CollectFuncS(), DepPath::content, DepPath::DeepCopy(), ValC::dps, ValC::dpsVersion, ExprPK, SharedTable< K, V >::KVPair::key, DepPathTbl::DPS::Merge(), ValC::MergeDPS(), AssocVC::name, NEW, SharedTable< K, V >::Iterator::Next(), ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), ListT< Value >::Push(), SharedTable< K, V >::T::Put(), DepPath::Size(), SharedTable< K, V >::KVPair::val, and AssocVC::val. Referenced by CollectFuncS(), and FuncDpnd(). |
|
Definition at line 2028 of file Val.C. References ListT< Value >::Append1D(), BindingVK, ClosureVK, CollectFunc(), ClosureVC::con, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, FuncEC::name, AssocVC::name, NEW_CONSTR, ListT< Value >::Null(), ListT< Value >::Pop(), AssocVC::val, and ValC::vKind. Referenced by CollectFunc(). |
|
|
Definition at line 1935 of file Val.C. References CollectDpnd(), CollectLetS(), DepPath::content, ValC::Copy(), DepPath::DeepCopy(), ValC::dps, emptyText, SharedTable< K, V >::KVPair::key, DepPathTbl::DPS::Merge(), ValC::Merge(), ValC::MergeDPS(), NEW, SharedTable< K, V >::Iterator::Next(), ValC::path, SharedTable< K, V >::T::Put(), SharedTable< K, V >::Iterator::Reset(), ValC::SizeOfDPS(), and SharedTable< K, V >::KVPair::val. Referenced by CollectLetS(), and LetDpnd(). |
|
Definition at line 1882 of file Val.C. References ListT< Value >::Append1D(), BindingVK, ClosureVK, CollectLet(), ClosureVC::con, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, FuncEC::name, AssocVC::name, NEW_CONSTR, ListT< Value >::Null(), ListT< Value >::Pop(), AssocVC::val, and ValC::vKind. Referenced by CollectLet(). |
|
Definition at line 1609 of file Val.C. References DepPath::DeepCopy(), ValC::dps, ValC::dpsVersion, DepPath::Extend(), LookupInContext(), and DepPathTbl::DPS::Merge(). Referenced by CollectDpnd(). |
|
Definition at line 2428 of file Val.C. References CollectDpnd(), DepPath::content, DepPath::DeepCopy(), ValC::dps, ValC::dpsVersion, SharedTable< K, V >::KVPair::key, DepPathTbl::DPS::Merge(), nameDot, NEW, SharedTable< K, V >::Iterator::Next(), ListT< Value >::Nth(), SharedTable< K, V >::T::Put(), and SharedTable< K, V >::KVPair::val. |
|
Definition at line 2257 of file Val.C. References DepPathTbl::DPS::Add(), CollectDpnd(), CollectModelS(), DepPath::content, DepPath::DeepCopy(), ValC::dps, ValC::dpsVersion, ExprPK, SharedTable< K, V >::KVPair::key, DepPathTbl::DPS::Merge(), ValC::MergeDPS(), nameDot, NEW, SharedTable< K, V >::Iterator::Next(), NormPK, ListT< Value >::Nth(), ValC::path, SharedTable< K, V >::T::Put(), and SharedTable< K, V >::KVPair::val. Referenced by CollectModelS(), and ModelDpnd(). |
|
Definition at line 2208 of file Val.C. References ListT< Value >::Append1D(), BindingVK, ClosureVK, CollectModel(), ClosureVC::con, ListVC::elems, BindingVC::elems, ClosureVC::func, ListVC::lenDps, BindingVC::lenDps, ListVK, FuncEC::name, AssocVC::name, NEW_CONSTR, ListT< Value >::Null(), ListT< Value >::Pop(), AssocVC::val, and ValC::vKind. Referenced by CollectModel(). |
|
Definition at line 1390 of file Val.C. References BindingVK, DeleteDuplicatePathsInner(), ValC::dps, ListVK, ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), SharedTable< K, V >::T::Size(), and ValC::vKind. Referenced by LetDpnd(). |
|
Definition at line 1351 of file Val.C. References BindingVK, ValC::dps, SharedTable< K, V >::KVPair::key, ListVK, DepPathTbl::DPS::Member(), NEW_CONSTR, 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(), and ValC::vKind. Referenced by DeleteDuplicatePaths(). |
|
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(). |
|
Definition at line 123 of file Val.C. References FP::Tag::ExtendRaw(), AssocVC::FingerPrint(), AssocVC::name, ListT< Value >::Null(), FP::Tag::Permute(), POLY_ONE, ListT< Value >::Pop(), and RawFP. |
|
Definition at line 112 of file Val.C. References FP::Tag::ExtendRaw(), ListT< Value >::Null(), FP::Tag::Permute(), POLY_ONE, ListT< Value >::Pop(), and RawFP. Referenced by ClosureVC::FingerPrint(). |
|
Definition at line 2203 of file Val.C. References CollectFunc(). Referenced by ApplicationFromCache(). |
|
Definition at line 1311 of file Val.C. References BindingVK. Referenced by Append(), Defined(), EqualVal(), Lookup(), Minus(), Plus(), and PlusPlus(). |
|
Definition at line 1315 of file Val.C. References ListVK. Referenced by Append(), EqualVal(), and Plus(). |
|
Definition at line 1307 of file Val.C. References BooleanVK. Referenced by And(), EqualVal(), IfEC::Eval(), Implies(), and NotEq(). |
|
Definition at line 1303 of file Val.C. References BooleanVK, and ValC::vKind. Referenced by BindingAppend(), IfEC::Eval(), and Or(). |
|
Definition at line 2770 of file Val.C. References AddStmtAssocs(), ValC::AddToDPS(), BindingVK, BLenPK, ValC::Copy(), BindingVC::elems, emptyText, Error(), ErrorVal(), DepPath::Extend(), BindingVC::FingerPrint(), PairEC::first, IntArc(), ExprC::kind, ListT< Value >::Length(), ListVK, LLenPK, Basics::mutex::lock(), AssocVC::name, NameEK, BindingVC::Names(), NEW_CONSTR, NormPK, ListT< Value >::Null(), outputMu, ValC::path, ListT< Value >::Pop(), ListT< Value >::Push(), PairEC::second, Basics::mutex::unlock(), AssocVC::val, and ValC::vKind. Referenced by AddStmtAssocs(). |
|
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(). |
|
Definition at line 2619 of file Val.C. References PrefixTbl::Arc(), PrefixTbl::endMarker, VestaSourceSRPC::Lookup, LookupArc(), LookupInContext(), PrefixTbl::PrefixIndex(), UnbndVK, and ValC::vKind. |
|
Definition at line 2488 of file Val.C. References ArcInt(), BindingVK, ClosureVK, ListVK, LookupInContext(), and ValC::vKind. Referenced by Lookup(), and LookupPath(). |
|
Definition at line 2481 of file Val.C. References FindInContext(). Referenced by BindRunToolArgs(), CollectLookup(), NameEC::Eval(), Lookup(), BindingVC::Lookup(), LookupArc(), BindingVC::LookupNoDpnd(), and LookupPath(). |
|
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. |
|
|
|
|
|
Definition at line 1504 of file Val.C. References BindingVK, ClosureVK, ClosureVC::con, DepPath::content, ValC::dps, BindingVC::elems, ListVC::elems, ClosureVC::func, SharedTable< K, V >::KVPair::key, BindingVC::lenDps, ListVC::lenDps, ListVK, ModelCutOff(), FuncEC::name, AssocVC::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(). |
|
Definition at line 2310 of file Val.C. References CollectModel(). Referenced by ModelFromCache(). |
|
Definition at line 152 of file Val.C. References Indent(), AssocVC::name, ListT< Value >::Null(), ListT< Value >::Pop(), and AssocVC::PrintD(). |
|
Definition at line 138 of file Val.C. References Indent(), ListT< Value >::Null(), and ListT< Value >::Pop(). Referenced by AllFreeVarsBoundInContext(), Assert(), NameEC::Eval(), and ClosureVC::PrintD(). |
|
Definition at line 2464 of file Val.C. References Basics::OBufStream::str(). Referenced by ConvertToBindElem(). |
|
Definition at line 1418 of file Val.C. References SharedTable< K, V >::T::Delete(), SharedTable< K, V >::KVPair::key, SharedTable< K, V >::Iterator::Next(), SharedTable< K, V >::T::Put(), and SharedTable< K, V >::T::Resize(). Referenced by CanonicalDpnd(). |
|
Definition at line 2736 of file Val.C. References ListT< Value >::Append1D(), FindInContext(), AssocVC::name, ListT< Value >::Null(), and ListT< Value >::Pop(). |
|
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(). |
|
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(). |
|
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(). |
|
Definition at line 2868 of file Val.C. References nameDot, NEW, NEW_CONSTR, and ListT< Value >::Push(). Referenced by StartEval(). |
|
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 ApplyEC::Eval(), SelectEC::Eval(), BindingEC::Eval(), ComputedEC::Eval(), IfEC::Eval(), IsType(), LookupPath(), ValC::MergeAndTypeDPS(), and TypeOfVal(). |
|
Definition at line 1627 of file Val.C. References BindingVK, ClosureVK, ClosureVC::con, ValC::dps, BindingVC::elems, ListVC::elems, ClosureVC::func, BindingVC::lenDps, ListVC::lenDps, ListVK, DepPathTbl::DPS::Merge(), FuncEC::name, AssocVC::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(). |
|
Referenced by BindingVC::FingerPrint(). |
|
Referenced by BooleanVC::FingerPrint(). |
|
Referenced by ClosureVC::FingerPrintExpr(). |
|
Definition at line 81 of file Val.C. Referenced by ApplyFunction(), BindApplicationArgs(), ModelFromCache(), NormalModelFromCache(), ProcessModelHead(), and RunToolFromCache(). |
|
Definition at line 81 of file Val.C. Referenced by Interpret(). |
|
Referenced by ErrorVC::FingerPrint(). |
|
Referenced by IntegerVC::FingerPrint(). |
|
Referenced by ListVC::FingerPrint(). |
|
Referenced by ModelVC::ModelVC(). |
|
Definition at line 58 of file Val.C. Referenced by AllFreeVarsBoundInContext(), BindingEC::Eval(), Lookup(), Map(), and ParMap(). |
|
Referenced by PrimitiveVC::FingerPrint(). |
|
Referenced by TextVC::FingerPrint(), and TextVC::TextVC(). |
|
Referenced by UnbndVC::FingerPrint(). |
|
|
|
Definition at line 54 of file Val.C. Referenced by AddToNewStuff(), SelectEC::Eval(), NameEC::Eval(), Evaluator_Dir_Server_Inner(), Lookup(), and Primary(). |
|
Definition at line 61 of file Val.C. Referenced by RunTool(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 53 of file Val.C. Referenced by Primary(). |
|
|
|
|
|
|