Welcome to the official expresso tutorial.
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}}
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
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.
- Expresso Basics
- (optional) Advanced Expression Construction and Manipulation
- Manipulation of Algebraic Expressions
- Rule Based Semantic Term Rewriting with Expresso
- Expresso's Internals/How it Works
- Extending Expresso
- Copy this repo, so you can experiment with the code while reading
- Begin reading Expresso's basics
- Pick any other section which is of interest
Copyright © 2013 FIXME
Distributed under the Eclipse Public License, the same as Clojure.