Capability
A trait for references in CaptureSets. These can be NamedTypes, ThisTypes or ParamRefs, as well as three kinds of AnnotatedTypes representing readOnly, reach, and maybe capabilities. If there are several annotations they come with an order: *
first, .rd
next, ?
last.
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
trait CoreCapabilitytrait ObjectCapabilityclass TermParamRefclass TermRefclass CachedTermRefclass ThisTypeclass CachedThisTypetrait SetCapabilityclass TypeParamRefclass TypeRefclass CachedTypeRefclass ParamReftrait DerivedCapabilityclass Maybeclass Reachclass ReadOnlytrait RootCapabilityclass FreshCapobject GlobalCapclass ResultCapShow all
Members list
Value members
Concrete methods
The capture set of the type underlying this reference
The capture set of the type underlying this reference
Attributes
The non-derived capability underlying this capability
The non-derived capability underlying this capability
Attributes
The type underlying this capability, NoType for root capabilities
The type underlying this capability, NoType for root capabilities
Attributes
x covers y
if we should retain y
when computing the overlap of two footprints which have x
respectively y
as elements. We assume that .rd have already been stripped on both sides. We have:
x covers y
if we should retain y
when computing the overlap of two footprints which have x
respectively y
as elements. We assume that .rd have already been stripped on both sides. We have:
x covers x x covers y ==> x covers y.f x covers y ==> x* covers y*, x? covers y? TODO what other clauses from subsumes do we need to port here?
Attributes
Tests whether the capability derives from capability class cls
.
Tests whether the capability derives from capability class cls
.
Attributes
Is this reference the generic root capability cap
or a Fresh instance?
Is this reference the generic root capability cap
or a Fresh instance?
Attributes
An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability first.
An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability first.
Attributes
Is this a maybe reference of the form x?
?
Is this a maybe reference of the form x?
?
Attributes
Is this a reach reference of the form x*
or a readOnly or maybe variant of a reach reference?
Is this a reach reference of the form x*
or a readOnly or maybe variant of a reach reference?
Attributes
Is this a read-only reference of the form x.rd
or x.rd?
or a capture set variable with only read-ony references in its upper bound?
Is this a read-only reference of the form x.rd
or x.rd?
or a capture set variable with only read-ony references in its upper bound?
Attributes
Is this reference a root capability or a derived version of one? These capabilities have themselves as their captureSetOfInfo.
Is this reference a root capability or a derived version of one? These capabilities have themselves as their captureSetOfInfo.
Attributes
Is the reference tracked? This is true if it can be tracked and the capture set of the underlying type is not always empty.
Is the reference tracked? This is true if it can be tracked and the capture set of the underlying type is not always empty.
Attributes
The symbol that represents the level closest-enclosing ccOwner. Symbols representing levels are
The symbol that represents the level closest-enclosing ccOwner. Symbols representing levels are
- class symbols, but not inner (non-static) module classes
- method symbols, but not accessors or constructors
Attributes
This is a maximal capability that subsumes y
in given context and VarState.
This is a maximal capability that subsumes y
in given context and VarState.
Value parameters
- canAddHidden
-
If true we allow maximal capabilities to subsume all other capabilities. We add those capabilities to the hidden set if this is a Fresh instance. If false we only accept
y
elements that are already in the hidden set of this Fresh instance. The idea is that in a VarState that accepts additions we first runmaxSubsumes
withcanAddHidden = false
so that new variables get added to the sets. If that fails, we run the test again with canAddHidden = true as a last effort before we fail a comparison.
Attributes
Similar to isExlusive, but also includes capabilties with capture set variables in their info whose status is still open.
Similar to isExlusive, but also includes capabilties with capture set variables in their info whose status is still open.
Attributes
The logical owner of the root of this class:
The logical owner of the root of this class:
- If this path starts with
C.this
, the classC
. - If it starts with a reference
r
,r
's owner. - If it starts with cap, the
scala.caps
package class. - If it starts with a fresh instance, its owner.
- If it starts with a ParamRef or a ResultCap, NoSymbol.
Attributes
The first element of this path type, skipping selections and qualifiers. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.
The first element of this path type, skipping selections and qualifiers. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.
Attributes
The capture set consisting of exactly this reference
The capture set consisting of exactly this reference
Attributes
x subsumes x x =:= y ==> x subsumes y x subsumes y ==> x subsumes y.f x subsumes y ==> x* subsumes y, x subsumes y? x subsumes y ==> x* subsumes y*, x? subsumes y? x: x1.type /\ x1 subsumes y ==> x subsumes y X = CapSet^cx, exists rx in cx, rx subsumes y ==> X subsumes y Y = CapSet^cy, forall ry in cy, x subsumes ry ==> x subsumes Y X: CapSet^c1...CapSet^c2, (CapSet^c1) subsumes y ==> X subsumes y Y: CapSet^c1...CapSet^c2, x subsumes (CapSet^c2) ==> x subsumes Y Contains[X, y] ==> X subsumes y
x subsumes x x =:= y ==> x subsumes y x subsumes y ==> x subsumes y.f x subsumes y ==> x* subsumes y, x subsumes y? x subsumes y ==> x* subsumes y*, x? subsumes y? x: x1.type /\ x1 subsumes y ==> x subsumes y X = CapSet^cx, exists rx in cx, rx subsumes y ==> X subsumes y Y = CapSet^cy, forall ry in cy, x subsumes ry ==> x subsumes Y X: CapSet^c1...CapSet^c2, (CapSet^c1) subsumes y ==> X subsumes y Y: CapSet^c1...CapSet^c2, x subsumes (CapSet^c2) ==> x subsumes Y Contains[X, y] ==> X subsumes y
Attributes
The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.
The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.
Attributes
The type representing this capability. Note this method does not distinguish different RootCapability
instances, and should only be used for printing or phases not related to CC.
The type representing this capability. Note this method does not distinguish different RootCapability
instances, and should only be used for printing or phases not related to CC.
Attributes
Inherited methods
A fallback text representation, if the pattern matching in Printers does not have a case for this showable element
A fallback text representation, if the pattern matching in Printers does not have a case for this showable element
Attributes
- Inherited from:
- Showable
The string representation of this showable element.
The string representation with each line after the first one indented by the given given margin (in spaces).
The string representation with each line after the first one indented by the given given margin (in spaces).
Attributes
- Inherited from:
- Showable
The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.
The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.
Attributes
- Inherited from:
- Showable