All Projects → JuliaSymbolics → Symbolicutils.jl

JuliaSymbolics / Symbolicutils.jl

Licence: other
Expression rewriting and simplification

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to Symbolicutils.jl

Missmatch
Pattern matching for JavaScript inspired by one of the great features of the Haskell language. Suitable for browsers or node.js.
Stars: ✭ 67 (-64.55%)
Mutual labels:  pattern-matching
Grape
🍇 Syntax-aware grep-like for Clojure
Stars: ✭ 132 (-30.16%)
Mutual labels:  pattern-matching
Expat
Reusable, composable patterns across Elixir libraries
Stars: ✭ 157 (-16.93%)
Mutual labels:  pattern-matching
Patme
Elixir-style pattern matching for ruby methods
Stars: ✭ 75 (-60.32%)
Mutual labels:  pattern-matching
Matchpy
A library for pattern matching on symbolic expressions in Python.
Stars: ✭ 109 (-42.33%)
Mutual labels:  pattern-matching
Stumpy
STUMPY is a powerful and scalable Python library for modern time series analysis
Stars: ✭ 2,019 (+968.25%)
Mutual labels:  pattern-matching
Narc Rs
(WIP) Dependently-typed programming language with Agda style dependent pattern matching
Stars: ✭ 58 (-69.31%)
Mutual labels:  pattern-matching
Symja android library
☕️ Symja - computer algebra language & symbolic math library. A collection of popular algorithms implemented in pure Java.
Stars: ✭ 170 (-10.05%)
Mutual labels:  pattern-matching
Bem Xjst
bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
Stars: ✭ 115 (-39.15%)
Mutual labels:  pattern-matching
Eval
Eval is a lightweight interpreter framework written in Swift, evaluating expressions at runtime
Stars: ✭ 157 (-16.93%)
Mutual labels:  pattern-matching
Nanomatch
Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but without support for extended globs (extglobs), posix brackets or braces, and with complete Bash 4.3 wildcard support: ("*", "**", and "?").
Stars: ✭ 79 (-58.2%)
Mutual labels:  pattern-matching
Pattern Matching Ts
⚡ Pattern Matching in Typescript
Stars: ✭ 107 (-43.39%)
Mutual labels:  pattern-matching
Rosie Pattern Language
Rosie Pattern Language (RPL) and the Rosie Pattern Engine have MOVED!
Stars: ✭ 146 (-22.75%)
Mutual labels:  pattern-matching
Glob
Glob for C++17
Stars: ✭ 74 (-60.85%)
Mutual labels:  pattern-matching
Egison Ruby
A Ruby gem for non-linear pattern-matching with backtracking
Stars: ✭ 159 (-15.87%)
Mutual labels:  pattern-matching
Mach7
Functional programming style pattern-matching library for C++
Stars: ✭ 1,151 (+508.99%)
Mutual labels:  pattern-matching
Z
Pattern Matching for Javascript
Stars: ✭ 1,693 (+795.77%)
Mutual labels:  pattern-matching
Akar
First-class patterns for Clojure. Made with love, functions, and just the right amount of syntax.
Stars: ✭ 176 (-6.88%)
Mutual labels:  pattern-matching
Fpgo
Monad, Functional Programming features for Golang
Stars: ✭ 165 (-12.7%)
Mutual labels:  pattern-matching
Motif
Scala-like pattern matching for Java 8
Stars: ✭ 149 (-21.16%)
Mutual labels:  pattern-matching

SymbolicUtils.jl

CI

SymbolicUtils.jl provides various utilities for symbolic computing. SymbolicUtils.jl is what one would use to build a Computer Algebra System (CAS). If you're looking for a complete CAS, similar to SymPy or Mathematica, see Symbolics.jl. If you want to build a crazy CAS for your weird Octonian algebras, you've come to the right place.

Symbols in SymbolicUtils carry type information. Operations on them propagate this information. A rule-based rewriting language can be used to find subexpressions that satisfy arbitrary conditions and apply arbitrary transformations on the matches. The library also contains a set of useful simplification rules for expressions of numeric symbols and numbers. These can be remixed and extended for special purposes.

If you are a Julia package develper in need of a rule rewriting system for your own types, have a look at the interfacing guide.

Go to the manual

SymbolicUtils.jl is on the general registry and can be added the usual way:

pkg> add SymbolicUtils

or

julia> using Pkg; Pkg.add("SymbolicUtils")

"I don't want to read your manual, just show me some cool code"

julia> using SymbolicUtils

julia> SymbolicUtils.show_simplified[] = true

julia> @syms x::Real y::Real z::Complex f(::Number)::Real
(x, y, z, f(::Number)::Real)

julia> 2x^2 - y + x^2
(3 * (x ^ 2)) + (-1 * y)

julia> f(sin(x)^2 + cos(x)^2) + z
f(1) + z

julia> r = @rule sinh(im * ~x) => sin(~x)
sinh(im * ~x) => sin(~x)

julia> r(sinh(im * y))
sin(y)

julia> simplify(cos(y)^2 + sinh(im*y)^2, RuleSet([r]))
1

Citations

  • The pattern matcher is an adaption of the one by Gerald Jay Sussman (as seen in 6.945 at MIT), his use of symbolic programming in the book SICM inspired this package.
  • Rewrite.jl and Simplify.jl by Harrison Grodin also inspired this package.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].