Exemplo n.º 1
0
// Call
void Executor::ExecuteInst3(Instruction *i, Value *val1,
                            Value *val2, Value *val3) {

    assert(i && "Expecting an instruction!");
    assert((val1 && val2 && val3) && "Expecting values!");
    assert(status==START && "Wrong status for Executor (!=START)!");
    ExprPtr expr = NULL;
    switch (i->getOpcode()) {
        case Instruction::Select:
            // Select
            executeSelect(i, val1, val2, val3);
            if (!DisabledSymbolicExe) {
                expr = PathEncoder->encode(cast<SelectInst>(i));
            }
            break;
        case Instruction::Call:
            // Call type foo(arg) / void foo(arg1,arg2)
        default:    
            assert("test-executor");
    }
    if (expr && !DisabledSymbolicExeCurRun) {
        expr->setHard();
        PathFormula->add(expr);
    }
}
Exemplo n.º 2
0
	SEQUENCE_INTERRUPTION_LIST GrfSelect::executeInternal(DtaScriptVariable& visibility) {
		SEQUENCE_INTERRUPTION_LIST result = NO_INTERRUPTION;
		std::list<DtaScriptVariable*> listOfNodes;
		_pMotifExpr->filterNodes(visibility, visibility, listOfNodes);
		if (!listOfNodes.empty()) {
			DtaScriptVariable stackSelect(&visibility, "##stack## select");
			stackSelect.createIterator(_pIndexExpr->getName().c_str(), &_pArrayIteratorData);
			result = executeSelect(listOfNodes, stackSelect);
			if (result == BREAK_INTERRUPTION) result = NO_INTERRUPTION;
		}
		return result;
	}