| 2818 | } |
| 2819 | |
| 2820 | PiecewiseLinearConstraint *Engine::pickSplitPLConstraint( DivideStrategy strategy ) |
| 2821 | { |
| 2822 | ENGINE_LOG( Stringf( "Picking a split PLConstraint..." ).ascii() ); |
| 2823 | |
| 2824 | PiecewiseLinearConstraint *candidatePLConstraint = NULL; |
| 2825 | if ( strategy == DivideStrategy::PseudoImpact ) |
| 2826 | { |
| 2827 | if ( _smtCore.getStackDepth() > 3 ) |
| 2828 | candidatePLConstraint = _smtCore.getConstraintsWithHighestScore(); |
| 2829 | else if ( !_preprocessedQuery->getInputVariables().empty() && |
| 2830 | _preprocessedQuery->getInputVariables().size() < |
| 2831 | GlobalConfiguration::INTERVAL_SPLITTING_THRESHOLD ) |
| 2832 | candidatePLConstraint = pickSplitPLConstraintBasedOnIntervalWidth(); |
| 2833 | else |
| 2834 | { |
| 2835 | candidatePLConstraint = pickSplitPLConstraintBasedOnPolarity(); |
| 2836 | if ( candidatePLConstraint == NULL ) |
| 2837 | candidatePLConstraint = _smtCore.getConstraintsWithHighestScore(); |
| 2838 | } |
| 2839 | } |
| 2840 | else if ( strategy == DivideStrategy::Polarity ) |
| 2841 | candidatePLConstraint = pickSplitPLConstraintBasedOnPolarity(); |
| 2842 | else if ( strategy == DivideStrategy::EarliestReLU ) |
| 2843 | candidatePLConstraint = pickSplitPLConstraintBasedOnTopology(); |
| 2844 | else if ( strategy == DivideStrategy::LargestInterval && |
| 2845 | ( ( _smtCore.getStackDepth() + 1 ) % |
| 2846 | GlobalConfiguration::INTERVAL_SPLITTING_FREQUENCY != |
| 2847 | 0 ) ) |
| 2848 | { |
| 2849 | // Conduct interval splitting periodically. |
| 2850 | candidatePLConstraint = pickSplitPLConstraintBasedOnIntervalWidth(); |
| 2851 | } |
| 2852 | ENGINE_LOG( |
| 2853 | Stringf( ( candidatePLConstraint ? "Picked..." |
| 2854 | : "Unable to pick using the current strategy..." ) ) |
| 2855 | .ascii() ); |
| 2856 | return candidatePLConstraint; |
| 2857 | } |
| 2858 | |
| 2859 | PiecewiseLinearConstraint *Engine::pickSplitPLConstraintSnC( SnCDivideStrategy strategy ) |
| 2860 | { |
nothing calls this directly
no test coverage detected