anchor.diff:            TestCaseData(bEq (bAfter "flag") (BNot (bBefore "flag")))
               .Returns(bEq (BNot (bBefore "flag"))
                            (BNot (bBefore "flag")))
  -            .SetName("Remove Boolean afters in after-before relation; reduce to tautology")
  +            .SetName("Remove Boolean afters in after-before relation")
             TestCaseData(BAnd [bAfter "flag"; bAfter "pole"])
               .Returns(BAnd [ BNot (bBefore "flag")
                               bAfter "pole" ])
  -            .SetName("Remove Boolean afters only if they are in the environment")
  +            .SetName("Remove Boolean afters only if in the environment")
             TestCaseData(BAnd [BGt (aAfter "serving", aAfter "t")
                                BOr [bAfter "flag"; bAfter "pole"]])
  -            .Returns(BAnd [ BGt ((AAdd [aBefore "serving"; AInt 1L]), aAfter "t")
  +            .Returns(BAnd [ BGt ((AAdd [aBefore "serving"
  +                                        AInt 1L]), aAfter "t")
                               BOr [BNot (bBefore "flag"); bAfter "pole" ]])
               .SetName("Remove afters of both types simultaneously")
  -          TestCaseData(BNot (BImplies (bAfter "flag", BGt (aAfter "serving", aAfter "t"))))
  +          TestCaseData(BNot (BImplies (bAfter "flag", BGt (aAfter "serving",
  +                                                           aAfter "t"))))
               .Returns(BNot (BImplies (BNot (bBefore "flag"),
                                        BGt (AAdd [aBefore "serving"; AInt 1L],
                                             aAfter "t"))))
  
positive.code:         [ ("flag", BNot (bBefore "flag"))
            ("turn", bBefore "turn") ]
          |> Map.ofList
      
      /// Test cases for rewriting Boolean expressions containing afters.
      static member AfterBools = 
          [ TestCaseData(aEq (aAfter "serving") (aAfter "ticket"))
              .Returns(aEq (AAdd [aBefore "serving"; AInt 1L])
                           (aBefore "ticket"))
              .SetName("Remove arithmetic afters in a simple equality")
            TestCaseData(aEq (aAfter "serving") (AAdd [aBefore "serving"; AInt 1L]))
              .Returns(aEq (AAdd [aBefore "serving"; AInt 1L])
                           (AAdd [aBefore "serving"; AInt 1L]))
              .SetName("Remove arithmetic afters in after-before relation; reduce to tautology")
            TestCaseData(BGt (aAfter "serving", aAfter "t"))
              .Returns(BGt (AAdd [aBefore "serving"; AInt 1L],
                            aAfter "t"))
              .SetName("Remove arithmetic afters only if they are in the environment")
            TestCaseData(bEq (bAfter "flag") (bAfter "turn"))
              .Returns(bEq (BNot (bBefore "flag"))
                           (bBefore "turn"))
  
negative.code: 
      /// Test discovery of Boolean before-after pairs.
      [<TestCaseSource("BoolAfterDiscoveries")>]
      member x.``Boolean before-after pairs should be found correctly`` b =
          b |> findBoolAfters |> Map.ofList
  
      /// Test cases for substituting afters in a func.
      static member AfterFuncs =
          [ TestCaseData({ Name = "foo"
                           Params = [ AExpr (aAfter "serving")
                                      BExpr (bAfter "flag") ] })
              .Returns({ Name = "foo"
                         Params = [ AExpr (AAdd [aBefore "serving"; AInt 1L])
                                    BExpr (BNot (bBefore "flag")) ] })
              .SetName("Substitute afters in a func with all-after params") ]
  
      /// Test substitution of afters in funcs.
      [<TestCaseSource("AfterFuncs")>]
      member x.``Afters in func params should be substituted correctly`` f =
          let sub = afterSubs OptimiserTests.AfterArithSubs
                              OptimiserTests.AfterBoolSubs
          subExprInVFunc sub f
  
      /// Test cases for simplification.
  