Giter VIP home page Giter VIP logo

expresso-tutorial's Introduction

Expresso-tutorial

Welcome to the official expresso tutorial.

What is Expresso

Expresso is the clojure library for algebraic manipulation of expressions and symbolic computation I developed as my Google summer of Code 2013 project. It builds on top of core.matrix and core.logic and provides a powerful manipulation framework for algebraic expressions.

(solve 'blue
  (ex (= pencils (+ green white blue red)))
  (ex (= (/ pencils 10) green))
  (ex (= (/ pencils 2) white))
  (ex (= (/ pencils 4) blue))
  (ex (= red 45))) ;=> #{{blue 75N}}

Features

At the end of gsoc, expresso has the following features:

  • functions to construct and handle algebraic expressions
  • a general rule based translator to succinctly state expression manipulations
  • functions to manipulate and simplify algebraic expressions
  • an expression solver which can solve a single equation and set of equations for unknowns. The expressions can also contain core.matrix matrix expressions.
  • an expression optimizer and compiler, which optimizes the expression for excecution speed and can compile it to an efficient clojure function

What this tutorial covers

The tutorial is split into multiple section, each contained in its own top level org file. Each file is itself a literal program and contains working clojure code. The extracted code can also be found in the src directory. You can find some example of expresso in the section 3.1 featuring solving word problems and finding roots and extremata of functions.

Table of contents

  1. Expresso Basics
  2. (optional) Advanced Expression Construction and Manipulation
  3. Manipulation of Algebraic Expressions
    1. Simplifying and Solving Expressions
    2. Optimizing and Compiling Expressions
  4. Rule Based Semantic Term Rewriting with Expresso
  5. Expresso's Internals/How it Works
  6. Extending Expresso

Getting started

  1. Copy this repo, so you can experiment with the code while reading
  2. Begin reading Expresso's basics
  3. Pick any other section which is of interest

License

Copyright © 2013 FIXME

Distributed under the Eclipse Public License, the same as Clojure.

expresso-tutorial's People

Contributors

mschuene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

expresso-tutorial's Issues

Missing clarification of result

Hi, how am I to interpret this result in lay man terms (im not a math wiz)?

(def t (sym/ex (= t 30000)))
(def t1 (sym/ex (= t (+ a b c))))
(sym/solve '[a b c] t t1)

{{a (+ (* -1 (+ _0 _1)) 30000), c _0, b _1}}

The _0 is explained in the tutorial as being any number but what is _1?
Also how can i make a constraint that a b and c must be >0?

Thanks for a really fun library, hope you continue working on it for a long time :)

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.