scheme programming error checking
This project received 2 bids from talented freelancers with an average bid price of $10 USD / hour.Get free quotes for a project like this
Project Budget$2 - $8 USD / hour
I have attached the program. I partially misunderstood the assignment when I wrote the program, and now I cannot figure out how to correct the program.
The program is a Scheme compiler that simplifies expressions according to the 20 rules given by the assignment.
I have been running the program in DrRacket 5.3.3. Once loaded into DrRacket, the program works as follows:
I enter the expression to be evaluated as a list:
> (parse '(+ 2 3))
The program outputs the following:
(+ 2 3)
This expression is simplified according to Rule 1, and in this case the program is functioning properly.
The program functions properly for rules that only involve c, where c represents a constant which in this case is any integer. The program cannot correctly evaluate expressions which include a "t". The program should be able to evaluate expressions where t represents a variable or another s-expression.
For example if I enter the following expression:
(parse '(+ (+ 3 t) 2))
The program output should be:
(+ (+ 3 2) t)
(+ 5 t)
Could you help me figure out how to correct this?
I am sure that you have questions. Please let me know.
please download the file from the link below
[url removed, login to view]
pay 20$ for error checking the code
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online