Yet another JVM language? Whiley takes fresh approach

We may not need another JVM language, but open source Whiley could wind up with other back ends

Yet another JVM language? Whiley takes a fresh approach
Credit: CSO staff

While it might seem like there were already plenty of languages riding atop the JVM, ranging from JRuby to Scala, Groovy to Kotlin, the developers of the open source Whiley language believe they still have something new to offer by tackling the verifying compiler challenge.

A verifying compiler uses mathematical and logical reasoning to check program correctness. "The question I'm trying to answer is whether or not it's possible to build a verifying compiler that could genuinely be used in practice," said main developer David Pearce, a senior lecturer in computer science at the University of Wellington, in New Zealand. "That means it's got to generate reasonably efficient code, it's got to have all the bells and whistles we expect from a modern language, and the compile-time verification has got to work well enough that it adds value and doesn't get in the way."

Whiley uses extended static-checking to eliminate errors at compile time, and like Scala, it leverages both object-oriented and functional programming. Pearce sees it as best suited for apps where safety and security are critical. "For example, the infamous Heartbleed bug contained a buffer overrun, which is exactly the kind of thing that Whiley checks for," he said.

But Whiley, currently is at version 0.3.40, is not ready for prime time yet. "Probably, the best use at the moment is really to help learn about verification," said Pearce. The intent is to improve the verification system so that it could verify realistic programs. "Beyond that, I've just finished a significant rework of the intermediate language used within the compiler. This opens up a lot of possibilities for more interesting back ends other than just the JVM. I'm particularly interested in a C or perhaps LLVM back end, and also JavaScript. I've also been playing around with embedded systems and want to see Whiley running on a micro-controller."

This story, "Yet another JVM language? Whiley takes fresh approach" was originally published by InfoWorld.

Computerworld's IT Salary Survey 2017 results
Shop Tech Products at Amazon