1. Jul 08, 2019
  2. Jul 07, 2019
  3. Jul 06, 2019
  4. Jul 05, 2019
    • Matthew Fernandez's avatar
      deprecate VarDecl::state_variable · 6a4f9ac3
      Matthew Fernandez authored
      We can't explicitly mark this deprecated because it triggers compiler warnings
      when calling the implicit copy constructor from within Ptr's copy constructor.
      6a4f9ac3
    • Matthew Fernandez's avatar
      use VarDecl::offset for is_in_state() · 175193b6
      Matthew Fernandez authored
      This means ExprID::referent->is_in_state() is now usable as the offset
      information within referents is consistent in a way
      ExprID::referent->state_variable is not.
      175193b6
    • Matthew Fernandez's avatar
      introduce VarDecl::is_in_state as a replacement for VarDecl::state_variable · 39bf6a26
      Matthew Fernandez authored
      The latter was probably introduced too hastily and doesn't make for a good API.
      We would like to have the freedom to change how we decide whether something is
      in the state.
      39bf6a26
    • Matthew Fernandez's avatar
      move reindexing prior to symbol resolution and model validation · c3d23559
      Matthew Fernandez authored
      The purpose of this is to ensure that resolved symbols (e.g. ExprID::referent)
      have the same final index as their original target declaration.
      c3d23559
    • Matthew Fernandez's avatar
      move state offset calculation into symbol resolution instead of reindexing · 7268f636
      Matthew Fernandez authored
      The offset calculation did not have much to do with reindexing and I think it
      may have just been put here because it was a convenient post-resolution place
      for it. An unfortunate side effect of this design was that resolved referents
      had an invalid offset. To see why this is, note that symbol resolution (1)
      replaces null referents with a *copy* of the target node and (2) runs prior to
      reindexing. That is, the offset calculation in reindexing would only affect the
      original state VarDecl, not its copies in ExprID referents.
      
      None of what has just been described was a bug. The offsets of the VarDecl
      copies are never used. But its presence incorrectly suggests to librumur clients
      that it is usable.
      
      In this commit we move the offset calculation to its more natural place within
      symbol resolution. We do offset calculation *prior* to declaring a VarDecl in
      the symbol table. This results in ExprIDs now receiving a referent with correct
      offset information. Note that we need to do some extra checks because a
      just-parsed VarDecl is part of an unvalidated model and may be invalid.
      
      All this is part of a broader direction to make all the fields of a referent
      valid and usable.
      7268f636
    • Matthew Fernandez's avatar
      deprecate validate_model · 45f095c9
      Matthew Fernandez authored
      This will be removed in a future release.
      45f095c9
    • Matthew Fernandez's avatar
    • Matthew Fernandez's avatar
      introduce a function for recursively validating any AST node · 499857ec
      Matthew Fernandez authored
      This is the equivalent of validate_model, but for *any* node in the AST.
      499857ec
    • Matthew Fernandez's avatar
      descend into referents during validation · 860f71d1
      Matthew Fernandez authored
      We're about to introduce a function for validating any subpart of the AST. That
      is, effectively calling validate_model with a node other than the topmost node.
      This means that the referent of a reference node (ExprID, FunctionCall or
      TypeExprID) may not yet have been validated. So we need to drop the optimization
      that avoids descending into these.
      
      This makes validating a model take longer, but the difference should be
      negligible. If this becomes a problem, we could start memoising visitor
      dispatch.
      860f71d1
  5. Jul 04, 2019
  6. Jul 02, 2019
  7. Jul 01, 2019
    • Matthew Fernandez's avatar
      white space · 5779d28b
      Matthew Fernandez authored
      5779d28b
    • Matthew Fernandez's avatar
      fix misuse of fcntl · 53f20cc0
      Matthew Fernandez authored
      We were using F_SETFD/F_GETFD to set O_NONBLOCK, but this is meant to be used on
      the status flags, not the file descriptor. We correct this to use
      F_SETFL/F_GETFL. Surprisingly this bug caused no visible misbehaviour on Ubuntu
      Linux, macOS or FreeBSD. It was detected by a user on Arch Linux under WSL.
      
      Github: related to #140 "Unit test fail on smt-simplify.m"
      53f20cc0
    • Matthew Fernandez's avatar
      move AFL test to GCC 9 · 7ae1c15d
      Matthew Fernandez authored
      7ae1c15d
    • Matthew Fernandez's avatar
      extend testing to GCC 9 on Linux · c91d6dbc
      Matthew Fernandez authored
      c91d6dbc
    • Matthew Fernandez's avatar
      suppress output of -m32 check in test suite · 64fa1723
      Matthew Fernandez authored
      When using a toolchain without 32-bit support, the check that eventually skips
      this test was causing some output about missing headers that could look
      confusing when running the test suite. Even on macOS where the test is not
      skipped, it was producing a linker warning. We now pipe all output to /dev/null
      as it is not informative for the user.
      64fa1723
  8. Jun 30, 2019
  9. Jun 27, 2019