<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Yes.<BR>
<BR>
C:\dev2\cm3.2\m3-sys\m3tests\src\p1\p155\Main.m3<BR>
<BR>
(* Copyright (C) 1994, Digital Equipment Corporation. *)<BR>(* All rights reserved. *)<BR>(* See the file COPYRIGHT for a full description. *)<BR> <BR>(* Last modified on Tue Oct 27 14:49:19 PST 1992 by kalsow *)<BR>(* modified on Wed Oct 10 13:15:01 1990 by saxe *)<BR>
(* Set operators on a small set type. *)<BR>
MODULE Main;<BR>IMPORT Test, Wr;<BR>FROM Stdio IMPORT stderr;<BR>
TYPE<BR> Elt = {a, b, c, d, e};<BR> Set = SET OF Elt;<BR>
VAR<BR> x: Set;<BR>
CONST<BR> p = Set{Elt.a, Elt.c, Elt.e};<BR> q = Set{};<BR> r = Set{Elt.a .. Elt.b, Elt.a .. Elt.a (* , Elt.d .. Elt.b *)};<BR>
PROCEDURE m( s: TEXT ) =<BR> BEGIN<BR> TRY<BR> Wr.PutText (stderr, s & "\n");<BR> Wr.Flush (stderr);<BR> EXCEPT ELSE END;<BR> END m;<BR>
BEGIN<BR> m ("check set p = {a, c, e}");<BR> Test.checkM (Elt.a IN p, "Elt.a IN p");<BR> Test.checkM (NOT (Elt.b IN p), "NOT (Elt.b IN p)");<BR> Test.checkM (Elt.c IN p, "Elt.c IN p");<BR> Test.checkM (NOT (Elt.d IN p), "NOT (Elt.d IN p)");<BR> Test.checkM (Elt.e IN p, "(Elt.e IN p");<BR>
m ("check set q = {}");<BR> Test.checkM (NOT (Elt.a IN q), "NOT (Elt.a IN q)");<BR> Test.checkM (NOT (Elt.b IN q), "NOT (Elt.b IN q)");<BR> Test.checkM (NOT (Elt.c IN q), "NOT (Elt.c IN q)");<BR> Test.checkM (NOT (Elt.d IN q), "NOT (Elt.d IN q)");<BR> Test.checkM (NOT (Elt.e IN q), "NOT (Elt.e IN q)");<BR>
m ("check set r = {a, b}");<BR> Test.checkM (Elt.a IN r, "Elt.a IN r");<BR> Test.checkM (Elt.b IN r, "Elt.b IN r");<BR> Test.checkM (NOT (Elt.c IN r), "NOT (Elt.c IN r)");<BR> Test.checkM (NOT (Elt.d IN r), "NOT (Elt.d IN r)");<BR> Test.checkM (NOT (Elt.e IN r), "NOT (Elt.e IN r)");<BR>
Test.checkM (r = Set{Elt.b, Elt.a}, "r = Set{Elt.b, Elt.a}");<BR>
(** Test.checkM (-p = Set{Elt.d, Elt.b}); **)<BR> (** Test.checkM (+p = p); **)<BR> Test.checkM (p - p = q, "check (p - p = q)");<BR> Test.checkM ((p - r) * (r - p) = q, "check ((p - r) * (r - p) = q)");<BR> Test.checkM (p - r = Set{Elt.c, Elt.e}, "check (p - r = Set{Elt.c, Elt.e})");<BR> Test.checkM (p + p = p, "check (p + p = p)");<BR> Test.checkM (p + r = Set{Elt.a, Elt.b, Elt.c, Elt.e},<BR> "check (p + r = Set{Elt.a, Elt.b, Elt.c, Elt.e})");<BR> (** Test.checkM (-(-(r)) = r); **)<BR> Test.checkM (p * r = Set{Elt.a}, "check (p * r = Set{Elt.a})");<BR> Test.checkM (p * q = Set{}, "check (p * q = Set{})");<BR> Test.checkM (p # q, "check (p # q)");<BR> Test.checkM (q < p, "check (q < p)");<BR> Test.checkM (NOT (p < r), "check (NOT (p < r))");<BR> Test.checkM (NOT (p > r), "check (NOT (p > r))");<BR> Test.checkM (NOT (p = r), "check (NOT (p = r))");<BR> Test.checkM ((p / r) = (Set{Elt.b, Elt.c, Elt.e}),<BR> "check ((p / r) = (Set{Elt.b, Elt.c, Elt.e}))");<BR> Test.checkM (r / q = q / r, "check (r / q = q / r)");<BR> Test.checkM (r / p / r / p / q / r = r, "check (r / p / r / p / q / r = r)");<BR> Test.checkM (p / r - r / p = q, "check (p / r - r / p = q)");<BR> x := p;<BR> x := x + Set{Elt.b}; (*INCL(x, Elt.b);*)<BR> (* x = { a, b, c, e } *)<BR> Test.checkM (x > p, "check (x > p)");<BR> Test.checkM (x >= p, "check (x >= p)");<BR> Test.checkM (p <= x, "check (p <= x)");<BR> Test.checkM (p # x, "check (p # x)");<BR> x := x - Set{Elt.c}; (*EXCL(x, Elt.c);*)<BR> (* x = { a, b, e } *)<BR> m ("check set x = {a, b, e}");<BR> Test.checkM (Elt.a IN x, "Elt.a IN x");<BR> Test.checkM (Elt.b IN x, "Elt.b IN x");<BR> Test.checkM (NOT (Elt.c IN x), "NOT (Elt.c IN x)");<BR> Test.checkM (NOT (Elt.d IN x), "NOT (Elt.d IN x)");<BR> Test.checkM (Elt.e IN x, "Elt.e IN x");<BR> Test.checkM (NOT (p <= x), "check (NOT (p <= x))");<BR> Test.checkM (NOT (p >= x), "check (NOT (p >= x))");<BR> Test.checkM (x = r + Set{Elt.e}, "check (x = r + Set{Elt.e})");<BR> Test.done ();<BR>END Main.<BR><BR><BR> -Jay<BR><BR><BR>
<HR id=stopSpelling>
<BR>
> From: hosking@cs.purdue.edu<BR>> Date: Sun, 27 Jan 2008 15:33:34 -0500<BR>> To: wagner@elegosoft.com<BR>> CC: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] Open CM3 regression tests<BR>> <BR>> Are your sets larger than a single word? The M3 frontend compiles <BR>> small sets (elements <= BITSIZE(Word.T)) differently from large <BR>> (elements > BITSIZE(Word.T)). The out-of-line set operations are <BR>> only for large sets.<BR>> <BR>> <BR>> On Jan 27, 2008, at 12:55 PM, Olaf Wagner wrote:<BR>> <BR>> > Quoting Tony Hosking <hosking@cs.purdue.edu>:<BR>> ><BR>> >> The set operations are coded in cm3/m3-libs/m3core/src/Csupport/ <BR>> >> Common/hand.c.<BR>> >><BR>> >> I notice Jay has made a number of changes here since September -- I<BR>> >> wonder if they have broken something.<BR>> ><BR>> > I tried different revisions of this file with no difference in the<BR>> > test results. I then took the latest version and added some printfs,<BR>> > and they got never displayed. So I checked what gets linked, but the<BR>> > symbols in question don't occur in the test program:<BR>> ><BR>> > % nm hand.o<BR>> > U __divdi3<BR>> > U __moddi3<BR>> > 000001e0 R _highbits<BR>> > 00000140 R _lowbits<BR>> > 00000000 T m3_div<BR>> > 000000ac T m3_divL<BR>> > 000001d4 T m3_mod<BR>> > 0000026c T m3_modL<BR>> > U printf<BR>> > 00000494 T set_difference<BR>> > 00000554 T set_eq<BR>> > 0000061c T set_ge<BR>> > 000006ac T set_gt<BR>> > 00000434 T set_intersection<BR>> > 0000077c T set_le<BR>> > 0000080c T set_lt<BR>> > 000003a8 T set_member<BR>> > 000005b8 T set_ne<BR>> > 000008d8 T set_range<BR>> > 000009d8 T set_singleton<BR>> > 000004f4 T set_sym_difference<BR>> > 000003d4 T set_union<BR>> ><BR>> > % nm /usr/local/cm3/pkg/m3core/FreeBSD4/libm3core.so.5 | grep set_<BR>> > 000243d0 T set_difference<BR>> > 00024490 T set_eq<BR>> > 00024558 T set_ge<BR>> > 000245fc T set_gt<BR>> > 00024370 T set_intersection<BR>> > 000246e0 T set_le<BR>> > 00024784 T set_lt<BR>> > 000242e4 T set_member<BR>> > 000244f4 T set_ne<BR>> > 00024864 T set_range<BR>> > 00024998 T set_singleton<BR>> > 00024430 T set_sym_difference<BR>> > 00024310 T set_union<BR>> ><BR>> > % ldd FreeBSD4/p1/p155/FreeBSD4/pgm<BR>> > FreeBSD4/p1/p155/FreeBSD4/pgm:<BR>> > libtest.so.5 => /d/home/wagner/work/cm3/m3-sys/m3tests/ <BR>> > FreeBSD4/libtest.so.5 (0x28085000)<BR>> > libm3.so.5 => /usr/local/cm3/pkg/libm3/FreeBSD4/libm3.so.5 <BR>> > (0x28088000)<BR>> > libm3core.so.5 => /usr/local/cm3/pkg/m3core/FreeBSD4/ <BR>> > libm3core.so.5 (0x281aa000)<BR>> > libm.so.4 => /lib/libm.so.4 (0x28a2d000)<BR>> > libpthread.so.2 => /lib/libpthread.so.2 (0x28a46000)<BR>> > libc.so.6 => /lib/libc.so.6 (0x28a6a000)<BR>> ><BR>> > % nm /usr/local/cm3/pkg/m3core/FreeBSD4/libm3core.so.5 | grep set_<BR>> > 000243d0 T set_difference<BR>> > 00024490 T set_eq<BR>> > 00024558 T set_ge<BR>> > 000245fc T set_gt<BR>> > 00024370 T set_intersection<BR>> > 000246e0 T set_le<BR>> > 00024784 T set_lt<BR>> > 000242e4 T set_member<BR>> > 000244f4 T set_ne<BR>> > 00024864 T set_range<BR>> > 00024998 T set_singleton<BR>> > 00024430 T set_sym_difference<BR>> > 00024310 T set_union<BR>> > luthien [~/work/cm3/m3-sys/m3tests] wagner<BR>> > % ldd FreeBSD4/p1/p155/FreeBSD4/pgm<BR>> > FreeBSD4/p1/p155/FreeBSD4/pgm:<BR>> > libtest.so.5 => /d/home/wagner/work/cm3/m3-sys/m3tests/ <BR>> > FreeBSD4/libtest.so.5 (0x28085000)<BR>> > libm3.so.5 => /usr/local/cm3/pkg/libm3/FreeBSD4/libm3.so.5 <BR>> > (0x28088000)<BR>> > libm3core.so.5 => /usr/local/cm3/pkg/m3core/FreeBSD4/ <BR>> > libm3core.so.5 (0x281aa000)<BR>> > libm.so.4 => /lib/libm.so.4 (0x28a2d000)<BR>> > libpthread.so.2 => /lib/libpthread.so.2 (0x28a46000)<BR>> > libc.so.6 => /lib/libc.so.6 (0x28a6a000)<BR>> > luthien [~/work/cm3/m3-sys/m3tests] wagner<BR>> > % nm -C -u FreeBSD4/p1/p155/FreeBSD4/pgm<BR>> > U Main_I3<BR>> > U RTHooks_I3<BR>> > U RTHooks__CheckLoadTracedRef<BR>> > U RTHooks__Concat<BR>> > U RTHooks__PopEFrame<BR>> > U RTHooks__PushEFrame<BR>> > U RTHooks__TextLitGetChar<BR>> > U RTHooks__TextLitGetChars<BR>> > U RTHooks__TextLitGetWideChar<BR>> > U RTHooks__TextLitGetWideChars<BR>> > U RTHooks__TextLitInfo<BR>> > U RTLinker__AddUnit<BR>> > U RTLinker__InitRuntime<BR>> > U RTProcess__Exit<BR>> > U Stdio_I3<BR>> > U Test_I3<BR>> > U Test__checkM<BR>> > U Test__done<BR>> > U Wr_I3<BR>> > U Wr__Flush<BR>> > U Wr__PutText<BR>> > w _Jv_RegisterClasses<BR>> > w __deregister_frame_info<BR>> > w __register_frame_info<BR>> > U _init_tls<BR>> > U _setjmp<BR>> > U atexit<BR>> > U exit<BR>> ><BR>> > Now I'm rather confused 8-/<BR>> ><BR>> > Any ideas?<BR>> ><BR>> > Olaf<BR>> > -- <BR>> > Olaf Wagner -- elego Software Solutions GmbH<BR>> > Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, <BR>> > Germany<BR>> > phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 <BR>> > 45 86 95<BR>> > http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: <BR>> > Berlin<BR>> > Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: <BR>> > DE163214194<BR>> ><BR>> <BR><BR><br /><hr />Connect and share in new ways with Windows Live. <a href='http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008' target='_new'>Get it now!</a></body>
</html>