edu.cmu.cs.crystal.flow
Interface IResult<LE>

Type Parameters:
LE - the type that represents the analysis knowledge
All Known Implementing Classes:
LabeledResult, LabeledSingleResult, SingleResult

public interface IResult<LE>

Interface for mapping branch labels to analysis information. Clients do not usually have to implement this interface. Instead, use one of the pre-defined implementing classes. If you want a single lattice value regardless of labels and do not want to track labels, use @link{SingleResult}. If you want a single lattice value but do want to track labels, use @link{LabeledSingleResult}. If you want to provide different lattice values for each label, use @link{LabeledResult}.

Author:
Kevin Bierhoff

Method Summary
 LE get(ILabel label)
          Clients should not modify the returned value.
 IResult<LE> join(IResult<LE> otherResult, IAbstractLatticeOperations<LE,?> ops)
          Clients do not usually call this method.
 Set<ILabel> keySet()
          Returns the set of labels mapped by this IResult.
 

Method Detail

get

LE get(ILabel label)
Clients should not modify the returned value. Implementers must provide a default value if label is null.

Parameters:
label -
Returns:
A valid lattice element or null if the label is unknown.

keySet

Set<ILabel> keySet()
Returns the set of labels mapped by this IResult.

Returns:
The set of labels mapped by this IResult. This method must not return null

join

IResult<LE> join(IResult<LE> otherResult,
                 IAbstractLatticeOperations<LE,?> ops)
Clients do not usually call this method. Implementations join two results "pointwise" by joining lattice elements with the same label. This method must not modify either IResult objects passed in.

Parameters:
otherResult - IResult object to join this IResult with.
ops - Lattice operations so we can join individual elements.
Returns:
Pointwise joined lattice elements.
See Also:
ILatticeOperations.join(LE, LE, org.eclipse.jdt.core.dom.ASTNode)