Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

Strings are escaped differently in different parts of the constraint writer.

Open BenSpencer opened this issue 8 years ago • 1 comments

In the example select-dynamic-form-updates, we have the following pieces in the same constraint file:

...
(declare-const SYMQQQINQQQcountry String)
(assert
  (or
    (= SYMQQQINQQQcountry "?")
    ...
  )
)

(assert (= (= (= SYMQQQINQQQcountry "\?") false) true))
...

Notice the "?" is escaped in the path constraint, but not in the select restriction. This seems like a bug?

BenSpencer avatar Jun 08 '16 11:06 BenSpencer

\? is not a valid escape sequence, so the \ is ignored and CVC4 treats it as a regular ?, so this will not result in a bug. It still seems like we should be consistent though.

http://cvc4.cs.nyu.edu/wiki/Strings#Escape_Sequences_in_String_Constants

BenSpencer avatar Jun 09 '16 09:06 BenSpencer