uk.ac.man.cs.rainbow.rapa.abstraction
Class Unary
java.lang.Object
|
+--uk.ac.man.cs.rainbow.rapa.data.AbstractFunction
|
+--uk.ac.man.cs.rainbow.rapa.abstraction.Unary
- public class Unary
- extends AbstractFunction
Unary abstract function implementation.
- See Also:
Application
,
NAry
Method Summary |
Value[] |
eval(Value[] args)
Evaluate this function according to the free abstraction. |
boolean |
supportsTop()
Whether the top of any type may be passed as an argument to the
type. |
Unary
public Unary(String name,
AbstractType intype,
Map map)
- Builds mapping for top from rest of map.
- Parameters:
map
- A mapping from abstract values to the arrays of
abstract values.
Unary
public Unary(String name,
AbstractType inty,
AbstractType outy,
String[] lookup)
supportsTop
public boolean supportsTop()
- Description copied from class:
AbstractFunction
- Whether the top of any type may be passed as an argument to the
type. Currently it is not a good idea to fail to support
this unless you can be sure it will never be passed a top...
- Overrides:
supportsTop
in class AbstractFunction
eval
public Value[] eval(Value[] args)
- Description copied from class:
AbstractFunction
- Evaluate this function according to the free abstraction.
- Overrides:
eval
in class AbstractFunction
- Following copied from class:
uk.ac.man.cs.rainbow.rapa.data.AbstractFunction
- Parameters:
args
- Arguments to the function; may include the top of a type in
any position if AbstractFunction.supportsTop()
returns true.- Returns:
- Array of all possible function results.