/// Create initial relations based on syscall type information.
Create initial relations based on syscall type information.
Create initial relations based on syscall type information .
pub fn new(target: &Target) -> Self {
        let influence: HashMap<SyscallId, Vec<SyscallId>> = target
            .enabled_syscalls()
            .iter()
            .map(|syscall| (syscall.id(), Vec::new()))
            .collect();
        let influence_by = influence.clone();
        let mut r = Relation {
            influence,
            influence_by,
            n: 0,
        };
        for i in target.enabled_syscalls().iter().map(|s| s.id()) {
            for j in target.enabled_syscalls().iter().map(|s| s.id()) {
                if i != j && Self::calculate_influence(target, i, j) {
                    r.push_ordered(i, j);
                }
            }
        }
        r
    }
pub fn new ( target : & Target ) -> Self { let influence : HashMap < SyscallId , Vec < SyscallId > > = target . enabled_syscalls ( ) . iter ( ) . map ( | syscall | ( syscall . id ( ) , Vec :: new ( ) ) ) . collect ( ) ; let influence_by = influence . clone ( ) ; let mut r = Relation { influence , influence_by , n : 0 , } ; for i in target . enabled_syscalls ( ) . iter ( ) . map ( | s | s . id ( ) ) { for j in target . enabled_syscalls ( ) . iter ( ) . map ( | s | s . id ( ) ) { if i != j && Self :: calculate_influence ( target , i , j ) { r . push_ordered ( i , j ) ; } } } r }
Create initial relations based on syscall type information.
Create initial relations based on syscall type information .
target
&Target