[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] A curious algebra failure
From: |
Gabriel Dos Reis |
Subject: |
Re: [Axiom-developer] A curious algebra failure |
Date: |
12 Aug 2007 08:40:32 -0500 |
"Weiss, Juergen" <address@hidden> writes:
| Hi,
|
| The file patches.lisp in the scratchpad sources from 1990 contained the
| following line:
|
| (defun |pmatch| (s p) (|pmatchWithSl| s p '(ok))) ;assoc with atom at
| eol
|
| to override the definition in c-util.boot.
|
| Seems that pmatchWithSl returns nil when a match
| is not possible, empty assoc list != nil when no substitutions are
| necessary
| for a match and an assoc list with substitutions otherwise.
Thanks for clarifying further the intended semantics.
|
| For example
| v:= ASSOC(p,al) => s=rest v or al
| returns 't if (p,s) is in al.
|
| So this function can never typecheck in ansi common lisp. The
| usage seems to come from a time when alists could contain
| atomic properties and associations as well.
Indeed.
| By the way, I think the line must read
|
| v:= ASSOC(p,al) => s=rest v and al
| ====
|
| this makes much more sense logically and should typecheck with
| the pmatch(s,p) == pmatchWithSl(s,p,[nil])
Yes, it typechecks; I just started a new build; I will report back.
I like your semantics description and suggested fix better.
-- Gaby
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), (continued)
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), William Sit, 2007/08/12
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), Bill Page, 2007/08/12
- Re: [Axiom-developer] A curious algebra failure, Martin Rubey, 2007/08/12
- Re: [Axiom-developer] A curious algebra failure, Gabriel Dos Reis, 2007/08/12
- Re: [Axiom-developer] A curious algebra failure, Gabriel Dos Reis, 2007/08/11
RE: [Axiom-developer] A curious algebra failure, Weiss, Juergen, 2007/08/12