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

Rewriting automata #318

Open
2 tasks done
Robby-the-paladin opened this issue Jan 22, 2024 · 5 comments
Open
2 tasks done

Rewriting automata #318

Robby-the-paladin opened this issue Jan 22, 2024 · 5 comments
Assignees

Comments

@Robby-the-paladin
Copy link
Collaborator

Robby-the-paladin commented Jan 22, 2024

Написать модуль для загрузки автоматов в интерактивный конвертер:

  • Реализовать функционал загрузки пользовательского ввода автоматов в объекты Чиполлино.
  • Добавить поддержку данного функционала в интерпретатор.
@Robby-the-paladin
Copy link
Collaborator Author

Пример автомата для FA:

FA {
    ab label = baobab terminal initial_state;
    aba terminal
    ...
    aba bab v;
    bab ab o;
    ab aba c
}

Пример автомата для MFA:

MFA {
    ab label = baobab terminal initial_state;
    aba terminal
    ...
    aba bab v 12 o;
    bab ab eps 12 c;
    ab aba &12
}

@Robby-the-paladin
Copy link
Collaborator Author

Грамматика:

  1. production -> "MFA" MFA | "FA" FA
  2. MFA -> "{" states MFA_edges "}"
  3. FA -> "{" states FA_edges "}"
  4. states -> state_description "..." | states state_description "..."
  5. state_description -> node_id variants
  6. variants -> "label" "=" node_id | "terminal" | "initial_state"
  7. MFA_edges -> MFA_edge MFA_edges | ε
  8. FA_edges -> FA_edge FA_edges | ε
  9. MFA_edge -> stmt memory_lists
  10. FA_edge -> stmt
  11. stmt -> node_id node_id transition
  12. memory_lists -> memory_cell memory_lists | ε
  13. memory_cell -> cell_id memory_state
  14. memory_state -> "o" | "c"
  15. node_id -> (любая строка)
  16. cell_id -> (любое число)
  17. transition -> "eps" | (любая буква или цифра) | "&" cell_id

@Robby-the-paladin Robby-the-paladin moved this to 👀 На ревью in Чиполлино Jan 22, 2024
Robby-the-paladin added a commit that referenced this issue Jan 23, 2024
@TonitaN
Copy link
Collaborator

TonitaN commented Feb 1, 2024

Так, а где интеграция в генератор случайных объектов? Причём на базе вашего же языка теперь уж надо. И метод Verify должен уметь обращаться к генератору по типу, причём к каждому типу автомата привязана инстанциация грамматики, по которой и делается генерация. Хардкодить грамматику ещё и в генераторе нельзя.

dak151449 added a commit that referenced this issue Feb 2, 2024
Robby-the-paladin added a commit that referenced this issue Feb 7, 2024
Robby-the-paladin added a commit that referenced this issue Feb 12, 2024
Robby-the-paladin added a commit that referenced this issue Feb 12, 2024
Robby-the-paladin added a commit that referenced this issue Feb 12, 2024
Robby-the-paladin added a commit that referenced this issue Feb 28, 2024
Robby-the-paladin added a commit that referenced this issue Feb 28, 2024
Robby-the-paladin added a commit that referenced this issue Feb 28, 2024
mathhyyn added a commit that referenced this issue Mar 30, 2024
mathhyyn added a commit that referenced this issue Mar 30, 2024
xendalm added a commit that referenced this issue Apr 2, 2024
- fixed zero cell number parsing
dak151449 added a commit that referenced this issue Apr 2, 2024
dak151449 added a commit that referenced this issue Apr 2, 2024
xendalm added a commit that referenced this issue Apr 2, 2024
dak151449 added a commit that referenced this issue Apr 3, 2024
Robby-the-paladin added a commit that referenced this issue Apr 16, 2024
mathhyyn added a commit that referenced this issue May 25, 2024
как будто костылище
(как это плохо...)
там правило final -> 'final' | EPS
и парсер смотрит перешли ли мы по правилу final, если да - то назначает состояние финальным. но из-за eps все портится и всегда попадаем в final (если состояния явно перечисляются)

по тому же принципу:
initial устанавливаются все состояния по очереди, пока не встретят оригинальный initial
xendalm added a commit that referenced this issue May 30, 2024
mathhyyn added a commit that referenced this issue Jun 22, 2024
(на самом деле строка)
xendalm added a commit that referenced this issue Jun 23, 2024
@TonitaN, когда-нибудь я солью SemDet. Чем позже, тем больнее
xendalm added a commit that referenced this issue Jun 23, 2024
xendalm added a commit that referenced this issue Jun 23, 2024
xendalm added a commit that referenced this issue Jun 23, 2024
xendalm added a commit that referenced this issue Jun 23, 2024
xendalm added a commit that referenced this issue Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 На ревью
Development

No branches or pull requests

2 participants