psyclone.core.signature#
This module provides management of variable access information.
Classes#
Signature: Given a variable access of the forma(i,j)%b(k,l)%c, the signature
- class psyclone.core.signature.Signature(variable, sub_sig=None)[source]#
Given a variable access of the form
a(i,j)%b(k,l)%c, the signature of this access is the tuple(a,b,c). For a simple scalar variableathe signature would just be(a,). The signature is the key used in VariablesAccessMap. In order to make sure two different signature objects containing the same variable can be used as a key, this class implements __hash__ and other special functions. The constructor also supports appending an existing signature to this new signature using the sub_sig argument. This is used in StructureReference to assemble the overall signature of a structure access.- Parameters:
variable (str or tuple of str or list of str) – the variable that is accessed.
sub_sig (
psyclone.core.Signature) – a signature that is to be added to this new signature.
Inheritance

- property is_structure#
- Returns:
True if this signature represents a structure.
- Return type:
bool
- property var_name#
- Returns:
the actual variable name, i.e. the first component of the signature.
- Return type:
str