Re-Tooling Computer Programming

Multi-national team creates tools for developing smarter code

Frozen Keyboards. Error Messages. Lost Data. System Failure.

hermenegildoUNM Computer Science ProfessorManuel Hermenegildo is working to make the software glitches that cause everyday annoyances - and catastrophic accidents - things of the past. As the University of New Mexico Prince of Asturias Endowed Chair in Information and Technology, Hermenegildo leads a team of computer scientists and engineers that is advancing the state of the art in program development.

"Right now, most software programs are riddled with bugs that cause small nuisances and major malfunctions. Computer programs are pervasive; they're at the heart of every artifactout there. So if computer programs are behind all the devices, we better find a way to write those programs so that they don't have errors and they're able to do the tasks that they're supposed to do," says Hermenegildo.

Hermenegildo's ultimate goal is to help developers build error-free software and to expedite the code writing process. He has assembled a multi-national team of graduate students and faculty to work on the research. His collaborators include graduate and Ph.D. students in Spain and Argentina, as well as faculty members at the Technical University of Madrid in Spain. The team also collaborates with researchers from several other countries, including the United Kingdom, Australia, Denmark, and Germany. Together they're creating a sophisticated toolbox for programmers. That toolbox will include a higher-level language for writing smarter, simpler code: tools that verify software and find bugs, and certified modules, or blocks of pre-approved code.

Tool 1: A Smarter Language

The first step in the process is to replace today's relatively low-level languages, which often result in what Hermenegildo calls "unmanageable code," with a higher-level computer language. The more powerful statements used in a higher-level language allow programmers to write code that is closer to the problem being solved than to the computer's machine code.

Not only does a higher-level language speed the writing process, but it makes it easier to find bugs in the program. In addition, the simplified format helps the software developer and the end user understand the code better.

Hermenegildo's team has already developed a higher-level language called Ciao. Ciao is open source code, available at

Several thousand people around the world are already using Ciao to write applications that range from streamlined electronic commerce software to artificial intelligence systems.

Ciao contains a novel combination of programming features, including functions, predicates, constraints and assertions, which allow software developers to actually describe instructions and knowledge in a natural way. Traditional computer languages are imperative and require programmers to write commands as a long series of relatively small steps. Ciao is more declarative, allowing programmers to separately describe what needs to be done, rather than how it needs to be done. Using Ciao, programmers can write the logic of the problem and then have the computer reason about the problem.

Hermenegildo says that advances like predicates and constraints aren't widely used in computer languages today, but he expects them to "percolate" to the point where mainstream languages will eventually adopt the ideas, in the same way that other advanced languages features, such as garbage collection, are now present in some of these mainstream languages, like Java.

Tool 2: Certified Programs

Whether it's software for a $50 accounting program or a piece of multi-million dollar medical equipment, chances are it's not verified to always run correctly. Hermenegildo says only a very small percentage of software programs today are fully certified. "The problem with the certification process we have right now is that it's slow, tedious and expensive," he says.

To put the challenge of certification in perspective, he gives a basic calculator program as an example. If a programmer needed to test every possible number combination for the calculator, the process would take a few centuries. The standard procedure for checking software today is for one team to program the software and a different team to conduct a limited number of spot tests on the completed code. Only after the software is installed in a device and shipped to thousands - if not millions- of users can undetected errors start to surface.

While they're designing structures, civil engineers and architects use tools that certify the structure's stability. Providing similar tools to certify a program's functionality is one of computer science's fundamental objectives, first proposed by Professor Tony Hoare. Hermenegildo and his team are determined to convert this objective into practical tools suitable for everyday use. They envision tools that can be used routinely and as an integral part of the development process, such that the program is verified against specifications and errors are flagged while the program is being written.

Hermenegildo put that theory to the test successfully with a program development tool he calls CiaoPP. The tool was written using the Ciao language. "We now have a tool that in a good number of cases can reason accurately about complex properties of a program, including resource usage characteristics like time or memory consumption and other security elements," explains Hermenegildo. "I believe we really have a number of clear firsts in some of these areas."

The principles of the certification process are general. Hermenegildo says that with time they could be applied to all computer languages. "The scientific advance is how to automatically infer interesting properties of programs. With our techniques, which are, in turn, based on the technique of 'abstract interpretation,' you can automatically infer that a program will take a long time or a short time. Right now, it's hard and tedious for programmers to look at a program and say it will take a certain amount of time," explains Hermenegildo.

Currently CiaoPP only works for the Ciao language and in its own particular environment. The team distributed the beta version of the program to a few universities for research. Soon, they will release the program to the public.

Tool 3: Building Blocks

Ciao facilitates code writing and CiaoPP certifies the higher-level code while it's being written. Then programmers can use Ciao and CiaoPP to create the last element in the toolbox: verified component-based software, essentially modules of computer code certified to do a specific function time after time without any errors.

Imagine an engineer designing a new car. Rather than write and test new software for the car's brake system, he could order verified software components designed to control an automotive brake system. Not only would he have the code he needed right away, the code would be certified to be free of bugs. Eventually, programmers would be able to pull these modules off the shelf, and link them together to write problem-free programs much faster.

Tools To Build The Future

Efforts such as Hermenegildo and his team's high-tech toolbox would change the way programmers work and reduce the costs of software development and maintenance. But the implications extend beyond the realm of programming to changing the way the world works. Hermenegildo sees programmers, designers and engineers freed to achieve bigger, better goals. "The future of this research is that these ideas work on all programs, all the time, and with all the computer languages people use everyday. This will require combining our techniques with those developed by other teams and also some new advances. But if we eventually put it out there, I think the world will change. If we can reduce the complication, then we can think at a higher level and do better and more interesting things."

A Royal Visit to the School of Engineering

asturiasLast October, the University of New Mexico and the School of Engineering were honored to host Their Royal Highnesses, the Prince of Asturias, Don Felipe de Borbón y Grecia, his wife Princess Letizia, and Mr. Iñigo de Oriol e Ybarra, the President of Iberdrola, Spain's electrical utility.

His Royal Highness and Oriol e Ybarra met with administrators and faculty regarding the Prince of Asturias Endowed Chair in Information and Technology. The $1.5 million endowment, established in honor of the heir to the Spanish throne, is funded by Iberdrola. Also during the visit, Oriol e Ybarra received the University Medal from UNM for his efforts in organizing the endowment.

"Thanks to the vision of men like His Royal Highness and Sr. Oriol e Ybarra, President of Iberdrola, UNM has become one of the leading universities in the western hemisphere in its commitment to advancing the state of information science and technology throughout the Americas," said University president Louis Caldera.

Through the endowment, a UNM research team is pursuing advancements in information science and technology. Iberdrola is interested in the research as a way to optimize many of its corporate functions. Manuel Hermenegildo, professor of computer science and electrical and computer engineering, holds the chair. The endowment also funds three graduate assistantships and three undergraduate international scholarships.

The entire program is generating significant scientific results and strengthening a valuable international partnership. "With the Chair's international dimension, this is truly an exceptional opportunity for UNM to take an important role in the continued development of the U.S./Spain bilateral relationship in science and technology," said Joe Cecchi, dean of the School of Engineering.

The UNM endowment is one of three in the United States named for the Prince of Asturias, and the only one outside the humanities.