Package org.mizartools.dli

Examples of org.mizartools.dli.Term


      org.mizartools.system.utility.AbstractSignature abstractSignature,
      LinkedList<org.mizartools.system.xml.Term> termList) throws DliException {
      LinkedList<Term> termDliList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term : termList){
        // FreeVar, LambdaVar, Const, InfConst, Num, PrivFunc, Fraenkel, Choice, QuaTrm, It
        Term termDli;
          if (term instanceof org.mizartools.system.xml.Func) {
        org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
          LinkedList<Term> term2List = getTermList(abstractSignature, ((org.mizartools.system.xml.Func)term).getTermList());
        if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
          if (func.getNr() == null) throw new DliException();
View Full Code Here


    vid2.setId(vid.getId());
    for (org.mizartools.system.xml.PartialDef partialDef : defMeaning.getPartialDefList()){
      partList.add(getPart(abstractSignature, partialDef, vid2));
    }
    Formula formula = getFormula(abstractSignature, defMeaning.getFormula(), vid2);
    Term term = getTerm(abstractSignature, defMeaning.getTerm(), vid2);
    ProperDefiniens properDefiniens = new ProperDefiniens(partList , formula, term);
    return properDefiniens;
  }
View Full Code Here

  static Term getTerm(AbstractSignature abstractSignature,
      org.mizartools.system.xml.Term term,
      VariableId vid) throws DliException {
    if (term == null) return null;
    Term termDli = null;
    if (term instanceof org.mizartools.system.xml.Var) {
      termDli = new Variable(((org.mizartools.system.xml.Var)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.LocusVar) {
      termDli = new LocusVar(((org.mizartools.system.xml.LocusVar)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.Func) {
      org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
      LinkedList<Term> termList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term1 : func.getTermList()) {
        termList.add(getTerm(abstractSignature, term1, vid));
      }
      if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
        if (func.getNr() == null) throw new DliException();
        termDli = new PrivateFunctor(func.getNr(), termList);
      } else {
        ItemId itemId = getItemId(abstractSignature, func.getKind(), func.getNr());
        termDli = new Func(itemId, termList);
      }
    } else if (term instanceof org.mizartools.system.xml.Choice) {
      termDli = new The(getType(abstractSignature, ((org.mizartools.system.xml.Choice)term).getTyp()));
    } else if (term instanceof org.mizartools.system.xml.Num) {
      termDli = new Num(((org.mizartools.system.xml.Num)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.Fraenkel) {
      org.mizartools.system.xml.Fraenkel fraenkel = (org.mizartools.system.xml.Fraenkel)term;
      LinkedList<Var> varList = new LinkedList<Var>();
      VariableId vid2 = new VariableId();
      vid2.setId(vid.getId());
      for (org.mizartools.system.xml.Typ typ : fraenkel.getTypList()) {
        vid2.increment();
        Variable variable = new Variable(vid2.getId());
        Type type = getType(abstractSignature, typ);
        varList.add(new Var(variable, type));
      }
      Term term1 = getTerm(abstractSignature, fraenkel.getTerm(), vid2);
      termDli = new Fraenkel(varList, term1, getFormula(abstractSignature, fraenkel.getFormula(), vid2));
    } else throw new DliException();
    return termDli;
  }
View Full Code Here

      org.mizartools.system.utility.AbstractSignature abstractSignature,
      org.mizartools.system.xml.FCluster fCluster)
    throws DliException {
    ArticleId articleId = new ArticleId(fCluster.getAid());
    Loci loci = Adapter.getLoci(abstractSignature, fCluster.getArgTypes());
    Term term = Adapter.getTerm(abstractSignature, fCluster.getTerm(), new VariableId());
    Type type = null;
    if (fCluster.getTyp() != null) type = Adapter.getType(abstractSignature, fCluster.getTyp());
    LinkedList<org.mizartools.system.xml.Cluster> clusterList = new LinkedList<org.mizartools.system.xml.Cluster>();
    if (fCluster.getCluster1() != null) clusterList.add(fCluster.getCluster1());
    if (fCluster.getCluster2() != null) clusterList.add(fCluster.getCluster2());
View Full Code Here

      LinkedList<Type> typeList = new LinkedList<Type>();
      for (org.mizartools.system.xml.Typ typ : reduction.getTypList()) {
      Type type = Adapter.getType(abstractSignature, typ);
        typeList.add(type);
      }
    Term term1 = Adapter.getTerm(abstractSignature, reduction.getTerm1(), new VariableId());
    Term term2 = Adapter.getTerm(abstractSignature, reduction.getTerm2(), new VariableId());
    ItemDefinition itemDefinition = new ReductionRegistration(loci, typeList, term1, term2);
    ItemId itemId = new ItemId(articleId, ItemType.redreg, reduction.getNr());
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
View Full Code Here

      org.mizartools.system.utility.AbstractSignature abstractSignature,
      LinkedList<org.mizartools.system.xml.Term> termList) throws DliException {
      LinkedList<Term> termDliList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term : termList){
        // FreeVar, LambdaVar, Const, InfConst, Num, PrivFunc, Fraenkel, Choice, QuaTrm, It
        Term termDli;
          if (term instanceof org.mizartools.system.xml.Func) {
        org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
          LinkedList<Term> term2List = getTermList(abstractSignature, ((org.mizartools.system.xml.Func)term).getTermList());
        if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
          if (func.getNr() == null) throw new DliException();
View Full Code Here

    vid2.setId(vid.getId());
    for (org.mizartools.system.xml.PartialDef partialDef : defMeaning.getPartialDefList()){
      partList.add(getPart(abstractSignature, partialDef, vid2));
    }
    Formula formula = getFormula(abstractSignature, defMeaning.getFormula(), vid2);
    Term term = getTerm(abstractSignature, defMeaning.getTerm(), vid2);
    ProperDefiniens properDefiniens = new ProperDefiniens(partList , formula, term);
    return properDefiniens;
  }
View Full Code Here

  static Term getTerm(AbstractSignature abstractSignature,
      org.mizartools.system.xml.Term term,
      VariableId vid) throws DliException {
    if (term == null) return null;
    Term termDli = null;
    if (term instanceof org.mizartools.system.xml.Var) {
      termDli = new Variable(((org.mizartools.system.xml.Var)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.LocusVar) {
      termDli = new LocusVar(((org.mizartools.system.xml.LocusVar)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.Func) {
      org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
      LinkedList<Term> termList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term1 : func.getTermList()) {
        termList.add(getTerm(abstractSignature, term1, vid));
      }
      if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
        if (func.getNr() == null) throw new DliException();
        termDli = new PrivateFunctor(func.getNr(), termList);
      } else {
        ItemId itemId = getItemId(abstractSignature, func.getKind(), func.getNr());
        termDli = new Func(itemId, termList);
      }
    } else if (term instanceof org.mizartools.system.xml.Choice) {
      termDli = new The(getType(abstractSignature, ((org.mizartools.system.xml.Choice)term).getTyp()));
    } else if (term instanceof org.mizartools.system.xml.Num) {
      termDli = new Num(((org.mizartools.system.xml.Num)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.Fraenkel) {
      org.mizartools.system.xml.Fraenkel fraenkel = (org.mizartools.system.xml.Fraenkel)term;
      LinkedList<Var> varList = new LinkedList<Var>();
      VariableId vid2 = new VariableId();
      vid2.setId(vid.getId());
      for (org.mizartools.system.xml.Typ typ : fraenkel.getTypList()) {
        vid2.increment();
        Variable variable = new Variable(vid2.getId());
        Type type = getType(abstractSignature, typ);
        varList.add(new Var(variable, type));
      }
      Term term1 = getTerm(abstractSignature, fraenkel.getTerm(), vid2);
      termDli = new Fraenkel(varList, term1, getFormula(abstractSignature, fraenkel.getFormula(), vid2));
    } else throw new DliException();
    return termDli;
  }
View Full Code Here

TOP

Related Classes of org.mizartools.dli.Term

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.