Jump to content

Opaque predicate

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Opencooper (talk | contribs) at 04:35, 18 June 2020 (top: grammar). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer programming, an opaque predicate is a predicate—an expression that evaluates to either "true" or "false"—for which the outcome is known by the programmer a priori, but which, for a variety of reasons, still needs to be evaluated at run time. Opaque predicates have been used as watermarks, as they will be identifiable in a program's executable. They can also be used to prevent an overzealous optimizer from optimizing away a portion of a program. Another use is in obfuscating the control or dataflow of a program to make reverse engineering harder.