com.inxar.syntacs.automaton.pushdown
Class SCCTransitiveClosure

java.lang.Object
  |
  +--com.inxar.syntacs.automaton.pushdown.SCCTransitiveClosure
All Implemented Interfaces:
Algorithm

public class SCCTransitiveClosure
extends Object
implements Algorithm

This is originally from Eve J, Kurki-Suonio R On Computing the Transitive Closure of a Relation" Acta Inf. 8 (1977), 303-314; modified for use in LALR set determination by DeRemer/Penello DeRemer F, Penello T "Efficient Computation of LALR(1) Look-Ahead Sets" ACM-TOPLAS vol.4, no.4 (Oct 1982) 615-649. Alternative explanation can be found in "The Theory and Practice of Compiler Writing", Tremblay/Sorenson p.382.


Inner Class Summary
static class SCCTransitiveClosure.NonTrivialSCCException
           
 
Constructor Summary
SCCTransitiveClosure(IntSet vertices, IntRelation relation, IntRelation input, IntRelation output)
          Constructs the SCCTransitiveClosure on the given raw IntSet of vertices, the IntRelation which implies the edges which connect those vertices, the IntRelation which holds the IntSet of values at each vertex, and the IntRelation where the output IntSet of values should be put.
 
Method Summary
 void evaluate()
          Evaluates the Algorithm, possibly throwing an AlgorithmException along the way.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCCTransitiveClosure

public SCCTransitiveClosure(IntSet vertices,
                            IntRelation relation,
                            IntRelation input,
                            IntRelation output)
Constructs the SCCTransitiveClosure on the given raw IntSet of vertices, the IntRelation which implies the edges which connect those vertices, the IntRelation which holds the IntSet of values at each vertex, and the IntRelation where the output IntSet of values should be put.
Method Detail

evaluate

public void evaluate()
              throws SCCTransitiveClosure.NonTrivialSCCException
Description copied from interface: Algorithm
Evaluates the Algorithm, possibly throwing an AlgorithmException along the way.
Specified by:
evaluate in interface Algorithm