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

only kFinalSymobl arcs enter final state #15

Merged
merged 1 commit into from
Apr 27, 2020

Conversation

qindazhu
Copy link
Collaborator

No description provided.

@danpovey danpovey merged commit 08145d0 into k2-fsa:master Apr 27, 2020
@danpovey
Copy link
Collaborator

We can put something like assert(IsValid(input_fsa)) on other operations. For operations that have other requirements, e.g. top-sortedness, can put assert(IsValid(..) && IsTopSorted(..)).

@danpovey
Copy link
Collaborator

And, guys, please always be absolutely clear in your head and in the functions' documentation, what the pre-conditions and post-conditions of functions are. There can also be conditional ones, e.g. "Input must be valid; if the input is top-sorted the output will be top-sorted". These kinds of things can also be checked via asserts.

@csukuangfj
Copy link
Collaborator

I will introduce glog in my pending pullrequest to check preconditions.

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.

3 participants