ConForM.CoopnTools.CoKer.CoopnTest.Cons2Logic
Class Cons2Logic

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnTest.Cons2Logic.Cons2Logic

public class Cons2Logic
extends java.lang.Object

Translation class, from Constraints syntactic modules to prolog (Logic Engine syntax) No constructor, only one method, translate.


Constructor Summary
Cons2Logic(CoopnWorkspace spec, ConstraintsMgr mgr, ConsEnv env, ConstraintsTranslationStrategy strategy)
          Constructor with two parameters, a CoopnMgr and a CoopnEnv.
 
Method Summary
 java.io.File translateModule(java.lang.String moduleName)
          Translation method.
 LogicParamAtom unfoldAssignation(ConstraintExpr name, ConstraintExpr expr)
           
 LogicParamAtom unfoldAtom(ConstraintAtom a)
           
 LogicParamAtom unfoldCondition(ConstraintCond cond)
           
 LogicTerm unfoldExpression(ConstraintExpr expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cons2Logic

public Cons2Logic(CoopnWorkspace spec,
                  ConstraintsMgr mgr,
                  ConsEnv env,
                  ConstraintsTranslationStrategy strategy)
Constructor with two parameters, a CoopnMgr and a CoopnEnv.
Parameters:
mgr - the coopnMgr
env - the coopnEnv
Method Detail

translateModule

public java.io.File translateModule(java.lang.String moduleName)
Translation method. Translates ConstraintsModule into Logic.
Parameters:
moduleName - the string corresponding to the module name
Returns:
a File handle on the prolog file

unfoldCondition

public LogicParamAtom unfoldCondition(ConstraintCond cond)

unfoldAssignation

public LogicParamAtom unfoldAssignation(ConstraintExpr name,
                                        ConstraintExpr expr)

unfoldAtom

public LogicParamAtom unfoldAtom(ConstraintAtom a)

unfoldExpression

public LogicTerm unfoldExpression(ConstraintExpr expr)