1. Jun 01, 2019
  2. May 30, 2019
  3. May 26, 2019
    • Matthew Fernandez's avatar
      fix syntax error misaligning caret indicator · 323fda58
      Matthew Fernandez authored
      When your input model contains a syntax error and the line in which the error
      occurs contains a tab, Rumur would print an error message indicating the wrong
      column location in the line. We now account for tabs and offset the caret
      indicator correctly.
      
      Note that error messages for lines containing multibyte characters (e.g. "≔")
      are still misaligned, but it does not seem worth it to work around this as it is
      fixed upstream in Bison 3.4.
      
      Github: closes #129 "syntax error output is misaligned with tabs"
      323fda58
  4. May 21, 2019
  5. May 20, 2019
  6. May 16, 2019
  7. May 15, 2019
  8. May 14, 2019
  9. May 13, 2019
  10. May 12, 2019
    • Matthew Fernandez's avatar
      release v2019.05.11 · 49d810c6
      Matthew Fernandez authored
      49d810c6
    • Matthew Fernandez's avatar
      optimisation: don't require a jmp_buf when --max-errors < 2 · 603f1809
      Matthew Fernandez authored
      We were using the sigsetjmp()/siglongjmp() exception mechanism when either of
      two things were true:
      
        1. --max-errors > 1; or
        2. the model has assumptions.
      
      As of 7dda1203, a failed assumption is signalled
      via a normal return value, not via a siglongjmp(). As a result, we no longer
      need to require a jmp_buf in this case. This should result in a slight speed up
      for models that have assumptions but run with --max-errors < 2.
      
      Github: related to #127 "--max-errors > 1 produces unsafe code"
      603f1809
    • Matthew Fernandez's avatar
      fix: push setjmp calls into rules/guards/etc · 7dda1203
      Matthew Fernandez authored
      The motivation for this change is to fix an error in our usage of sigsetjmp().
      When using jmp_bufs (JMP_BUF_NEEDED), we use sigsetjmp() and siglongjmp() to
      give us an exception-handling-like mechanism to jump back to the exploration
      loop after signalling an error. This pattern is fine except that these calls are
      documented to leave all non-volatile locals in an indeterminate state. We had
      several of these that were important (e.g. the pointer to the state that we go
      on to free).
      
      My initial planned solution to this was to simply mark the relevant variables
      volatile. However, this comes with some drawbacks. Unconditionally marking these
      volatile impedes the compiler's optimiser in the case when we're not using
      jmp_bufs, while conditionally marking them volatile overcomplicates the code
      generation logic. To further complicate this, some of the relevant variables are
      generated (ruleset iterators). We would have to cast away these variables'
      volatility when passing them to rules which would introduce even further
      complications.
      
      Instead, we duplicate the sigsetjmp() calls and move them inwards. E.g. for
      guards, we call sigsetjmp() as the first step in the guard itself and then use
      the return value of the guard to indicate to the exploration loop whether
      siglongjmp() was called. The advantage of this is that the only work done in the
      siglongjmp() path is now returning from the containing function; there are no
      longer any relevant non-volatile locals.
      
      This had a couple of unanticipated side effects:
      
        1. The error call in case of a deadlock had to be moved into its own function
           to also avoid having any non-volatile locals. This is not a problem, just
           unexpected.
        2. Return statements now awkwardly return a boolean when they have no
           associated expression. Relatedly void-returning functions (procedures) now
           have a boolean return type. This is because a return statement can be used
           in a rule (which now returns a boolean). We could have done something more
           elaborate like have an empty return statement jump to the end of the
           rule/function, but it seemed this would be more likely to confuse the
           compiler.
      
      Github: closes #127 "--max-errors > 1 produces unsafe code"
      7dda1203
  11. May 10, 2019
  12. May 07, 2019
  13. May 06, 2019