MzScheme:src解析
MzSchemeに特に興味を持ったのは、Windowsの開発環境があったのと srcコードに
#if defined(OSKIT) && !defined(OSKIT_TEST) && !KNIT oskit_prepare(&argc, &argv); #endif の文字があった為です。
もしかしてOS込みのSchemeの実装も考えている?と勘ぐったからです。 実際 mzsrcwin-205\plt\src\README の中にはそれらしい文章 Compiling the OSKit-based kernel があります。 http://www.cs.utah.edu/projects/flux/oskit/ 実際どこまでなのか?は分かっていません。 期待しているのは、FD1枚程度でPCが起動してSchemeが動き、WebサーバなりWikiクローンなりが動く世界です。 そして更に+αです。 こちらは、Windowsとは関係有りません。
Software Design 2003 10月号 にOSKitとTinySchemeによる Scheme OS の記事があります。 http://sourceforge.jp/projects/yawos/ scmos
とGUIにwxWindowsを使用していたのもあります。 使用しているバージョンは
#define wxVERSION_STRING "wxWindows 1.63, PLT Variant"
と古いですが。
Windows VS2002のプロジェクトによる解析
MzScheme
コンソールベースのSchemeなのでGUI関係等は使用していない
plt\src\worksp\mzscheme\mzscheme.sln 3ヶのプロジェクト 1)libmzgc :libmzgcxxxxxxx.dll を作成する ``conservative'' garbage collector http://www.hpl.hp.com/personal/Hans_Boehm/gc/ plt\src\mzscheme\gc 2)libmzsch :libmzschxxxxxxx.dll を作成する MzScheme の本体 上記libmzgcをリンクしている plt\src\mzscheme\src の中のソースファイル 3)mzscheme :MzScheme.exe を作成する ほとんど上記ライブラリを呼び出すだけ plt\src\mzscheme\main.c 上記dllは、バージョン付き名 libmzgc205_000.dll、libmzsch205_000.dll へ
- libmzgc
A garbage collector for C and C++ http://www.hpl.hp.com/personal/Hans_Boehm/gc/ 参考 Boehm GC ライブラリを使って C/C++ でもガーベージコレクションをしよう http://www.mtl.t.u-tokyo.ac.jp/~nminoru/programming/ w3m のガーベジコレクタと gpm http://www.asahi-net.or.jp/~bg3k-ysd/psion/diary/20000330.html MzSchemeでもアセンブラが出てくる Garbage Collection Chapter9(B4ゼミ) http://www.ueda.info.waseda.ac.jp/~yamane/ http://www.google.co.jp/search?q=cache:UYBWJ8vEyjMJ:www.ueda.info.waseda.ac.jp/~yamane/GC.doc+Conservative+garbage+collector+&hl=ja&lr=lang_ja&ie=UTF-8
MzScheme Ver.205では version 6.1alpha2(src\mzscheme\gc\doc\READMEより)のgcを使用している (そのまま使用しているよう) gcの最新は http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
GC_init(); GC_clear_roots(); で初期化 GC_XXX がgcの関数、ただしプラットフォームが多く、ifdef等の嵐なので、実際に使用されているかは、「定義へ移動」(VSの機能)等で確認を要す
- libmzsch
cmdline.inc fun.c sj_start = top_level_do(k, eb, sj_start);
- mzscheme
main.c exit_val = run_from_cmd_line(argc, argv, scheme_basic_env, cont_run); -> cmdline.inc
動作プラットフォーム
Ver.205 Windows Mac OS (PPC Classic and OS X) Linux (x86, PPC, 68k, Alpha) Cygwin Solaris (x86, Sparc) SunOS4 (Sparc) IBM AIX (RS6000) SGI IRIX (Mips) DEC Ultrix HP/UX FreeBSD OpenBSD OSF1 (Alpha) SCO Unix (x86)
使用しているライブラリ等
Help Desk の License より
PLT Software Copyright (c) 1995-2003 PLT
PLT software is distributed under the GNU Library General Public License (LGPL). This means you can link PLT software (such as MzScheme or MrEd) into proprietary applications, provided you follow the specific rules stated in the LGPL. You can also modify PLT software; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular means that you must release the source code for the modified software. See COPYING.LIB for more information.
PLT software includes or extends the following copyrighted material:
DrScheme
Copyright (c) 1995-2003 PLT All rights reserved.
MrEd
Copyright (c) 1995-2003 PLT All rights reserved.
MzScheme
Copyright (c) 1995-2003 PLT All rights reserved.
libscheme
Copyright (c) 1994 Brent Benson All rights reserved.
wxWindows
Copyright (c) 1994 Artificial Intelligence Applications Institute, The University of Edinburgh All rights reserved.
wxWindows Xt
Copyright (c) 1994 Artificial Intelligence Applications Institute, The University of Edinburgh Copyright (c) 1995 GNU (Markus Holzem) All rights reserved.
Conservative garbage collector
Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 Xerox Corporation Copyright (c) 1996-1999 Silicon Graphics Copyright (c) 1999-2001 by Hewlett-Packard Company All rights reserved.
Collector C++ extension by Jesse Hull and John Ellis
Copyright (c) 1994 Xerox Corporation All rights reserved.
The A List
Copyright (c) 1997-2000 Kyle Hammond. All rights reserved.
Independent JPEG Group library
Copyright (c) 1991-1998 Thomas G. Lane. All rights reserved.
libpng
Copyright (c) 2000-2002 Glenn Randers-Pehrson All rights reserved.
zlib
Copyright (c) 1995-2002 Jean-loup Gailly and Mark Adler All rights reserved.
GNU Classpath
Gnu Public Licence with special exception