io.shiftleft.semanticcpg.accesspath
Members list
Type members
Classlikes
Attributes
- Supertypes
- Known subtypes
-
object AddressOf.typeclass ConstantAccessobject IndirectionAccess.typeclass PointerShiftobject VariableAccess.typeobject VariablePointerShift.typeShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AccessPath.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
- Self type
-
AddressOf.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
For handling of invertible elements, cf AccessPathAlgebra.md. The general rule is that elements concatenate normally, except for:
For handling of invertible elements, cf AccessPathAlgebra.md. The general rule is that elements concatenate normally, except for:
Elements(&) ++ Elements() == Elements() Elements() ++ Elements(&) == Elements() Elements(<0>) == Elements() Elements() ++ Elements(
From this, once can see that , * and & are invertible, <?> is idempotent and <0> is a convoluted way of describing and empty sequence of tokens. Nevertheless, we mostly consider * as noninvertible (because it is, in real computers!) and <?> as invertible (because it is in real computers, we just don't know the offset)
Elements get a private constructor. Users should use the no-argument Elements.apply() factory method to get an empty path, and the specific concat operators for building up pathes. The Elements.normalized(iter) factory method serves to build this in bulk.
The unnormalized factory method is more of an escape hatch.
The elements field should never be mutated outside of this file: We compare and hash Elements by their contents, not by identity, and this breaks in case of mutation.
The reason for using a mutable Array instead of an immutable Vector is that this is the lightest weight datastructure for the job.
The reason for making this non-private is simply that it is truly annoying to write wrappers for all possible uses.
Attributes
Result of matchFull
comparison
Result of matchFull
comparison
Value parameters
- extensionDiff
-
extensionDiff is non empty if and only if a proper subset is affected. Outside of over tainting, if extensionDiff is non empty then: path.elements ++ path.matchFull(other).extensionDiff == other.elements path.matchFull(other).stepIntoPath.get.elements.isEmpty Invariants:
- Exclusions have no invertible tail
- Only paths without overTaint can have exclusions TODO: Figure out sensible assertions to defend these invariants
- stepIntoPath
-
The affected part of the access path, mapped to be relative to this stepIntoPath.isDefined if and only if there is a match in paths, i.e. if the call can affect the tracked variable at all. Outside of overtainting, if stepIntoPath.isDefined && stepIntoPath.elements.nonEmpty then: path.elements == other.elements ++ path.matchFull(other).stepIntoPath.get.elements extensionDiff.isEmpty
- stepOverPath
-
the unaffected part of the access path. Some(this) for no match, None for perfect match; may have additional exclusions to this.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
- Self type
-
IndirectionAccess.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Enumerationtrait Serializableclass Objecttrait Matchableclass Any
- Self type
-
MatchResult.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class TrackedAliasobject TrackedFormalReturn.typeclass TrackedLiteraltrait TrackedMethodOrTypeRefclass TrackedMethodclass TrackedTypeRefclass TrackedNamedVariableclass TrackedReturnValueobject TrackedUnknown.typeShow all
Attributes
- Supertypes
- Self type
-
TrackedFormalReturn.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedMethodOrTypeReftrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Known subtypes
-
class TrackedMethodclass TrackedTypeRef
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TrackedMethodOrTypeReftrait TrackedBaseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Self type
-
TrackedUnknown.type
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
- Self type
-
VariableAccess.type
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass AccessElementtrait Comparable[AccessElement]class Objecttrait Matchableclass AnyShow all
- Self type
-
VariablePointerShift.type