CallArrow

public final class CallArrow

One arrow in the CallGraph.

Fields

coversFurther

public BoolVector coversFurther

Elementary formal arguments that are at a leaf of their complete formal arg structure. Related to the question of mismatchnig types of formal and actual arg.

destination

public Unit destination

destination Unit of this CallArrow.

origin

public Unit origin

Origin Unit of this CallArrow.

translator

public PublicInfo[] translator

The zone translator, which is the necessary information to convert the zones numbering of the callee into that of the caller.

Constructors

CallArrow

protected CallArrow(Unit origin, Unit destination)

Creates a new CallArrow from origin Unit to destination Unit.

Methods

addKind

protected void addKind(int newKind)

computeCallTranslatorElem

protected static PublicInfo computeCallTranslatorElem(ZoneInfo zoneInfo, Unit destination, Unit origin)

computeTranslator

protected void computeTranslator()

Once the CallArrow between a origin and destination Units is created, AND the zone numbering is sorted out, this method computes the translator, i.e. the mapping of the zones numbers between the callee (destination) and the caller (origin).

delKind

protected void delKind(int k)

delete

protected void delete()

Deletes this CallArrow.

destination

public Unit destination()
Returns

the destination Unit of this CallArrow.

followsDirections

protected boolean followsDirections(int callsDir, int importsDir, int containsDir, TapList<Unit> forwardDeclarationUnits)

isCall

public boolean isCall()
Returns

True if this arrow is a CALL.

isContain

public boolean isContain()
Returns

True if this arrow is a CONTAINS.

isImport

public boolean isImport()
Returns

True if this arrow is an IMPORT.

origin

public Unit origin()
Returns

the origin Unit of this CallArrow.

redirectDestination

protected void redirectDestination(Unit unit)

Redirects the destination of this CallArrow to “unit”. If unit==null, this disconnects this CallArrow from its destination.

redirectOrigin

protected void redirectOrigin(Unit unit)

Redirects the origin of this CallArrow to “unit”. If unit==null, this disconnects this CallArrow from its origin.

setContain

public void setContain(boolean contain)

setImport

public void setImport(boolean anImport)

setSrcCallName

protected void setSrcCallName(String calledName)

Sets the original name used in the statement that calls this CallArrow.

setTimes

protected void setTimes(int times)

srcCallName

public String srcCallName()

takesArgumentByValue

public boolean takesArgumentByValue(int parameterRank)
Parameters
  • parameterRank – from 1 to nbArgs.

Returns

true if this CallArrow passes arguments by value.

times

protected int times()
Returns

Number of times the caller calls the callee (textual occurrences of call).

toString

public String toString()

translator

public PublicInfo[] translator()
Returns

the zone translator, which is the necessary information to convert the zones numbering of the callee into that of the caller.