https://github.com/allofphysicsgraph/graph
An attempt to use MathML and automatically check correctness using symbolic computation.
https://github.com/allofphysicsgraph/graph
Last synced: over 1 year ago
JSON representation
An attempt to use MathML and automatically check correctness using symbolic computation.
- Host: GitHub
- URL: https://github.com/allofphysicsgraph/graph
- Owner: allofphysicsgraph
- Created: 2018-06-09T03:39:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-27T00:28:38.000Z (almost 8 years ago)
- Last Synced: 2025-01-13T14:52:46.938Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Motivation
Purpose of this repository is to test how we can
* store the graph in semantically meaningful way (MathML)
* automatically verify graph correctness using symbolic computation
# Current stage
There are four vertices in the graph and two edges. Vertices 1-3 are simple derivation using the two edges. Vertex 4 is an expression that second transition is using as a substitution (to show graph can use itself to derive things).
To check correctness run
`python -m unittest -v tests.graph tests.parsing`
Expected something like following as an output
```
testApply (tests.graph.GraphTest) ... ok
testParsing (tests.graph.GraphTest) ... ok
testSubstitute (tests.graph.GraphTest) ... ok
testAddition (tests.parsing.ParsingTest) ... ok
testMultiplication (tests.parsing.ParsingTest) ... ok
testSubtraction (tests.parsing.ParsingTest) ... ok
----------------------------------------------------------------------
Ran 6 tests in 0.110s
OK
```
To see the initial (hardcoded) example run
`python derive.py`
Expected output
```
temporarily, as demonstration, it can only derive equation vert3 from vert1
C = E
apply D + eq to both sides of equation
C + D = D + E
substitute with lhs of m + n = x*y*z, map values as {'m': 'C', 'n': 'D'}
x*y*z = D + E
#
```