Over a relatively short time span, the web development community has re-engineered its software development process. Facebook’s React library (over 3 million downloads/week), has led to much cleaner architectural designs, and source code is much less error-prone and easier to reason about.

More recently, Facebook has followed up with ReasonML — another project that’s gaining a lot of momentum (scoring very favorably in 2018’s State of JavaScript survey given that the project is only a couple of years old). What’s very exciting is that the rigor and precision of source code written with ReasonML components allows the application of the latest advances in automated reasoning (symbolic AI/formal methods).

The following post will look over the recent milestones and demonstrate the underlying pattern and suggest the natural “next step” in the evolution of web development.

Automated reasoning

Here at Aesthetic Integration, the goal of our work is to help automate a lot of the error-prone manual tasks that developers/designers perform today. To power this automation, we’ve developed a powerful cloud-native automated reasoning engine (Imandra), allowing you to tap into the latest scientific advances in automated reasoning and formal verification. Recent headline-making hacks and their ensuing regulatory fines make the case for the value of these tools for us.

Now we’ve got our sights on the domain of web UIs. We call this project Verified React — combining the incredible work of the ReasonML/React community and our work on Imandra and its OCaml and ReasonML interfaces (check out https://try.imandra.ai).

Two areas where we hope Verified React will make significant impact:

Symbolic verification vs. testing:

Testing, whereby developers write explicit sets of inputs/expected outputs, is an error-prone chore and is not natural to human beings. We think at a higher-level — in terms of symbolic behavior. What exacerbates the situation is that modern web applications have virtually infinite state spaces, making manual test case development even more onerous.

With formal verification, we can describe properties of programs symbolically and have machines analyze the underlying source code. With Imandra, we’ve built a powerful new automated reasoning engine equipped with a mechanized formal semantics of OCaml (and therefore ReasonML), allowing you to tap into the latest scientific advances in this field.

State-space exploration:

React components are (virtually) infinite state machines. This is because state variables may contain rich, nested data structures, although even the basics like arbitrary strings and numbers represent huge numbers of ‘concrete’ states.

After you’ve written a component, it’s natural that you would like to explore how it may behave under the various possible scenarios that your code entails. In other words, what are the possible N-step state transitions of this infinite state machine?

Let’s now dive into Verified React in more detail. We’d love your feedback — please join us on our Imandra Discord!

Evolution of the front-end