## Intent

Applied when a restriction on the maximum number of occurrences is desired.

## LTL Template

$\neg \mathcal{F} (\underbrace{l_1 \wedge \mathcal{X} (\mathcal{F}(l_1 \wedge \ldots \mathcal{X} (\mathcal{F}(l_1)}_\text{n}))))$, where $l_1 \in L$

Note that the pattern is general and consider the case in which a robot can be in two locations at the same time. For example, a robot can be in an area of a building indicated as l1 (e.g., area 01) and at the same time in a room of the area indicated as l2 (e.g., room 002) at the same time. If the topological intersection of the considered locations is empty, then the robot cannot be in two locations at the same time and the transitions labeled with both l1 and l2 cannot be fired.

## Examples and Known Uses

A robot has to visit $l_1$ at most $3$ times. The trace $l_1 \rightarrow l_4 \rightarrow l_1 \rightarrow l_3 \rightarrow l_1 \rightarrow l_4 \rightarrow l_1 \rightarrow ( l_3)^\omega$ violates the mission requirement since $l_1$ is visited four times. The trace $l_4 \rightarrow l_3 \rightarrow l_1 \rightarrow l_2 \rightarrow l_4 \rightarrow ( l_3)^\omega$ satisfies the mission requirement.

## Relationships

The LTL formula used to encode Upper Restricted Avoidance constrains the LTL visit pattern by forcing a location to be visited at least a certain number of times.

## Occurences

Chen et al. proposed an LTL formula that forces a service to occur at maximum a specified number of times, this can be considered as an example of usage of the upper restricted avoidance pattern.

## Büchi Automaton representing accepting sequences of events

where circled states are accepting states and states with an incoming arrow with no source are initial states. The automaton above is deterministic.

## CTL Template

$\neg \forall \mathcal{F} (\underbrace{l_1 \wedge \forall \mathcal{X} (\forall\mathcal{F}(l_1 \wedge \ldots \forall\mathcal{X} (\forall \mathcal{F}(l_1)}_\text{n}))))$, where $l_1 \in L$