Rice University computer science professor Robert “Corky” Cartwright has a gift for languages. He develops and refines programming languages that translate human objectives into executable code for machines.
“The gap that programming languages fill,” he said, “is between a human’s understanding of what they want to compute – usually in some kind of mathematical model – and how to translate that description into code the device can execute.”
Imagine a greeting card that contains a music chip. Open the card and a tune begins to play. The chip uses simple embedded software that runs through a series of directions –called algorithms– written in a programming language. “This kind of simple system can also be found in toys and appliances,” said Cartwright. “But machines like airplanes use complex embedded systems, involving additional memory and more sophisticated processes and requiring more energy.”
Cartwright’s current focus is energy efficiency. Like spoken languages, both syntax (structure) and semantics (meaning of the symbols, characters, and words) are critical. Cartwright is exploring ways to economize on the energy required to execute a command by changing the language used to write the command.
He is particularly interested in testing the limits of compromise. “We already compromise on quality to save energy usage in things like hearing aids,” he said. Humans deal in approximations on a daily basis, from estimating drive time in traffic to the arithmetic we use in a calculator app on a mobile phone. Cartwright said, “The calculator will only carry a certain number of decimals, and we’re comfortable with that approximation.”
If complex systems like drones can tolerate approximate rather than exact results, then the energy resources required to run them can be minimized. But drones don’t fly in a straight line; they respond to their environment. How can commands be streamlined and still adjust to changing conditions? This particular challenge fascinates Cartwright. “Can we define a programming language with minimal energy expenditure for an environment consisting of embedded systems that adapt to their environment?”
Drones are ideal candidates for Cartwright’s research. Their airborne flight and absence of passengers create opportunities to explore embedded systems like those he envisions. “What is really important for any mobile application,” he said, “is energy cost. I’d like my system to work as well as possible with a nearly exhausted battery or damaged memory system.”
For example, if weather shuts down some or most of the drone’s components, can the overall device still execute part of its original plan? Cartwright is anxious to find out. He said, “There is little precedent for developing a programming language for a system that adapts to its environment, which is one of the reasons the research is so exciting.”