Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IncrementalDAGBuilder fails for traces with cyclic repetitions longer than 2 #79

Closed
mtf90 opened this issue May 16, 2024 · 0 comments · Fixed by #80
Closed

IncrementalDAGBuilder fails for traces with cyclic repetitions longer than 2 #79

mtf90 opened this issue May 16, 2024 · 0 comments · Fixed by #80

Comments

@mtf90
Copy link
Member

mtf90 commented May 16, 2024

Describe the bug
Inserting certain traces into an Incremental(Mealy)DAGBuilder throws a ConflictException.

To Reproduce

import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.impl.Alphabets;
import net.automatalib.incremental.mealy.dag.IncrementalMealyDAGBuilder;
import net.automatalib.word.Word;

public class IncrementalMealyDAGError {

    public static void main(String[] args) {

        final Alphabet<Character> alphabet = Alphabets.characters('0', '3');

        final Word<Character> in1 = Word.fromString("12");
        final Word<Character> in2 = Word.fromString("302");
        final Word<Character> in3 = Word.fromString("3023102");
        final Word<Character> in4 = Word.fromString("30231023");

        final Word<Character> out1 = Word.fromString("21");
        final Word<Character> out2 = Word.fromString("101");
        final Word<Character> out3 = Word.fromString("1013201");
        final Word<Character> out4 = Word.fromString("10132010");

        final IncrementalMealyDAGBuilder<Character, Character> builder = new IncrementalMealyDAGBuilder<>(alphabet);

        builder.insert(in1, out1);
        builder.insert(in2, out2);
        builder.insert(in3, out3);
        builder.insert(in4, out4); // boom
    }
}

Expected behavior
No exception should be thrown.

Desktop (please complete the following information):

  • OS: Linux
  • Java version: 11/17/21
  • AutomataLib version: 0.11.0

Additional context
This issue was originally reported as LearnLib/learnlib#126.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant