|
|
last edited 1 year ago by test1 |
1 2 3 4 5 6 7 8 9 | ||
Editor: Bill Page
Time: 2007/11/21 11:32:36 GMT-8 |
||
Note: lattice absorption axioms fail to compile |
added: --Evaluating more complex Meet/Joint expressions causes seg fault: --main5():Record(D1hasMeetJoin:Boolean, D1hasJoinMeet:Boolean) == -- [D1 has Meet(C1,Join(C1,C2)), D1 has Join(C1,Meet(C1,C2))]; added: -- expect True, True --main5()
Aldor-Meet
On Date: Nov 19, 2007 10:58 AM Oleg Golubitsky wrote to aldor-l <aldor-l@aldor.org>:
By analogy with 'Join', 'Meet(C1,C2)' should return a category which has the intersection of exports of 'C1' and 'C2'.
A simple test (see below) confirmed this semantics; I also could not find a description of 'Meet' in the guide.
begin{aldor} #include "aldor" define C1:Category == with {
f: Integer; g: Integer;
} define C2:Category == with {
f: Integer; h: Integer;
} D: Meet(C1,C2) == add {
- f: Integer == 1; -- OK; if this line is commented out, error:
- -- The domain is missing some exports. -- Missing f: AldorInteger?
} end{aldor}
The Axiom library apparently does not define 'Meet'. begin{aldor} #include "axiom" Meet(T: Tuple Category): Category == with;
} D1: C1 == add {
f: Integer == 1; g: Integer == 2;
} define C2:Category == with {
f: Integer; h: Integer;
} D2: C2 == add {
f: Integer == 1; h: Integer == 3;
}
define M12:Category == Meet(C1,C2);
g: Integer == 2; h: Integer == 3;
}
define J12:Category == Join(C1,C2);
}
--Evaluating more complex Meet/Joint expressions causes seg fault: --main5():Record(D1hasMeetJoin:Boolean, D1hasJoinMeet:Boolean) == -- [D1 has Meet(C1,Join(C1,C2)), D1 has Join(C1,Meet(C1,C2))]?; end{aldor}
begin{axiom} f()$DM12 -- expect not defined g()$DM12 -- expect not defined h()$DM12 f()$DJ12 g()$DJ12 h()$DJ12 end{axiom}
begin{axiom} -- expect False, False main1() end{axiom}
Comment of Ralf Hemmecke 20-Nov-2007: I would expect (false,false) for main2(), because, DM12 is not explicitly declared to be of type C1 or C2 even if its "add" domain has all the exports (except for the names C1 and C2). begin{axiom} -- expect True, True main2() -- expect True, True main3() -- expect True, True, True main4() -- expect True, True --main5() end{axiom} Comment of Ralf Hemmecke 20-Nov-2007: That main4() returns (false, false, true) should be considered a bug.