Reach
If x is a capability, its reach capability x*. x* stands for all capabilities reachable through x. We have {x} <: {x*} <: dcs(x)} where the deep capture set dcs(x) of x is the union of all capture sets that appear in covariant position in the type of x. If x and y are different variables then {x*} and {y*} are unrelated.
Reach capabilities cannot wrap read-only capabilities or maybe capabilities. We have (x?).reach = (x.reach)? (x.rd).reach = (x.reach).rd (x.only[T]).reach = (x*).only[T]
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait DerivedCapabilitytrait Capabilitytrait Showableclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Inherited methods
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
The capture set of the type underlying this reference
Attributes
- Inherited from:
- Capability
The classifier, either given in an explicit .only or assumed for a FreshCap. AnyRef for unclassified FreshCaps. Otherwise NoSymbol if no classifier is given.
The classifier, either given in an explicit .only or assumed for a FreshCap. AnyRef for unclassified FreshCaps. Otherwise NoSymbol if no classifier is given.
Attributes
- Inherited from:
- Capability
Compute result based on hidden set of this capability. Restrictions and read-only status transfer from the capability to its hidden set.
Compute result based on hidden set of this capability. Restrictions and read-only status transfer from the capability to its hidden set.
Value parameters
- f
-
a function that gets applied to all detected hidden sets
Attributes
- Inherited from:
- Capability
The non-derived capability underlying this capability
The type underlying this capability, NoType for root capabilities
The type underlying this capability, NoType for root capabilities
Attributes
- Inherited from:
- Capability
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? x covers y ==>
TODO what other clauses from subsumes do we need to port here? The last clause is a conservative over-approximation: basically, we can't achieve separation by having different classifiers for now. It would be good to have a test that would expect such separation, then we can try to refine the clause to make the test pass.
Attributes
- Inherited from:
- Capability
x eq y or x is a fresh cap, y is a fresh cap with prefix p, and there is a prefix of p that contains x in its capture set.
x eq y or x is a fresh cap, y is a fresh cap with prefix p, and there is a prefix of p that contains x in its capture set.
Attributes
- Inherited from:
- Capability
Tests whether the capability derives from capability class cls.
Tests whether the capability derives from capability class cls.
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
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 elements hidden by this capability, if this is a FreshCap or a derived version of one. Read-only status and restrictions are transferred from the capability to its hidden set.
The elements hidden by this capability, if this is a FreshCap or a derived version of one. Read-only status and restrictions are transferred from the capability to its hidden set.
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
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
- Inherited from:
- Capability
An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability or a capability classified as SharedCapability first.
An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability or a capability classified as SharedCapability first.
Value parameters
- required
-
if true, exclusivity can be obtained by setting the mutability status of some capture set variable from Ignored to Writer.
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Is this a maybe reference of the form x??
Attributes
- Inherited from:
- Capability
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
- Inherited from:
- Capability
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
- Inherited from:
- Capability
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
- Inherited from:
- Capability
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
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
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 For Unscoped FreshCaps the level owner is the top-level class.
Attributes
- Inherited from:
- Capability
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
yelements that are already in the hidden set of this Fresh instance. The idea is that in a VarState that accepts additions we first runmaxSubsumeswithcanAddHidden = falseso 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
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
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
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
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.capspackage class. - If it starts with a fresh instance, its owner.
- If it starts with a ParamRef or a ResultCap, NoSymbol.
Attributes
- Inherited from:
- Capability
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
- Inherited from:
- Capability
An iterator over the names of all the elements of this product.
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
The string representation of this showable element.
Attributes
- Inherited from:
- Capability
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
The capture set consisting of exactly this reference
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability
Drop restrictions with clss cls or a superclass of cls
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
- Inherited from:
- Capability
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
- Inherited from:
- Capability
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 from:
- Capability
The transitive classifiers of this capability.
Attributes
- Inherited from:
- Capability
Attributes
- Inherited from:
- Capability