Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
language:connections [2022/05/13 08:44] rajit |
language:connections [2023/04/09 19:10] rajit [Simple connections] |
||
---|---|---|---|
Line 76: | Line 76: | ||
parameter variables as //immutable types// | parameter variables as //immutable types// | ||
defined once. | defined once. | ||
+ | |||
+ | ===== Assertions ===== | ||
+ | |||
+ | Sometimes it is useful to be able to check that a parameter (or an expression of parameters) has a reasonable | ||
+ | value. To express this, ACT supports explicit assertions. We use Hoare' | ||
+ | '' | ||
+ | <code act> | ||
+ | {x=8}; | ||
+ | </ | ||
+ | If a more meaningful message is required, the following syntax is also supported: | ||
+ | <code act> | ||
+ | {x=8 : "This assertion failed" | ||
+ | </ | ||
+ | which also reports the message specified when the assertion failed. | ||
+ | |||
+ | During circuit development/ | ||
+ | other or in fact disconnected from each other at a particular point during circuit construction. To assert that '' | ||
+ | <code act> | ||
+ | bool a; | ||
+ | bool b; | ||
+ | |||
+ | { a !== b : "a and b are connected connected!" | ||
+ | a = b; | ||
+ | { a === b : "a and b are not connected!" | ||
+ | { a !== b : "a and b are connected connected!" | ||
+ | </ | ||
+ | |||
+ | The operators '' | ||
===== Array and subrange connections ===== | ===== Array and subrange connections ===== |