diff options
author | dos-reis <gdr@axiomatics.org> | 2011-08-18 14:03:04 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-08-18 14:03:04 +0000 |
commit | 44936f3d978b3a47cc67a3a51fe43030b24e0a9e (patch) | |
tree | 826342b00ebcbd4f173174885f3c92c71d1bdfd9 /src/interp/c-util.boot | |
parent | 562e4ac985b89cf4fc8ff66119e3ca5b97bd9bb5 (diff) | |
download | open-axiom-44936f3d978b3a47cc67a3a51fe43030b24e0a9e.tar.gz |
* interp/c-util.boot (categoryAssociatedTypes): Rename from
categoryHierarchy. Adjust callers.
(categoryPrincipals): New.
(categoryAncestors): Likewise.
(categoryLocals): Likewise.
(categoryParameters): Likewise.
(extendsCategoryForm): Use them.
* interp/category.boot: Likewise.
* interp/cattable.boot: Likewise.
* interp/define.boot: Likewise.
* interp/functor.boot: Likewise.
* interp/modemap.boot: Likewise.
* interp/nruncomp.boot: Likewise.
* interp/database.boot (getCategoryAttributes): Remove.
(getPrincipalAncestors): Likewise.
(getCategoryParents): Likewise.
* algebra/domain.spad.pamphlet (Category): Adjust.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r-- | src/interp/c-util.boot | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 4ad94273..54000fad 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -86,16 +86,23 @@ macro categoryAttributes d == categoryRef(d,2) ++ Return a 3-list of data describing the hierarchy of category `c'. -macro categoryHierarchy c == +macro categoryAssociatedTypes c == categoryRef(c,4) ++ Return the list of principal ancestors of category `c'. macro categoryPrincipals c == - first categoryHierarchy c + first categoryAssociatedTypes c -++ Return the list of [ancestor,predicate,index] data of catagory `c'. +++ Return the list of [ancestor,predicate,index] data of catagory `c', +++ where `ancestor' is a fundamental ancestor, `index' its sequence number. macro categoryAncestors c == - second categoryHierarchy c + second categoryAssociatedTypes c + +macro categoryLocals c == + third categoryAssociatedTypes c + +macro categoryParameters c == + categoryRef(c,5) ++ Reference a 3-list ++ [lookupFunction,thisDomain,optable] @@ -1033,12 +1040,11 @@ extendsCategoryForm(domain,form,form') == form' is ["IF",:.] => true --temporary hack so comp won't fail -- Are we dealing with an Aldor category? If so use the "has" function ... # formVec = 1 => newHasTest(form,form') - catvlist:= formVec.4 - listMember?(form',first catvlist) or - listMember?(form',substitute(domain,"$",first catvlist)) or + listMember?(form',categoryPrincipals formVec) or + listMember?(form',substitute(domain,"$",categoryPrincipals formVec)) or (or/ [extendsCategoryForm(domain,substitute(domain,"$",cat),form') - for [cat,:.] in second catvlist]) + for [cat,:.] in categoryAncestors formVec]) nil getmode(x,e) == |