[Haskell-cafe] ANN: atom-0.1.3

miaubiz miaubiz at gmail.com
Mon Jan 18 09:19:12 EST 2010

Tom Hawkins-2 wrote:
> If you are using the latest version of Atom, asserts are checked
> between the execution of every rule.  The way you've coded it, it may
> appear as if the assertions are checked along with the associated
> rules, but this is not the case.  And not only are the assertions not
> checked with the rules, they don't follow the period or phase
> constraints either.  So what you have is essentially 2 assertions that
> are being checked at every time instance and between every atom state
> update.

how should I feed test data into my system?

I am having quite a bit of trouble with testing an atom with hysteresis
because I always end up having an assertion fire before and after my test
data is updated.

I have essentially the following code:

inputs = [1, 2, 3, 4, 5]
expected = [6, 7, 8, 9, 10]

output <- word16' "output"
input <- word16' "input"

input <== inputs !. clock
assert "fiveIsAdded" $ (value output) ==. (expected !. clock)

  atom "addFive" $ period 1 $ do
    output <== (value input 5) + 5

the only way I am able to write assertions is to duplicate the logic of
hysteresis into the assertions, which is not a reasonable way to go for me.  

Tom Hawkins-2 wrote:
>> because covered is the second word of the line from the log, the name of
>> cover must be a single word. assertions and atoms can contain spaces as
>> far
>> as I can tell.
> No, they really shouldn't.  I've been meaning to add some checks to
> enforce some naming rules, but haven't gotten around to it.

good to know.  thanks for the heads up.

View this message in context: http://old.nabble.com/ANN%3A-atom-0.1.3-tp26624813p27211086.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list