@@ -456,8 +456,8 @@ \subsection{Monitoring for information flow}
456456The 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}`
461461in x + y
462462end
463463\end {lstlisting }
@@ -481,9 +481,9 @@ \subsection{Monitoring for information flow}
481481\ begin{lstlisting}
482482(* ifc_labels.trp *)
483483import 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}`
499499in if x > 5 then 1 else 0
500500end
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 ])
528528end
529529\end {lstlisting }
530530\begin {verbatim }
@@ -542,7 +542,7 @@ \subsection{Monitoring for information flow}
542542helper 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}
609609looks 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, `{}` )
614614end
615615\end {lstlisting }
616616
617617When 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, `{}` )
623623end
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 }
901901let val x = 42 raisedTo {alice}
902- in print (declassify (x, authority, {} )
902+ in print (declassify (x, authority, `{}` )
903903end
904904\end {verbatim }
905905% \end{lstlisting}
0 commit comments