Package statechum.analysis.Erlang.Signatures

Examples of statechum.analysis.Erlang.Signatures.AnySignature


      for(EXPANSIONOFANY value:expansionValues)
      {
        Configuration conf = config.copy();conf.setErlangAlphabetAnyElements(value);
        StringBuffer alphabetValues = new StringBuffer();
        boolean first = true;
        for(OtpErlangObject obj:new AnySignature(conf, new OtpErlangList()).instantiateAllAlts())
        {
          if (first) first = false;else alphabetValues.append(", ");
          alphabetValues.append(obj.toString());
        }
        String expansionValue = alphabetValues.toString();
View Full Code Here


      for(EXPANSIONOFANY value:expansionValues)
      {
        Configuration conf = config.copy();conf.setErlangAlphabetAnyElements(value);
        StringBuffer alphabetValues = new StringBuffer();
        boolean first = true;
        for(OtpErlangObject obj:new AnySignature(conf, new OtpErlangList()).instantiateAllAlts())
        {
          if (first) first = false;else alphabetValues.append(", ");
          alphabetValues.append(obj.toString());
        }
        String expansionValue = alphabetValues.toString();
View Full Code Here

        //System.out.flush();
        Signature sig;
        String spec = specbuf.toString();
        if (spec.startsWith("_")) {
            specbuf.delete(0, 1);
            sig = new AnySignature(new OtpErlangList());
        } else if (spec.matches("^[0-9].*")) {
            // Integer literal
            // Floats are not supported atm...
            String val = "";
            while ((specbuf.length() > 0) && (specbuf.substring(0, 1).matches("[0-9]"))) {
                val += "" + specbuf.substring(0, 1);
                specbuf.delete(0, 1);
            }
            // handle ranges...
            if (specbuf.toString().startsWith("..")) {
                int lowerValue = Integer.parseInt(val);
                specbuf.delete(0, 2);
                val = "";
                while ((specbuf.length() > 0) && (specbuf.substring(0, 1).matches("[0-9]"))) {
                    val += "" + specbuf.substring(0, 1);
                    specbuf.delete(0, 1);
                }
                int upperValue = Integer.parseInt(val);
                sig = new IntSignature(new OtpErlangList(),new OtpErlangList(new OtpErlangObject[]{
                    new OtpErlangInt(lowerValue),new OtpErlangInt(upperValue)
                }));

            } else {
                sig = new LiteralSignature(val);
            }
        } else if (spec.startsWith("any()")) {
            specbuf.delete(0, 5);
            sig = new AnySignature(new OtpErlangList());
        } else if (spec.startsWith("integer()")) {
            specbuf.delete(0, 9);
            sig = new IntSignature(new OtpErlangList());
        } else if (spec.startsWith("non_neg_integer()")) {
            specbuf.delete(0, 17);
View Full Code Here

TOP

Related Classes of statechum.analysis.Erlang.Signatures.AnySignature

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.