class point_kind

Enumeration class: program point ( point ) kind.

Get a point’s kind with point.get_kind().

point_kind Details

class cs.point_kind

Enumeration class: program point ( point ) kind.

static from_integer(_inner)

Construct an instance from an integer representation.

Parameters:_inner (int) – The integer representation, as returned by point_kind.as_integer().
Return type:point_kind
Raises:result.ERROR_INVALID_ARGUMENT if _inner is not a valid integer representation for a point_kind instance.

Invariant: For point_kind x, point_kind.from_integer(x.as_integer()) == x

>>> pk = point_kind.CALL_SITE.as_integer()
>>> pk
9
>>> point_kind.from_integer(pk)
<cs.point_kind call-site>
__cmp__(other)

Comparison function for point_kind , with respect to a stable overall ordering.

Parameters:other (point_kind) – The point_kind object to compare against.
Return type:int
Returns:An integer N such that:
  • N==0 if the two objects compare equal
  • N<0 if self < other
  • N>0 if self > other
>>> point_kind.SWITCH_CASE.__cmp__(point_kind.INDIRECT_CALL)
1
__eq__(b)

Equality operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:True if self and b compare equal, False otherwise.
>>> point_kind.FORMAL_IN == point_kind.AUXILIARY
False
__ge__(b)

Greater-than-or-equal operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:True if self >= b , False otherwise.
>>> point_kind.RESERVED_000 >= point_kind.NORMAL_RETURN
False
__gt__(b)

Greater-than operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:True if self > b , False otherwise.
>>> point_kind.GLOBAL_FORMAL_IN > point_kind.RESERVED_004
False
__hash__()

Hash function for point_kind .

Return type:int
>>> hash(point_kind.EXCPT_RETURN)
32
__le__(b)

Less-than-or-equal operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:True if self <= b , False otherwise.
>>> point_kind.ENTRY <= point_kind.RESERVED_002
True
__lt__(b)

Less-than operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:True if self < b , False otherwise.
>>> point_kind.DECLARATION < point_kind.VARIABLE_INITIALIZATION
True
__ne__(b)

Inequality operator for point_kind .

Parameters:b (point_kind) – The point_kind object to compare against.
Return type:bool
Returns:False if self and b compare equal, True otherwise.
>>> point_kind.RESERVED_002 != point_kind.CALL_SITE
True
__repr__()

Get a representation of a point_kind object that includes information useful for debugging.

Return type:str
Returns:The string representation.
>>> repr(point_kind.EXCPT_EXIT)
'<cs.point_kind exceptional-exit>'
__str__()

Get a simple string representation of a point_kind object.

Return type:str
Returns:The string representation.
>>> str(point_kind.ACTUAL_IN)
'actual-in'
as_integer()

Get an integer representation of self.

Return type:int
Returns:An integer suitable for use with point_kind.from_integer().

Invariant: For point_kind x, point_kind.from_integer(x.as_integer()) == x

>>> pk = point_kind.CALL_SITE.as_integer()
>>> pk
9
>>> point_kind.from_integer(pk)
<cs.point_kind call-site>
name()

Get the name of a point_kind object.

Return type:str
Returns:The name.
>>> point_kind.CONTROL_POINT.name()
'control-point'
participates_in_cfg()

Check: do points ( point ) of this point_kind appear in CFGs?

Return type:bool
Returns:True if a point of this kind can ever appear in a CFG, False otherwise.
>>> point_kind.GLOBAL_ACTUAL_IN.participates_in_cfg()
False
>>> point_kind.EXPRESSION.participates_in_cfg()
True
ACTUAL_IN

Kind actual-in.

>>> point_kind.ACTUAL_IN
<cs.point_kind actual-in>
ACTUAL_OUT

Kind actual-out.

>>> point_kind.ACTUAL_OUT
<cs.point_kind actual-out>
AUXILIARY

[CodeSurfer only] Kind auxiliary.

>>> point_kind.AUXILIARY
<cs.point_kind auxiliary>
BODY

Kind body.

>>> point_kind.BODY
<cs.point_kind body>
CALL_SITE

Kind call-site.

>>> point_kind.CALL_SITE
<cs.point_kind call-site>
CONTROL_POINT

Kind control-point.

>>> point_kind.CONTROL_POINT
<cs.point_kind control-point>
DECLARATION

[CodeSurfer only] Kind declaration.

>>> point_kind.DECLARATION
<cs.point_kind declaration>
ENTRY

Kind entry.

>>> point_kind.ENTRY
<cs.point_kind entry>
EXCPT_EXIT

[CodeSurfer only] Kind exceptional-exit.

>>> point_kind.EXCPT_EXIT
<cs.point_kind exceptional-exit>
EXCPT_RETURN

[CodeSurfer only] Kind exceptional-return.

>>> point_kind.EXCPT_RETURN
<cs.point_kind exceptional-return>
EXIT

Kind exit.

>>> point_kind.EXIT
<cs.point_kind exit>
EXPRESSION

Kind expression.

>>> point_kind.EXPRESSION
<cs.point_kind expression>
FORMAL_IN

Kind formal-in.

>>> point_kind.FORMAL_IN
<cs.point_kind formal-in>
FORMAL_OUT

Kind formal-out.

>>> point_kind.FORMAL_OUT
<cs.point_kind formal-out>
GLOBAL_ACTUAL_IN

[CodeSurfer only] Kind global-actual-in.

>>> point_kind.GLOBAL_ACTUAL_IN
<cs.point_kind global-actual-in>
GLOBAL_ACTUAL_OUT

[CodeSurfer only] Kind global-actual-out.

>>> point_kind.GLOBAL_ACTUAL_OUT
<cs.point_kind global-actual-out>
GLOBAL_FORMAL_IN

[CodeSurfer only] Kind global-formal-in.

>>> point_kind.GLOBAL_FORMAL_IN
<cs.point_kind global-formal-in>
GLOBAL_FORMAL_OUT

[CodeSurfer only] Kind global-formal-out.

>>> point_kind.GLOBAL_FORMAL_OUT
<cs.point_kind global-formal-out>
HAMMOCK_EXIT

[CodeSurfer only] Kind hammock-exit.

>>> point_kind.HAMMOCK_EXIT
<cs.point_kind hammock-exit>
HAMMOCK_HEADER

[CodeSurfer only] Kind hammock-header.

>>> point_kind.HAMMOCK_HEADER
<cs.point_kind hammock-header>
INDIRECT_CALL

Kind indirect-call.

>>> point_kind.INDIRECT_CALL
<cs.point_kind indirect-call>
JUMP

Kind jump.

>>> point_kind.JUMP
<cs.point_kind jump>
LABEL

Kind label.

>>> point_kind.LABEL
<cs.point_kind label>
NORMAL_EXIT

[CodeSurfer only] Kind normal-exit.

>>> point_kind.NORMAL_EXIT
<cs.point_kind normal-exit>
NORMAL_RETURN

[CodeSurfer only] Kind normal-return.

>>> point_kind.NORMAL_RETURN
<cs.point_kind normal-return>
PHI

[CodeSurfer only] Kind phi.

>>> point_kind.PHI
<cs.point_kind phi>
PI

[CodeSurfer only] Kind pi.

>>> point_kind.PI
<cs.point_kind pi>
PREEXIT

Kind preexit.

>>> point_kind.PREEXIT
<cs.point_kind preexit>
RESERVED_000

[CodeSurfer only] VERTEX_KIND_NULL

>>> point_kind.RESERVED_000
<cs.point_kind reserved-000>
RESERVED_002

[CodeSurfer only] CALLPOST_VERTEX

>>> point_kind.RESERVED_002
<cs.point_kind reserved-002>
RESERVED_004

[CodeSurfer only] USER_DEFINED_VERTEX

>>> point_kind.RESERVED_004
<cs.point_kind reserved-004>
RETURN

Kind return.

>>> point_kind.RETURN
<cs.point_kind return>
SWITCH_CASE

Kind switch-case.

>>> point_kind.SWITCH_CASE
<cs.point_kind switch-case>
UNAVAILABLE

Kind unavailable.

>>> point_kind.UNAVAILABLE
<cs.point_kind unavailable>
VARIABLE_INITIALIZATION

Kind variable-initialization.

>>> point_kind.VARIABLE_INITIALIZATION
<cs.point_kind variable-initialization>