Skip to content

Commit ed1a89d

Browse files
author
Aslan Askarov
committed
backticks
1 parent 2407fa1 commit ed1a89d

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

body.tex

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ \subsection{Monitoring for information flow}
456456
The following example shows how to create labeled values and how explicit dependencies are propagated.
457457
\begin{lstlisting}
458458
(* ifc_explicit.trp *)
459-
let val x = 10 raisedTo {alice}
460-
val y = 20 raisedTo {bob}
459+
let val x = 10 raisedTo `{alice}`
460+
val y = 20 raisedTo `{bob}`
461461
in x + y
462462
end
463463
\end{lstlisting}
@@ -481,9 +481,9 @@ \subsection{Monitoring for information flow}
481481
\begin{lstlisting}
482482
(* ifc_labels.trp *)
483483
import lists
484-
map (fn (x,lev) => x raisedTo lev) [ (1, {alice})
485-
, (2, {bob})
486-
, (3, {charlie}) ]
484+
map (fn (x,lev) => x raisedTo lev) [ (1, `{alice}`)
485+
, (2, `{bob}`)
486+
, (3, `{charlie}`) ]
487487
\end{lstlisting}
488488
\begin{lstlisting}
489489
>>> Main thread finished with value: [1@{alice}%{}, 2@{bob}%{},
@@ -495,7 +495,7 @@ \subsection{Monitoring for information flow}
495495

496496
\begin{lstlisting}
497497
(* ifc_implicit1.trp *)
498-
let val x = 10 raisedTo {alice}
498+
let val x = 10 raisedTo `{alice}`
499499
in if x > 5 then 1 else 0
500500
end
501501
\end{lstlisting}
@@ -519,12 +519,12 @@ \subsection{Monitoring for information flow}
519519

520520
\begin{lstlisting}
521521
(* ifc_implicit2.trp *)
522-
let val x = 10 raisedTo {secret}
522+
let val x = 10 raisedTo `{secret}`
523523
val p = self()
524524
val _ = spawn ( fn () => if x > 0
525525
then send (p, 1)
526526
else send (p, 0) )
527-
in rcvp ({secret}, [ hn x => x ])
527+
in rcvp (`{secret}`, [ hn x => x ])
528528
end
529529
\end{lstlisting}
530530
\begin{verbatim}
@@ -542,7 +542,7 @@ \subsection{Monitoring for information flow}
542542
helper internal function \code{debugpc ()}.
543543
\begin{lstlisting}
544544
(* ifc_debugpc.trp *)
545-
let val x = 1 raisedTo{secret}
545+
let val x = 1 raisedTo `{secret}`
546546
val _ = debugpc()
547547
val x = if x > 2 then receive [] else ()
548548
val _ = debugpc()
@@ -597,7 +597,7 @@ \subsubsection{Example with attenuation of authority}
597597

598598
\begin{lstlisting}
599599
(* ifc_attenuate.trp *)
600-
attenuate (authority, {alice})
600+
attenuate (authority, `{alice}`)
601601
\end{lstlisting}
602602
\begin{verbatim}
603603
>>> Main thread finished with value: !{alice}@{}%{}
@@ -609,17 +609,17 @@ \subsubsection{Basic declassification}
609609
looks like this.
610610
\begin{lstlisting}
611611
(* ifc_declassify_atten.trp *)
612-
let val x = 10 raisedTo {alice}
613-
in declassify (x , authority, {} )
612+
let val x = 10 raisedTo `{alice}`
613+
in declassify (x , authority, `{}`)
614614
end
615615
\end{lstlisting}
616616

617617
When authority for declassification is not sufficient, Troupe returns an error message.
618618
\begin{lstlisting}
619619
(* ifc_declassify_err.trp *)
620-
let val authAlice = attenuate (authority, {alice})
621-
val x = 1 raisedTo {bob}
622-
in declassify (x, authAlice, {})
620+
let val authAlice = attenuate (authority, `{alice}`)
621+
val x = 1 raisedTo `{bob}`
622+
in declassify (x, authAlice, `{}`)
623623
end
624624
\end{lstlisting}
625625

@@ -876,7 +876,7 @@ \subsubsection{\code{attenuate}}
876876
\item [Description] Returns the attenuated authority
877877
\item [Arguments] A value of authority type.
878878
\item [Returns] A value of authority type
879-
\item [Example usage] \code{attenuate ( authority, \{alice\} ) } Note that the above example will generate a runtime error.
879+
\item [Example usage] \code{attenuate ( authority, `\{alice\}` ) } Note that the above example will generate a runtime error.
880880
\end{description}
881881

882882

@@ -899,7 +899,7 @@ \subsubsection{\code{declassify}}
899899
%\begin{lstlisting}
900900
\begin{verbatim}
901901
let val x = 42 raisedTo {alice}
902-
in print (declassify (x, authority, {})
902+
in print (declassify (x, authority, `{}`)
903903
end
904904
\end{verbatim}
905905
%\end{lstlisting}

defs.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
\newcommand\code[1]{\ensuremath{{\mathtt{#1}}}}
99
\newcommand\textcode[1]{{\tt #1}}
1010

11-
\newcommand\lev[1]{\{#1\}}
11+
\newcommand\lev[1]{`\{#1\}`}
1212
\newcommand\tag[1]{\code{#1}}
1313
\newcommand\ltag[1]{\textcode{#1}}
1414

0 commit comments

Comments
 (0)