Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Redo some changes that disappeared with merge

  • Loading branch information...
commit cda17f3b408f6214ca8e5ebfd1b13d9d3ae6b1ea 1 parent ef7ab23
Shu-yu Guo authored

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. +10 10 analysis.tex
20 analysis.tex
@@ -432,18 +432,18 @@ \subsection{Example Constraints}
432 432
433 433 At line 18, there is a call to \code{use}. This matches \textsc{App} and
434 434 generates the constraints (\ref{ct:6}) and (\ref{ct:7}). Note that
435   -(\ref{ct:use-arg}) employs a barrier. Barriers conceptually restrict propagation
436   -of types to runtime, so $T_{\code{a}}$ \emph{does not} propagate to
437   -$T_{\code{a}'}$ even though we know statically $\mathit{Use} \in
438   -T_{\code{use}}$. And at the current time, before \code{use} is actually
439   -called, $T_{\code{a}'} \not\supseteq T_{\code{a}}$, which means we need to
440   -emit a dynamic check that continues the propagation should new types be
441   -observed.
  435 +(\ref{ct:use-arg}) employs a barrier constraint. Barrier constraints
  436 +conceptually restrict propagation of types to runtime, so $T_{\code{a}}$
  437 +\emph{does not} propagate to $T_{\code{a}'}$ even though we know statically
  438 +$\mathit{Use} \in T_{\code{use}}$. And at the current time, before \code{use}
  439 +is actually called, $T_{\code{a}'} \not\supseteq T_{\code{a}}$, which means we
  440 +need to emit a dynamic check, or type barrier, that continues the propagation
  441 +should new types be observed.
442 442
443 443 Until \code{main} is executed to the point where \code{use} is called, no
444 444 further analysis is done. That is, we \emph{interleave} constraint generation,
445   -propagation, and code execution. Propagation, due to barriers, can happen
446   -during analysis and at runtime.
  445 +propagation, and code execution. Propagation, due to barrier constraints, can
  446 +happen during analysis and at runtime.
447 447
448 448 Suppose then that \code{main} is executed and it calls to \code{use}. First,
449 449 the type barrier we inserted at the argument binding for \code{use} is
@@ -463,7 +463,7 @@ \subsection{Example Constraints}
463 463 \code{int} from $\mathit{prop}(\mathit{Box}, \code{p})$ to $T_{\code{v}}$.
464 464
465 465 At this point, as we have observed all possible types of the property access
466   -\code{a'[i].p}, we can remove the emitted type barrier. But this removal may
  466 +\code{a$'$[i].p}, we can remove the emitted type barrier. But this removal may
467 467 not be permanent. If we analyze new code which adds new types to the type set
468 468 $\mathit{prop}(\mathit{Box}, \code{p})$, we will need to re-emit the dynamic
469 469 check. For instance, if in the future we were to see \lstinline{new Box("hello!")}

0 comments on commit cda17f3

Please sign in to comment.
Something went wrong with that request. Please try again.