Skip to content

Student Proposal: Computer Algebra System (CAS) Implementation #11

@joshuanianji

Description

@joshuanianji

Hey everyone, I'm a student and this is my proposal for this year's GSoC. It's a bit more on the academic side, but if you are interested I'd love to work on it.

Title: Computer Algebra System (CAS) Implementation in Elm

Name: Joshua Ji
Name in Elm Slack: OshuaJay

Summary:
The goal of this project is to implement a Computer Algebra System (CAS) in Elm, particularly the ASAE data type mentioned in Chapter 3 of Joel S. Cohen’s Computer Algebra and Symbolic Computation. Such a data type represents mathematical expressions in a way that can be manipulated and simplified in a nontrivial manner, unlike the more conventional binary expression tree that has many limitations.

How the project will be done:
Following the book should be sufficient. Although long, most of it is dedicated to prerequisites, and the section focusing on the implementation is of reasonable length. It explains the data structure and provides pseudocode to implement some of the functionality that can be added to such a library (such as polynomial factorization and derivatives). The scheme implementation can be used as a supplementary resource.

What will the project focus on:
This project will focus on providing a clean API to create symbolic mathematical expressions, and basic functionality for manipulating them. Further extensions may be possible if there is enough time.

Benefits:
A subset of the elm community has been moving toward more computationally expensive projects, such as simulations using elm-physics and elm-3d-scene. Further developments in this field may require a greater demand for a more complicated mathematical library, especially as many problems in physics and math use systems of equations and other nontrivial equations. In fact, similar libraries in other languages, like SymPy in Python, are a basis for a huge variety of projects in geometry, statistics, physics and more. A project like this will serve both as a proof of concept and a gateway for more powerful applications built with Elm.

Goals:

  • Define the AST for the Algebraic Expressions, as well as an API to create it.
  • Create a parser to generate the AST from a LaTeX-formatted equation, and a function to generate LaTeX-formatted code from the AST.
  • Create an evaluation function, given a dictionary of the variables to values.
  • (optional) Create a function to factorize a polynomial, or approximate the roots.
  • (optional) Create a function to take the derivative of an AST.

What’s Needed: Elm, parsing, math
Difficulty: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions