fn extract_verification_errors(&self, out: &str) -> Vec<BoogieError> {
        let mut errors = vec![];
        let mut at = 0;
        while let Some(cap) = VERIFICATION_DIAG_STARTS.captures(&out[at..]) {
            let inbetween = out[at..at + cap.get(0).unwrap().start()].trim();
            at = usize::saturating_add(at, cap.get(0).unwrap().end());
            let msg = cap.name("msg").unwrap().as_str();

            // Filter diags that we know and will be processed later (e.g., inconclusive).
            // Other unknown diags will be reported as unexpected boogie output.
            if !inbetween.is_empty()
                && !INCONCLUSIVE_DIAG_STARTS.is_match(inbetween)
                && !INCONSISTENCY_DIAG_STARTS.is_match(inbetween)
            {
                // This is unexpected text and we report it as an internal error
                errors.push(BoogieError {
                    kind: BoogieErrorKind::Internal,
                    loc: self.env.unknown_loc(),
                    message: format!(
                        "unexpected boogie output: `{} ..`",
                        &inbetween[0..inbetween.len().min(70)]
                    ),
                    execution_trace: vec![],
                    model: None,
                })
            }

            let args = cap.name("args").unwrap().as_str();
            let loc = self.report_error(self.extract_loc(args), self.env.unknown_loc());
            let execution_trace = self.extract_augmented_trace(out, &mut at);
            let mut model = Model::new(self);
            self.extract_model(&mut model, out, &mut at);

            if msg != "expected to fail" {
                // Only add this if it is not a negative test. We still needed to parse it.
                errors.push(BoogieError {
                    kind: BoogieErrorKind::Assertion,
                    loc,
                    message: msg.to_string(),
                    execution_trace,
                    model: if model.is_empty() { None } else { Some(model) },
                });
            }
        }
        errors
    }
/// Extracts verification errors from Boogie output.
Extracts verification errors from Boogie output.
Extracts verification errors from Boogie output .
fn extract_verification_errors(&self, out: &str) -> Vec<BoogieError> {
        let mut errors = vec![];
        let mut at = 0;
        while let Some(cap) = VERIFICATION_DIAG_STARTS.captures(&out[at..]) {
            let inbetween = out[at..at + cap.get(0).unwrap().start()].trim();
            at = usize::saturating_add(at, cap.get(0).unwrap().end());
            let msg = cap.name("msg").unwrap().as_str();
            // Filter diags that we know and will be processed later (e.g., inconclusive).
            // Other unknown diags will be reported as unexpected boogie output.
            if !inbetween.is_empty()
                && !INCONCLUSIVE_DIAG_STARTS.is_match(inbetween)
                && !INCONSISTENCY_DIAG_STARTS.is_match(inbetween)
            {
                // This is unexpected text and we report it as an internal error
                errors.push(BoogieError {
                    kind: BoogieErrorKind::Internal,
                    loc: self.env.unknown_loc(),
                    message: format!(
                        "unexpected boogie output: `{} ..`",
                        &inbetween[0..inbetween.len().min(70)]
                    ),
                    execution_trace: vec![],
                    model: None,
                })
            }
            let args = cap.name("args").unwrap().as_str();
            let loc = self.report_error(self.extract_loc(args), self.env.unknown_loc());
            let execution_trace = self.extract_augmented_trace(out, &mut at);
            let mut model = Model::new(self);
            self.extract_model(&mut model, out, &mut at);
            if msg != "expected to fail" {
                // Only add this if it is not a negative test. We still needed to parse it.
                errors.push(BoogieError {
                    kind: BoogieErrorKind::Assertion,
                    loc,
                    message: msg.to_string(),
                    execution_trace,
                    model: if model.is_empty() { None } else { Some(model) },
                });
            }
        }
        errors
    }
fn extract_verification_errors ( & self , out : & str ) -> Vec < BoogieError > { let mut errors = vec ! [ ] ; let mut at = 0 ; while let Some ( cap ) = VERIFICATION_DIAG_STARTS . captures ( & out [ at .. ] ) { let inbetween = out [ at .. at + cap . get ( 0 ) . unwrap ( ) . start ( ) ] . trim ( ) ; at = usize :: saturating_add ( at , cap . get ( 0 ) . unwrap ( ) . end ( ) ) ; let msg = cap . name ( " " ) . unwrap ( ) . as_str ( ) ; // Filter diags that we know and will be processed later (e.g., inconclusive). // Other unknown diags will be reported as unexpected boogie output. if ! inbetween . is_empty ( ) && ! INCONCLUSIVE_DIAG_STARTS . is_match ( inbetween ) && ! INCONSISTENCY_DIAG_STARTS . is_match ( inbetween ) { // This is unexpected text and we report it as an internal error errors . push ( BoogieError { kind : BoogieErrorKind :: Internal , loc : self . env . unknown_loc ( ) , message : format ! ( " " inbetween [ 0 inbetween len ( ) min ( 70 ) ] ) , execution_trace : vec ! [ ] , model : None , } ) } let args = cap . name ( " " ) . unwrap ( ) . as_str ( ) ; let loc = self . report_error ( self . extract_loc ( args ) , self . env . unknown_loc ( ) ) ; let execution_trace = self . extract_augmented_trace ( out , & mut at ) ; let mut model = Model :: new ( self ) ; self . extract_model ( & mut model , out , & mut at ) ; if msg != " " { // Only add this if it is not a negative test. We still needed to parse it. errors . push ( BoogieError { kind : BoogieErrorKind :: Assertion , loc , message : msg . to_string ( ) , execution_trace , model : if model . is_empty ( ) { None } else { Some ( model ) } , } ) ; } } errors }
Extracts verification errors from Boogie output.
Extracts verification errors from Boogie output .
&self
out
&str