Implements the "Evaluating operations" section of the spec.
6919
protected static function executeOperation(ExecutionContext $context, $root, OperationDefinition $operation)
    {
        $type = self::getOperationRootType($context->schema, $operation);
        $fields = self::collectFields($context, $type, $operation->get('selectionSet'), new \ArrayObject(), new \ArrayObject());
        if ($operation->get('operation') === 'mutation') {
            return self::executeFieldsSerially($context, $type, $root, $fields->getArrayCopy());
        }

        return self::executeFields($context, $type, $root, $fields);
    }
46309
public boolean evaluate(Object context){
		switch (operatorType){
		case OPERATOR_AND:
			for (BooleanExpression e: children){
				if (e.evaluate(context) == false){
					return false;
				}
			}
			return true;
		case OPERATOR_OR:
			for (BooleanExpression e: children){
				if (e.evaluate(context) == true){
					return true;
				}
			}
			return false;
		case OPERATOR_NOT:
			if (children.size() != 1){
				throw new UnsupportedOperationException("One and only one operand is allowed for NOT operator.");
			}
			BooleanExpression e = children.get(0);
			return !e.evaluate(context);
		default:
			throw new UnsupportedOperationException("Operand should implement its own evaluation method.");
		}
	}
801756
public void setOperations(java.util.Collection<Operation> operations) {
        if (operations == null) {
            this.operations = null;
            return;
        }

        this.operations = new java.util.ArrayList<Operation>(operations);
    }
690314
def evaluate(self, m):
        """"""

        g = m.groupdict()
        if g["strings"]:
            self.line_num += g['strings'].count('\n')
        elif g["code"]:
            self.line_num += g["code"].count('\n')
        else:
            if g['block']:
                self.evaluate_block(g)
            elif self.stylesheets != CSS:
                if g['start'] is None:
                    self.evaluate_inline_tail(g)
                else:
                    self.evaluate_inline(g)
            self.line_num += g['comments'].count('\n')
45385
private List applyOperationAndCheck(Operation op, MithraTransaction tx)
    {
        boolean oldEvaluationMode = tx.zIsInOperationEvaluationMode();
        List resultList = null;
        try
        {
            tx.zSetOperationEvaluationMode(true);
            if (this.isPureHome() || (!this.isOperationPartiallyCached(op) && !this.txParticipationRequired(tx, op)))
            {
                resultList = this.resolveOperationOnCache(op);
            }
            else
            {
                resultList = op.applyOperationToPartialCache();
                if (resultList == null && !this.isOperationPartiallyCached(op) && this.getTxParticipationMode(tx).mustParticipateInTxOnRead())
                {
                    // attempt to find what we have in cache to trigger waiting for potential other transactions
                    List untrustworthyResult = op.applyOperationToFullCache();
                    checkTransactionParticipationAndWaitForOtherTransactions(untrustworthyResult, tx);
                }
                resultList = checkTransactionParticipationAndWaitForOtherTransactions(resultList, tx);
            }
        }
        finally
        {
            tx.zSetOperationEvaluationMode(oldEvaluationMode);
        }
        if (this.isPureHome())
        {
            checkTransactionParticipationForPureObject(resultList, tx);
        }
        return resultList;
    }
809803
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSInt cmd_index_validator = new MPSInt();
		cmd_index_validator.validate(operationType, cmd_index, "\"cmd_index\"");
		
		MPSString command_validator = new MPSString();
		command_validator.validate(operationType, command, "\"command\"");
		
	}
659232
def run_evaluate(self, *args, **kwargs) -> None:
        
        if self._needs_evaluation:
            for _, item in self._nested_items.items():
                item.run_evaluate()
916921
def evaluate_feature_performance(project, force=False):
    """"""
    if not force and not project.on_pr():
        raise SkippedValidationTest('Not on PR')

    out = project.build()
    X_df, y, features = out['X_df'], out['y'], out['features']

    proposed_feature = get_proposed_feature(project)
    accepted_features = get_accepted_features(features, proposed_feature)
    evaluator = GFSSFAcceptanceEvaluator(X_df, y, accepted_features)
    accepted = evaluator.judge(proposed_feature)

    if not accepted:
        raise FeatureRejected
935702
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSInt polling_interval_validator = new MPSInt();
		polling_interval_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 1);
		polling_interval_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 1000);
		polling_interval_validator.validate(operationType, polling_interval, "\"polling_interval\"");
		
		MPSString interval_unit_validator = new MPSString();
		interval_unit_validator.validate(operationType, interval_unit, "\"interval_unit\"");
		
	}
311118
private void processSkippedOperations(final List<OP> shouldskip) {
        for (final OP operation : shouldskip) {
            workflowEngine.event(
                    WorkflowSystemEventType.WillSkipOperation,
                    String.format("Skip condition statisfied for operation: %s, skipping", operation),
                    operation
            );
            StateObj newstate = operation.getSkipState(workflowEngine.getState());
            WorkflowSystem.OperationCompleted<DAT> objectOperationCompleted = WorkflowEngine.dummyResult(newstate);
            stateChangeQueue.add(objectOperationCompleted);
        }
    }
95048
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSInt core_number_validator = new MPSInt();
		core_number_validator.validate(operationType, core_number, "\"core_number\"");
		
		MPSInt cpu_validator = new MPSInt();
		cpu_validator.validate(operationType, cpu, "\"cpu\"");
		
		MPSString hyper_threads_validator = new MPSString();
		hyper_threads_validator.validate(operationType, hyper_threads, "\"hyper_threads\"");
		
		MPSString instances_validator = new MPSString();
		instances_validator.validate(operationType, instances, "\"instances\"");
		
		MPSDouble avg_usage_validator = new MPSDouble();
		avg_usage_validator.validate(operationType, avg_usage, "\"avg_usage\"");
		
	}
1294665
def evaluate(actual, expected)
      if actual.include?(expected)
        pass new_message.includes(expected)
      else
        fail expected_message(actual).to_include(expected)
      end
    end
154103
def evaluate(self):
        """"""
        if DEVELOP:
            internal_assert(not self.been_called, "inefficient reevaluation of action " + self.name + " with tokens", self.tokens)
            self.been_called = True
        evaluated_toks = evaluate_tokens(self.tokens)
        if logger.tracing:  # avoid the overhead of the call if not tracing
            logger.log_trace(self.name, self.original, self.loc, evaluated_toks, self.tokens)
        try:
            return _trim_arity(self.action)(
                self.original,
                self.loc,
                evaluated_toks,
            )
        except CoconutException:
            raise
        except (Exception, AssertionError):
            traceback.print_exc()
            raise CoconutInternalException("error computing action " + self.name + " of evaluated tokens", evaluated_toks)
597390
public final void evaluate() throws IOException {
    final SequenceLabelerEvaluator evaluator = new SequenceLabelerEvaluator(this.corpusFormat,
        this.sequenceLabeler);
    evaluator.evaluate(this.testSamples);
    System.out.println(evaluator.getFMeasure());
  }
69521
void acceptOperation(UpdateAttributesOperation operation) {
        ensureSegmentId(operation);
        acceptAttributes(operation.getAttributeUpdates());
        this.isChanged = true;
    }
209558
private boolean evaluateLogicalOperator(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
   {
      boolean result = false;

      if (m_criteriaList.size() == 0)
      {
         result = true;
      }
      else
      {
         for (GenericCriteria criteria : m_criteriaList)
         {
            result = criteria.evaluate(container, promptValues);
            if ((m_operator == TestOperator.AND && !result) || (m_operator == TestOperator.OR && result))
            {
               break;
            }
         }
      }

      return result;
   }
781024
def evaluate(instance, *args, &block)
      cleanroom.new(instance).instance_eval(*args, &block)
    end