Skip to content

`convert' sometimes returns an error. #41

@shallit43

Description

@shallit43

Describe the bug
The `convert' command, which allows you to change the number system of an automaton provided the base-change is sensible (both powers of the same number), doesn't always work. Sometimes returns an error.

To Reproduce
Steps to reproduce the behavior:
Put the attached a163482base4.txt file in the Automata Library of Walnut. Then execute the command
convert $a163482 msd_2 $a163482base4;
and you get the following error (in Walnut v7.1.0):
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.ints.IntList.getInt(int)" because the return value of "it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap.get(int)" is null
at Automata.AutomatonLogicalOps.convertLsdBaseToRoot(AutomatonLogicalOps.java:632)

Expected behavior
Should create a new automaton a163482.txt accepting the same sequence, but in msd_2 format.

Desktop (please complete the following information):

  • OS: Mac Sequoia 15.6
  • Walnut Version v7.1.0

Additional context
Add any other context about the problem here.

a163482base4.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions