assert => ASSERT / ABORT
assert => ASSERT / ABORT

Note: Under -O3, assert goes away.  Mace developers have been using (for better
or worse) runtime assertion checking intended to test safety in deployment.

Probably we need a better design - one which allows Mace developers to distinguish two uses of ASSERT...

1) ASSERT(X) => if (!X) { ABORT() }X

  Assertions which should be maintained as runtime checks.

2) ASSERT(X) => X

  Assertions which can be trusted at runtime, but the code needs to run.  (lock acquisition)

3) ASSERT(X) =>

  Assertions of purely testing tests.

Note the pre-existance of EXPECT(X), which becomes if (!X) { print error; }

Perhaps this:

1) REQUIRE(X)

2) TRUST(X)

3) VALIDATE(X)

Thoughts?


-Chip




------------------------------------------------------------------------
r1142 | ckillian | 2011-06-15 14:05:41 -0400 (Wed, 15 Jun 2011) | 37 lines

jojochuang/eventwave,jojochuang/eventwave,jojochuang/eventwave,jojochuang/eventwave,jojochuang/eventwave