arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.02142cs.LO
收藏

命题逻辑与短路求值:非交换性和交换性变体

Propositional logic with short-circuit evaluation: a non-commutative and a commutative variant

Section Theory of Computer Science, Informatics Institute(计算机科学理论系,信息学研究所);Faculty of Science, University of Amsterdam(阿姆斯特丹大学理学院)

Jan A. Bergstra, Alban Ponse, Daan J. C. Staudt

AI总结:

本文研究了在左到右评估假设下,哪些逻辑定律可以公理化短路求值,探讨了非交换性和交换性变体逻辑的差异及特性。

摘要:

短路求值指的是命题连接词的语义,其中第二个论证仅在第一个论证不足以确定表达式值时才被评估。短路求值在编程中广泛使用,顺序 conjunction 和 disjunction 作为基本连接词。我们研究了在以下假设下,哪些逻辑定律可以公理化短路求值:复合陈述从左到右评估,每个原子(命题变量)评估为真或假,原子评估可能产生副作用。答案取决于原子副作用的类型,导致不同的“短路逻辑”。基本情况是FSCL(自由短路逻辑),它描述了每个原子评估可能产生副作用的设置。我们回顾了一些主要结果,并将FSCL与MSCL(记忆短路逻辑)相关联,其中在评估复合陈述时,每个原子的第一次评估结果被记忆。MSCL可以被视为命题逻辑的顺序变体:原子评估不能产生副作用,顺序连接词不具有交换性。然后我们将MSCL与SSCL(静态短路逻辑)相关联,即命题逻辑的变体,规定使用交换性顺序连接词的短路求值。我们提出了评估树作为短路求值的直观语义,并为提及的短路逻辑提供了简单的等式公理化,仅使用否定和顺序连接词。

英文摘要:

Short-circuit evaluation denotes the semantics of propositional connectives in which the second argument is evaluated only if the first argument does not suffice to determine the value of the expression. Short-circuit evaluation is widely used in programming, with sequential conjunction and disjunction as primitive connectives. We study the question which logical laws axiomatize short-circuit evaluation under the following assumptions: compound statements are evaluated from left to right, each atom (propositional variable) evaluates to either true or false, and atomic evaluations can cause a side effect. The answer to this question depends on the kind of atomic side effects that can occur and leads to different "short-circuit logics". The basic case is FSCL (free short-circuit logic), which characterizes the setting in which each atomic evaluation can cause a side effect. We recall some main results and then relate FSCL to MSCL (memorizing short-circuit logic), where in the evaluation of a compound statement, the first evaluation result of each atom is memorized. MSCL can be seen as a sequential variant of propositional logic: atomic evaluations cannot cause a side effect and the sequential connectives are not commutative. Then we relate MSCL to SSCL (static short-circuit logic), the variant of propositional logic that prescribes short-circuit evaluation with commutative sequential connectives. We present evaluation trees as an intuitive semantics for short-circuit evaluation, and simple equational axiomatizations for the short-circuit logics mentioned that use negation and the sequential connectives only.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑