aude

Crates.ioaude
lib.rsaude
version0.2.0
sourcesrc
created_at2022-04-18 16:41:51.888631
updated_at2022-04-18 18:19:48.125046
descriptionAn automated differentiation solver with a Lisp-like functional programming language
homepagehttps://github.com/advancedresearch/aude
repositoryhttps://github.com/advancedresearch/aude.git
max_upload_size
id569923
size61,558
Sven Nilsen (bvssvni)

documentation

README

Aude

An automated differentiation solver with a Lisp-like functional programming language

=== Aude 0.2 ===
Type `help` for more information.
> mul

mul

ty: (fun (tup f64 f64) f64)

D: (lam (tup f64 f64) (tup mul($0) (lin_lam (tup f64 f64) add((tup mul((tup fst(f64)(f64)($0) fst(f64)(f64)($1))) mul((tup snd(f64)(f64)($0) snd(f64)(f64)($1))))))))

To run Aude from your Terminal, type:

cargo install --example aude aude

Then, to run:

aude

References

The Simple Essence of Automatic Differentiation

Design

Aude uses a Lisp-like syntax, to avoid pain during translating to and from other programming languages.

For example, instead of f64 -> f64, Aude uses (ty f64 f64).

Function application uses the syntax <function>(<argument>), e.g. sin(0).

Variables uses De Bruijn indices, e.g. $0 refers to the lambda argument.

All operators take 2 arguments, e.g. (fun f64 f64).

Features

Function Description
add Addition
cos Cosine (trigonometry)
fst First tuple component
fst_par First parallel component
id Identity
neg Negation
mul Multiplication
sin Sine (trigonometry)
snd Second tuple component
snd_par Second parallel component
Op Description Example
comp Composes functions g . f = (comp g f)
lin_comp Composes linear functions g . f = (lin_comp g f)
fun Function type f64 -> f64 = (fun f64 f64)
lin Linear function type f64 -o f64 = (lin f64 f64)
lam Lambda expression \x:f64.x = (lam f64 $0)
lam_lin Linear lambda expression \x:f64.x = (lin_lam f64 $0)
par Parallel tuple f x g = (par f g)
tup Tuple (f, g) = (tup f g)
ty Type x : f64 = (ty x f64)
Commit count: 16

cargo fmt