• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
          • In-terminal-set
          • Well-formedness
            • Rulelist-incremental-ok-p
            • Num-val-wfp
            • Char-val-wfp
              • Prose-val-wfp
              • Rulename-wfp
              • Rulelist-wfp
              • Repeat-range-wfp
              • Rule-list-wfp
              • Concatenation-wfp
              • Alternation-wfp
              • Rule-wfp
              • Concatenation-list-wfp
              • Repetition-list-wfp
              • Repetition-wfp
              • Element-wfp
            • Closure
            • Plugging
            • Ambiguity
            • Renaming
            • Numeric-range-retrieval
            • Rule-utilities
            • Removal
            • Character-value-retrieval
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Well-formedness

    Char-val-wfp

    A character value notation is well-formed iff it consists of only non-control ASCII characters, except for the double quote character.

    Signature
    (char-val-wfp char-val) → yes/no
    Arguments
    char-val — Guard (char-val-p char-val).
    Returns
    yes/no — Type (booleanp yes/no).

    These allowed characters are consistent with the rule quoted-string in [RFC:4]. That rule allows empty strings, so the rule char-val in [RFC:4] also allows empty strings. An empty character value notation may play the role of the empty sequence of symbols (often denoted by \epsilon in textbooks).

    Definitions and Theorems

    Function: char-val-wfp

    (defun char-val-wfp (char-val)
     (declare (xargs :guard (char-val-p char-val)))
     (b*
      ((allowed-chars (nats=>chars (append (integers-from-to 32 33)
                                           (integers-from-to 35 126)))))
      (char-val-case char-val
                     :sensitive (subsetp (explode char-val.get)
                                         allowed-chars)
                     :insensitive (subsetp (explode char-val.get)
                                           allowed-chars))))

    Theorem: booleanp-of-char-val-wfp

    (defthm booleanp-of-char-val-wfp
      (b* ((yes/no (char-val-wfp char-val)))
        (booleanp yes/no))
      :rule-classes :rewrite)