Most UIs in practice boil down to state machines which are extremely amenable to formal verification.
Hillel Wayne's writing is a good starting place to learn more: https://www.hillelwayne.com/formally-specifying-uis/