Coder Social home page Coder Social logo

mlgmpidl's Introduction

# $Id$

# This file is part of the MLGmpIDL OCaml interface for GMP 5.0.0 and MPFR 3.0.0 or up
# released under LGPL license with an exception allowing the redistribution
# of statically linked executables.

# Please read the COPYING file packaged in the distribution

This package is an OCAML interface for GMP and MPFR libraries.

The interface is decomposed into 5 modules:
Mpz       : GMP multiprecision integers
Mpzf      : GMP multiprecision integers, functional version
	    (no side-effect on numbers)
Mpq       : GMP multiprecision rationals
Mpqf      : GMP multiprecision rationals, functional version
	    (no side-effect on numbers)
Mpf       : GMP multiprecision floating-point numbers
Gmp_random: GMP random numbers generation
Mpfr      : MPFR multiprecision floating-point numbers
Mpfrf	  : MPFR multiprecision floating-point numbers, functional version
	    (no side-effect on numbers)

Compared to the well-known MLGMP interface developped by D. Monniaux
(http://www.di.ens.fr/~monniaux/programmes.html.en), MLGMPIDL favours an
imperative interface to a functional interface (all functions are offered in an
imperative version, more efficient in term of memory allocation). Moreover, it
uses CamlIDL, which allows to design easily further OCaml/C interface that
needs GMP types, using "import mpz.idl" clauses. The APRON project exploits
this.

REQUIREMENTS
============
GMP library (tested with version 5.x.y and up)
MPFR library (requires version 3.x.y)
OCaml 3.09 or up (tested with 3.09 and 3.12)
Camlidl (tested with 1.05)
GNU sed, version 4.1 or up
FINDLIB (http://projects.camlcity.org/projects/findlib.html)

INSTALLATION
============

1. Library
----------

Type:

   ./configure

to check for dependencies and generate a Makefile.configure file.

Then, type:

   make
   make install

(with optional 'sudo' for make install, in case you install in a system
location)


The OCaml part of the library is named gmp.cma (.cmxa, .a).  The C
part of the library is named libgmp_caml.a (libgmp_caml_debug.a), or, with dynamic linking, dllgmp_caml.so.

'make install' installs not only .mli, .cmi, but also .idl files.


./configure has some options and acknowledges some environment variables.
Type './configure --help' to know everything about it.


2. Linking
------------

With FINDLIB, no problem at all.

gmp.cma requires bigarray.cma. 

Look at the rule for session.byte and session.opt executable in the Makefile
to see how to link against gmp.cma/gmp.cmxa.

3. Interpreter and toplevel
---------------------------

With dynamic linking, you can use ordinary runtime ocamlrun and toplevel.

You can play with [session.ml], and compile it with 'make session.byte',
'make session.opt'.

4. Documentation
----------------

The documentation (currently, just refers to GMP and MPFR doc) is generated
with ocamldoc.

'make mlgmpidl.pdf'
'make html' (put the HTML files in the html subdirectoy)

5. Miscellaneous
----------------

'make install', 'make uninstall',
'make clean' and 'make distclean' have the usual behaviour. 

mlgmpidl's People

Contributors

nberth avatar yakobowski avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.