pub fn select_res_input_syscall(ctx: &Context, rng: &mut RngType) -> Option<SyscallId> {
    if let Some(mut res) = ctx.res().choose(rng) {
        if rng.gen_ratio(3, 10) {
            // use syscalls that take super type of 'res' as input
            res = ctx.target().res_sub_tys(res).choose(rng).unwrap();
        }
        ctx.target().res_input_syscall(res).choose(rng).copied()
    } else {
        None
    }
}
/// Select syscall that consume current resource
Select syscall that consume current resource
Select syscall that consume current resource
pub fn select_res_input_syscall(ctx: &Context, rng: &mut RngType) -> Option<SyscallId> {
    if let Some(mut res) = ctx.res().choose(rng) {
        if rng.gen_ratio(3, 10) {
            // use syscalls that take super type of 'res' as input
            res = ctx.target().res_sub_tys(res).choose(rng).unwrap();
        }
        ctx.target().res_input_syscall(res).choose(rng).copied()
    } else {
        None
    }
}
pub fn select_res_input_syscall ( ctx : & Context , rng : & mut RngType ) -> Option < SyscallId > { if let Some ( mut res ) = ctx . res ( ) . choose ( rng ) { if rng . gen_ratio ( 3 , 10 ) { // use syscalls that take super type of 'res' as input res = ctx . target ( ) . res_sub_tys ( res ) . choose ( rng ) . unwrap ( ) ; } ctx . target ( ) . res_input_syscall ( res ) . choose ( rng ) . copied ( ) } else { None } }
Select syscall that consume current resource
Select syscall that consume current resource
ctx
&Context
rng
&mut RngType
ctx
&Context
rng
&mut RngType