Browse Source

added temporal logic chapter

main
sp 2 weeks ago
parent
commit
c991cdf903
  1. 1
      decidability/0001.tex
  2. 1
      decidability/0002.tex
  3. 1
      decidability/0003.tex
  4. 1
      decidability/0004.tex
  5. 14
      decidability/decidability.tex
  6. 8
      main.tex
  7. 6
      temporal_logic/0001.tex
  8. 6
      temporal_logic/0001_sol.tex
  9. 24
      temporal_logic/0002.tex
  10. 21
      temporal_logic/0002_sol.tex
  11. 26
      temporal_logic/0003.tex
  12. 27
      temporal_logic/0003_sol.tex
  13. 27
      temporal_logic/0004.tex
  14. 25
      temporal_logic/0004_sol.tex
  15. 8
      temporal_logic/0005.tex
  16. 11
      temporal_logic/0005_sol.tex
  17. 7
      temporal_logic/0006.tex
  18. 12
      temporal_logic/0006_sol.tex
  19. 12
      temporal_logic/0007.tex
  20. 5
      temporal_logic/0007_sol.tex
  21. 12
      temporal_logic/0008.tex
  22. 5
      temporal_logic/0008_sol.tex
  23. 6
      temporal_logic/1000.tex
  24. 6
      temporal_logic/1001.tex
  25. 3
      temporal_logic/1002.tex
  26. 15
      temporal_logic/1003.tex
  27. 18
      temporal_logic/1004.tex
  28. 24
      temporal_logic/1005.tex
  29. 25
      temporal_logic/1006.tex
  30. 2
      temporal_logic/1007.tex
  31. 2
      temporal_logic/1008.tex
  32. 24
      temporal_logic/practical_questions/6_1_ltl_example_lect.tex
  33. 13
      temporal_logic/practical_questions/6_1_ltl_example_lect_sol.tex
  34. 27
      temporal_logic/practical_questions/6_2_ltl_example_lect.tex
  35. 16
      temporal_logic/practical_questions/6_2_ltl_example_lect_sol.tex
  36. 6
      temporal_logic/practical_questions/6_3_weekdays_lect.tex
  37. 24
      temporal_logic/practical_questions/6_4_ltl_example_self.tex
  38. 25
      temporal_logic/practical_questions/6_5_ltl_example_self.tex
  39. 26
      temporal_logic/practical_questions/6_6_ltl_example_self.tex
  40. 16
      temporal_logic/practical_questions/6_6_ltl_example_self_sol.tex
  41. 31
      temporal_logic/practical_questions/6_7_robot_city_self.tex
  42. 18
      temporal_logic/practical_questions/6_8_traffic_light_lect.tex
  43. 6
      temporal_logic/practical_questions/9_1_lect.tex
  44. 6
      temporal_logic/practical_questions/9_1_lect_sol.tex
  45. 8
      temporal_logic/practical_questions/9_2_lect.tex
  46. 11
      temporal_logic/practical_questions/9_2_lect_sol.tex
  47. 7
      temporal_logic/practical_questions/9_3_lect.tex
  48. 12
      temporal_logic/practical_questions/9_3_lect_sol.tex
  49. 12
      temporal_logic/practical_questions/9_4_lect.tex
  50. 5
      temporal_logic/practical_questions/9_4_lect_sol.tex
  51. 12
      temporal_logic/practical_questions/9_5_lect.tex
  52. 5
      temporal_logic/practical_questions/9_5_lect_sol.tex
  53. 64
      temporal_logic/temporal_logic.tex
  54. 6
      temporal_logic/theory_questions/6_1_self.tex
  55. 15
      temporal_logic/theory_questions/6_2_self.tex
  56. 2
      temporal_logic/theory_questions/6_3_eventually_semantics_lect.tex
  57. 3
      temporal_logic/theory_questions/6_3_self.tex
  58. 2
      temporal_logic/theory_questions/6_4_until_semantics_lect.tex
  59. 6
      temporal_logic/theory_questions/6_5_self.tex
  60. 2
      temporal_logic/theory_questions/6_6_self.tex
  61. 2
      temporal_logic/theory_questions/6_7_self.tex
  62. 1
      util/version.tex

1
decidability/0001.tex

@ -0,0 +1 @@
\item TODO

1
decidability/0002.tex

@ -0,0 +1 @@
\item TODO

1
decidability/0003.tex

@ -0,0 +1 @@
\item TODO

1
decidability/0004.tex

@ -0,0 +1 @@
\item TODO

14
decidability/decidability.tex

@ -0,0 +1,14 @@
\begin{questionSection}{Decidability}
\question{decidability/0001.tex}
{no_solution}
{3cm}
\question{decidability/0002.tex}
{no_solution}
{3cm}
\question{decidability/0003.tex}
{no_solution}
{3cm}
\question{decidability/0004.tex}
{no_solution}
{3cm}
\end{questionSection}

8
main.tex

@ -5,6 +5,7 @@
\input{util/packages}
\input{util/math_macros}
\input{util/ltl_macros}
\input{util/styling_macros}
\input{util/constants}
\input{util/chapter}
@ -127,6 +128,13 @@
\pagebreak
\fi
\ifchapterdecidability
\setsectionnum{10}
\section{Decidability}
\input{decidability/decidability.tex}
\pagebreak
\fi
\ifchaptertemporal
\setsectionnum{10}
\section{Temporal Logic}

6
temporal_logic/0001.tex

@ -0,0 +1,6 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item In every execution the system gives a grant infinitely often.
\item There exists an execution in which the system sends a request finitely often.
\end{itemize}

6
temporal_logic/0001_sol.tex

@ -0,0 +1,6 @@
\begin{itemize}
\item The Boolean variable $g$ represents ``The system gives a grant.''\newline
$\varphi_1 \coloneqq AGF g$
\item The Boolean variable $r$ represents ``The system sends a request.'' \newline
$\varphi_2 \coloneqq EFG \neg r$
\end{itemize}

24
temporal_logic/0002.tex

@ -0,0 +1,24 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{a\}, \{b\}, \{\}, \{a\}, \{a, b\}^\omega$
\item $\varphi = \nex a \lor a \unt b$
\end{itemize}
\begin{ltltabular}{7}
\ltlSteps{6}{1}
\ltlTrace{a}{0|1|1|0|0|1 |1}
\ltlTrace{b}{0|0|0|1|0|0 |1}
\hline
\hline
\ltlFormula{$\nex a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$a \unt b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\nex a \lor a \unt b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}

21
temporal_logic/0002_sol.tex

@ -0,0 +1,21 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{a\}, \{b\}, \{\}, \{a\}, \{a, b\}^\omega$
\item $\varphi = \nex a \lor a \unt b$
\end{itemize}
\begin{ltltabular}{7}
\ltlSteps{6}{1}
\ltlTrace{a}{0|1|1|0|0|1 |1}
\ltlTrace{b}{0|0|0|1|0|0 |1}
\hline
\hline
\ltlFormula{$\nex a$}
{1|1|0|0|1 |1 | 1}
\ltlFormula{$a \unt b$}
{0|1|1|1|0 |1 | 1}
\ltlFormula{$\nex a \lor a \unt b$}
{1|1|1|1|1 |1 | 1}
\end{ltltabular}

26
temporal_logic/0003.tex

@ -0,0 +1,26 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob a \imp (\event b \lor c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b \vee c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\glob a \imp (\event b \lor c)$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}

27
temporal_logic/0003_sol.tex

@ -0,0 +1,27 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob a \imp (\event b \lor c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob a$}
{0|1|0|1|1|1 |1|1|1}
\ltlFormula{$\event b$}
{0|1|0|1|1|1 |0|0|0}
\ltlFormula{$\event b \vee c$}
{0|1|0|1|1|1 |0|1|1}
\ltlFormula{$\glob a \imp (\event b \lor c)$}
{0|1|0|1|1|1 |0|1|1}
\end{ltltabular}

27
temporal_logic/0004.tex

@ -0,0 +1,27 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob \event a \imp (\event \glob \neg b \wedge c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob \event a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob \neg b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob \neg b \wedge c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\glob \event a \imp (\event \glob \neg b \wedge c )$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

25
temporal_logic/0004_sol.tex

@ -0,0 +1,25 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob \event a \imp (\event \glob \neg b \wedge c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob \event a$}
{1|1|1|1|1|1 |1|1|1}
\ltlFormula{$\event \glob \neg b$}
{1|1|1|1|1|1 |1|1|1}
\ltlFormula{$\event \glob \neg b \wedge c$}
{0|0|0|1|0|0 |0|1|1}
\ltlFormula{$\glob \event a \imp (\event \glob \neg b \wedge c )$}
{0|0|0|1|0|0 |0|1|1}
\end{ltltabular}

8
temporal_logic/0005.tex

@ -0,0 +1,8 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item For any execution, it always holds that whenever the robot
visits region A, it visits region C within the next two steps.
\item There exists an execution such that the robot visits
region C within the next two steps after visiting region A.
\end{itemize}

11
temporal_logic/0005_sol.tex

@ -0,0 +1,11 @@
We use the following Boolean variables:
\begin{itemize}
\item $a$ represents ``The robot visits region A''
\item $b$ represents ``The robot visits region B''
\item $c$ represents ``The robot visits region C''
\end{itemize}
\begin{itemize}
\item $\varphi_1 \coloneqq AG (a \rightarrow Xc \vee XXc)$
\item $\varphi_2 \coloneqq EG (a \rightarrow Xc \vee XXc)$
\end{itemize}

7
temporal_logic/0006.tex

@ -0,0 +1,7 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item The robot can visit region A infinitely often and region C infinitely often
\item Always, the robot visits region A infinitely often and region C infinitely often.
\item If the robot visits region A infinitely often, it should also visit region C finitely often.
\end{itemize}

12
temporal_logic/0006_sol.tex

@ -0,0 +1,12 @@
We use the following Boolean variables:
\begin{itemize}
\item $a$ represents ``The robot visits region A''
\item $b$ represents ``The robot visits region B''
\item $c$ represents ``The robot visits region C''
\end{itemize}
\begin{itemize}
\item $\varphi_1 \coloneqq E(GF a \wedge GF c)$
\item $\varphi_2 \coloneqq A (GF a \wedge FG \neg c)$
\item $\varphi_3 \coloneqq A (GF a \rightarrow GF c)$
\end{itemize}

12
temporal_logic/0007.tex

@ -0,0 +1,12 @@
\item \lect
Given the following Kripke structure $\mathcal{K}$. Does the initial state $s_0$ of $\mathcal{K}$ satisfy the following formulas?
\begin{itemize}
\item $\varphi_1 \coloneqq EXX(a\wedge b)$
\item $\varphi_2 \coloneqq EXAX (a \wedge b)$
\end{itemize}
\begin{figure}[h!]
\centering
\includegraphics[width=0.63\textwidth]{figures/computation_tree.png}
\caption{Left: Kripke structure of Example 7, Right: Corresponding computation tree}
\label{fig3}
\end{figure}

5
temporal_logic/0007_sol.tex

@ -0,0 +1,5 @@
\begin{itemize}
\item $s_0 \vDash EXX(a\wedge b)$
\item $s_0 \nvDash EXAX (a \wedge b)$
\end{itemize}

12
temporal_logic/0008.tex

@ -0,0 +1,12 @@
\item \lect
Given the following Kripke structure $\mathcal{K}$. Does the initial state $s_0$ of $\mathcal{K}$ satisfy the following formulas?
\begin{itemize}
\item $\varphi_1 \coloneqq EXp$
\item $\varphi_2 \coloneqq EG\neg p$
\end{itemize}
\begin{figure}[h!]
\centering
\includegraphics[width=0.23\textwidth]{figures/kripke5.png}
\caption{Kripke structure of Example 8}
\label{fig3}
\end{figure}

5
temporal_logic/0008_sol.tex

@ -0,0 +1,5 @@
\begin{itemize}
\item $s_0 \vDash EXp$
\item $s_0 \vDash EG\neg p$
\end{itemize}

6
temporal_logic/1000.tex

@ -0,0 +1,6 @@
\item \self
Give the definition of a \emph{Kripke structure}.
Explain the components of the tuple a Kripke structure consists of.
Give an example of a Kripke structure in the representation of a graph.

6
temporal_logic/1001.tex

@ -0,0 +1,6 @@
\item \self
Give the definition of
\emph{paths} and \emph{words} of Kripke structures.
Give an example in which you draw a graph representing a Kripke structure,
and give one possible infinite path and corresponding word.

3
temporal_logic/1002.tex

@ -0,0 +1,3 @@
\item \self What does a \emph{computation tree} of a Kripke structure represent?
Give an example in which you draw a graph representing a Kripke structure,
and draw the first 3 levels of the computation tree of this Kripke structure.

15
temporal_logic/1003.tex

@ -0,0 +1,15 @@
\item \self
The temporal operators describe properties that hold along a given infinite path $\rho$
through the computation tree of a Kripke structure. Given two formulas
$\varphi$ and $\psi$ describing state properties.
\begin{itemize}
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash G\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash F\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash X\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash \varphi U \psi$?
\end{itemize}

18
temporal_logic/1004.tex

@ -0,0 +1,18 @@
\item \self
Consider an ordinary traffic junction with incoming lanes from the north, south, east and west. We want to formulate relevant constraints that a traffic light system has to fulfill.
Give a set of propositional variables that model whether the north and south \emph{or} the east and the west get the
\begin{itemize}
\itemsep0em
\item green,
\item yellow or
\item red
\end{itemize}
light, respectively. \\
Formulate the following sentences using \emph{$CTL^\star$}:
\begin{enumerate}[label=(\alph*)]
\item The north/south lanes will never get the green light at same time as the east/west lanes.
\item Whenever the north/south lane receive the green light it will stay green until it changes to yellow.
\item When the east/west lane has the red light, it will eventually get the yellow and red light until the light switches to green.
\end{enumerate}

24
temporal_logic/1005.tex

@ -0,0 +1,24 @@
\item \self Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{\}, \{a,b\}, \{a \}, \{a,b\}, (\{a\}, \{a, b\}, \{a \})^\omega$
\item $\varphi = \event \glob a \imp \event \glob b$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|1|0}
\hline
\hline
\ltlFormula{$\event \glob a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob a \imp \event \glob b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

25
temporal_logic/1006.tex

@ -0,0 +1,25 @@
\item \self
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{a\},\{a\},\{a\},\{b,c\},\{a\},\{a,b\}(\{a\},\{c\})^\omega$
\item $\varphi = a \unt c \lor \event b $
\end{itemize}
\begin{ltltabular}{8}
\ltlSteps{6}{2}
\ltlTrace{a}{1|1|1|0|1|1 |1|0}
\ltlTrace{b}{0|0|0|1|0|1 |0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1}
\hline
\hline
\ltlFormula{$a \unt c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$a \unt c \lor \event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

2
temporal_logic/1007.tex

@ -0,0 +1,2 @@
\item \self Give the definition of the syntax of the computation tree logic $CTL^\star$.
In particular, give the definition of state formulas and path formulas.

2
temporal_logic/1008.tex

@ -0,0 +1,2 @@
\item \self Give an intuitive explanation of the semantics of computation tree logic $CTL^\star$.
Therefore, explain the semantics of the introduced path quantifiers and temporal operators with respect to the computation tree of a Kripke structure.

24
temporal_logic/practical_questions/6_1_ltl_example_lect.tex

@ -0,0 +1,24 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{a\}, \{b\}, \{\}, \{a\}, \{a, b\}^\omega$
\item $\varphi = \nex a \lor a \unt b$
\end{itemize}
\begin{ltltabular}{7}
\ltlSteps{6}{1}
\ltlTrace{a}{0|1|1|0|0|1 |1}
\ltlTrace{b}{0|0|0|1|0|0 |1}
\hline
\hline
\ltlFormula{$\nex a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$a \unt b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\nex a \lor a \unt b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}

13
temporal_logic/practical_questions/6_1_ltl_example_lect_sol.tex

@ -0,0 +1,13 @@
\begin{ltltabular}{7}
\ltlSteps{6}{1}
\ltlTrace{a}{0|1|1|0|0|1 |1}
\ltlTrace{b}{0|0|0|1|0|0 |1}
\hline
\hline
\ltlFormula{$\nex a$}
{1|1|0|0|1 |1 | 1}
\ltlFormula{$a \unt b$}
{0|1|1|1|0 |1 | 1}
\ltlFormula{$\nex a \lor a \unt b$}
{1|1|1|1|1 |1 | 1}
\end{ltltabular}

27
temporal_logic/practical_questions/6_2_ltl_example_lect.tex

@ -0,0 +1,27 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob \event a \imp (\event \glob \neg b \wedge c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob \event a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob \neg b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob \neg b \wedge c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\glob \event a \imp (\event \glob \neg b \wedge c )$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

16
temporal_logic/practical_questions/6_2_ltl_example_lect_sol.tex

@ -0,0 +1,16 @@
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob \event a$}
{1|1|1|1|1|1 |1|1|1}
\ltlFormula{$\event \glob \neg b$}
{1|1|1|1|1|1 |1|1|1}
\ltlFormula{$\event \glob \neg b \wedge c$}
{0|0|0|1|0|0 |0|1|1}
\ltlFormula{$\glob \event a \imp (\event \glob \neg b \wedge c )$}
{0|0|0|1|0|0 |0|1|1}
\end{ltltabular}

6
temporal_logic/practical_questions/6_3_weekdays_lect.tex

@ -0,0 +1,6 @@
\item \lect
\begin{itemize}
\item draw weekdays kripke structure
\item There will always eventually be weekend.
\item If it is Tuesday, the next day will be Wednesday.
\end{itemize}

24
temporal_logic/practical_questions/6_4_ltl_example_self.tex

@ -0,0 +1,24 @@
\item \self Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{\}, \{a,b\}, \{a \}, \{a,b\}, (\{a\}, \{a, b\}, \{a \})^\omega$
\item $\varphi = \event \glob a \imp \event \glob b$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|1|0}
\hline
\hline
\ltlFormula{$\event \glob a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event \glob a \imp \event \glob b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

25
temporal_logic/practical_questions/6_5_ltl_example_self.tex

@ -0,0 +1,25 @@
\item \self
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{a\},\{a\},\{a\},\{b,c\},\{a\},\{a,b\}(\{a\},\{c\})^\omega$
\item $\varphi = a \unt c \lor \event b $
\end{itemize}
\begin{ltltabular}{8}
\ltlSteps{6}{2}
\ltlTrace{a}{1|1|1|0|1|1 |1|0}
\ltlTrace{b}{0|0|0|1|0|1 |0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1}
\hline
\hline
\ltlFormula{$a \unt c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$a \unt c \lor \event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}
\newline

26
temporal_logic/practical_questions/6_6_ltl_example_self.tex

@ -0,0 +1,26 @@
\item \lect
Given the following execution word $w$ of a Kripke structure. Evaluate the
formula $\varphi$ on $w$. Evaluate each sub-formula for any execution step using the
provided table.
\begin{itemize}
\item $w = \{\}, \{a\}, \{ \}, \{a,b,c\}, \{a\}, \{a,b\}, ( \{a\} , \{a,c\}, \{a,c\})^\omega$
\item $\varphi = \glob a \imp (\event b \lor c )$
\end{itemize}
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob a$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\event b \vee c$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\ltlFormula{$\glob a \imp (\event b \lor c)$}
{\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}|\ws{1cm}}
\end{ltltabular}

16
temporal_logic/practical_questions/6_6_ltl_example_self_sol.tex

@ -0,0 +1,16 @@
\begin{ltltabular}{9}
\ltlSteps{6}{3}
\ltlTrace{a}{0|1|0|1|1|1 |1|1|1}
\ltlTrace{b}{0|0|0|1|0|1 |0|0|0}
\ltlTrace{c}{0|0|0|1|0|0 |0|1|1}
\hline
\hline
\ltlFormula{$\glob a$}
{0|1|0|1|1|1 |1|1|1}
\ltlFormula{$\event b$}
{0|1|0|1|1|1 |0|0|0}
\ltlFormula{$\event b \vee c$}
{0|1|0|1|1|1 |0|1|1}
\ltlFormula{$\glob a \imp (\event b \lor c)$}
{0|1|0|1|1|1 |0|1|1}
\end{ltltabular}

31
temporal_logic/practical_questions/6_7_robot_city_self.tex

@ -0,0 +1,31 @@
\item \self
Consider a robot moving in this small transition system. The robot has to fulfill tasks in the state $00$ and $10$. \\
Let the state labelling be as follows: $(x_1 x_0)$.
\begin{figure}[h!]
\centering
\begin{conflictgraph}
%\tikzset{every loop/.style={min distance=10mm,in=0,out=60,looseness=10}}
\node[base node] (00) {$00$};
\node[base node] (01) [right of=00] {$01$};
\node[base node] (10) [below of=01] {$10$};
\node[base node] (11) [below of=00] {$11$};
\path[->] (00) edge [loop above] node {} ();
\path[->] (10) edge [loop right] node {} ();
\path[->] (11) edge [loop below] node {} ();
\path[]
(00) edge [bend left] node {} (01)
(01) edge [bend left] node {} (00)
(01) edge [bend left] node {} (10)
(10) edge [bend left] node {} (01)
(00) edge [] node {} (11)
(10) edge [] node {} (11);
\end{conflictgraph}
\end{figure}
Formulate the following using \emph{Linear Temporal Logic}:
\begin{enumerate}[(a)]
\item The robot will infinitely often see state $00$ and $10$.
\item The robot will never visit state $11$.
\item After visiting either state $00$ or $10$ the robot will visit state $01$ within the next three time steps.
\end{enumerate}

18
temporal_logic/practical_questions/6_8_traffic_light_lect.tex

@ -0,0 +1,18 @@
\item \self
Consider an ordinary traffic junction with incoming lanes from the north, south, east and west. We want to formulate relevant constraints that a traffic light system has to fulfill.
Give a set of propositional variables that model whether the north and south \emph{or} the east and the west get the
\begin{itemize}
\itemsep0em
\item green,
\item yellow or
\item red
\end{itemize}
light, respectively. \\
Formulate the following sentences using \emph{$CTL^\star$}:
\begin{enumerate}[(a)]
\item The north/south lanes will never get the green light at same time as the east/west lanes.
\item Whenever the north/south lane receive the green light it will stay green until it changes to yellow.
\item When the east/west lane has the red light, it will eventually get the yellow and red light until the light switches to green.
\end{enumerate}

6
temporal_logic/practical_questions/9_1_lect.tex

@ -0,0 +1,6 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item In every execution the system gives a grant infinitely often.
\item There exists an execution in which the system sends a request finitely often.
\end{itemize}

6
temporal_logic/practical_questions/9_1_lect_sol.tex

@ -0,0 +1,6 @@
\begin{itemize}
\item The Boolean variable $g$ represents ``The system gives a grant.''\newline
$\varphi_1 \coloneqq AGF g$
\item The Boolean variable $r$ represents ``The system sends a request.'' \newline
$\varphi_2 \coloneqq EGF \neg r$
\end{itemize}

8
temporal_logic/practical_questions/9_2_lect.tex

@ -0,0 +1,8 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item For any execution, it always holds that whenever the robot
visits region A, it visits region C within the next two steps.
\item There exists an execution such that the robot visits
region C within the next two steps after visiting region A.
\end{itemize}

11
temporal_logic/practical_questions/9_2_lect_sol.tex

@ -0,0 +1,11 @@
We use the following Boolean variables:
\begin{itemize}
\item $a$ represents ``The robot visits region A''
\item $b$ represents ``The robot visits region B''
\item $c$ represents ``The robot visits region C''
\end{itemize}
\begin{itemize}
\item $\varphi_1 \coloneqq AG (a \rightarrow Xc \vee XXc)$
\item $\varphi_2 \coloneqq EG (a \rightarrow Xc \vee XXc)$
\end{itemize}

7
temporal_logic/practical_questions/9_3_lect.tex

@ -0,0 +1,7 @@
\item \lect
Translate the following sentences in computation tree logic $CTL^\star$.
\begin{itemize}
\item The robot can visit region A infinitely often and region C infinitely often
\item Always, the robot visits region A infinitely often and region C infinitely often.
\item If the robot visits region A infinitely often, it should also visit region C finitely often.
\end{itemize}

12
temporal_logic/practical_questions/9_3_lect_sol.tex

@ -0,0 +1,12 @@
We use the following Boolean variables:
\begin{itemize}
\item $a$ represents ``The robot visits region A''
\item $b$ represents ``The robot visits region B''
\item $c$ represents ``The robot visits region C''
\end{itemize}
\begin{itemize}
\item $\varphi_1 \coloneqq E(GF a \wedge GF c)$
\item $\varphi_2 \coloneqq A (GF a \wedge FG \neg c)$
\item $\varphi_3 \coloneqq A (GF a \rightarrow GF c)$
\end{itemize}

12
temporal_logic/practical_questions/9_4_lect.tex

@ -0,0 +1,12 @@
\item \lect
Given the following Kripke structure $\mathcal{K}$. Does the initial state $s_0$ of $\mathcal{K}$ satisfy the following formulas?
\begin{itemize}
\item $\varphi_1 \coloneqq EXX(a\wedge b)$
\item $\varphi_2 \coloneqq EXAX (a \wedge b)$
\end{itemize}
\begin{figure}[h!]
\centering
\includegraphics[width=0.63\textwidth]{figures/computation_tree.png}
\caption{Left: Kripke structure of Example 7, Right: Corresponding computation tree}
\label{fig3}
\end{figure}

5
temporal_logic/practical_questions/9_4_lect_sol.tex

@ -0,0 +1,5 @@
\begin{itemize}
\item $s_0 \vDash EXX(a\wedge b)$
\item $s_0 \nvDash EXAX (a \wedge b)$
\end{itemize}

12
temporal_logic/practical_questions/9_5_lect.tex

@ -0,0 +1,12 @@
\item \lect
Given the following Kripke structure $\mathcal{K}$. Does the initial state $s_0$ of $\mathcal{K}$ satisfy the following formulas?
\begin{itemize}
\item $\varphi_1 \coloneqq EXp$
\item $\varphi_2 \coloneqq EG\neg p$
\end{itemize}
\begin{figure}[h!]
\centering
\includegraphics[width=0.23\textwidth]{figures/kripke5.png}
\caption{Kripke structure of Example 8}
\label{fig3}
\end{figure}

5
temporal_logic/practical_questions/9_5_lect_sol.tex

@ -0,0 +1,5 @@
\begin{itemize}
\item $s_0 \vDash EXp$
\item $s_0 \vDash EG\neg p$
\end{itemize}

64
temporal_logic/temporal_logic.tex

@ -0,0 +1,64 @@
\begin{questionSection}{Temporal Logic}
\question{temporal_logic/1000.tex}
{no_solution}
{3cm}
\question{temporal_logic/1001.tex}
{no_solution}
{3cm}
\question{temporal_logic/1002.tex}
{no_solution}
{3cm}
\question{temporal_logic/1003.tex}
{no_solution}
{3cm}
\question{temporal_logic/1007.tex}
{no_solution}
{3cm}
\question{temporal_logic/1008.tex}
{no_solution}
{3cm}
\question{temporal_logic/0001.tex}
{temporal_logic/0001_sol.tex}
{3cm}
\question{temporal_logic/0005.tex}
{temporal_logic/0005_sol.tex}
{3cm}
\question{temporal_logic/0006.tex}
{temporal_logic/0006_sol.tex}
{3cm}
\mcquestion{temporal_logic/0002.tex}
{temporal_logic/0002_sol.tex}
\mcquestion{temporal_logic/0003.tex}
{temporal_logic/0003_sol.tex}
\mcquestion{temporal_logic/0004.tex}
{temporal_logic/0004_sol.tex}
\mcquestion{temporal_logic/1005.tex}
{temporal_logic/1005.tex}
\mcquestion{temporal_logic/1006.tex}
{temporal_logic/1006.tex}
\question{temporal_logic/0007.tex}
{temporal_logic/0007_sol.tex}
{3cm}
\question{temporal_logic/0008.tex}
{temporal_logic/0008_sol.tex}
{3cm}
\question{temporal_logic/1004.tex}
{no_solution}
{3cm}
\end{questionSection}

6
temporal_logic/theory_questions/6_1_self.tex

@ -0,0 +1,6 @@
\item \self
Give the definition of a \emph{Kripke structure}.
Explain the components of the tuple a Kripke structure consists of.
Give an example of a Kripke structure in the representation of a graph.

15
temporal_logic/theory_questions/6_2_self.tex

@ -0,0 +1,15 @@
\item \self
The temporal operators describe properties that hold along a given infinite path $\rho$
through the computation tree of a Kripke structure. Given two formulas
$\varphi$ and $\psi$ describing state properties.
\begin{itemize}
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash G\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash F\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash X\varphi$?
\item Which are the properties that $\rho$ needs to satisfy such that
$\rho \vDash \varphi U \psi$?
\end{itemize}

2
temporal_logic/theory_questions/6_3_eventually_semantics_lect.tex

@ -0,0 +1,2 @@
\item \lect
Let $\pi$ be a trace over a transition system. Give the definition of the \emph{Eventually} operator from \emph{LTL}, i.e. when does $\pi\models\event\varphi$?

3
temporal_logic/theory_questions/6_3_self.tex

@ -0,0 +1,3 @@
\item \self What does a \emph{computation tree} of a Kripke structure represent?
Give an example in which you draw a graph representing a Kripke structure,
and draw the first 3 levels of the computation tree of this Kripke structure.

2
temporal_logic/theory_questions/6_4_until_semantics_lect.tex

@ -0,0 +1,2 @@
\item \lect
Let $\pi$ be a trace over a transition system. Give the definition of the \emph{Until} operator from \emph{LTL}, i.e. when does $\pi\models\varphi_1\unt\varphi_2$?

6
temporal_logic/theory_questions/6_5_self.tex

@ -0,0 +1,6 @@
\item \self
Give the definition of
\emph{paths} and \emph{words} of Kripke structures.
Give an example in which you draw a graph representing a Kripke structure,
and give one possible infinite path and corresponding word.

2
temporal_logic/theory_questions/6_6_self.tex

@ -0,0 +1,2 @@
\item \self Give the definition of the syntax of the computation tree logic $CTL^\star$.
In particular, give the definition of state formulas and path formulas.

2
temporal_logic/theory_questions/6_7_self.tex

@ -0,0 +1,2 @@
\item \self Give an intuitive explanation of the semantics of computation tree logic $CTL^\star$.
Therefore, explain the semantics of the introduced path quantifiers and temporal operators with respect to the computation tree of a Kripke structure.

1
util/version.tex

@ -16,6 +16,7 @@
\newif\ifchaptereqchecking
\newif\ifchaptersymbenc
\newif\ifchaptertemporal
\newif\ifchapterdecidability
\newif\ifassignmentsheet

Loading…
Cancel
Save