sdr 0.21

net.cscott.sdr.calls.transform
Class Elaborate

java.lang.Object
  extended by net.cscott.sdr.calls.transform.TransformVisitor<Formation>
      extended by net.cscott.sdr.calls.transform.Elaborate

public class Elaborate
extends TransformVisitor<Formation>

The Elaborate class does formation evaluation to eliminate Opt elements in the call tree and identify the dancers in Pars. It inserts Warp elements as needed. The result is a 'simplified tree'.

Version:
$Id: Elaborate.java,v 1.5 2006-10-30 03:58:09 cananian Exp $
Author:
C. Scott Ananian

Method Summary
 List<ParCall> doOptCall(OptCall oc, Formation f)
           
static Comp elaborate(DanceState ds, Formation f, Comp c, boolean doFully)
           
 SeqCall visit(Apply a, Formation f)
          Expand any 'Apply' node we come to.
 Comp visit(If iff, Formation f)
           
 OptCall visit(OptCall oc, Formation f)
           
 Comp visit(Opt opt, Formation f)
          Go through list of possible formations, and pick the first one which works.
 ParCall visit(ParCall pc, Formation f)
          Select the given dancers in the formation, and evaluate the child.
 Comp visit(Par p, Formation _f)
          For each select clause, rephrase using 'primitive' tags.
 Comp visit(Warped w, Formation f)
          A little optimization: for pairs of Warps, compose them into one node.
 
Methods inherited from class net.cscott.sdr.calls.transform.TransformVisitor
visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

elaborate

public static Comp elaborate(DanceState ds,
                             Formation f,
                             Comp c,
                             boolean doFully)

visit

public SeqCall visit(Apply a,
                     Formation f)
Expand any 'Apply' node we come to.

Overrides:
visit in class TransformVisitor<Formation>

visit

public Comp visit(If iff,
                  Formation f)
Overrides:
visit in class TransformVisitor<Formation>

visit

public Comp visit(Opt opt,
                  Formation f)
Go through list of possible formations, and pick the first one which works. Generate SELECT and WARP nodes to pull out the subformations.

Overrides:
visit in class TransformVisitor<Formation>

doOptCall

public List<ParCall> doOptCall(OptCall oc,
                               Formation f)

visit

public OptCall visit(OptCall oc,
                     Formation f)
Overrides:
visit in class TransformVisitor<Formation>

visit

public Comp visit(Par p,
                  Formation _f)
For each select clause, rephrase using 'primitive' tags. Ensure that every selected dancer matches one of the clauses.

Overrides:
visit in class TransformVisitor<Formation>

visit

public ParCall visit(ParCall pc,
                     Formation f)
Select the given dancers in the formation, and evaluate the child.

Overrides:
visit in class TransformVisitor<Formation>

visit

public Comp visit(Warped w,
                  Formation f)
A little optimization: for pairs of Warps, compose them into one node.

Overrides:
visit in class TransformVisitor<Formation>

sdr 0.21

Copyright (c) 2006 C. Scott Ananian