Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/setup_fuzzer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readonly BASE_DIR
setup_psf() {
# setup protocol-state-fuzzer library

CHECKOUT="d076ce0e7de2eaac71f99fbf5345ddd80fe38963"
CHECKOUT="4bbb3ea2208fae606201a565b3c57385d8625e3c"

set -e
cd "${BASE_DIR}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.protocolfuzzing.edhocfuzzer.components.sul.mapper.config.EdhocMapperConfig;
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.LearnerResult;
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.config.MapperConfig;
import com.github.protocolfuzzing.protocolstatefuzzer.entrypoints.ProcessResult;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.core.config.StateFuzzerEnabler;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -14,7 +15,12 @@
public class EdhocDotProcessor {
private static final Logger LOGGER = LogManager.getLogger();

public static void beautify(LearnerResult<?> learnerResult) {
public static void beautify(ProcessResult<?> processResult) {
if (!processResult.hasLearnerResult()) {
return;
}
LearnerResult<?> learnerResult = processResult.getLearnerResult();

if (learnerResult.isFromTest()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public static void main(String[] args) {
MultiBuilder mb = new MultiBuilder();
String[] parentLoggers = {Main.class.getPackageName()};

CommandLineParser<?> commandLineParser = new CommandLineParser<>(mb, mb, mb, mb);
CommandLineParser<?> commandLineParser = new CommandLineParser<>(mb, mb, mb, mb, mb, mb);
commandLineParser.setExternalParentLoggers(parentLoggers);

commandLineParser.parse(args, true, List.of(EdhocDotProcessor::beautify));
commandLineParser.process(args, true, List.of(EdhocDotProcessor::beautify));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.core.config.StateFuzzerEnabler;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.core.config.StateFuzzerServerConfig;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.core.config.StateFuzzerServerConfigStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.DiffTester;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.DiffTesterBuilder;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.DiffTesterEnabler;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.DiffTesterStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.config.DiffTesterConfig;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.config.DiffTesterConfigBuilder;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.difftester.config.DiffTesterConfigStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.testrunner.core.TestRunner;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.testrunner.core.TestRunnerBuilder;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.testrunner.core.TestRunnerStandard;
Expand All @@ -37,7 +44,9 @@

public class MultiBuilder implements
StateFuzzerConfigBuilder,
DiffTesterConfigBuilder,
StateFuzzerBuilder<MealyMachineWrapper<EdhocInput, EdhocOutput>>,
DiffTesterBuilder,
TestRunnerBuilder,
TimingProbeBuilder {

Expand Down Expand Up @@ -67,13 +76,23 @@ public StateFuzzerServerConfig buildServerConfig() {
);
}

@Override
public DiffTesterConfig buildConfig() {
return new DiffTesterConfigStandard();
}

@Override
public StateFuzzer<MealyMachineWrapper<EdhocInput, EdhocOutput>> build(StateFuzzerEnabler stateFuzzerEnabler) {
return new StateFuzzerStandard<>(
new StateFuzzerComposerStandard<>(stateFuzzerEnabler, alphabetBuilder, sulBuilder).initialize()
);
}

@Override
public DiffTester build(DiffTesterEnabler diffTesterEnabler) {
return new DiffTesterStandard<>(diffTesterEnabler, alphabetBuilder);
}

@Override
public TestRunner build(TestRunnerEnabler testRunnerEnabler) {
return new TestRunnerStandard<>(testRunnerEnabler, alphabetBuilder, sulBuilder).initialize();
Expand Down
Loading