| 206 | } |
| 207 | |
| 208 | bool createInputQuery( InputQuery &inputQuery, |
| 209 | std::string networkFilePath, |
| 210 | std::string propertyFilePath ) |
| 211 | { |
| 212 | try |
| 213 | { |
| 214 | AcasParser *acasParser = new AcasParser( String( networkFilePath ) ); |
| 215 | acasParser->generateQuery( inputQuery ); |
| 216 | |
| 217 | String propertyFilePathM = String( propertyFilePath ); |
| 218 | if ( propertyFilePath != "" ) |
| 219 | { |
| 220 | printf( "Property: %s\n", propertyFilePathM.ascii() ); |
| 221 | if ( propertyFilePathM.endsWith( ".vnnlib" ) ) |
| 222 | { |
| 223 | VnnLibParser().parse( propertyFilePathM, inputQuery ); |
| 224 | } |
| 225 | else |
| 226 | { |
| 227 | PropertyParser().parse( propertyFilePathM, inputQuery ); |
| 228 | } |
| 229 | } |
| 230 | else |
| 231 | printf( "Property: None\n" ); |
| 232 | } |
| 233 | catch ( const InputParserError &e ) |
| 234 | { |
| 235 | printf( "Caught an InputParserError. Code: %u. Message: %s\n", |
| 236 | e.getCode(), |
| 237 | e.getUserMessage() ); |
| 238 | return false; |
| 239 | } |
| 240 | return true; |
| 241 | } |
| 242 | |
| 243 | void addDisjunctionConstraint( InputQuery &ipq, const std::list<std::list<Equation>> &disjuncts ) |
| 244 | { |