DynaMoW: Dynamic Mathematics on the Web

What is DynaMoW?

DynaMoW is a programming tool for controlling the generation of mathematical web sites that embed dynamical mathematical contents generated by computer-algebra calculations. The desire for this tool grew from the development of the Dynamic Dictionary of Mathematical Functions (DDMF), and DynaMoW is now used as the underlying engine for both the DDMF and the ECS.

DynaMoW takes the form of an OCaml library. A beta of a first release has been published end of March 2011, and the final release is expected soon. The authors are F. Chyzak (frederic.chyzak@at@inria.fr) and A. Darrasse (alexis.darrasse@at@lip6.fr).

The present release of DynaMoW is distributed under CeCILL-B license [en | fr], with rights owned by INRIA and Microsoft Corporation.

Installation procedure

  1. download DynaMoW-1.0.0.tar.gz.
  2. perform the following commands that install (some of) the dependencies automatically:
    tar zxpf DynaMoW-1.0.0.tar.gz
    cd DynaMoW-1.0.0
  3. the library can now be compiled:
  4. make

After this, you can perform or skip the quick test of the next section. You can then copy the libraries build/DynaMoW{.cma,.cmi,_filter.cma} against which your application can then be compiled, and keep (copy) build/DynaMoW.mli for API documentation. For application examples, refer to the manual in the documentation section below.

Likely dependencies for compiling (as Debian packages): git-core make ocaml camlp4-extra ocaml-findlib libocamlnet-ocaml-dev libcryptokit-ocaml-dev.

Likely dependencies for running and looking at a web site (as Debian packages): latexml texlive-binaries texlive-latex-base latex-beamer ghostscript netpbm dvipng inkscape libapache2-mod-fastcgi ttf-jsmath (not all dependencies are needed, depending on configuration options and web clients actually used).

Quick test

Assuming you have Maple installed and in your path, the following is a quick test that everything works, using the DynaMoW toplevel:

$ bin/dynamow_top
        Objective Caml version 3.12.0

	Camlp4 Parsing version 3.12.0

# use_cas Maple ;;
module DynaMoW_CAS__ :
    type 'a t = 'a Maple.t
    type cas_code = string
    val evaluator_symbolic : cas_code -> 'a t DynaMoW.symb
    val evaluator_latex : cas_code -> DynaMoW.CAS.latex
    val evaluator_unit : cas_code -> unit
    val evaluator_int : cas_code -> int
    val evaluator_bool : cas_code -> bool
    val evaluator_string : cas_code -> string
    val serialization_of_t : 'a t DynaMoW.symb -> string
    val cas_ref_of_t : 'a t DynaMoW.symb -> string
    val pp : Format.formatter -> 'a t DynaMoW.symb -> unit
    val pretty_code_of_t : 'a t DynaMoW.symb -> DynaMoW.CAS.pretty_code
    val latex_of_t : 'a t DynaMoW.symb -> DynaMoW.CAS.latex
    val cas_code_of_bool : bool -> cas_code
    val reset : unit -> unit
# let a = <:int< degree(normal((x^10 - 1) / (x - 1))) >> ;;
val a : int = 9
# <:bool< x^$(int:a) = x^9 >> ;;
- : bool = true


A most complete programmer's manual is available [html | pdf].

See also the white paper on DynaMoW (published as an experience report at ICFP'11, [bib]).

Examples of practical coding

We have used DynaMoW for two applications: the ECS and the DDMF.

The ECS describes combinatorial structures. Compare the form for the generating functions given in the sections 4 of ECS #34: Cycles of cycles and ECS #93: Planar trees, respectively: depending on the mathematics, we provide different forms of output. In ECS #34, the explicit form involves logarithms, but satisfies no linear differential equations; in ECS #93, we can supply a linear differential equation. By itself, these sections 4 are the result of evaluating a service named GeneratingFunction, whose implementation is given here, together with its interface.

The DDMF provides information on various special functions of mathematical analysis. All articles describe one function and are built on the same structure. This is the result of a service named SpecialFunction, whose implementation is given here, together with its interface. On each page, the short paragraph One gets a polynomial… is the result of the case analysis in a service named TaylorTruncation, whose implementation is given here, together with its interface.