MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / storeOriginalQuery

Method storeOriginalQuery

src/engine/Simulator.cpp:48–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void Simulator::storeOriginalQuery( const InputQuery &inputQuery )
49{
50 _originalQuery = inputQuery;
51
52 for ( const auto &plConstraint : _originalQuery.getPiecewiseLinearConstraints() )
53 {
54 List<unsigned> variables = plConstraint->getParticipatingVariables();
55 for ( unsigned variable : variables )
56 {
57 plConstraint->notifyLowerBound( variable, _originalQuery.getLowerBound( variable ) );
58 plConstraint->notifyUpperBound( variable, _originalQuery.getUpperBound( variable ) );
59 }
60 }
61
62 _originalQuery = *( Preprocessor().preprocess( _originalQuery, false ) );
63
64 if ( _originalQuery.countInfiniteBounds() != 0 )
65 throw MarabouError( MarabouError::SIMULATOR_ERROR,
66 "Preprocessed query has infinite bounds" );
67
68 if ( _originalQuery.getNumInputVariables() == 0 )
69 throw MarabouError( MarabouError::SIMULATOR_ERROR,
70 "Preprocessed query has no input variables" );
71}
72
73void Simulator::runSingleSimulation()
74{

Callers

nothing calls this directly

Calls 10

PreprocessorClass · 0.85
MarabouErrorClass · 0.85
preprocessMethod · 0.80
countInfiniteBoundsMethod · 0.80
notifyLowerBoundMethod · 0.45
getLowerBoundMethod · 0.45
notifyUpperBoundMethod · 0.45
getUpperBoundMethod · 0.45
getNumInputVariablesMethod · 0.45

Tested by

no test coverage detected