There is software everywhere you turn these days: from computers and smartphones, to pacemakers, vending machines and anti-lock brakes.

And if you’ve ever had an app freeze or lost a document when Microsoft Word suddenly crashed, you know those programs are often prone to glitches.

Most software hiccups simply cause frustration, but when errors shut down call centres, force airports to cancel flights or trigger unintended flurries of stock trades, they can cost companies millions of dollars. A software defect in a medical device, missile or self-driving car, meanwhile, could prove fatal.

Improving Software Safety by preventing error early

Werner Dietl Cybersecurity Waterloo Engineering

Werner M. Dietl, an assistant professor in Electrical and Computer Engineering

That’s why Werner Dietl, an electrical and computer engineering professor at the University of Waterloo, is on a mission to increase Software Safety.

“Having bugs creep into production is very costly,” he says. “So how can we prevent errors earlier in development, and how can we do this in a productive way?”

Programming languages come with type systems that help categorize the different components of code and make sure they’re constructed correctly, but Dietl doesn’t believe those systems do enough to prevent run-time errors such as the ubiquitous “null pointer exception.”

As any programmer will attest, it’s far too easy to inadvertently include a line of code that points to a null value rather than a real object — and standard type systems don’t alert you to the mistake.

Checker Framework LogoIn response to that failing, Dietl has developed lightweight type systems and compiler plug-ins like the Checker Framework, a popular tool that helps software developers detect and prevent those type of errors in their Java programs.

In fact, there’s a good chance you’ve come across his work without realizing it. As a post-doctoral researcher in Seattle, he developed system enhancements that were included in Java 8, one of the most widely used programming languages on the planet.

Waterloo a ‘positive’ environment for Software Research

Dietl came to Waterloo in 2013, drawn by the University’s reputation and the size and strength of its computer science, and electrical and computer engineering programs.

He relishes opportunities for collaboration with colleagues and one-on-one interactions with students, who impress him with just how much they know from their co-op placements.

“Their undergraduate experience is really amazing,” he says.

Dietl’s work got a big boost when he secured a prestigious Google Faculty Research Award — one of only eight software engineering proposals to receive funding. The money allowed him to expand his team, which now totals 10 graduate students and undergraduate research assistants.

“It’s a very exciting time at the moment,” he says. “There are always new projects starting.”

With more companies releasing programming languages and greater recognition of the value of error-free software, the importance of Dietl’s work keeps growing.

“It’s not that we cure cancer, but we make sure that the computers of the people that cure cancer don’t crash,” he says.