Next: eaconstruct.n and easolve.n
Up: Implementation
Previous: eaperv.n
This file includes various utilities for nML EA.
- fid, nFid, mkFids, mkFids':
utilities for function id
- exn_env, own_env, env:
environments keeping static scoping information during the analysis
- ePops, ePush, ePushs, oPops,
oPush, oPushs, var2exn,
getOwner, mkOwn, mkOwn': utilities for environments
- tables: exception flow equations
- addEx, getEx, addP, addP', getP,
addX, getX, addPP, getPP, addPX, getPX,
addXP, getXP, addPR, getPR, addMR, getMR,
addApp, getApp, addNfn, getNfn, copyTbls,
getTbls, setTbls, addTbls, minusTbls, substTbls,
prTbls, 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 EA 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 eainfo = {exs: exn_env}
eainfo includes information of the declared
exceptions (exn_env).
- c'2c, sids2c, sids2c', addFC,
addGC, addSC, addEI, addC,
addC', copyCUC, copyCUC', prC, prC':
utilities for contexts
- initEa, initEaFid, initEaConstruct, backward:
initializations
- unhandled: Absyn.rule list -> (string list * string list * bool) option
Given an exception rule list, unhandled returns the following result:
- None : The rule list is exhaustive.
(It is exhaustive iff it has wildpat or varpat.)
- Some (minus, plus, normal) : The rule list is not exhaustive.
- minus : exceptions with no arguments and
exceptions with non-exception-having arguments
- plus : exceptions with non-exception-having arguments
whose argument patterns are not exhaustive
- normal: whether there exist exceptions
with exception-having arguments
- if normal then ([], [], true)
else (minus, plus, false)
Next: eaconstruct.n and easolve.n
Up: Implementation
Previous: eaperv.n
Sukyoung Ryu
2001-08-31