reduce state space by ignoring lower priorities

This commit is contained in:
Alwin Berger 2025-07-04 07:30:01 +00:00
parent fabf746c4c
commit 2dfb5f853d
4 changed files with 10 additions and 3 deletions

View File

@ -5,7 +5,7 @@ authors = ["Alwin Berger <alwin.berger@tu-dortmund.de>"]
edition = "2021"
[features]
default = ["std", "snapshot_fast", "restarting", "do_hash_notify_state", "do_hash_notify_value", "config_stg", "fuzz_int", "shortcut", "trace_job_response_times" ]
default = ["std", "snapshot_fast", "restarting", "do_hash_notify_state", "do_hash_notify_value", "config_stg", "fuzz_int", "shortcut", "trace_job_response_times", "observe_systemstate_unordered" ]
std = []
# Exec environemnt basics
snapshot_restore = []
@ -19,6 +19,7 @@ shortcut = []
observe_edges = [] # observe cfg edges
observe_hitcounts = [ "observe_edges" ] # reduces edge granularity
observe_systemstate = []
observe_systemstate_unordered = []
do_hash_notify_state = []
do_hash_notify_value = []
trace_job_response_times = [ "trace_stg" ]

View File

@ -2,7 +2,7 @@ import csv
import os
envvars:
"BENCHDIR"
def_flags="--release --no-default-features --features std,snapshot_fast,restarting,do_hash_notify_state,do_hash_notify_value,fuzz_int,trace_job_response_times"
def_flags="--release --no-default-features --features std,snapshot_fast,restarting,do_hash_notify_state,do_hash_notify_value,fuzz_int,trace_job_response_times,observe_systemstate_unordered"
benchdir=os.environ["BENCHDIR"]
RUNTIME=(3600*24)

View File

@ -1,4 +1,3 @@
use hashbrown::HashSet;
use libafl::inputs::Input;
/// Feedbacks organizing SystemStates as a graph

View File

@ -94,6 +94,13 @@ pub(crate) fn refine_system_states(
.collect();
collector.append(&mut tmp);
}
#[cfg(feature = "observe_systemstate_unordered")]
{
// respect the order of the first ``lookahead`` tasks and sort the rest by task name
const lookahead : usize = 2;
collector.get_mut(lookahead..).map(|x| x.sort_by(|a, b| a.task_name.cmp(&b.task_name)));
}
// collect delay list
let mut delay_list: Vec<RefinedTCB> =
tcb_list_to_vec_cached(i.delay_list, &mut i.dumping_ground)