Exercises for LTL specification

$\def\nec{\Box} \def\pos{\Diamond} \def\U{{\cal U}} \def\W{{\cal W}} \def\R{{\cal R}} \def\B{{\cal B}} \def\X{\bigcirc} $
Exercise 1 (from 14/1/2022). In each cycle, a process X can be in the ready queue ($\color{blue}r$) or performing some input/output ($\color{blue}{io}$) operation. Additionally, the CPU can be busy ($\color{blue}{b}$) executing some process or it can be empty ($\color{blue}{\neg b}$). Formulate the following sentences in LTL
  1. If the CPU is empty and X is not ready then X is performing input/output
  2. If process X is ready, the CPU must be busy in the next cycle
  3. Process X does not suffer from starvation, that is, when it is in the ready queue, it will eventually leave it
  4. Process X never gets permanently blocked doing input/output
  5. Between each two different periods of input/output, process X always passes through the ready queue
Exercise 2 (from 5/7/2021). A chronometer has a start/stop button ($\color{blue}b$). The watch can be stopped ($\color{blue}{s}$) or running ($\color{blue}{\neg s}$). Besides, the time can be at zero 00:00:00 ($\color{blue}{z}$) or not. Formulate the following sentences in LTL
  1. When we push the button, if it was stopped, it starts running and vice versa, unless we keep it pushed in the next moment
  2. If we keep the button pushed two consecutive situations, the watch stops and resets to zero immediately after
  3. If the button is not pushed, the watch does not change its state (stopped/running)
  4. The watch is set to zero an infinite number of times
  5. We never push the button indefinitely
Exercise 3 (from 7/6/2021). The fire alarm can start ringing ($\color{blue}r$) when a sensor detects smoke ($\color{blue}s$) or when it is activated manually ($\color{blue}m$), for instance, for an evacuation drill. Formulate the following sentences in LTL
  1. If smoke is detected, the alarm will start ringing at some moment
  2. If it is activated manually, it starts ringing immediately after
  3. When the alarm is ringing, it stops doing so after a while
  4. You can always activate the alarm manually as much as you want
  5. It cannot start ringing without detecting smoke before, unless it was activated manually
Exercise 4 (from 19/1/2021). A COVID-19 monitoring center is making a weekly control on several sample patients. During the last week, the patient may have been confined ($\color{blue}c$) and/or have had symptoms ($\color{blue}s$) compatible with COVID-19. Assuming that each transition represents the last week passed after the previous control, formulate the following sentences in LTL
  1. If the patient had symptoms, she must be confined the next two weeks
  2. At some moment, the patient won't have any symptom again
  3. A patient cannot remain indefinitely confined
  4. If a patient is confined, then she must have had symptoms before
  5. Between two different confinment periods, the patient must have had symptoms
Exercise 5 (from 1/7/2019). An accused can go to trial ($\color{blue}t$) and, as a consequence, receive a sentence ($\color{blue}s$) that can be appealed ($\color{blue}a$). Formulate the following sentences in LTL
  1. The accused cannot be sentenced without a previous trial
  2. If the accused goes to trial, she eventually gets a sentence
  3. There is some moment in which no more appeals can be made
  4. The accused cannot go to trial twice without some appeal in between