Matching logic
Matching logic is a family of formal systems that were created mainly to specify and reason about computer programs and their correctness. Compared to classical logics such as first-order logic, matching logic's formulas, called patterns, are interpreted as, not elements, but power sets of the underlying carrier set(s), with the intuition that a pattern is matched by the set of elements that "match" it. This way, matching logic is said to admit a semantics based on pattern matching. Matching logic was initially coined by Grigore Rosu and finalized with Xiaohong Chen in 2019. Matching logic is the logical foundation of the K framework. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
Matching logic is a family of formal systems that were created mainly to specify and reason about computer programs and their correctness. Compared to classical logics such as first-order logic, matching logic's formulas, called patterns, are interpreted as, not elements, but power sets of the underlying carrier set(s), with the intuition that a pattern is matched by the set of elements that "match" it. This way, matching logic is said to admit a semantics based on pattern matching. Matching logic was initially coined by Grigore Rosu and finalized with Xiaohong Chen in 2019. Matching logic is the logical foundation of the K framework. Let (S,\Sigma) be a many-sorted signature. Let \mathrm{EV} = {\mathrm{\{EV}_s\}}_{s \in S} and \mathrm{SV} = {\mathrm{\{SV}_s\}}_{s \in S} be two disjoint families of S -indexed sets of variables. We call elements in \mathrm{EV} element variables, denoted x : s , y : s , ... and elements in \mathrm{SV} set variables, denoted X : s , Y: s , ... Matching logic formulas are called patterns. The set of (S,\Sigma) -patterns, or simply patterns, is an S -indexed set \mathrm{Pattern} = {\mathrm{\{Pattern}_s\}}_{s \in S} . We write \varphi_s \in \mathrm{Pattern} or \varphi \in \mathrm{Pattern}_s to denote a pattern of a sort s . The set of all patterns is inductively defined by the following grammar rules: x : s \in \mathrm{Pattern}_s . X : s \in \mathrm{Pattern}_s . \sigma(\varphi_{s_1},\dots,\varphi_{s_n}) \in \mathrm{Pattern}_s for any \sigma \in \Sigma{s_1 \dots s_n , s} . \bot_s \in \mathrm{Pattern}_s . \varphi_s \to \varphi'_s \in \mathrm{Pattern}_s . \exists x : s' \cdot \varphi_s \in \mathrm{Pattern}_s . Note that s' and s need not be the same. \mu X : s \cdot \varphi_s \in \mathrm{Pattern}_s if \varphi_s is positive in X : s . Here, \varphi_s is positive in X : s if every occurrence of X : s lies within an even number of implication left-hand sides. For example, X : s \to Y : s is positive in Y : s but not in X : s . In contrast, (X : s \to Y : s) \to X : s is positive in X : s but not in Y : s . Let (S,\Sigma) be a signature. An (S,\Sigma) -model, or simply a model, is denoted M = (\{{M_s}\}_{s \in S}, {\{\sigma_M\}}_{\sigma \in \Sigma}) . It consists of: A nonempty carrier set M_s for every s \in S . A function \sigma_M : M_{s_1} \times \dots \times M_{s_n} \to \mathcal{P}(M_s) for every \sigma \in \Sigma_{s_1 \dots s_n , s} . Here, \mathcal{P}(M_s) denotes the power set of M_s . A valuation \rho maps every element variable of sort s to an element in M_s . It also maps every set element of sort s to a subset of M_s . That is, \rho(x : s) \in M_s and \rho(X : s) \subseteq M_s . Given a model M and a valuation \rho , the interpretation of a pattern is \mathrm{\left\vert \varphi_s \right\vert}_{M,\rho} \subseteq M_s . This interpretation is inductively defined in the following way: \mathrm{} \left\vert {x : s} \right\vert _{M,\rho} = {\{ \rho(x : s) }\} \mathrm{}\left\vert X : s \right\vert _{M,\rho} = \rho(X : s) \mathrm\left\vert \sigma(\varphi_{s_1},\dots,\varphi_{s_n}) \right\vert _{M,\rho} = \bigcup_{a_1 \in \mathrm\left\vert \varphi_{s_1} \right\vert _{M,\rho}} \dots \bigcup_{a_n \in \mathrm\left\vert \varphi_{s_n} \right\vert _{M,\rho}} \sigma_M(a_1,\dots,a_n) \mathrm{}\left\vert \bot_x \right\vert _{M,\rho} = \emptyset , the empty set. \mathrm\left\vert \varphi_s \to \varphi'_s \right\vert _{M,\rho} = M_s \setminus (\mathrm\left\vert \varphi_s \right\vert _{M,\rho} \setminus \mathrm\left\vert \varphi'_s \right\vert _{M,\rho}) , where " \setminus " denotes set difference. \mathrm{}\left\vert \exists x : s' \cdot \varphi_s \right\vert _{M,\rho} = \bigcup_{a \in M_{s'}} \mathrm\left\vert \varphi_s \right\vert _{M,\rho [a / x : s']} , where \rho[a / x : s'] is the valuation that is identical to \rho except that it maps to x : s' to a . \mathrm{}\left\vert \mu X : s \cdot \varphi_s \right\vert _{M,\rho} = \bigcap \{{ A \subseteq M_s \mid \mathrm\left\vert \varphi_s \right\vert _{M,\rho[A / X : s]} \subseteq A }\} \mathrm\left\vert \neg \varphi_s \right\vert _{M,\rho} = M_s \setminus \mathrm\left\vert \varphi_s \right\vert _{M,\rho} \mathrm\left\vert \top_s \right\vert _{M,\rho} = M_s \mathrm\left\vert \varphi_s \lor \varphi'_s \right\vert _{M,\rho} = \mathrm\left\vert \varphi_s \right\vert _{M,\rho} \cup \mathrm\left\vert \varphi'_s \right\vert _{M,\rho} \mathrm\left\vert \varphi_s \land \varphi'_s \right\vert _{M,\rho} = \mathrm\left\vert \varphi_s \right\vert _{M,\rho} \cap \mathrm\left\vert \varphi'_s \right\vert _{M,\rho} \mathrm\left\vert \varphi_s \leftrightarrow \varphi'_s \right\vert _{M,\rho} = M_s \setminus (\mathrm\left\vert \varphi_s \right\vert _{M,\rho} \Delta \mathrm\left\vert \varphi'_s \right\vert _{M,\rho}) , where " \Delta " denotes the symmetric difference operator. \mathrm{}\left\vert \forall x : s' \cdot \varphi_s \right\vert _{M,\rho} = \bigcap_{a \in M_{s'}} \mathrm\left\vert \varphi_s \right\vert _{M,\rho[a / x : s']} \mathrm{}\left\vert \nu X : s \cdot \varphi_s \right\vert _{M,\rho} = \bigcup \{{ A \subseteq M_s \mid A \subseteq \mathrm\left\vert \varphi_s \right\vert _{M,\rho[A / X : s]} \subseteq A }\}
Cite this
"Matching logic". 1778039000. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1352777421 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy