Package edu.mit.csail.sdg.alloy4

Examples of edu.mit.csail.sdg.alloy4.Pos.merge()


   /** Returns the formula (lone...| this)
    * <p> this must be a formula
    */
   public final Expr forLone(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.LONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }

   /** Returns the formula (one ...| this)
    * <p> this must be a formula
View Full Code Here


        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, null , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

   /** Returns the formula (one ...| this)
    * <p> this must be a formula
    */
   public final Expr forOne(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.ONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }

   /** Returns the formula (some...| this)
    * <p> this must be a formula
View Full Code Here

        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-7)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        List<Decl> d = (List<Decl>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, d    , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

   /** Returns the formula (some...| this)
    * <p> this must be a formula
    */
   public final Expr forSome(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SOME.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }

   /** Returns the comprehension expression {...|this}
    * <p> this must be a formula
View Full Code Here

    * <p> this must be a formula
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr comprehensionOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.COMPREHENSION.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }

   /** Returns the integer (sum...| this)
    * <p> this must be an integer expression
View Full Code Here

        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-7)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        List<Decl> d = (List<Decl>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, d    , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

    * <p> this must be an integer expression
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr sumOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SUM.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }

   /** Return the multiplicity expression "some this"
    * <p> this must be already fully typechecked, and must be a unary set
View Full Code Here

              Object RESULT =null;
        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, null  , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

              Object RESULT =null;
        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, null  , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
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.