Exercise 28: Integrating Plato with Grace

Summary

The goal of this exercise is to integrate the Plato engine with the Grace UI, and to demonstrate the temperature() functionality.

Combine the Grace and Plato projects into a single solution.
Create data files (.txt) to represent each of Plato's data structures, and have Grace load those into memory when it initializes.
Every 5 seconds, have Grace examine the file sizes and reload them as needed.
Create a new data structure for Grace which will represent the phrases that will be recognized. They may use entity types, such as:
what is the current temperature in {city}?
 
Optional words are denoted with round brackets, and vertical bars can be used to denote several options. For required words that have several options, use square brackets. For example:
[what is|what's] the (current) temperature in {city}?
 
Transform these specifications into an SR grammar, write it to disk, compile it, and then load it.
When a statement is recognized, pass it on to Plato.
If Plato can't parse the statement/question, abort all operations. Simply do nothing.
If Plato's output is a value, display it and speak it.
If Plato's output is an assignment or relationship, briefly display a full-screen green window. (1 second)
If Plato's output is a TransOutput_Program, display a full-screen gray window while the query executes. If the query completes properly, display and speak the answer. If it fails, display a full-screen red window for 1 second.
Test the setup in a kitchen with a laptop, speakers, and a Bluetooth headset.

...