se.chalmers.cs.gf.gfcutil
Class LinRule

java.lang.Object
  extended by se.chalmers.cs.gf.gfcutil.LinRule
All Implemented Interfaces:
java.io.Serializable, Definition

public class LinRule
extends java.lang.Object
implements Definition, java.io.Serializable

Contains the linearization rule for a function.

See Also:
Serialized Form

Constructor Summary
LinRule(java.lang.String name, se.chalmers.cs.gf.GFC.Absyn.ListArgVar param, se.chalmers.cs.gf.GFC.Absyn.Term term)
          Construct a linearization rule.
 
Method Summary
 int getArity()
          Get the number of arguments that this linearization rule takes (the same the number of arguments to the corresponing function).
 java.lang.String getName()
          Get the name of the function which is lineatized.
 se.chalmers.cs.gf.GFC.Absyn.Term getTerm()
          Get the linearization rule body.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinRule

public LinRule(java.lang.String name,
               se.chalmers.cs.gf.GFC.Absyn.ListArgVar param,
               se.chalmers.cs.gf.GFC.Absyn.Term term)
Construct a linearization rule.

Parameters:
name - The name of the function which this rule is for.
param - The formal arguments of the function.
term - The body of the function, as a GF term.
Method Detail

getName

public java.lang.String getName()
Get the name of the function which is lineatized.

Specified by:
getName in interface Definition

getTerm

public se.chalmers.cs.gf.GFC.Absyn.Term getTerm()
Get the linearization rule body.


getArity

public int getArity()
Get the number of arguments that this linearization rule takes (the same the number of arguments to the corresponing function).


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object