<commit_before>#!/usr/bin/env sh

TRACE_FILE=/tmp/partisan-latest.trace
REPLAY_TRACE_FILE=/tmp/partisan-replay.trace
SAVED_TRACE_FILE=/tmp/partisan-saved.trace
COUNTEREXAMPLE_CONSULT_FILE=/tmp/partisan-counterexample.consult
REBAR_COUNTEREXAMPLE_CONSULT_FILE=_build/test/rebar3_proper-counterexamples.consult

if [ ! -f ${COUNTEREXAMPLE_CONSULT_FILE} ]; then
    echo "No counterexample consult file!"
    exit 1
fi

if [ ! -f ${TRACE_FILE} ]; then
    echo "No trace file!"
    exit 1
fi

# Save the original trace file.
cp ${TRACE_FILE} ${SAVED_TRACE_FILE}

# Shrink counterexample, which should copy files in place.
echo "Deriving schedules to test for counterexample support..."
bin/counterexample-identify-support.escript ${TRACE_FILE} ${REPLAY_TRACE_FILE} ${COUNTEREXAMPLE_CONSULT_FILE} ${REBAR_COUNTEREXAMPLE_CONSULT_FILE}

# # Replay counterexample.
# echo "Replaying counterexample..."
# make kill; pkill -9 beam.smp; rm -rf priv/lager; SHRINKING=true REPLAY=true REPLAY_TRACE_FILE=${REPLAY_TRACE_FILE} TRACE_FILE=${TRACE_FILE} ./rebar3 proper --retry<commit_msg>Supply a preload omission file.<commit_after>#!/usr/bin/env sh

TRACE_FILE=/tmp/partisan-latest.trace
REPLAY_TRACE_FILE=/tmp/partisan-replay.trace
SAVED_TRACE_FILE=/tmp/partisan-saved.trace
COUNTEREXAMPLE_CONSULT_FILE=/tmp/partisan-counterexample.consult
REBAR_COUNTEREXAMPLE_CONSULT_FILE=_build/test/rebar3_proper-counterexamples.consult
PRELOAD_OMISSION_FILE=/tmp/partisan-preload.trace

if [ ! -f ${COUNTEREXAMPLE_CONSULT_FILE} ]; then
    echo "No counterexample consult file!"
    exit 1
fi

if [ ! -f ${TRACE_FILE} ]; then
    echo "No trace file!"
    exit 1
fi

# Save the original trace file.
cp ${TRACE_FILE} ${SAVED_TRACE_FILE}

# Shrink counterexample, which should copy files in place.
echo "Deriving schedules to test for counterexample support..."
bin/counterexample-identify-support.escript ${TRACE_FILE} ${REPLAY_TRACE_FILE} ${COUNTEREXAMPLE_CONSULT_FILE} ${REBAR_COUNTEREXAMPLE_CONSULT_FILE} ${PRELOAD_OMISSION_FILE}

# # Replay counterexample.
# echo "Replaying counterexample..."
# make kill; pkill -9 beam.smp; rm -rf priv/lager; SHRINKING=true REPLAY=true REPLAY_TRACE_FILE=${REPLAY_TRACE_FILE} TRACE_FILE=${TRACE_FILE} ./rebar3 proper --retry
{'fraction_non_alphanumeric': 0.10952168082253018, 'fraction_numerical': 0.004470272686633884, 'mean_word_length': 5.823170731707317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3816670', 'n_tokens_mistral': 816, 'n_tokens_neox': 817, 'n_words': 163}