Created
November 27, 2018 01:59
-
-
Save vznvzn/090dc7385d4b6021aec896f6cb511826 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 | |
setlocal | |
if "%1%" == "" goto errmsg | |
if "%2%" neq "" goto ok | |
:errmsg | |
echo specify [n] [m] | |
exit /b | |
:ok | |
set n=%1% | |
set m=%2% | |
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 | |
echo "m=%m% n=%n% x=%x%" >> out.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment