INFR10089/INFR11248 — 2024 | Main page | Lectures and handouts | Homework |
Piazza | Notes | HW Submissions |
a.(b+τ.c)+τ.a.d | a.(b+τ.c)+τ.a.d+a.b | a.(b+τ.c)+τ.a.d+a.c | a.(b+τ.c)+τ.a.d+a.d |
if $P \mathrel{\mathcal{B}} Q$ and $P \stackrel{\alpha}\longrightarrow P'$,
then there are $Q_0$, $Q_1$, ... , $Q_n$ for some $n \geq 0$,
and $Q'_0$, $Q'_1$, ... , $Q'_m$ for some $m \geq 0$
such that
$Q=Q_0 \stackrel{\tau}\longrightarrow Q_1 \stackrel{\tau}\longrightarrow \dots
\stackrel{\tau}\longrightarrow Q_n \stackrel{(\alpha)}\longrightarrow Q'_0
\stackrel{\tau}\longrightarrow Q'_1 \stackrel{\tau}\longrightarrow \dots
\stackrel{\tau}\longrightarrow Q'_m$,
and moreover $P \mathrel{\mathcal{B}} Q_i$ for all $i=1,...,n$
and $P' \mathrel{\mathcal{B}} Q'_j$ for all $j=0,...,m$.
if $P \mathrel{\mathcal{B}} Q$ and $P \stackrel{\alpha}\longrightarrow P'$,
then there are $Q_0$, $Q_1$, ... , $Q_n$ for some $n \geq 0$,
such that
$Q=Q_0 \stackrel{\tau}\longrightarrow Q_1 \stackrel{\tau}\longrightarrow \dots
\stackrel{\tau}\longrightarrow Q_n \stackrel{(\alpha)}\longrightarrow Q'$,
and moreover $P \mathrel{\mathcal{B}} Q_n$ and $P' \mathrel{\mathcal{B}} Q'$.
Consider a language L without recursion. A different definition of a congruence ~ requires for any $n$-ary operator $f$ of L that
$P_i \sim Q_i$ for $i=1,...,n$ implies $f(P_1,...,P_n) \sim f(Q_1,...,Q_n)$.
Show that this definition is equivalent to the one above.P ~L Q if and only if C[P] ~ C[Q] for any L-context C[ ].
Prove that ~L is the coarsest congruence finer than ~.Ad i: We need to show that if P ~L Q and $D[\ ]$ is a context, then D[P] ~L D[Q]. So suppose P ~L Q. This means that for any L-context C[ ] we have C[P] ~ C[Q]. What we have to show is that for any L-context C[ ] we have C[D[P]] ~ C[D[Q]], because that's the definition of D[P] ~L Q[D]. But this holds, because a context $C[D[\ ]]$ is just a context $E[\ ]$.
Ad ii: Suppose P ~L Q. This means that for any L-context C[ ] we have C[P] ~ C[Q]. This holds in particular for the trivial context, consisting of one single hole. If T[ ] is the trivial context, then T[P] = P. Thus P ~L Q implies P ~ Q, which was to be shown.
Ad iii: Let $\approx$ be any other congruence that is finer then ~. Suppose $P \approx Q$. Then, for any context $C[\ ]$ we have $C[P] \approx C[Q]$, using that $\approx$ is a congruence, and thus $C[P] \sim C[Q]$, using that $\approx$ is finer than $\sim$. By definition this means that $P \sim_L Q$, which had to be shown.
In (c) and (d) below, work with a form of LTS in which any state (possibly with outgoing transitions) can have the label $\surd$. Moreover, the label $\surd$ can occur in a (partial or completed) trace, as explained in the notes.
Implementation:
(R1 | R2)\$\{$handover$\}$ where
R1 = start.handover.0
R2 = handover.finish.0
P --a--> P'
------------------------ (for P' $\neq$ 0) P;Q --a--> P';Q |
P --a--> 0
---------------- P;Q --a--> Q |
We assume such an algorithm to be modelled as a Kripke structure. Among the atomic propositions that label the states of this Kripke structure is IntentA, saying that Process A wants to enter the critical section, but has not done so yet. We also have an atomic proposition CritA, stating that Process A is in its critical section. Likewise we have atomic propositions IntentB and CritB.
{ab, acd, adc, a[cd]}
Here [cd] denotes the multiset containing c and d one time each.Click on 'Portfolio 2' in the homework interface, and select for each of your submitted homeworks 11-20 whether or not you want to include it in your portfolio. The intention is that you select all homeworks except for one expensive one (with lots of potential marks) and one inexpensive one, but in some cases you are better off making a different selection. Your grade is calculated as $n/m$, where $n$ is the total number of points you got for the homeworks in your portfolio, and $m$ is the maximal number of points you could have gotten for the homeworks in your portfolio. However, to prevent you from including too few homeworks, $m$ will never be lower than the total allocated points of all homeworks 11-20 minus 73.
For yet more fun, you can try the 2020 exam of this course. Questions 4(c)--(f) in that exam test material that has not been covered this year. Skipping those, you can get 88 points for this exam, and 84 of those constitute full credit (a mark of 100). The so-reduced exam is supposed to be done in 2.5 hours (unlike the 2023 and 2024 exams, which you have to do in 2 hours).
I propose that you try the exams first before getting confronted with the answers. Let's do a session about 2 weeks before the final exam (and we know when that is only in March) in which I (or one of you) solve(s) the 2020 exam questions on the whiteboard. I'll post the solutions to the 2023 exam here a week before that (or whenever you all want), and these can be discussed in that session as well. Let's use Piazza to make final plans (when the time comes).
And here is the exam and solutions of this year's exam.
Rob van Glabbeek | main MCS page | notes | Rob.van.Glabbeek@ed.ac.uk |