GithubHelp home page GithubHelp logo

calculatrice's Introduction

Projet de PFA : Calcul Formel

Installation

Pour compiler les fichiers sources fournis, en plus d'OCaml nous vous recommandons fortement l'usage des outils suivants: make, menhir, dune, ocamlfind.

Sur une Debian (ou Ubuntu >= 20.4), ces outils peuvent s'installer simplement via: sudo apt install make ocaml menhir dune ocaml-findlib.

Pour les autres systèmes, make est disponible sur toute plateforme raisonnable de développement, et si les autres outils ne sont pas disponibles directement vous pourrez les installer via opam, un gestionnaire de paquets OCaml.

Eviter fortement Ubuntu 18.04 (ou plus ancien), qui ne propose pas l'outil dune (ou pire, un binaire du même nom mais qui n'a rien à voir avec OCaml).

Utilisation

Une fois installé les outils nécessaires (voir la section précédente), vous pouvez compiler en lançant make dans le répertoire actuel projet, ce qui lancera dune build avec les bons arguments (voir le fichier Makefile pour plus de détails).

Ensuite, le petit script fourni run facilite ensuite le lancement du binaire obtenu (dune exec avec les bons arguments). Pour l'instant, le code principal lit une expression algébrique sur l'entrée standard, la transforme en donnée OCaml de type Syntax.expr, puis la réaffiche (voir src/calc.ml). Par exemple:

% ./run
x+pi*sqrt(3)
(x+(pi*sqrt(3)))

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.