Skip to content

Commit

Permalink
Fix Chapter 5
Browse files Browse the repository at this point in the history
  • Loading branch information
francescoo22 committed Sep 12, 2024
1 parent ab4e8fa commit a1425dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions chapters/5-Annotation-System.typ
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
This chapter formalizes the uniqueness system that was introduced in @cap:annotations-kt.
While inspired by prior works @aldrich2002alias @boyland2001alias @zimmerman2023latte, it introduces several significant improvements.
This system is designed for being as lightweight as possible and gradually integrable with already existing Kotlin code.

The main goal of the system is to improve SnaKt's verification process by adding aliasing control to Kotlin, thereby establishing a connection to separation logic in Viper.

== Grammar
Expand Down Expand Up @@ -261,7 +260,7 @@ $ \_inangle(\_): Delta -> p -> alpha beta $
]

#example[
Given class $C$, context $Delta$ and variable $x$ such that: $ class C(f: shared) in P \ Delta = x : unique \ type(x.f) = shared $
Given class $C$, context $Delta$ and variable $x$ such that: $ class C(f: shared) in P \ Delta = x : unique $
The result of the lookup for $x.f$ is the following: $ Delta inangle(x.f) = shared $
Since $x.f in.not Delta$, the lookup returns the default annotation, which is the one declared in the class signature.
]
Expand All @@ -272,7 +271,7 @@ $ \_inangle(\_): Delta -> p -> alpha beta $
Get-Var, Get-Path,
)

As described in the previous subsection, the lookup function might not return the correct annotation for a given path. The task of returning the right annotation for a path within a context is left to the (partial) function described in this chapter.
As described in the previous subsection, the lookup function might not return the correct annotation for a given path. The task of returning the right annotation for a path within a context is left to the (partial) function described in this section.

$ \_(\_) : Delta -> p -> alpha beta $

Expand Down Expand Up @@ -655,9 +654,9 @@ The resulting context is built in the following way:
f(x: unique, y: unique): unique {
begin_f;
(Δ = x: unique, y: unique)
⊣ Δ = x: unique, y: unique
y.t = x.b.t;
(Δ = x: unique, y: unique, x.b.t: T, y.t: unique)
⊣ Δ = x: unique, y: unique, x.b.t: T, y.t: unique
x.b = y;
⊣ Δ = x: unique, y: T, x.b: unique
...
Expand Down

0 comments on commit a1425dc

Please sign in to comment.