Course:CPSC312-2017-Calc-Tool
Calculus Tool | |
---|---|
CPSC 312 | |
Section: | 101 |
Instructor: | David Poole |
Email: | |
Office: | |
Office Hours: | |
Class Schedule: | |
Classroom: | |
Important Course Pages | |
Syllabus | |
Lecture Notes | |
Assignments | |
Course Discussion | |
Overview
Authors: Ambikeya Sangwan, Chase Walden, Edward Tunnard
What is the problem?
State the general problem. If applicable, tell us what information you will use, e.g., a link to some web site that provides the information you used. What will you do?
There are many tools out there that help solve various maths problems, often though they are not free, or can be clunky to use. Our aim is to create a lightweight calculator tool that runs as a server and will be accessible via a web page. By creating the tool ourselves it will only cost electricity, and by having it run as a web server it will be easier to use then typing into a command line. We will attempt to make the calculator solve simple calculus questions, regarding integration and derivation as well as simple matrix problems. We will do this by giving the calculator tool some basic rules for arithmetic, integration, and differentiation and use those to process equations. A similar ideology will be used for matrices as well.
What is the something extra?
What is the in-depth aspect you will do? If the problem is related to some other group's project, tell us how they fit together. If in doubt, include the information.
Rather than just making the calculator we will run the tool on a simple web server using html forms. This will allow us to enter data in plaintext into the tool, then have it perform various tasks on the data and be able to get answers back though the same web page. By doing this we enable the tool be be used from various locations and devices, it would be able to be used by multiple people with out needed to share the code itself, and it would provide a cleaner interface than a command line.
What did we learn from doing this?
(This should be written after you have done the work.) What is the bottom-line? Is logic programming suitable for (part-of) the task? Make sure you include the evidence for your claims.
Using Prolog as a tool for calculating some mathematical problems works very well due to its recursive nature, allowing it to effectively break problems down into simpler ones for which the answer is already known. Using it as a tool to solve matrices was not as direct as it does not handle lists of lists quite as well. It has been interesting solving problems in a recursive fashion, unlike most conventional languages.
Using a Prolog's HTTP framework to make a web page went well, although it did have a learning curve. The server code has been structured well so that it can be easily expanded upon. While Prolog makes it simpler to pass inputs and receive outputs, it does limit what you can do, since everything needs to have a form created for it.
If given more time, we would combine more of the inputs together so that you could just type into one box and allow determine if it is integrating, differentiating, or dealing with matrices with out it being explicitly specified.
Code Repository
Code for this project can be found at this link.