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

Improve the efficiency of regular grammar processing #22

Merged
merged 25 commits into from
Aug 28, 2024

Conversation

riya461
Copy link
Contributor

@riya461 riya461 commented Jul 28, 2024

Description:

This PR addresses the issue #21 and issue #2 raised. We made the following enhancements to improve the efficiency of regular language processing.

Changes made:

NFA to DFA Conversion:

  • Implemented the subset construction algorithm to convert Non-deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).

DFA State Minimization:

  • Implemented Hopcroft for reducing the number of states in a deterministic finite automaton (DFA) while maintaining its language recognition capabilities.

Optimization Algorithms:

  • Co-reachability: Identify states that can reach a final state and eliminate non-contributing states.
  • Cyclic Dependency: Add method to detect and raise a warning for cyclic dependencies.

Copy link

vercel bot commented Jul 28, 2024

@riya461 is attempting to deploy a commit to the Akash Hamirwasia's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@blenderskool blenderskool left a comment

Choose a reason for hiding this comment

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

@riya461 Can you run Prettier on all the changed files with "Pretter: Single Quote" option enabled?

@riya461
Copy link
Contributor Author

riya461 commented Jul 29, 2024

Have formatted the changed files with Prettier- single quote option enable @blenderskool

@blenderskool
Copy link
Owner

@riya461 Give me sometime to review all the changes you folks made. Great job nevertheless! 👏

Copy link

vercel bot commented Aug 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vyaakaran-lj2m ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 7:29pm

Copy link
Owner

@blenderskool blenderskool left a comment

Choose a reason for hiding this comment

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

@riya461 Changes look good. Small suggestions and nit-picks. We should be good to merge once they are resolved. Thanks for this great contribution!

editor/src/components/explorers/FiniteAutomata.vue Outdated Show resolved Hide resolved
compiler/src/regular-grammar/semantic.ts Show resolved Hide resolved
compiler/src/regular-grammar/semantic.ts Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Outdated Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Outdated Show resolved Hide resolved
compiler/src/regular-grammar/index.ts Outdated Show resolved Hide resolved
@riya461
Copy link
Contributor Author

riya461 commented Aug 25, 2024

@blenderskool We have resolved the issues raised. The changes made has been updated with proper commits.
Thankyou!

@blenderskool blenderskool merged commit d783c58 into blenderskool:main Aug 28, 2024
2 checks passed
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.

Enhancing Regular Language Parsing: NFA to DFA, State Minimization, and Optimization Algorithms
3 participants