Description of the Seventh Homework Problem

Write a program that does calcuations (addition and multiplication) where the interface looks like English, for example

     How much is the product of 1, 2, 3, 4, and 5?
You are given all of the program except the part that parses the subset of English being used. In preparation for the upcoming year 2001, the main predicate is called hal_9000.

Details:

Handin Requirements

Reference:

Chapters 10 and 11 of the Spivey text on Prolog are sufficient for this assignment.

Sample Run:

This is an example of what it looks like to run this assignment on a sample program that moves the contents of the first location in memory to the eight location and then quits.

brown[221]: pprolog Hmwk7.Given.pp Hmwk7.pp  
Welcome to picoProlog
Reading Hmwk7.Given.pp
Reading Hmwk7.pp

# :- test_hal.
"In response to: How much is 3?"
hal_says(3)
"In response to: How much is the sum of 3 and 4?"
hal_says(7)
"In response to: How much is the sum of 3, 4, and 5?"
hal_says(12)
"In response to: How much is the product of 12 and 5?"
hal_says(60)
"In response to: How much is the product of 1, 2, 3, 4, and 5?"
hal_says(120)
"In response to: How much is the sum of 1, and 2?"
"In response to: How much is the sum of 1, 2, the product of 3 and 4, and 5?"
hal_says(20)

no

# :- ^D

Hints: