diff --git a/docs/spec/validation.md b/docs/spec/validation.md index a692b0a3de06993395e6c41bc5332094cd78bf76..9a0fa0b9419e50dce43024c892d7c4f5fc0e9525 100644 --- a/docs/spec/validation.md +++ b/docs/spec/validation.md @@ -180,10 +180,10 @@ The `put` function may put a value into an output port. This function may only b If a `put` function is called in a branch that has previously assumed that nothing will ever be sent through the port provided as argument, then that branch is considered inconsistent and will be removed. If a `put` function is called in a branch that has not decided on the firing state of a port then it will be forced to fire without forking of execution. -The put function would be written in PDL as: +The put function would be written in PDL as, if it would support the C-like `void` type: ``` -func put(out output_port, T value_to_put) -> T { /* ... */ } +func put(out output_port, T value_to_put) -> void { /* ... */ } ``` **note**: Whether the `put` statement blocks until a corresponding `get` has been performed has not yet been decided. @@ -239,6 +239,11 @@ func assert(bool test) -> void { /* ... */ } ### Synchronous Blocks +Synchronous blocks may only be placed in primitive components. Synchronous blocks may not be nested. One may not jump into or out of a synchronous block. + ### Use of Builtin Procedures -### Control-Flow Rules \ No newline at end of file +Builtin procedures that do not have a return value (currently only `put` and `assert`) may not be called at the expression level and must be called at the statement level. i.e. the parent of the builtin call expression may only be the `StmtExpr` statement. + +### Control-Flow Rules +