diff options
author | dos-reis <gdr@axiomatics.org> | 2010-07-25 03:34:30 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-07-25 03:34:30 +0000 |
commit | 0df43e77732de95d97212f042ed922d2f7314bab (patch) | |
tree | 5380eb6afd4ff2b44f4986c335212173838c5897 /src/interp/g-util.boot | |
parent | f5181e8acaf34cb5a26a30bd3901a19485933c6d (diff) | |
download | open-axiom-0df43e77732de95d97212f042ed922d2f7314bab.tar.gz |
* interp/c-util.boot (usedSymbol?): Move to g-util.boot.
* interp/nruncomp.boot (NRTsetVector4a): Tidy.
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r-- | src/interp/g-util.boot | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 13acbdc6..5d6cd5a9 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -44,8 +44,24 @@ module g_-util where mkList: %List -> %List isSubDomain: (%Mode,%Mode) -> %Form expandToVMForm: %Thing -> %Thing - - + usedSymbol?: (%Symbol,%Code) -> %Boolean + +--% + +$AbstractionOperator == + '(LAM ILAM SLAM SPADSLAM LAMBDA) + +++ Return true if the symbol 's' is used in the form 'x'. +usedSymbol?(s,x) == + symbol? x => s = x + atom x => false + x is ['QUOTE,:.] => false + x is [op,parms,:body] and op in $AbstractionOperator => + s in parms => false + usedSymbol?(s,body) + or/[usedSymbol?(s,x') for x' in x] + + --% VM forms ++ Make the assumption named `prop' for all symbols |