Skip to content

Commit

Permalink
Improve error messages documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Apr 4, 2024
1 parent 5e93696 commit 5f700ce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,5 +465,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.4.3
Build Date UTC : 2024-03-31 22:13:35.244442+00:00
Build Date UTC : 2024-04-04 09:09:51.744520+00:00
-->
3 changes: 2 additions & 1 deletion docs/manual/errors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ <h1 id="error-messages">Error messages</h1>
<p>The compiler is organized in several stages:</p>
<ul>
<li>starting from the DSP source code, the parser builds an internal memory representation of the source program (typically known as an <a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract Source Tree</a>) made here of primitives in the <em>Box language</em>. A first class of errors messages are known as <em>syntax error</em> messages, like missing the <code>;</code> character to end a line, etc. </li>
<li>an expression in the Box language is then evaluated to produce an expression in the <em>Signal language</em> where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust <a href="https://hal.science/hal-02159011v1">Block Diagram Algebra</a>, and not following the connections rules will trigger a second class of errors messages, the <em>box connection errors</em>. Other errors can be produced at this stage when parameters for some primitives are not of the correct type. </li>
<li>the next step is to evaluate the definition of <code>process</code> programe entry point. This step is basically a λ-calculus interpreter with a strict evaluation. The result is ”flat” block-diagram where everything have been expanded. The resulting block is type annoatetd to discover its number of inputs and outputs.</li>
<li>the ”flat” block-diagram is then translated the <em>Signal language</em> where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust <a href="https://hal.science/hal-02159011v1">Block Diagram Algebra</a>, and not following the connections rules will trigger a second class of errors messages, the <em>box connection errors</em>. Other errors can be produced at this stage when parameters for some primitives are not of the correct type. </li>
<li>the pattern matching meta language allows to algorithmically create and manipulate block diagrams expressions. So a third class of <em>pattern matching coding errors</em> can occur at this level. </li>
<li>signal expressions are optimized, type annotated (to associate an integer or real type with each signal, but also discovering when signals are to be computed: at init time, control-rate or sample-rate..) to produce a so-called <em>normal-form</em>. A fourth class of <em>parameter range errors</em> or <em>typing errors</em> can occur at this level, like using delays with a non-bounded size, etc. </li>
<li>signal expressions are then converted in FIR (Faust Imperative Representation), a representation for state based computation (memory access, arithmetic computations, control flow, etc.), to be converted into the final target language (like C/C++, LLVM IR, Rust, WebAssembly, etc.). A fifth class of <em>backend errors</em> can occur at this level, like non supported compilation options for a given backend, etc.</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

Binary file modified docs/sitemap.xml.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion mkdocs/docs/manual/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Error messages are typically displayed in the form of compiler errors. They occu
The compiler is organized in several stages:

- starting from the DSP source code, the parser builds an internal memory representation of the source program (typically known as an [Abstract Source Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree)) made here of primitives in the *Box language*. A first class of errors messages are known as *syntax error* messages, like missing the `;` character to end a line, etc.
- an expression in the Box language is then evaluated to produce an expression in the *Signal language* where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust [Block Diagram Algebra](https://hal.science/hal-02159011v1), and not following the connections rules will trigger a second class of errors messages, the *box connection errors*. Other errors can be produced at this stage when parameters for some primitives are not of the correct type.
- the next step is to evaluate the definition of `process` programe entry point. This step is basically a λ-calculus interpreter with a strict evaluation. The result is ”flat” block-diagram where everything have been expanded. The resulting block is type annoatetd to discover its number of inputs and outputs.
- the ”flat” block-diagram is then translated the *Signal language* where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust [Block Diagram Algebra](https://hal.science/hal-02159011v1), and not following the connections rules will trigger a second class of errors messages, the *box connection errors*. Other errors can be produced at this stage when parameters for some primitives are not of the correct type.
- the pattern matching meta language allows to algorithmically create and manipulate block diagrams expressions. So a third class of *pattern matching coding errors* can occur at this level.
- signal expressions are optimized, type annotated (to associate an integer or real type with each signal, but also discovering when signals are to be computed: at init time, control-rate or sample-rate..) to produce a so-called *normal-form*. A fourth class of *parameter range errors* or *typing errors* can occur at this level, like using delays with a non-bounded size, etc.
- signal expressions are then converted in FIR (Faust Imperative Representation), a representation for state based computation (memory access, arithmetic computations, control flow, etc.), to be converted into the final target language (like C/C++, LLVM IR, Rust, WebAssembly, etc.). A fifth class of *backend errors* can occur at this level, like non supported compilation options for a given backend, etc.
Expand Down
3 changes: 2 additions & 1 deletion src/manual/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Error messages are typically displayed in the form of compiler errors. They occu
The compiler is organized in several stages:

- starting from the DSP source code, the parser builds an internal memory representation of the source program (typically known as an [Abstract Source Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree)) made here of primitives in the *Box language*. A first class of errors messages are known as *syntax error* messages, like missing the `;` character to end a line, etc.
- an expression in the Box language is then evaluated to produce an expression in the *Signal language* where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust [Block Diagram Algebra](https://hal.science/hal-02159011v1), and not following the connections rules will trigger a second class of errors messages, the *box connection errors*. Other errors can be produced at this stage when parameters for some primitives are not of the correct type.
- the next step is to evaluate the definition of `process` programe entry point. This step is basically a λ-calculus interpreter with a strict evaluation. The result is ”flat” block-diagram where everything have been expanded. The resulting block is type annoatetd to discover its number of inputs and outputs.
- the ”flat” block-diagram is then translated the *Signal language* where signals as conceptually infinite streams of samples or control values. The box language actually implements the Faust [Block Diagram Algebra](https://hal.science/hal-02159011v1), and not following the connections rules will trigger a second class of errors messages, the *box connection errors*. Other errors can be produced at this stage when parameters for some primitives are not of the correct type.
- the pattern matching meta language allows to algorithmically create and manipulate block diagrams expressions. So a third class of *pattern matching coding errors* can occur at this level.
- signal expressions are optimized, type annotated (to associate an integer or real type with each signal, but also discovering when signals are to be computed: at init time, control-rate or sample-rate..) to produce a so-called *normal-form*. A fourth class of *parameter range errors* or *typing errors* can occur at this level, like using delays with a non-bounded size, etc.
- signal expressions are then converted in FIR (Faust Imperative Representation), a representation for state based computation (memory access, arithmetic computations, control flow, etc.), to be converted into the final target language (like C/C++, LLVM IR, Rust, WebAssembly, etc.). A fifth class of *backend errors* can occur at this level, like non supported compilation options for a given backend, etc.
Expand Down

0 comments on commit 5f700ce

Please sign in to comment.