|
|
|
last edited 2 years ago by test1 |
| 1 2 3 4 5 6 7 8 9 | ||
|
Editor: test1
Time: 2023/09/17 16:07:01 GMT+0 |
||
| Note: | ||
changed: -The Axiom library apparently does not define 'Meet'. The FriCAS library apparently does not define 'Meet'. changed: -#include "axiom" #include "fricas"
On Date: Nov 19, 2007 10:58 AM Oleg Golubitsky wrote to aldor-l
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.
(1) -> <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
}</aldor>
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2046275806961882305-25px001.as
using Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
Use the system command )set compiler args to change these
options.Compiling Lisp source code from file
./2046275806961882305-25px001.lsp
Issuing )library command for 2046275806961882305-25px001Reading #P"/var/aw/var/LatexWiki/2046275806961882305-25px001.asy" C1 is now explicitly exposed in frame initial
>> System error: The function BOOT::ASHARPMKAUTOLOADFUNCTOR is undefined.
The FriCAS library apparently does not define Meet.
#include "fricas" Meet(T: Tuple Category): Category == with;
define C1:Category == with { f: Integer; g: Integer; } 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);
DM12: M12 == add { f: Integer == 1; -- if this line is commented out,error: -- The domain is missing some exports. g: Integer == 2; h: Integer == 3;
}
define J12:Category == Join(C1,C2);
DJ12: J12 == add { f: Integer == 1; g: Integer == 2; h: Integer == 3; }
main1():Record(D1hasM12:Boolean,D2hasM12:Boolean) == [D1 has M12, D2 has M12]; main2():Record(M12hasC1:Boolean, DM12hasC2:Boolean) == [DM12 has C1, DM12 has C2]; main3():Record(DJ12hasC1:Boolean, DJ12hasC2:Boolean) == [DJ12 has C1, DJ12 has C2];
main4():Record(D1hasMeet:Boolean,D2hasMeet:Boolean, D1hasF:Boolean) == [D1 has Meet(C1, C2), D2 has Meet(C1, C2), D1 has with {f:Integer}];
--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))];
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3470372493881279901-25px002.as
using Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
Use the system command )set compiler args to change these
options.
Compiling Lisp source code from file
./3470372493881279901-25px002.lsp
Issuing )library command for 3470372493881279901-25px002
Reading #P"/var/aw/var/LatexWiki/3470372493881279901-25px002.asy"
Meet is now explicitly exposed in frame initial
>> System error:
The function BOOT::ASHARPMKAUTOLOADFUNCTOR is undefined.f()$DM12
DM12 is not a valid type.
-- expect False,False main1()
There are no library operations named main1 Use HyperDoc Browse or issue )what op main1 to learn if there is any operation containing " main1 " in its name.
Cannot find a no-argument definition or library operation named main1 .
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).
-- expect True,True main2()
There are no library operations named main2 Use HyperDoc Browse or issue )what op main2 to learn if there is any operation containing " main2 " in its name.
Cannot find a no-argument definition or library operation named main2 .
Comment of Ralf Hemmecke 20-Nov-2007: That main4() returns (false, false, true) should be considered a bug.