incomplete printing of char predicates

Issue #227 new
Sven Verdoolaege created an issue

barrel$ cat typ.idp vocabulary V { A(char) } structure S : V { } theory T : V { A("a"). } barrel$ ~/local/install/idp/bin/runidp.sh -e 'stdoptions.nbmodels=2;L=modelexpand(T,S);for i=1,#L do print (L[i]) end;' typ.idp structure : V { A[std::char] = { 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; structure : V { A[std::char] = { 0; 1; 2; 3; 4; 5; 6; 7; 8; 9;

I'm not sure how many elements should be in the predicate in those two structures, but I would expect at least "a" to be one of them. The printing seems to break off prematurely.

Comments (3)

  1. Bart Bogaerts

    Lua cuts of our string after encoutering the NULL character \0, the successor of '9'. We should fix this by

    • Either restricting our chars
    • Print an empty char instead of the escape character \0
  2. Broes De Cat

    Also, after rewriting the rest of the printing, chars are now printed with " " instead of single quotes, which might be incorrect?

  3. Log in to comment