The use of modal logic in computer science
I think you can find many good examples if you search a bit online.  Some very-easy-to-find examples are in the following list:
From Stanford Encyclopedia

In computer science, labeled transition systems (LTSs) are commonly used to represent possible computation pathways during execution of a program.

Wikipedia has some examples in its article modal logic:

Versions of temporal logic can be used in computer science to model computer operations and prove theorems about them. In one version, ◇P means &quot;at a future time in the computation it is possible that the computer state will be such that P is true&quot;; □P means &quot;at all future times in the computation P will be true&quot;. In another version, ◇P means &quot;at the immediate next state of the computation, P might be true&quot;; □P means &quot;at the immediate next state of the computation, P will be true&quot;.

Also, if you go to Logic in Action, you will find several examples, e.g.:

[Chapter 6] introduces dynamic logic, a system that was introduced in computer science for reasoning about the behaviour of computer programs, by Vaughan Pratt and others, in the 1970s.
In [Chapter 10] it is explained how predicate logic can be used for programming. The chapter gives an introduction to concepts used in automating logical theorem proving. This leads to computational tools underlying the well known logic programming language Prolog, popular in AI an in computational linguistics. The inferential mechanism behind Prolog is called SLD-resolution. This is the reasoning engine for a natural fragment of predicate logic (the so-called Horn-fragment).