Project

General

Profile

Actions

Task #5419

closed

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

Added by Sergey Smolov over 9 years ago. Updated about 9 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).

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

Actions #1

Updated by Artem Kotsynyak over 9 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.

Actions #2

Updated by Sergey Smolov over 9 years ago

  • Status changed from Resolved to Verified
Actions #3

Updated by Andrei Tatarnikov about 9 years ago

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

Also available in: Atom PDF