Skip to content

Homework 7. FSM. Ermolovich#26

Merged
CandiedDisc192 merged 1 commit intopractice9from
homework7
Dec 25, 2023
Merged

Homework 7. FSM. Ermolovich#26
CandiedDisc192 merged 1 commit intopractice9from
homework7

Conversation

@CandiedDisc192
Copy link
Copy Markdown
Owner

No description provided.

@CandiedDisc192 CandiedDisc192 changed the title Homework 7. Ermolovich Homework 7. FSM. Ermolovich Dec 9, 2023
@SpirinEgor SpirinEgor changed the base branch from main to practice9 December 18, 2023 13:24
Copy link
Copy Markdown
Collaborator

@SpirinEgor SpirinEgor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Надо поправить замечания в пр к практике, это дополняющий пр, а не замещающий
  2. Есть тесты на функции перехода и на мейн в целом, но нет на каждый автомат. Точно надо проверять, что определенный ДКА принимает такие-то строки и не принимает другие

Comment on lines 33 to +40
first_fsm = create_fs_machine([0, 1, 2, 3], ["a", "b"], next_state1, 0, [3])
second_fsm = create_fs_machine(
[0, 1, 2, 3, 4, 5, 6],
[*(str(n) for n in range(10)), ".", "E", "+", "-"],
next_state2,
0,
[1, 3, 6],
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Такое в тестах будет неудобно переиспользовать, придется копипастить создание ДКА. Лучше вынести создание в отдельные функции

Comment on lines 42 to +44
if validate_string(first_fsm, user_string):
print("Your string belongs to first language: (a|b)*abb")
elif validate_string(second_fsm, user_string, -1):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А если будет еще 100 грамматик, так и будет каскад ифов?

@CandiedDisc192 CandiedDisc192 merged commit 6f3d44d into practice9 Dec 25, 2023
@SpirinEgor
Copy link
Copy Markdown
Collaborator

Ну и зачем ты самостоятельно что-то мерджишь?(

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 this pull request may close these issues.

2 participants