https://hal.archives-ouvertes.fr/hal-01863457
Raw File
Tip revision: c812045b6b43f7bfeca7954a47baf2dcbb8c6d8d authored by Software Heritage on 03 September 2018, 13:40:43 UTC
hal: Deposit 174 in collection hal
Tip revision: c812045
README
This directory contains some examples of Caml programs.

The examples can either be compiled and executed as standalone programs
(just type "make" in the subdirectory), or run interactively under
"camllight" (the graphics programs must be run under "camlgraph"), by
executing 
                include "loadall";;

in the appropriate directory.

Examples marked (*) are taken from the book ``Le langage Caml'', by
Pierre Weis and Xavier Leroy (InterEditions, 1993). Messages and
identifiers are in French and contain accented letters (ISO 8859-1
encoding). You'll need an 8-bit clean system to read them.

Examples marked (G) assume installed the contrib/libgraph library.

basics:
        Three all-time favorites: Fibonacci, Eratosthene's sieve, and the
        Unix "wc" utility.

asl:
        This is the implementation of A Small Language, as described in
        part 3 of ``Functional Programming using Caml Light'', by
        Michel Mauny.

calc:
        This is a simple desk calculator that illustrates the use of camllex 
        and camlyacc.

colwheel: (G)
        The "color wheel" (color space in HSV coordinates).
        Needs at least 256 colors to look good.

compress: (*)
        File compression and decompression (Huffman).

demonstr: (*)
        Tautology checker.

dimens: 
        Examples of Caml-Light with dimensions. These ones are not compiled
        by the general make.
        reltest : compile with 
             camlc -o reltest reltest.ml
        It gives energy of a particle from its mass and speed (according to
        the relativity theory)
        electest : to load in the toplevel with
             load "electest.ml";;
        It computes the transfer function of an electronic circuit.

docteur: (*)
        A (French-speaking) clone of Eliza.

grep: (*)
        Regular expressions and automata.

hanoi: (*)
        Animated towers of Hanoi.

kb:
        The Knuth-Bendix completion procedure for rewriting systems.
        Taken from some course notes by Gerard Huet.

minicaml: (*)
        An interpreter and typechecker for a subset of Caml.

minilogo: (*) (G)
        An interpreter for a small language with turtle graphics.

pascal: (*)
        An interpreter and compiler for a subset of Pascal.
        The compiler generates code for the "picomach" program.

picomach: (*)
        An assembler and simulator for a RISC processor.

showsort: (G)
        Graphic animation of sorting algorithms.

spirals: (G)
        Explore a family of flashy curves. (Use spir on a color screen
        and spir-bw on a black and white screen.)

config:
        This directory does not contain an example, but configuration
        files used to generate the Makefiles.
back to top