Two programs are observationally equivalent when they have the same behaviour.

See A Robust Graph-Based Approach to Observational Equivalence See Lambda-calculus models of programming languages

Between terms or programs.

Observational equivalence problem

Undecidable

Applications

Problems

This has led to various indirect approaches to observational semantics. As an extremal case, denotational semantics provides a model theoretic route to observational equivalence. There are also hybrid approaches that employ both denotational and operational techniques, such as Kripke logical relations [Sta85] and trace semantics [JR05]. Moreover, an operational and coinductive approach exists, under the name of applicative bisimilarity [Abr90].