dk.brics.xact.analysis.xmlgraph
Class Emptiness
java.lang.Object
dk.brics.xact.analysis.xmlgraph.BackwardsXGAnalyzer<EPresence>
dk.brics.xact.analysis.xmlgraph.Emptiness
public class Emptiness
- extends BackwardsXGAnalyzer<EPresence>
May/must backwards analysis that determines which nodes in an XML graph have empty
sequence unfoldings.
It can be configured to treat attributes, elements, and/or text nodes as "bottom"
or "empty" elements to take advantage of additional information available outside
the XML graph.
Note: The emptiness analysis is forced to treat comments and processing instructions
as empty sequences because they are invisible in the XML graph. Make sure that you
consider the possibility of their presence.
Field Summary |
(package private) dk.brics.xact.analysis.xmlgraph.Emptiness.Processor |
processor
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
processor
dk.brics.xact.analysis.xmlgraph.Emptiness.Processor processor
Emptiness
public Emptiness(XMLGraph xg,
EPresence attributes,
EPresence elements,
EPresence texts,
EPresence gaps)
- Performs emptiness analysis on the specified XML graph.
Each of the
EPresence
arguments may be set to null to let Emptiness
choose a sound value by itself.
- Parameters:
xg
- XML graph to analyzeattributes
- lattice point to assign an AttributeNode
; or nullelements
- lattice point to assign an ElementNode
; or nulltexts
- lattice point to assign a TextNode
; or nullgaps
- lattice point to assign to a ChoiceNode
that is a gap; or null
bottom
protected EPresence bottom()
- Description copied from class:
BackwardsXGAnalyzer
- Returns BOTTOM element.
- Specified by:
bottom
in class BackwardsXGAnalyzer<EPresence>
initial
protected EPresence initial(Node node)
- Description copied from class:
BackwardsXGAnalyzer
- Returns initial value for the specified node. If node
has BOTTOM as initial value, return null instead.
- Specified by:
initial
in class BackwardsXGAnalyzer<EPresence>
transfer
protected EPresence transfer(Node node,
EPresence currentValue)
- Description copied from class:
BackwardsXGAnalyzer
- Transfer function for the specified node. The node
should only read lattice data from its children and itself.
- Specified by:
transfer
in class BackwardsXGAnalyzer<EPresence>
- Parameters:
node
- in the XML graph to analyzecurrentValue
- current lattice point for the node. Should not be modified.
- Returns:
- a new instance of a lattice element
Copyright © 2005-2011 Aarhus University.