Skip to content
Open
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Manifest.toml
docs/Manifest.toml

# Mathematica (useful for translation of new rules)
*.m

# Documentation build artifacts
docs/build/

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SymbolicIntegration.jl

[![Build Status](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Build Status](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/ci.yml?query=branch%3Amain)
[![Spell Check](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/spellcheck.yml/badge.svg?branch=main)](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/actions/workflows/spellcheck.yml)
[![Rules](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/JuliaSymbolics/SymbolicIntegration.jl/main/.github/badges/rules-count.json&query=$.message&label=Total%20rules&color=blue)](https://github.com/JuliaSymbolics/SymbolicIntegration.jl)

Expand Down Expand Up @@ -83,7 +83,7 @@ trigonometric functions | ? | sometimes
hyperbolic functions | ✅ | sometimes
Nonelementary integrals | ❌ | most of them
Special functions | ❌ | ❌
more than one symbolic<br> variable in the expression | ❌ | ✅
multiple symbols | ❌ | ✅

More info about them in the [methods documentation](https://docs.sciml.ai/SymbolicIntegration/dev/methods/overview/)

Expand Down
9 changes: 3 additions & 6 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ trigonometric functions | ? | sometimes
hyperbolic functions | ✅ | sometimes
Nonelementary integrals | ❌ | most of them
Special functions | ❌ | ❌
more than one symbolic<br> variable in the expression | ❌ | ✅
multiple symbols | ❌ | ✅

[→ See complete methods documentation](methods/overview.md)

Expand All @@ -68,7 +68,7 @@ integrate(x^2 + 1, x, RischMethod(use_algebraic_closure=false, catch_errors=true
- `use_algebraic_closure` does what?
- `catch_errors` does what?

[→ See detailed Risch documentation](risch.md)
[→ See detailed Risch documentation](methods/risch.md)

### RuleBased
This method uses a large number of integration rules that specify how to integrate various mathematical expressions.
Expand Down Expand Up @@ -102,10 +102,7 @@ If you use SymbolicIntegration.jl in your research, please cite:

```@contents
Pages = [
"manual/getting_started.md",
"manual/basic_usage.md",
"manual/rational_functions.md",
"manual/transcendental_functions.md",
"manual/contributing.md",
"api.md"
]
Depth = 2
Expand Down
19 changes: 13 additions & 6 deletions docs/src/manual/contributing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
- [Contributing to improving RuleBasedMethod](#contributing-to-improving-rulebasedmethod)
# Contributing

We welcome contributions!

Below there are detailed info on how to contribute to the translation of new rules from the Mathematica [RUBI](https://rulebasedintegration.org/) package, or translation of solved integrals to use as tests, from the same package.

- [Contributing to RuleBasedMethod](#contributing-to-rulebasedmethod)
- [Common problems when translating rules](#common-problems-when-translating-rules)
- [function not translated](#function-not-translated)
- [Sum function translation](#sum-function-translation)
Expand All @@ -13,10 +19,10 @@
- [end](#end)
- [Adding Testsuites](#adding-testsuites)

# Contributing to improving RuleBasedMethod
# Contributing to translating new rules for RuleBasedMethod

In this repo there is also some software that serves the sole purpose of helping with the translation of rules from Mathematica syntax, and not for the actual package working. The important ones are:
- translator_of_rules.jl is a script that with regex and other string manipulations translates from Mathematica syntax to julia syntax
In the github repo of the package there is also some software that serves the sole purpose of helping with the translation of rules from Mathematica syntax, and not for the actual package working. The important ones are:
- translator_of_rules.jl is a script that with regex and other string manipulations translates from Mathematica syntax to julia syntax (see "houw to use it" section later)
- translator_of_testset.jl is a script that translates the testsets into julia syntax (much simpler than translator_of_rules.jl)
- `reload_rules` function in rules_loader.jl. When developing the package using Revise is not enough because rules are defined with a macro. So this function reloads rules from a specific .jl file or from all files if called without arguments.

Expand Down Expand Up @@ -75,10 +81,11 @@ This script is used to translate integration rules from Mathematica syntax
to julia Syntax.

### How to use it
In the branch `rules` of the github repo of the package there are all the Mathematica files containing the untranslated rules already in the correct folders in this repo, so that you can use the translator script like this:
``` bash
julia src/translator_of_rules.jl "src/rules/4 Trig functions/4.1 Sine/4.1.8 trig^m (a+b cos^p+c sin^q)^n.m"
```
and will produce the julia file at the path `src/rules/4 Trig functions/4.1 Sine/4.1.8 trig^m (a+b cos^p+c sin^q)^n.jl`
this will produce the julia file at the path `src/rules/4 Trig functions/4.1 Sine/4.1.8 trig^m (a+b cos^p+c sin^q)^n.jl`

### How it works internally (useful to know if you have to debug it)
It processes line per line, so the integration rule must be all on only one
Expand Down Expand Up @@ -170,4 +177,4 @@ finally the rule is placed in a tuple (index, rule), and all the
tuples are put into a array, ready to be included by load_rules

## Adding Testsuites
There is a test suite of 27585 solved integrals taken from the RUBI package, in the folders `test/test_files/0 Independent test suites` (1796 tests) and `test/test_files/1 Algebraic functions` (25798 tests). But more test can be translated from the [RUBI testsuite](https://rulebasedintegration.org/testProblems.html). In [this](https://github.com/Bumblebee00/SymbolicIntegration.jl?tab=readme-ov-file#testing) repo there are the tests still in Mathematica syntax and a script to translate them to julia.
There is a test suite of 27585 solved integrals taken from the RUBI package, in the folders `test/test_files/0 Independent test suites` (1796 tests) and `test/test_files/1 Algebraic functions` (25798 tests). But more test can be translated from the [RUBI testsuite](https://rulebasedintegration.org/testProblems.html). In the branch `rules` of this repo there are the tests still in Mathematica syntax and a script to translate them to julia.
Loading
Loading