[Math][Pure C] Theory of pure equality

Theory of pure equality AKA equality logic: The pure theory of equality contains formulas of first-order logic with equality, where the only predicate symbol is equality itself and there are no function symbols.

Funny thing, this is what I've found in libressl:

                /* AEAD fixed nonce length. */
                if (aead == EVP_aead_aes_128_gcm() ||
                    aead == EVP_aead_aes_256_gcm())
                        iv_len = 4;
                else if (aead == EVP_aead_chacha20_poly1305())
                        iv_len = 12;
                else
                        goto err;

( libressl-3.8.1/ssl/tls12_key_schedule.c )

Usually you don't do pointer arithmetics on pointers to functions (senseless?), but you can compare them and this may be quite practical.

Hence, only equality operation is used on pointers to functions.

(the post first published at 20240510.)


List of my other blog posts.

Subscribe to my news feed,

Yes, I know about these lousy Disqus ads. Please use adblocker. I would consider to subscribe to 'pro' version of Disqus if the signal/noise ratio in comments would be good enough.