> Prolog is one example of a language that automatically solves declarative constraints but the syntax is bad.
That's why I mentioned SQL. Both SQL and Prolog are declarative languages but SQL has a much more approachable syntax. In SQL constraints can be expressed using WHERE and ON clauses. For your more complex robot example this would require some work but it's certainly possible.