Created
November 24, 2018 16:39
-
-
Save vznvzn/5787db2d7313d4ecba42b590e527a72f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if "%1%" == "" ( | |
echo specify [n] | |
exit /b | |
) | |
set n=%1% | |
set m=26 | |
echo "fsm14 n=%n% m=%m%" | |
call minlen %n% > nul | |
set fslice=fstlen%n%b.fst | |
lenmin %n% > lenmin.txt | |
set fminlen=lenmin.fst | |
fstcompile --acceptor=true lenmin.txt %fminlen% | |
set fpre=pre.fst | |
set flen=len.fst | |
uplen %m% > len%m%.txt | |
fstcompile --acceptor=true len%m%.txt %flen% | |
fstintersect %fslice% %flen% %fpre% | |
set fzero=empty.fst | |
echo. > empty.txt | |
fstcompile --acceptor=true empty.txt %fzero% | |
set x=0 | |
set fin=%fminlen% | |
:re | |
set /a x = x + 1 | |
echo -- %x% | |
date /t | |
time /t | |
set fcomp=fsmcomp.fst | |
fstcompose %fpre% fsmb.fst | fstproject --project_output=true > %fcomp% | |
call fstmin2b %fcomp% | |
set fand=and.fst | |
fstintersect %fcomp% %fin% %fand% | |
call fstmin2b %fand% | |
copy %fand% %fpre% > nul | |
fstequivalent %fpre% %fzero% | |
if %errorlevel% neq 0 goto re |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment