Next: cfaconstruct.n and cfasolve.n
Up: Implementation
Previous: perv.n
This file includes various utilities for nML CFA.
- fid, nFid, mkFids, mkFids':
utilities for function id
- lexp: selected source information for nML CFA
- lid, nLid, mkLids:
utilities for lexp id
- ftn_env, own_env, env:
environments keeping static scoping information during the analysis
- fPops, fPush, fPushs, oPops,
oPush, oPushs, f2f, fnm2fid,
getOwner, mkOwn: utilities for environments
- tables: control flow equations
- count, flag, addFids, addFids',
getFids, getAri, addF, getF, addT,
addLa, getLa, addLb, addE, addAb,
addApAb, addApL, addDmAp, lid2le,
getLid2le, addLoc2lid, loc2lid,
addFctApp, getFctApp,
prLoc2lid, prF, getHifn, getTbls,
setTbls, addTbls, minusTbls, substTbls,
prTbls: utilities for tables
- contexts keeping analysis results
- type basis = {fc: fc, gc: gc, c: ctxt}
When analysis results are dumped for the future uses (in case of the
incremental analysis), nML CFA dumps basis. basis includes
a functor context fc, a signature context gc, and a
structure context c.
- structure FC : H where type key = StringInfo.fctidinfo
type fc = (ctxt' * ctxt * tables) FC.t
A functor context fc is a map from functor names to a triple of
a functor argument context
ctxt', a functor body context ctxt, and the analysis
results of the functor body tables.
- structure GC : H where type key = StringInfo.sigidinfo
type gc = ctxt' GC.t
and ctxt' = Ct of gc * cfainfo
A signature context gc is a map from signature names to its
context ctxt'. ctxt' includes a signature context for its
subsignatures and cfainfo of the signature body.
- structure SC : H where type key = StringInfo.stridinfo
type sc = ctxt SC.t
and ctxt = C of sc * cfainfo
A structure context sc is a map from structure names to its
context ctxt. ctxt includes a structure context for its
substructures and cfainfo of the structure body.
- type cfainfo = {ff:fid, lf:fid, fl:lid, ll:lid, fns:ftn_env}
cfainfo includes the range of function id (ff, lf)
and lexp id (fl, ll) and information of the declared
functions (ftn_env).
- c'2c, sids2c, sids2c', addFC,
addGC, addSC, addCI, addC,
addC', copyC, copyC', prC, prC':
utilities for contexts
- initCfa, initCfaConstruct, initCfaSolve: initializations
- fidsbytys: functions unifiable with a given function type
- cfasE, cfasAp, cfasLb: solving control flow equations
- result: ((Location.t * lid) list) ref:
a list of function position and its lexp id of each function application
Next: cfaconstruct.n and cfasolve.n
Up: Implementation
Previous: perv.n
Sukyoung Ryu
2001-08-31