The top-level
(vl-main &key (state 'state)) → state
Function:
(defun vl-main-fn (state) (declare (xargs :stobjs (state))) (declare (xargs :guard t)) (let ((__function__ 'vl-main)) (declare (ignorable __function__)) (b* ((state (set-debugger-enable :bt-break)) (- (acl2::tshell-ensure)) ((mv argv state) (oslib::argv)) ((unless (consp argv)) (b* ((state (vl-help '("help")))) (exit-fail) state)) ((cons cmd args) argv) ((when (or (equal cmd "help") (equal cmd "-h") (equal cmd "--help"))) (b* ((state (vl-help args))) (exit-ok) state)) ((when (equal cmd "json")) (b* ((state (vl-json args))) (exit-ok) state)) ((when (equal cmd "lint")) (b* ((state (vl-lint args))) (exit-ok) state)) ((when (equal cmd "model")) (b* ((state (vl-model args))) (exit-ok) state)) ((when (equal cmd "pp")) (b* ((state (vl-pp args))) (exit-ok) state)) ((when (equal cmd "gather")) (b* ((state (vl-gather args))) (exit-ok) state)) ((when (equal cmd "stv2c")) (b* ((state (acl2::stv2c args))) (exit-ok) state)) ((when (equal cmd "server")) (b* ((state (vl-server args))) state)) ((when (equal cmd "shell")) (b* ((state (vl-shell args))) state))) (vl-toolkit-other-command cmd args state))))