Skip to content

Commit 10ec43d

Browse files
committed
update repository
1 parent ad6fe25 commit 10ec43d

26 files changed

Lines changed: 1562 additions & 667 deletions

examples/ra_conflict.json renamed to archive/examples_experimental/ra_conflict.json

File renamed without changes.

examples/ra_delayed_link.json renamed to archive/examples_experimental/ra_delayed_link.json

File renamed without changes.

examples/ra_sequential.json renamed to archive/examples_experimental/ra_sequential.json

File renamed without changes.

examples/token_ring_round_robin.json renamed to archive/examples_experimental/token_ring_round_robin.json

File renamed without changes.

evidence/v0.3.2/01_basic/raw/fig_ui_overview_source.png renamed to evidence/v0.3.2/UI-01_overview/raw/fig_ui_overview_source.png

File renamed without changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
\chapter{User Manual}
2+
\label{app:user-manual}
3+
4+
\section{Running the Tool Locally}
5+
From the repository root, start a local server:
6+
\begin{verbatim}
7+
python -m http.server 5500
8+
\end{verbatim}
9+
Open:
10+
\begin{verbatim}
11+
http://localhost:5500/
12+
\end{verbatim}
13+
14+
\section{Basic Usage}
15+
\begin{itemize}
16+
\item Select an algorithm (Token Ring or RA) and choose the number of processes.
17+
\item Use \textbf{Request CS} to issue a request.
18+
\item Use \textbf{Step} to progress deterministically.
19+
\item Use \textbf{Run/Pause} for automated playback.
20+
\item Observe the process table, message queue table, trace, safety label, and preview canvas.
21+
\end{itemize}
22+
23+
\section{Fault Injection}
24+
\begin{itemize}
25+
\item Token Ring: use \textbf{Drop token}, \textbf{Regenerate token}, \textbf{Crash}, and \textbf{Recover}.
26+
\item RA: use \textbf{Drop next in-flight msg} and \textbf{Arm drop-next-send}.
27+
\end{itemize}
28+
29+
\section{Scripted Demos}
30+
Use the scripted demo controls to load deterministic scenarios such as crash/recover and RA tie-break demonstrations.
31+
32+
\section{Evidence Export}
33+
Use the export controls to generate:
34+
\begin{itemize}
35+
\item state JSON,
36+
\item trace TXT,
37+
\item preview PNG.
38+
\end{itemize}
39+
These artefacts support reproducible evidence collection.

report/Appendices/B_test_cases.tex

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
\chapter{Test Cases Summary}
2+
\label{app:test-cases}
3+
4+
This appendix summarises the minimum manual test set executed for the freeze baseline.
5+
6+
\section{Token Ring}
7+
\begin{itemize}
8+
\item \textbf{TR-01 Basic mutual exclusion:} issue requests from multiple processes and verify that only one process enters the critical section at a time.
9+
\item \textbf{TR-02 Token loss and regeneration:} drop the token, observe loss of progress, regenerate the token, and verify recovery.
10+
\item \textbf{TR-03 Crash and recover:} crash a process, observe state and trace changes, then recover the process.
11+
\end{itemize}
12+
13+
\section{Ricart--Agrawala}
14+
\begin{itemize}
15+
\item \textbf{RA-01 Basic request/entry/release:} request the critical section and step through REQUEST/REPLY delivery until entry.
16+
\item \textbf{RA-02 Tie-break:} load the scripted tie-break scenario and verify deterministic ordering under equal timestamps.
17+
\item \textbf{RA-03 Drop next in-flight message:} drop a queued message and observe the stalled state with explicit missing-REPLY explanation.
18+
\item \textbf{RA-04 Drop-next-send:} arm the send-side drop and observe the resulting stalled state.
19+
\end{itemize}
20+
21+
For each case, an evidence triplet (state JSON, trace TXT, preview PNG) is exported and indexed separately.

report/BSPR.md

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
\chapter{Introduction}
2+
\label{ch:introduction}
3+
4+
\section{Motivation}
5+
Distributed systems underpin modern computing, but their behaviour is often difficult to understand from static material because correctness depends on concurrency, message ordering, and assumptions about failures \cite{tanenbaum2017distributed,coulouris2011distributed,lynch1996distributed}. Mutual exclusion is a classic example: a set of distributed processes must coordinate access to a shared critical section without relying on shared memory or a global clock.
6+
7+
Learners commonly struggle to connect algorithm descriptions to concrete executions. This challenge becomes more severe when faults are introduced, since safety properties may remain intact even when progress is lost. Such distinctions are difficult to communicate through static diagrams alone. This motivates the development of an interactive teaching tool that makes state, causality, and fault consequences directly observable.
8+
9+
\section{Project Aim and Objectives}
10+
The aim of this project is to develop an interactive educational artefact for visualising distributed mutual exclusion and its behaviour under faults and recovery conditions.
11+
12+
The specific objectives are:
13+
\begin{itemize}
14+
\item implement a technically correct simulation that preserves the safety invariant of mutual exclusion,
15+
\item provide step-by-step execution with an explanatory trace,
16+
\item support representative token-based and message-based algorithms,
17+
\item support fault injection and recovery to illustrate safety vs liveness trade-offs,
18+
\item provide reproducible evidence export,
19+
\item and evaluate the artefact in terms of correctness, usability, and reproducibility.
20+
\end{itemize}
21+
22+
\section{Scope}
23+
The delivered system focuses on two representative approaches:
24+
\begin{itemize}
25+
\item \textbf{Token Ring}, a token-based mechanism that provides an intuitive model of exclusivity.
26+
\item \textbf{Ricart--Agrawala (RA)}, a message-based algorithm using Lamport-style timestamps \cite{ricart1981optimal,lamport1978time}.
27+
\end{itemize}
28+
29+
The system is teaching-oriented rather than production-oriented. The network model is intentionally simplified to support controlled observation and reproducibility. Message loss in RA is used to demonstrate that liveness can fail while safety is preserved; retransmission and failure detectors are not implemented.
30+
31+
\section{Contributions}
32+
The main contributions of the project are:
33+
\begin{itemize}
34+
\item a browser-based, dependency-free Distributed Mutual Exclusion Explorer,
35+
\item support for both Token Ring and an RA teaching-oriented prototype,
36+
\item explicit fault injection and recovery mechanisms,
37+
\item scripted demos for deterministic replay,
38+
\item an evidence export pipeline (state JSON, trace TXT, preview PNG),
39+
\item and a reproducible testing and evidence framework built around a freeze baseline.
40+
\end{itemize}
41+
42+
\section{Report Structure}
43+
Chapter~\ref{ch:background} reviews distributed mutual exclusion, logical time, fault assumptions, and educational visualisation literature.
44+
Chapter~\ref{ch:design} presents the specification and design of the artefact.
45+
Chapter~\ref{ch:implementation} describes implementation details.
46+
Chapter~\ref{ch:testing} covers testing strategy and execution.
47+
Chapter~\ref{ch:evaluation} evaluates correctness, usability, and reproducibility.
48+
Chapter~\ref{ch:professional} discusses professional issues.
49+
Chapter~\ref{ch:conclusion} concludes the report and outlines future work.

0 commit comments

Comments
 (0)