Class TaintMark
This is essentially a symbol or variable, but we also include an immutable set of tags. A mark is
the bottom-most component in a TaintVec.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TaintMark
Construct a new taint markTODO: Validation that the name and tags do not contain any separators, so that
parse(String)andtoString()are proper inverses.- Parameters:
name- the nametags- the tags
-
-
Method Details
-
parse
Parse a mark from the given stringA mark has the form "
name:tag1,tag2,...,tagN". The tags are optional, so it may also take the form "name".- Parameters:
string- the string to parse- Returns:
- the resulting mark
-
toString
Render the mark as a string -
equals
Check if two marks are equalNote that we distinguish between a mark without tags and another mark with the same name but having tags. Because we use tags to indicate, e.g., indirection, we want to allow a variable to be marked as tainted both directly and indirectly. Furthermore, if indirect taints are filtered, we would want to ensure such a variable is not removed, since it's also tainted directly.
-
hashCode
public int hashCode() -
getName
Get the name of the mark- Returns:
- the name
-
getTags
Get the mark's tags- Returns:
- the tags
-
tagged
Create a new mark with the given tag addedTags are a set, so this may return the same mark
- Parameters:
tag-- Returns:
-