Skip to content

Commit

Permalink
Update according to generic machine model
Browse files Browse the repository at this point in the history
  • Loading branch information
actyp committed Feb 15, 2024
1 parent f512148 commit e442026
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
public class EdhocDotProcessor {
private static final Logger LOGGER = LogManager.getLogger();

public static void beautify(LearnerResult<?, ?> learnerResult) {
public static void beautify(LearnerResult<?> learnerResult) {
if (learnerResult.isFromTest()) {
return;
}

if (learnerResult.isEmpty()) {
LOGGER.warn("Provided empty LearnerResult");
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.github.protocolfuzzing.edhocfuzzer;

import com.github.protocolfuzzing.edhocfuzzer.components.sul.mapper.symbols.inputs.EdhocInput;
import com.github.protocolfuzzing.edhocfuzzer.components.sul.mapper.symbols.outputs.EdhocOutput;
import com.github.protocolfuzzing.protocolstatefuzzer.entrypoints.CommandLineParser;

import java.util.List;
Expand All @@ -11,7 +9,7 @@ public static void main(String[] args) {
MultiBuilder mb = new MultiBuilder();
String[] parentLoggers = {Main.class.getPackageName()};

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

commandLineParser.parse(args, true, List.of(EdhocDotProcessor::beautify));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.alphabet.AlphabetBuilderStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.alphabet.xml.AlphabetSerializerXml;
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.config.LearnerConfigStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.statistics.MealyMachineWrapper;
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.core.SulBuilder;
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.core.SulWrapper;
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.core.SulWrapperStandard;
Expand All @@ -36,7 +37,11 @@
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.testrunner.timingprobe.config.TimingProbeConfigStandard;
import com.github.protocolfuzzing.protocolstatefuzzer.statefuzzer.testrunner.timingprobe.config.TimingProbeEnabler;

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

protected AlphabetBuilder<EdhocInput> alphabetBuilder = new AlphabetBuilderStandard<>(
new AlphabetSerializerXml<EdhocInput, EdhocAlphabetPojoXml>(EdhocInput.class, EdhocAlphabetPojoXml.class)
Expand Down Expand Up @@ -66,7 +71,7 @@ public StateFuzzerServerConfig buildServerConfig() {
}

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

0 comments on commit e442026

Please sign in to comment.