dk.brics.xact.analysis.xmlgraph
Class XMLGraphAnalysis

java.lang.Object
  extended by dk.brics.xact.analysis.xmlgraph.XMLGraphAnalysis
All Implemented Interfaces:
VariableAnalysisInterface<XMLGraph>

public class XMLGraphAnalysis
extends Object
implements VariableAnalysisInterface<XMLGraph>

XML graph lattice and transfer functions for dataflow analysis.


Constructor Summary
XMLGraphAnalysis(XMLGraph global_xg, ElementNode dummy_root, ChoiceNode dummy_root_content, Map<String,String> namespaces, StatementNodes stm_nodes, Set<Statement> empty_xpath, Set<Statement> check_fails)
          Constructs a new XML graph dataflow analysis.
 
Method Summary
 void assign(XMLGraph g, Statement s)
          Invoked after each assignment transfer function on the resulting value.
 boolean merge(XMLGraph source, XMLGraph dest)
          Computes the least upper bound of two value lattice elements.
 XMLGraph newBottomElement()
          Creates a placeholder for a lattice element for a flow value, having the initial value.
 XMLGraph transferCast(CastStm s, XMLGraph base)
          Transfer function for a CastStm.
 void transferCheck(CheckStm s, XMLGraph base)
          Transfer function for a CheckStm.
 XMLGraph transferConcat(ConcatStm s, XMLGraph xmlsource)
          Transfer function for a ConcatStm.
 XMLGraph transferConst(ConstStm s)
          Transfer function for a ConstStm.
 XMLGraph transferCopy(CopyStm s, XMLGraph base, XMLGraph firstattr, XMLGraph firstchild, XMLGraph nextnode)
          Transfer function for a CopyStm.
 XMLGraph transferEmpty(EmptyStm s)
          Transfer function for an EmptyStm.
 XMLGraph transferGapify(GapifyStm s, XMLGraph base)
          Transfer function for a GapifyStm.
 XMLGraph transferGet(GetStm s, XMLGraph base)
          Transfer function for a GetStm.
 XMLGraph transferInsert(InsertStm s, XMLGraph base, XMLGraph xmlsrc)
          Transfer function for an InsertStm.
 XMLGraph transferNode(NodeStm s, XMLGraph firstattr, XMLGraph firstchild, XMLGraph nextnode)
          Transfer function for a NodeStm.
 XMLGraph transferPlug(PlugStm s, XMLGraph base, XMLGraph xmlsrc)
          Transfer function for a PlugStm.
 XMLGraph transferRemove(RemoveStm s, XMLGraph base)
          Transfer function for a RemoveStm.
 XMLGraph transferSet(SetStm s, XMLGraph base, XMLGraph xmlsrc)
          Transfer function for a SetStm.
 XMLGraph transferUnknown(UnknownStm s)
          Transfer function for an UnknownStm.
 XMLGraph transferValidate(ValidateStm s, XMLGraph base)
          Transfer function for a ValidateStm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLGraphAnalysis

public XMLGraphAnalysis(XMLGraph global_xg,
                        ElementNode dummy_root,
                        ChoiceNode dummy_root_content,
                        Map<String,String> namespaces,
                        StatementNodes stm_nodes,
                        Set<Statement> empty_xpath,
                        Set<Statement> check_fails)
Constructs a new XML graph dataflow analysis.

Method Detail

assign

public void assign(XMLGraph g,
                   Statement s)
Description copied from interface: VariableAnalysisInterface
Invoked after each assignment transfer function on the resulting value.

Specified by:
assign in interface VariableAnalysisInterface<XMLGraph>

merge

public boolean merge(XMLGraph source,
                     XMLGraph dest)
Description copied from interface: VariableAnalysisInterface
Computes the least upper bound of two value lattice elements.

Specified by:
merge in interface VariableAnalysisInterface<XMLGraph>
Returns:
true if the new value of dest is different from the old, false otherwise.

newBottomElement

public XMLGraph newBottomElement()
Description copied from interface: VariableAnalysisInterface
Creates a placeholder for a lattice element for a flow value, having the initial value.

Specified by:
newBottomElement in interface VariableAnalysisInterface<XMLGraph>

transferCast

public XMLGraph transferCast(CastStm s,
                             XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a CastStm.

Specified by:
transferCast in interface VariableAnalysisInterface<XMLGraph>

transferCheck

public void transferCheck(CheckStm s,
                          XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a CheckStm.

Specified by:
transferCheck in interface VariableAnalysisInterface<XMLGraph>

transferConcat

public XMLGraph transferConcat(ConcatStm s,
                               XMLGraph xmlsource)
Description copied from interface: VariableAnalysisInterface
Transfer function for a ConcatStm.

Specified by:
transferConcat in interface VariableAnalysisInterface<XMLGraph>

transferConst

public XMLGraph transferConst(ConstStm s)
Description copied from interface: VariableAnalysisInterface
Transfer function for a ConstStm.

Specified by:
transferConst in interface VariableAnalysisInterface<XMLGraph>

transferCopy

public XMLGraph transferCopy(CopyStm s,
                             XMLGraph base,
                             XMLGraph firstattr,
                             XMLGraph firstchild,
                             XMLGraph nextnode)
Description copied from interface: VariableAnalysisInterface
Transfer function for a CopyStm.

Specified by:
transferCopy in interface VariableAnalysisInterface<XMLGraph>

transferEmpty

public XMLGraph transferEmpty(EmptyStm s)
Description copied from interface: VariableAnalysisInterface
Transfer function for an EmptyStm.

Specified by:
transferEmpty in interface VariableAnalysisInterface<XMLGraph>

transferGapify

public XMLGraph transferGapify(GapifyStm s,
                               XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a GapifyStm.

Specified by:
transferGapify in interface VariableAnalysisInterface<XMLGraph>

transferGet

public XMLGraph transferGet(GetStm s,
                            XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a GetStm.

Specified by:
transferGet in interface VariableAnalysisInterface<XMLGraph>

transferInsert

public XMLGraph transferInsert(InsertStm s,
                               XMLGraph base,
                               XMLGraph xmlsrc)
Description copied from interface: VariableAnalysisInterface
Transfer function for an InsertStm.

Specified by:
transferInsert in interface VariableAnalysisInterface<XMLGraph>

transferNode

public XMLGraph transferNode(NodeStm s,
                             XMLGraph firstattr,
                             XMLGraph firstchild,
                             XMLGraph nextnode)
Description copied from interface: VariableAnalysisInterface
Transfer function for a NodeStm.

Specified by:
transferNode in interface VariableAnalysisInterface<XMLGraph>

transferPlug

public XMLGraph transferPlug(PlugStm s,
                             XMLGraph base,
                             XMLGraph xmlsrc)
Description copied from interface: VariableAnalysisInterface
Transfer function for a PlugStm.

Specified by:
transferPlug in interface VariableAnalysisInterface<XMLGraph>

transferRemove

public XMLGraph transferRemove(RemoveStm s,
                               XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a RemoveStm.

Specified by:
transferRemove in interface VariableAnalysisInterface<XMLGraph>

transferSet

public XMLGraph transferSet(SetStm s,
                            XMLGraph base,
                            XMLGraph xmlsrc)
Description copied from interface: VariableAnalysisInterface
Transfer function for a SetStm.

Specified by:
transferSet in interface VariableAnalysisInterface<XMLGraph>

transferUnknown

public XMLGraph transferUnknown(UnknownStm s)
Description copied from interface: VariableAnalysisInterface
Transfer function for an UnknownStm.

Specified by:
transferUnknown in interface VariableAnalysisInterface<XMLGraph>

transferValidate

public XMLGraph transferValidate(ValidateStm s,
                                 XMLGraph base)
Description copied from interface: VariableAnalysisInterface
Transfer function for a ValidateStm.

Specified by:
transferValidate in interface VariableAnalysisInterface<XMLGraph>


Copyright © 2005-2011 Aarhus University.