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

Port necessary interegular functionality #8

Closed
wants to merge 773 commits into from
Closed

Conversation

drbh
Copy link
Collaborator

@drbh drbh commented Aug 21, 2024

This is a work in progress PR, opening for visibility and feedback

This PR (will) add interegular FSM creation logic. Currently this is maintained as a separate repo however this implementation moves this logic into outlines with the rust rewrite.

todo

  • implement SimpleParser to process regexpr
  • implement basic Alphabet<T>
  • implement basic Fsm<G>
  • revisit the concept of AnythingElse to use better types
  • implement ParsePattern (rewrite current impl to only use concrete types)
$ cargo test --package outlines-core-rs --lib -- interegular::fsm::tests --show-output
running 19 tests
test interegular::fsm::tests::test_is_empty ... ok
test interegular::simple_parser::tests::test_any ... ok
test interegular::fsm::tests::test_simple_fsm ... ok
test interegular::fsm::tests::test_times ... ok
test interegular::fsm::tests::test_star ... ok
test interegular::fsm::tests::test_reverse ... ok
test interegular::simple_parser::tests::test_anyof_b ... ok
test interegular::simple_parser::tests::test_any_but ... ok
test interegular::fsm::tests::test_reduce ... ok
test interegular::fsm::tests::test_concatenate ... ok
test interegular::simple_parser::tests::test_anyof ... ok
test interegular::simple_parser::tests::test_multiple ... ok
test interegular::fsm::tests::test_intersection ... ok
test interegular::simple_parser::tests::test_no_match_display ... ok
test interegular::fsm::tests::test_union ... ok
test interegular::simple_parser::tests::test_parser_with_complex_input ... ok
test interegular::simple_parser::tests::test_peek_static ... ok
test interegular::simple_parser::tests::test_static_b ... ok
test interegular::simple_parser::tests::test_static_match ... ok

successes:

successes:
    interegular::fsm::tests::test_concatenate
    interegular::fsm::tests::test_intersection
    interegular::fsm::tests::test_is_empty
    interegular::fsm::tests::test_reduce
    interegular::fsm::tests::test_reverse
    interegular::fsm::tests::test_simple_fsm
    interegular::fsm::tests::test_star
    interegular::fsm::tests::test_times
    interegular::fsm::tests::test_union
    interegular::simple_parser::tests::test_any
    interegular::simple_parser::tests::test_any_but
    interegular::simple_parser::tests::test_anyof
    interegular::simple_parser::tests::test_anyof_b
    interegular::simple_parser::tests::test_multiple
    interegular::simple_parser::tests::test_no_match_display
    interegular::simple_parser::tests::test_parser_with_complex_input
    interegular::simple_parser::tests::test_peek_static
    interegular::simple_parser::tests::test_static_b
    interegular::simple_parser::tests::test_static_match

test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

rlouf and others added 30 commits March 13, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request run-benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle regex-to-FSM conversion in Rust