• 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
          • Name-database
            • Vl-namedb
              • Vl-namedb-fix
              • Vl-namedb-p
              • Vl-namedb-equiv
              • Make-vl-namedb
              • Vl-namedb->pset
              • Vl-namedb->pmap
              • Vl-namedb->names
              • Change-vl-namedb
            • Vl-namedb-plain-name
            • Vl-namedb-pset-fix
            • Vl-namedb-plain-names
            • Vl-namedb-indexed-name
            • Vl-namedb-pmap-fix
            • Vl-unlike-any-prefix-p
            • Vl-namedb-pmap-okp
            • Vl-namedb-allnames
            • Vl-starting-namedb
            • Vl-pgenstr-highest
            • Vl-namedb-pset-okp
            • Vl-pgenstr-p
            • Vl-pgenstr->val
            • Vl-free-namedb
            • Vl-namedb-plain-name-quiet
            • Vl-pgenstr-highest-of-alist-keys
            • Vl-pgenstr
            • Vl-empty-namedb
            • Vl-namedb-nameset
            • Vl-unlike-any-prefix-p-of-alist-keys
            • Vl-namedb-prefixmap
          • Vl-gc
          • Symbol-list-names
          • Ints-from
          • Nats-from
          • Make-lookup-alist
          • Redundant-mergesort
          • Longest-common-prefix
          • Vl-plural-p
          • Vl-remove-keys
          • Vl-merge-contiguous-indices
          • Vl-edition-p
          • Sum-nats
          • Vl-maybe-integer-listp
          • Fast-memberp
          • Nat-listp
          • Max-nats
          • Longest-common-prefix-list
          • Character-list-listp
          • Vl-character-list-list-values-p
          • Remove-from-alist
          • Prefix-of-eachp
          • Vl-string-keys-p
          • Vl-maybe-nat-listp
          • Vl-string-list-values-p
          • String-list-listp
          • Vl-string-values-p
          • True-list-listp
          • Symbol-list-listp
          • Explode-list
          • All-have-len
          • Pos-listp
          • Min-nats
          • Debuggable-and
          • Vl-starname
          • Remove-equal-without-guard
          • Vl-maybe-string-list
          • String-fix
          • Longer-than-p
          • Anyp
          • Fast-alist-free-each-alist-val
          • Not*
          • Free-list-of-fast-alists
          • *nls*
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Name-database

Vl-namedb

Name database structure.

This is a product type introduced by defprod.

Fields
names — vl-namedb-nameset
pmap — vl-namedb-prefixmap
pset — vl-namedb-nameset
Additional Requirements

The following invariant is enforced on the fields:

(and (vl-namedb-pmap-okp names pmap) (vl-namedb-pset-okp pmap pset))

A name db has three fields:

  • names, a fast alist that associates strings to t.
  • pmap, a fast alist that associates strings to natural numbers.
  • pset, a fast alist that associates strings to t.

Invariant. Each prefix bound in pmap is bound to (vl-pgenstr-highest prefix (alist-keys names)).

Invariant. The pset binds exactly those prefixes that are bound in pmap.

Intuitively, the names represents the set of all names that are currently in use. We use a fast-alist representation so that we can very quickly determine whether a plain name is available.

Meanwhile, the pmap allows us to quickly generate indexed names. In particular, it binds some prefixes with their highest used index. This way, we only need to scan the names once per prefix.

The pset is really just an optimization that allows us to avoid needing to shrink the psets.

Subtopics

Vl-namedb-fix
Fixing function for vl-namedb structures.
Vl-namedb-p
Recognizer for vl-namedb structures.
Vl-namedb-equiv
Basic equivalence relation for vl-namedb structures.
Make-vl-namedb
Basic constructor macro for vl-namedb structures.
Vl-namedb->pset
Get the pset field from a vl-namedb.
Vl-namedb->pmap
Get the pmap field from a vl-namedb.
Vl-namedb->names
Get the names field from a vl-namedb.
Change-vl-namedb
Modifying constructor for vl-namedb structures.