Design By Contract

Re-posting here because replying from email breaks…

IMHO There are many many known ways to improve software quality in general, and ROS in particular, but many limiting factors, mostly the lack of resources ( including each and everyone motivation and time ).

So I think the focus should be on applying the software development methodologies that are most likely to bring big benefits with relatively little investment, picking from the list of already proven existing software systems in other areas.

The contracts as described seems to be a “weak” version of a specification + model checker (check TLA+) that could also be integrated with a ROS system, but the effort required for the potential users is probably prohibitive…

Before doing contracts, I would first focus on proper, static (since message structure is static), strong, typing (despite the default weak/dynamic typing of the supported languages, it is doable using existing libraries, like for C++ and Python - and even LISPs).

My personal top two wishes are :

  • static&strong typing for ROS message fields (typing helps, and even more when things are distributed). It s a first step… later we could do much more, like add external dynamic typechecker that can check communication during execution (for types, contracts or stronger formal systems)

  • erlang VM integration ( ROS messages as a port, communicating with speed number crunching C++ code, and able to use the erlang VM for all the distribution concerns ) - especially for ROS1.