How to install free softwares in Linux

last update: 29 Sep 2004

home |index |previous |next |contents

SML/NJ (Standard ML of New Jersey)



"SML/NJ"は関数型言語MLの処理系の一つで、特にStandard MLの仕様をかなり忠実に実装しているものです。
:注 これに対しCaml lightなどは、構文などでStandard MLと微妙に差異があります。

12.1 ソフトの入手
SML/NJはいくつかのファイルに分割されてFTPサイトに おかれています。
最低限度必要なファイルは

110-bin.x86-unix.tar.Z
110-cm.tar.Z
110-config.tar.Z
110-runtime.tar.Z

です。

以下のサイトから"SML/NJ"を入手できます:
12.2 インストール
あらかじめSML/NJを展開するディレクトリを作っておきます。 ここでは/usr/local/smlを作り、 110-cofig.tar.Zファイルを以下の手順で展開します。

    % mkdir /usr/local/sml

    % cd /usr/local/sml
    % zcat 110-cofig.tar.Z | tar -xf -

次に、インストールするツールを選択するために./config/tagetsファイルを編集します。 例えばSMLのコンパイラsmlと並行処理用コンパイラツールを同時にインストールする場合には、 コンパイルオプションINSTALL_SML_AND_CM="TRUE"を選択します。

# Set this flag to TRUE, if you want to have both sml and sml-cm available.
# Otherwise, the sml heap images will be replaced by links to the corresponding
# sml-cm heap images.
#
INSTALL_SML_AND_CM="TRUE"

# build the testbed compiler; useful for compiler-development work
#
#TARGETS="$TARGETS sml-full-cm"

./config/targetsの編集例


ファイル./config/tagetsの編集が終ったら、ダウンロードしたファイルを ディレクトリ/usr/local/smlにコピーして下さい。

    % pwd
    /usr/local/sml
    % ls
    110-bin.x86-unix.tar.Z
    110-cm.tar.Z
    110-cml.tar.Z
    110-config.tar.Z
    110-doc.tar.Z
    110-eXene.tar.Z
    110-ml-burg.tar.Z
    110-ml-lex.tar.Z
    110-ml-yacc.tar.Z
    110-runtime.tar.Z
    110-sml-nj.tar.Z
    110-smlnj-c.tar.Z
    110-smlnj-lib.tar.Z
    config

最後に、ディレクトリ/usr/local/smlでシェルコマンド"./config/install.sh"を実行して下さい。
自動的にコンパイルが行なわれ、 ディレクトリ/usr/local/sml/bin以下にコンパイラはじめ各種ツールがインストールされます。
    % pwd
    /usr/local/sml
    % ./config/install.sh

12.3 参考文献
MLの学習については以下の図書が最適と思われます。

・J.D.Ullman, "Elements of ML Programming", Prentice Hall, 1994
(邦訳: プログラミング言語ML, ASCII出版)


home |index |previous |next |contents


since 04/Oct/2004