Ejemplo n.º 1
0
void Master::integrateIntoBackDemIndexFromQueue()
{
    CALL("integrateIntoBackDemIndexFromQueue()");
    ASSERT(!_backwardDemodulationSemaphore);
    Clause* cl;
    while (_queueForIntegrationIntoBackwardDemodIndex.dequeue(cl))
    {
        ASSERT(cl->flag(Clause::FlagInQueueForIntegrationIntoBackwardDemodIndex));
        ASSERT(cl->mainSet() == Clause::MainSetPassive);
        cl->clearFlag(Clause::FlagInQueueForIntegrationIntoBackwardDemodIndex);
        integrateIntoBackDemodulationIndex(cl);
    };
}; // void Master::integrateIntoBackDemIndexFromQueue()
Ejemplo n.º 2
0
void Master::processCollectedInputQuery0()
{
    CALL("processCollectedInputQuery0()");
    Clause* newClause;

    switch (_continuation)
    {
    case Continuation_Init:
        break;
    case Continuation_InputQueryClause0_ProcessCollectedInput:
    // same as below
    case Continuation_EliminateDefinitions_ProcessCollectedInput:
        goto process_next_retained_clause;
    default:
        ICP("ICP0");
        RuntimeError::report("Bad _continuation in VK::Master::processCollectedInputQuery0()");
    };


    if (_parameters.outputStreamForGenerated)
        _freshClause.output(*_parameters.outputStreamForGenerated << "% GEN "
                            << statNumOfGeneratedCl() << ' ') << '\n';
    _freshClause.ProcessCollected(_retainedNewClauses);

process_next_retained_clause:
    while (_retainedNewClauses.dequeue(newClause))
    {
        ASSERT(newClause->mainSet() == Clause::MainSetNew);

        if (newClause->isAnswer())
        {
            rememberAnswer0(newClause);
            _proof = newClause;
            return;
        };
        _continuation = Continuation_Init;

        makePassive0(newClause);
        if (_parameters.backward_subsumption) backSubsumeBy(newClause);
        if (_parameters.backward_demodulation > 0)
        {
            ASSERT(!newClause->flag(Clause::FlagInQueueForBackSimplification));
            _queueForBackSimplification.enqueue(newClause);
            newClause->setFlag(Clause::FlagInQueueForBackSimplification);
        };
        integratePassive(newClause);
    };
    ASSERT(_retainedNewClauses.empty());
}; // void Master::processCollectedInputQuery0()
Ejemplo n.º 3
0
void Master::processCollected0()
{
    CALL("processCollected0()");
    Clause* newClause;
    switch (_continuation)
    {
    case Continuation_Init:
        break;
    case Continuation_InputQueryClause0_BackSimplify:
    // same as below
    case Continuation_EliminateDefinitions_BackSimplify:
    // same as below
    case Continuation_MainLoop0_ProcessNewInference:
    // same as below
    case Continuation_MainLoop0_BackSimplify:
        goto process_retained;
    default:
        ICP("ICP0");
        RuntimeError::report("Bad _continuation in VK::Master::processCollected0()");
    };

    if (_parameters.outputStreamForGenerated) _freshClause.output(*_parameters.outputStreamForGenerated << "% GEN " << statNumOfGeneratedCl() << ' ') << '\n';
    _freshClause.ProcessCollected(_retainedNewClauses);


process_retained:
    while (_retainedNewClauses.dequeue(newClause))
    {

        ASSERT(newClause->mainSet() == Clause::MainSetNew);
        if (newClause->isAnswer())
        {
            rememberAnswer0(newClause);
            _proof = newClause;
            return;
        };

        _continuation = Continuation_Init;

        makePassive0(newClause);
        if (newClause->weight() > _parameters.maxWeight)
        {

            enqueueForDisposal(newClause);
            _statRecycled++;

        }
        else
        {
            if (_parameters.backward_subsumption)
                if (backSubsumeBy(newClause))
                    if (_parameters.orphan_murder)
                        killActiveOrphans0();

            if (_parameters.backward_demodulation > 0)
            {
                ASSERT(!newClause->flag(Clause::FlagInQueueForBackSimplification));

                _queueForBackSimplification.enqueue(newClause);

                newClause->setFlag(Clause::FlagInQueueForBackSimplification);
            };

            integratePassive(newClause);

            eliminateAllocationBufferDeficit0();
        };
    };
}; // void Master::processCollected0()