Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangList.elementAt()


                ignoredBehaviours.add(bstring);
                System.out.println("Warning: unknown behaviour "+bstring);
              }
            }
            else
              throw new IllegalArgumentException("behaviour attribute " + behList.elementAt(i)
                  + " is of the wrong type");
             
         
        } else
          throw new IllegalArgumentException("behaviour attribute " + value
View Full Code Here


    progress.next();// 6

    sigTypes = new TreeMap<String,OtpErlangTuple>();
    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
View Full Code Here

    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
        FuncSignature s = new FuncSignature(config,functionDescr, null);
        sigTypes.put(s.getQualifiedName(), functionDescr);
        //sigs.put(s.getQualifiedName(), s);
View Full Code Here

       
        if (tail instanceof OtpErlangList)
        {// merge this into the current list.
          OtpErlangList tailAsList = (OtpErlangList)tail;
          for(int i=0;i<tailAsList.arity();++i)
            listComponents.add(tailAsList.elementAt(i));
          tail = tailAsList.getLastTail();
        }
      }
     
      OtpErlangList outcome = null;
View Full Code Here

      throw new IllegalArgumentException("unknown Erlang response " + outcome);
    }
    OtpErlangList trace = (OtpErlangList) result.elementAt(2);
    ErlangLabel[] answerDetails = new ErlangLabel[trace.arity()];
    for (int i = 0; i < trace.arity(); ++i) {
      OtpErlangTuple elemAti = (OtpErlangTuple) trace.elementAt(i);
      if (elemAti.arity() < 2 || elemAti.arity() > 3)
        throw new IllegalArgumentException("received tuple " + elemAti
            + " of invalid arity");
      if (elemAti.arity() == 3) {
        if (config.getUseErlangOutputs()) {
View Full Code Here

            new OtpErlangAtom("types")
          },
        "Could not run typer");
       OtpErlangList analysisResults = (OtpErlangList)response.elementAt(1);
        Assert.assertEquals(1,analysisResults.arity());
        OtpErlangTuple fileDetails = (OtpErlangTuple)analysisResults.elementAt(0);
        OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
        for(int i=0;i<typeInformation.arity();++i)
        {
          FuncSignature s = new FuncSignature(typeInformation.elementAt(i));
          sigs.put(s.toString(), s);
View Full Code Here

        Assert.assertEquals(1,analysisResults.arity());
        OtpErlangTuple fileDetails = (OtpErlangTuple)analysisResults.elementAt(0);
        OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
        for(int i=0;i<typeInformation.arity();++i)
        {
          FuncSignature s = new FuncSignature(typeInformation.elementAt(i));
          sigs.put(s.toString(), s);
        }

        BufferedReader input = new BufferedReader(new FileReader(f));
        String line = input.readLine();
View Full Code Here

    for(int i=0;i<knownScores.arity();++i)
    {
      OtpErlangList listA=(OtpErlangList)knownScores.elementAt(i), listB= (OtpErlangList)value.elementAt(i);
      Assert.assertEquals(listA.arity(),listB.arity());
      for(int elem=0;elem<listA.arity();++elem)
        Assert.assertEquals(((OtpErlangDouble)listA.elementAt(elem)).doubleValue(),((OtpErlangDouble)listB.elementAt(elem)).doubleValue(),Configuration.fpAccuracy);
    }
  }
}
View Full Code Here

    }
    progress.next();// 6

    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      //System.out.print("\n" + typeInformation.elementAt(i).toString());
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
View Full Code Here

    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      //System.out.print("\n" + typeInformation.elementAt(i).toString());
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
        FuncSignature s = new FuncSignature(config,typeInformation.elementAt(i), null);
        sigs.put(s.getQualifiedName(), s);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.