Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nklapste/cmput_325_assignment_2
CMPUT 325 Assignment 2
https://github.com/nklapste/cmput_325_assignment_2
lisp university-project
Last synced: 2 days ago
JSON representation
CMPUT 325 Assignment 2
- Host: GitHub
- URL: https://github.com/nklapste/cmput_325_assignment_2
- Owner: nklapste
- License: mit
- Created: 2019-01-31T04:21:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T15:42:06.000Z (almost 6 years ago)
- Last Synced: 2024-12-10T00:32:07.675Z (about 2 months ago)
- Topics: lisp, university-project
- Language: Common Lisp
- Homepage: https://webdocs.cs.ualberta.ca/~mmueller/courses/325-Winter-2019/assignment/a2.html
- Size: 107 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmput_325_assignment_2
## Overview
In this assignment, you implement a restricted form of the classic problem of
simplifying arithmetic expressions. You first implement two simplification
operations, then a general algorithm to transform such expressions into a
normal form.The main restriction is that we only deal with the operations `+`, `-`,
and `*`, and that the arguments are only integers and a single variable
symbol `x`. Therefore, all expressions eventually simplify to a polynomial
in `x`, with integer coefficients.### Types of Expressions in this Assignment
We have two main types of expressions in this assignment:
* Assignment 2 expressions or A2Expr are built as explained above
* polynomials in `x` or `PExpr` are represented in a specific short form.#### A2Expr - a more formal definition
* An integer is an `A2Expr`
* `x` is an `A2Expr`
* If `E1` and `E2` are `A2Expr`, then ``(+ E1 E2)``, ``(- E1 E2)``
and ``(* E1 E2)`` are `A2Expr`
Nothing else is an `A2Expr`