This is a really good idea. My take on this was to use Prolog but it turned out people did not like Prolog: https://github.com/davidk01/cwacop. The project is dead at the moment but being able to work with infrastructure using a hybrid model of logic + imperative drivers I think is fundamentally a good idea.