• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
          • Vl-server
            • Vls-scannedalist-p
            • Vls-loadedalist-p
            • Vls-commands
            • Vls-data-p
            • Vl-server-opts-p
            • Vl-descriptionlist-summaries
            • Vls-transdb
            • Vl-describe
            • Ts-queue
            • Vls-get-plainsrc
            • Vl-description->warnings
            • Vls-showloc
            • File-layout
            • Vls-remove-from-scannedalist
            • Vls-describe
            • Vl-server-top
              • Vls-port-table
              • Vl-find-description-insensitive
              • Vls-get-warnings
              • Vls-get-summary
              • Vls-get-origsrc
              • Vl-ppc-description
              • Vls-get-parents
              • Vls-get-children
              • Vls-data-origname-reportcard
              • Vls-data-from-zip
              • Start
              • Vls-make-scannedalist
              • Vls-get-summaries
              • Vls-get-unloaded-json
              • Vls-get-desctypes
              • Vls-scannedalist-to-json
              • Vls-loadedalist-to-json
              • Vl-description-summary
              • *vl-server-help*
              • Vl-descalist->descriptions/types
              • Stop
            • Vl-gather
            • Vl-zip
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-server

    Vl-server-top

    Top-level vl server command.

    Signature
    (vl-server-top cmdargs &optional (state 'state)) → state
    Arguments
    cmdargs — Guard (string-listp cmdargs).

    Definitions and Theorems

    Function: vl-server-top-fn

    (defun vl-server-top-fn (cmdargs state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (string-listp cmdargs)))
      (let ((__function__ 'vl-server-top))
        (declare (ignorable __function__))
        (b* (((mv errmsg opts extra-args)
              (parse-vl-server-opts cmdargs))
             ((when errmsg)
              (die "~@0~%" errmsg)
              state)
             ((when extra-args)
              (die "Unrecognized arguments: ~x0"
                   extra-args)
              state)
             ((vl-server-opts opts) opts)
             ((when opts.help)
              (vl-cw-ps-seq (vl-print *vl-server-help*))
              (exit-ok)
              state)
             ((when opts.readme)
              (vl-cw-ps-seq (vl-print *vl-server-readme*))
              (exit-ok)
              state)
             (max-mem (* (expt 2 30) opts.mem))
             (1/3-mem (floor max-mem 3))
             (- (set-max-mem max-mem))
             (- (set-vl-gc-baseline))
             (- (set-vl-gc-threshold 1/3-mem))
             ((unless (<= opts.port 65535))
              (die "Invalid port ~x0~%" opts.port)
              state)
             ((mv & hostname state)
              (getenv$ "HOSTNAME" state))
             (- (cw "Starting VL server on ~s0:~x1~%"
                    hostname opts.port))
             (- (start :port opts.port
                       :public-dir opts.public
                       :root-dir opts.root)))
          (cw "Starting VL Shell for the server.~%")
          (vl-shell-top nil))))