From 5f63d42cf83ebce312a44c5d596e85c6ae879ab0 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 14 Nov 2011 02:56:26 +0000 Subject: * interp/category.boot (SigListMember): Remove as deadcode. (SigEqual): Remove. (predicateImplies): Rename from PredImplies. Rework it to match documentation. Adjust callers. (CondAncestorP): Adjust arguments in call to predicateImplies. (JoinInner): Likewise. --- src/ChangeLog | 9 +++++++++ src/interp/category.boot | 33 +++++++++------------------------ 2 files changed, 18 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 184aee48..89355641 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-11-13 Gabriel Dos Reis + + * interp/category.boot (SigListMember): Remove as deadcode. + (SigEqual): Remove. + (predicateImplies): Rename from PredImplies. Rework it to match + documentation. Adjust callers. + (CondAncestorP): Adjust arguments in call to predicateImplies. + (JoinInner): Likewise. + 2011-11-13 Gabriel Dos Reis * lisp/core.lisp.in: Export %sysInit. diff --git a/src/interp/category.boot b/src/interp/category.boot index 4d0acc49..043b6d67 100644 --- a/src/interp/category.boot +++ b/src/interp/category.boot @@ -257,22 +257,11 @@ mkAnd2(a,b,e) == [a,:b] [a,:b] -SigListMember(m,list) == - list=nil => false - SigEqual(m,first list) => true - SigListMember(m,rest list) - -SigEqual([sig1,pred1,:.],[sig2,pred2,:.]) == - -- Notice asymmetry: checks that arg1 is a consequence of arg2 - sig1=sig2 and PredImplies(pred2,pred1) - -PredImplies(a,b) == - --true if a => b in the sense of logical implication ---a = "true" => true - a=true => true - a=b => true - false -- added by RDJ: 12/21/82 ---error() -- for the time being +++ Return true if `a implies b' in the logical sense. +predicateImplies(a,b) == + b is true => true + a is true => false + a = b -- for now. SigListOpSubsume([[name1,sig1,:.],:.],list) == --does m subsume another operator in the list? @@ -352,7 +341,7 @@ CondAncestorP(xname,leaves,condition,env) == null rest u => true second u xname = u' or listMember?(xname,categoryPrincipals CatEval(u',env)) => - PredImplies(ucond,condition) => return u' + predicateImplies(condition,ucond) => return u' ++ Returns true if the form `a' designates a category that is any @@ -427,16 +416,12 @@ JoinInner(l,$e) == if rest anc then (anccond:= second anc; ancindex:= third anc) else (anccond:= true; ancindex:= nil) - if PredImplies(condition,anccond) + if predicateImplies(anccond,condition) then FundamentalAncestors:= - - -- the new 'b' is more often true than the old one 'anc' + -- the new 'b' is more often true than the old one 'anc' [[bname,condition,ancindex],:remove(FundamentalAncestors,anc)] else - if ancindex and (PredImplies(anccond,condition); true) --- I have no idea who effectively commented out the predImplies --- JHD 25/8/86 - then + if ancindex then --the new 'b' is less often true newentry:=[bname,condition,ancindex] if not listMember?(newentry,FundamentalAncestors) then -- cgit v1.2.3