From 5151c89ded8e401d2aec83e9a3f56c50a76f209b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 26 Sep 2008 18:27:01 +0000 Subject: * algebra/matrix.spad.pamphlet (new$Matrix): New. Remove uses of pretend. Define Rep. --- src/interp/database.boot | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/interp/database.boot') diff --git a/src/interp/database.boot b/src/interp/database.boot index 48e5d1e7..06422176 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -491,15 +491,26 @@ replaceVars(x,oldvars,newvars) == x := substitute(new,old,x) x +++ Return the list of qualifying predicates of the system modemap `mm'. +getConditionListFromMm mm == + [., cond] := mm + if cond is ["partial", :c] then cond := c + cond is ["AND", :cl] => cl + cond is ["OR", ["AND", :cl],:.] => cl --all cl's should give same info + [cond] + + +++ Returns the domain of computation of the modemap `mm'. This is not +++ to be confused with `getDomainFromMm' below, which can also return +++ a category. +getDCFromSystemModemap mm == + for cond in getConditionListFromMm mm repeat + cond is ["isDomain","*1",dom] => return dom + getDomainFromMm mm == -- Returns the Domain (or package or category) of origin from a pattern -- modemap - [., cond] := mm - if cond is ['partial, :c] then cond := c - condList := - cond is ['AND, :cl] => cl - cond is ['OR, ['AND, :cl],:.] => cl --all cl's should give same info - [cond] + condList := getConditionListFromMm mm val := for condition in condList repeat condition is ['isDomain, "*1", dom] => return opOf dom -- cgit v1.2.3