The artifact of "Learning Weighted Finite Automata over the Max-Plus Semiring, and Beyond". Comments in the source code are removed for the anonymity.
- cargo 1.45.1
- rustc 1.45.2
As the experiments take a lot of time, the system of experiments is distributed over AWS machines and cannot be presented as a standalone application. Instead, we present the program executed on each AWS machine and show a way to replicate a single experiment setting. You can replicate the full set of experiments by running experiments many times with changing the parameters.
By typing cargo run -- {options here}
, Cargo builds the program and runs an experiment.
Command-line options specify the configuration of an setting.
- ``--disable_reduce_rows`: Optional. When this is NOT specified, the "best-effort minimization" is activated. It affects only when the output semiring is the max-plus semiring.
--wfa {json}
: The target WFA. Automaton files are stored inautom_files
, and filenames have forms ofwfa{id}_a{alphabet size}_d{automaton size}.json
. Please choose a setting you want to try. The automata ofid
from 0 to 4 are generated by the normal distribution N(0, 1), and the automata ofid
from 5 to 9 are generated by Gamma(0.5, 2).--isr {R|MP}
: Just use--isr MP
.--osr {R|MP}
: The semiring of the learned WFA.R
stands for the real semiring, andMP
stands for the max-plus semiring.--timeout {sec}
: Timeout. The unit is second. In our setting, it is--timeout 3600
. The experiment can take more time than the timeout because the validation step is out of the time limitation.--eqqfile {json}
: Test list used by the equivalence oracle e. The files are stored ineqq_files
, and filenames have forms ofa{alphabet size}.json
. Make sure that the alphabet size is consistent with the automaton specified at--wfa
.--valfile {json}
: Validation list used by the validation. The files are stored inval_files
, and filenames have forms ofa{alphabet size}.json
. Make sure that the alphabet size is consistent with the automaton specified at--wfa
.--tol {tolerance}
: Tolerance.
For example,
cargo run -- --wfa autom_files/wfa0_a5_d10.json --isr MP --osr MP --timeout 3600 --eqq eqq_files/a5.txt --val val_files/a5.txt --tol 0.1
After the experiment, the result is written in the directory result/result.json
.
The entry wfa_size
stands for the size of the learned WFA, and the entry rmse
stands for the RMSE.
As test lists and validation lists are fixed as the json files, there is no matter about the replication failure caused by random seeds.