Examples of Op


Examples of bytecodeparser.analysis.opcodes.Op

  public void parse(OpHandler opHandler) throws BadBytecode {
    while(context.iterator.hasNext()) {
      if(stop)
        break;
      int index = context.iterator.next();
      Op op = Opcodes.OPCODES.get(context.iterator.byteAt(index)).init(context, index);
      opHandler.handle(op, index);
    }
  }
View Full Code Here

Examples of cartago.Op

//    @Requirements(
//        commitments = (Initiator.class, Participant.class, "propose", "accept OR reject")
//        )
    public void cfp(Task task) {
      try {
        doAction(this.getArtifactId(), new Op("cfp", task, getRoleId()));
      } catch (ActionFailedException e) {
        logger.error("Action CFP failed: "+e.getFailureMsg());
        e.printStackTrace();
      } catch (CartagoException e) {
        // TODO Auto-generated catch block
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        Var var_x = Var.alloc("x") ;
        Var var_z = Var.alloc("z") ;
       
        // ---- Build expression
        bp.add(new Triple(var_x, Node.createURI(BASE+"p"), var_z)) ;
        Op op = new OpBGP(bp) ;
        //Expr expr = ExprUtils.parse("?z < 2 ") ;
        Expr expr = new E_LessThan(new ExprVar(var_z), NodeValue.makeNodeInteger(2)) ;
        op = OpFilter.filter(expr, op) ;

        // ---- Example setup
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        // Parse
        Query query = QueryFactory.create(s) ;
        System.out.println(query) ;
       
        // Generate algebra
        Op op = Algebra.compile(query) ;
        op = Algebra.optimize(op) ;
        System.out.println(op) ;
       
        // Execute it.
        QueryIterator qIter = Algebra.exec(op, Ex1.createModel()) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        Triple t = new Triple(nodeVar, RDFS.label.asNode(), var2) ;
        bp.add(t) ;
        OpBGP op = new OpBGP(bp) ;
       
        Expr regex = new E_Regex(new ExprVar(var2.getName()), pattern, "i") ;
        Op filter = OpFilter.filter(regex, op) ;

        // ---- Evaluation
        if ( true )
        {
            // Use the reference query engine
            // Create a table for the input stream (so it uses working memory at this point,
            // which is why this is not the preferred way). 
            // Then join to expression for this stage.
            Table table = TableFactory.create(input) ;
            Op op2 = OpJoin.create(OpTable.create(table), filter) ;
            return Algebra.exec(op2, execCxt.getDataset()) ;
        }       
       
        // Use the default, optimizing query engine.
        return QC.execute(filter, input, execCxt) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        ElementGroup elementGroup = new ElementGroup() ;
        elementGroup.addElement(elementBGP) ;
        elementGroup.addElement(new ElementFilter(regex)) ;
        // Compile it.
        // The better design is to build the Op structure programmatically,
        Op op = Algebra.compile(elementGroup) ;
        op = Algebra.optimize(op, execCxt.getContext()) ;
        return QC.execute(op, input, execCxt) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

    { }
   
    @Override
    public Op transform(OpFilter opFilter, Op subOp)
    {
        Op op = apply(opFilter.getExprs(), subOp) ;
        if ( op == null )
            return super.transform(opFilter, subOp) ;
        return op ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        List<Pair<Var, NodeValue>> equalities = p.getLeft() ;
        Collection<Var> varsMentioned = varsMentionedInEqualityFilters(equalities) ;
        ExprList remaining = p.getRight() ;
       
        // ---- Check if the subOp is the right shape to transform.
        Op op = subOp ;
       
        // Special case : deduce that the filter will always "eval unbound"
        // hence elimate all rows.  Return the empty table.
       
        if ( testSpecialCaseUnused(subOp, equalities, remaining))
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

            // If the varsLeft are disjoint from assigned vars,
            // we may be able to push assign down right
            // (this generalises the unit table case specialcase1)
            // Needs more investigation.
           
            Op opLeft = opleftjoin.getLeft() ;
            Set<Var> varsLeft = OpVars.patternVars(opLeft) ;
            if ( varsLeft.containsAll(varsEquality) )
                return true ;
            return false ;
        }       
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.Op

        List<Op> ops2 = new ArrayList<Op>() ;
        Collection<Var> vars = varsMentionedInEqualityFilters(equalities) ;
       
        for ( Op op : ops )
        {
            Op op2 = op ;
            if ( safeToTransform(vars, op) )
            {
                for ( Pair<Var, NodeValue> p : equalities )
                        op2 = processFilterWorker(op, p.getLeft(), p.getRight()) ;
            }
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.