We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const { DeterministicFiniteAutomaton } = require('fauton'); const DivisibleBy3DFA = new DeterministicFiniteAutomaton( (randomBinaryString) => { return parseInt(randomBinaryString, 2) % 3 === 0; }, { label: 'DFA 1', alphabets: ['1', '0'], description: 'Divisible by 3', final_states: ['A'], start_state: 'A', states: ['A', 'B', 'C'], transitions: { A: ['A', 'B'], B: ['C', 'A'], C: ['B', 'C'], }, } ); const startsWithBC = new DeterministicFiniteAutomaton( (inputString) => inputString.startsWith('bc'), { alphabets: ['a', 'b', 'c'], description: 'Starts with bc', final_states: ['Q3'], label: 'starts_with_bc', start_state: 'Q0', states: ['Q0', 'Q1', 'Q2', 'Q3'], transitions: { Q0: ['Q2', 'Q1', 'Q2'], Q1: ['Q2', 'Q2', 'Q3'], Q2: 'loop', Q3: 'loop', }, } ); const DivisibleBy3OrStartsWithBC= DivisibleBy2DFA.OR(startsWithBC );
This should fail with an appropriate message, but the error message generated is extremely vague and difficult to decipher.
The text was updated successfully, but these errors were encountered:
Devorein
No branches or pull requests
This should fail with an appropriate message, but the error message generated is extremely vague and difficult to decipher.
The text was updated successfully, but these errors were encountered: