Specification and verification of digital systems using higher-order predicate logic