pub struct SPDG {
pub name: Identifier,
pub path: Box<[Identifier]>,
pub id: Endpoint,
pub graph: SPDGImpl,
pub markers: HashMap<Node, Box<[Identifier]>>,
pub arguments: Box<[Node]>,
pub return_: Box<[Node]>,
pub type_assigns: HashMap<Node, Types>,
pub statistics: SPDGStats,
}
Expand description
A semantic PDG, e.g. a graph plus marker annotations
Fields§
§name: Identifier
The identifier of the entry point to this computation
path: Box<[Identifier]>
The module path to this controller function
id: Endpoint
The id
graph: SPDGImpl
The PDG
markers: HashMap<Node, Box<[Identifier]>>
Nodes to which markers are assigned.
arguments: Box<[Node]>
The nodes that represent arguments to the entrypoint
return_: Box<[Node]>
If the return is ()
or !
then this is None
type_assigns: HashMap<Node, Types>
Stores the assignment of relevant (e.g. marked) types to nodes. Node that this contains multiple types for a single node, because it hold top-level types and subtypes that may be marked.
statistics: SPDGStats
Statistics
Implementations§
Source§impl SPDG
impl SPDG
Sourcepub fn data_sinks(&self) -> impl Iterator<Item = Node> + '_
pub fn data_sinks(&self) -> impl Iterator<Item = Node> + '_
Returns an iterator over all the data sinks in the data_flow
relation.
Sourcepub fn edges(&self) -> impl Iterator<Item = EdgeReference<'_, EdgeInfo>> + '_
pub fn edges(&self) -> impl Iterator<Item = EdgeReference<'_, EdgeInfo>> + '_
An iterator over all edges in this graph.
Sourcepub fn all_sources(&self) -> impl Iterator<Item = Node> + '_
pub fn all_sources(&self) -> impl Iterator<Item = Node> + '_
Gather all Node
s that are mentioned in this controller including data and control flow.
Sourcepub fn arguments(&self) -> NodeCluster
pub fn arguments(&self) -> NodeCluster
The arguments of this spdg. The same as the arguments
field, but
conveniently paired with the controller id
Sourcepub fn node_types(&self, node: Node) -> &[TypeId]
pub fn node_types(&self, node: Node) -> &[TypeId]
All types (if any) assigned to this node
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SPDG
impl<'de> Deserialize<'de> for SPDG
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SPDG
impl RefUnwindSafe for SPDG
impl Send for SPDG
impl Sync for SPDG
impl Unpin for SPDG
impl UnwindSafe for SPDG
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more