pub fn translate_assume_well_formed(&self, struct_env: &StructEnv<'_>) {
        emitln!(
            self.writer,
            "function {{:inline}} {}_$is_well_formed($this: $Value): bool {{",
            boogie_struct_name(struct_env),
        );
        self.writer.indent();
        emitln!(self.writer, "$Vector_$is_well_formed($this)");
        emitln!(
            self.writer,
            "&& $vlen($this) == {}",
            struct_env.get_fields().count()
        );
        for field in struct_env.get_fields() {
            let select = format!("$SelectField($this, {})", boogie_field_name(&field));
            let check =
                boogie_well_formed_expr(struct_env.module_env.env, &select, &field.get_type());
            if !check.is_empty() {
                emit!(self.writer, "  && ");
                emitln!(self.writer, "{}", check);
            }
        }
        self.writer.unindent();
        emitln!(self.writer, "}");
    }
/// Generates a function which assumes well formedness (type correcness) of a struct.
Generates a function which assumes well formedness (type correcness) of a struct.
Generates a function which assumes well formedness ( type correcness ) of a struct .
pub fn translate_assume_well_formed(&self, struct_env: &StructEnv<'_>) {
        emitln!(
            self.writer,
            "function {{:inline}} {}_$is_well_formed($this: $Value): bool {{",
            boogie_struct_name(struct_env),
        );
        self.writer.indent();
        emitln!(self.writer, "$Vector_$is_well_formed($this)");
        emitln!(
            self.writer,
            "&& $vlen($this) == {}",
            struct_env.get_fields().count()
        );
        for field in struct_env.get_fields() {
            let select = format!("$SelectField($this, {})", boogie_field_name(&field));
            let check =
                boogie_well_formed_expr(struct_env.module_env.env, &select, &field.get_type());
            if !check.is_empty() {
                emit!(self.writer, "  && ");
                emitln!(self.writer, "{}", check);
            }
        }
        self.writer.unindent();
        emitln!(self.writer, "}");
    }
pub fn translate_assume_well_formed ( & self , struct_env : & StructEnv < ' _ > ) { emitln ! ( self writer " " boogie_struct_name ( struct_env ) ) ; self . writer . indent ( ) ; emitln ! ( self writer " " ) ; emitln ! ( self writer " " struct_env get_fields ( ) count ( ) ) ; for field in struct_env . get_fields ( ) { let select = format ! ( " " boogie_field_name ( field ) ) ; let check = boogie_well_formed_expr ( struct_env . module_env . env , & select , & field . get_type ( ) ) ; if ! check . is_empty ( ) { emit ! ( self writer " " ) ; emitln ! ( self writer " " check ) ; } } self . writer . unindent ( ) ; emitln ! ( self writer " " ) ; }
Generates a function which assumes well formedness (type correcness) of a struct.
Generates a function which assumes well formedness ( type correcness ) of a struct .
&self
struct_env
&StructEnv<'_>