Package PrologPlusCG.prolog

Examples of PrologPlusCG.prolog.PrologDataIndexPair


  }
 
  // ------------------------------------------------------------------
  boolean sameNameRel(PrologData rla1, int niv1, PrologData rla2,
      int niv2) throws ExecException {
    PrologDataIndexPair valIndLeft = env.unification.valueFromUnifStack(rla1, niv1);
    PrologDataIndexPair valIndRight = env.unification.valueFromUnifStack(rla2, niv2);
   
    if ((valIndLeft.pData == null) || (valIndRight.pData == null)) {
      throw new ExecException(
      "Error: for CG operations, relations should have specific values\nand not be free variables.");
    }
View Full Code Here


              }
            }
           
            Relation Rp = new Relation();
           
            PrologDataIndexPair ValRel1 = env.unification.valueFromUnifStack(rel1.m_pdRelationName, niv1);
            Rp.m_pdRelationName = new PrologData(uIdentifier,ValRel1.pData.data);
            ValRel1 = null;
           
            if (BranchDirection == e_inComeBranch) {
              Rp.m_concSource = Ca3;
View Full Code Here

  Concept addConc(int N, Concept C, int niv, CG Gt) throws ExecException {
    //Concept Cp = C.Copie();
    Concept Cp = null;
   
    if (C.m_pdType == null) {
      PrologDataIndexPair ValRef = env.unification.valueFromUnifStack(C.m_pdReferent, niv);
     
      if (ValRef.pData == null) {
        throw new ExecException(
        "Error: The concept to be added should be a specific concept, not a free variable.");
      } else {
View Full Code Here

  }
 
  // ------------------------------------------------------------------
  void addRel(int N, Concept CP, Relation R, int niv, Concept CF, CG Gt) {
    Relation Rp = new Relation();
    PrologDataIndexPair ValRel = env.unification.valueFromUnifStack(R.m_pdRelationName, niv);
    String sRel = (String) ValRel.pData.data;
    Rp.m_pdRelationName = new PrologData(uIdentifier, sRel);
   
    Rp.m_concSource = CP;
    Rp.m_concDestination = CF;
View Full Code Here

  // ------------------------------------------------------------------
  boolean matchType(byte OperCG, PrologData Type1, int level1,
      PrologData Type2, int level2, Concept C3) throws ExecException {
    String Type3 = null;
    boolean bResult = false;
    PrologDataIndexPair valIndLeft = env.unification.valueFromUnifStack(Type1, level1);
    PrologDataIndexPair valIndRight = env.unification.valueFromUnifStack(Type2, level2);
   
    if ((valIndLeft.pData == null) || (valIndRight.pData == null)) {
      throw new ExecException(
      "Error: for CG operations, types shoud have specific values.");
    } else {
View Full Code Here

   
    if (!bResult) {
      return bResult;
    }
   
    PrologDataIndexPair valIndLeft;
   
    if (Ref1 != null) {
      valIndLeft = env.unification.valueFromUnifStack(Ref1, niv1);
    } else {
      valIndLeft = null;
    }
   
    PrologDataIndexPair valIndRight;
   
    if (Ref2 != null) {
      valIndRight = env.unification.valueFromUnifStack(Ref2, niv2);
    } else {
      valIndRight = null;
View Full Code Here

 
  // ------------------------------------------------------------------
  boolean matchValue(byte OperCG, PrologData Val1, int level1,
      PrologData Val2, int level2, Concept C3) throws ExecException {
    boolean bResult = true;
    PrologDataIndexPair valIndLeft;
   
    if (Val1 != null) {
      valIndLeft = env.unification.valueFromUnifStack(Val1, level1);
    } else {
      valIndLeft = null;
    }
   
    PrologDataIndexPair valIndRight;
   
    if (Val2 != null) {
      valIndRight = env.unification.valueFromUnifStack(Val2, level2);
    } else {
      valIndRight = null;
View Full Code Here

        return nouvConc;
    }

  public Concept copyValue(int level) {
        Concept newConcept = new Concept(env);
        PrologDataIndexPair ValType = env.unification.valueFromUnifStack(m_pdType, level);
        newConcept.m_pdType = ValType.pData.myCopy();

        if (m_pdReferent != null) {
            PrologDataIndexPair ValRef = env.unification.valueFromUnifStack(m_pdReferent, level);

            if (ValRef.pData != null) {
                newConcept.m_pdReferent = ValRef.pData.myCopy();
            }
        }

        if (m_pdValue != null) {
            PrologDataIndexPair ValVal = env.unification.valueFromUnifStack(m_pdValue, level);

            if (ValVal.pData != null) {
                newConcept.m_pdValue = ValVal.pData.myCopy();
            }
        }
View Full Code Here

TOP

Related Classes of PrologPlusCG.prolog.PrologDataIndexPair

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.