Project

General

Profile

Task #5419

[transformer][ruleset] реализовать правило expr==false -> NOT(expr == true)

Added by Sergey Smolov almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Start date:
11/12/2014
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Published in build:
141226

Description

Правила, описанные в классе ru.ispras.fortress.transformer.ruleset.Predicate, преобразуют только операции.
Предлагается добавить ещё одно правило "канонизации", преобразующее значения:

выражение expr==false преобразовывать в !(expr == true).

Правило нужно включить в стандартный набор.

History

#1

Updated by Artem Kotsynyak almost 5 years ago

  • Status changed from New to Resolved

r677
New rules (independent of boolean value position):
(eq expr true) -> expr
(eq expr false) -> (not' expr)
(eq true e0 ...) -> (and e0 ...)
(eq false e0 ...) -> (and (not' e0) ...)

(not true/false) -> false/true keeping user data
(not (not expr)) -> expr

not' is target for described not rules.

#2

Updated by Sergey Smolov almost 5 years ago

  • Status changed from Resolved to Verified
#3

Updated by Andrei Tatarnikov over 4 years ago

  • Status changed from Verified to Closed
  • % Done changed from 0 to 100
  • Published in build set to 141226

Also available in: Atom PDF