• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
              • Primitive-types
              • Reference-types
              • Keywords
                • Keywords-grammar-validation
                • Jkeywordp
                  • Restricted-jkeywordp
                  • *jkeywords*
                  • *restricted-jkeywords*
                • Unicode-characters
                • Integer-literals
                • String-literals
                • Octal-digits
                • Hexadecimal-digits
                • Decimal-digits
                • Binary-digits
                • Character-literals
                • Null-literal
                • Floating-point-literals
                • Boolean-literals
                • Package-names
                • Literals
              • Semantics
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Keywords

    Jkeywordp

    Recognize (non-restricted) Java keywords.

    Signature
    (jkeywordp x) → yes/no
    Returns
    yes/no — Type (booleanp yes/no).

    A Java keyword is a list of Java Unicode characters that consist of the (ASCII) codes of some element in *jkeywords*.

    The j in front of jkeywordp avoids a conflict with the built-in keywordp.

    Definitions and Theorems

    Function: jkeywordp

    (defun jkeywordp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'jkeywordp))
        (declare (ignorable __function__))
        (and (ascii-listp x)
             (member-equal (ascii=>string x)
                           *jkeywords*)
             t)))

    Theorem: booleanp-of-jkeywordp

    (defthm booleanp-of-jkeywordp
      (b* ((yes/no (jkeywordp x)))
        (booleanp yes/no))
      :rule-classes :rewrite)