[Aldor-l] Aldor-Meet

Ralf Hemmecke ralf at hemmecke.de
Tue Nov 20 05:08:39 EST 2007


> Also I notice that apparently 'Meet' does not interact with 'has' as
> one might expect:
> 
> define M12:Category == Meet(C1,C2);
> 
> D1: C1 == add {
>   f: Integer == 1;
>   g: Integer == 2;
> }
> 
> D2: C2 == add {
>   f: Integer == 1;
>   h: Integer == 3;
> }
> 
> Both D1 has M12 and D2 has M12 evaluate as False. If Meet is the
> intersection like Join is the union of two categories then I think
> they should both return True, i.e. that C1 and C2 should be
> subcategories of Meet(C1,C2) like Join(C1,C2) is a subcategory of C1
> and C2. No?

I think that "D1 has M12" returns false is OK, since M12 is a new 
category and D1 has not explicitly been declared to be a member of that 
category.

However, for the following program I would have expected (F, T, T).

---BEGIN aaa.as
#include "aldor"
#include "aldorio"
Z==>Integer;
define C1:Category == with {f: Z; g: Z}
define C2:Category == with {f: Z; h: Z}
define M12:Category == Meet(C1,C2);
D1: C1 == add {f: Z == 1; g: Z == 2}
D2: C2 == add {f: Z == 1; h: Z == 3}
D: M12 == add {f: Z == 4}
import from Boolean;
stdout << "D1 has M12  = " << (D1 has M12) << newline;
stdout << "D1 has Meet = " << (D1 has Meet(C1, C2)) << newline;
stdout << "D1 has f    = " << (D1 has with {f: Z}) << newline;
---END aaa.as

 >aldor -fx -laldor aaa.as
 >aaa
D1 has M12  = F
D1 has Meet = F
D1 has f    = T

That looks like a bug---Well, it's not, because gave a clear definition 
of "Meet".

But as you said, Bill, I would also like to see a proper use case for 
the "Meet" feature.

See also my modifications to 
http://axiom-wiki.newsynthesis.org/SandBoxAldorJoinAndMeet

Ralf



More information about the Aldor-l mailing list