Skip to content

Fix broken links #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/developer/developer-eclipse-setup-with-oomph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Hello World.

This should print "Hello World".

We strongly recommend browsing the system tests, which provide a concise overview of the capabilities of Lingua Franca. You can set up a project in the IDE for this using [these instructions](<../developer/regression-tests.mdx#browsing-and-editing-examples-in-the-lf-ide>).
We strongly recommend browsing the system tests, which provide a concise overview of the capabilities of Lingua Franca. You can set up a project in the IDE for this using [these instructions](regression-tests.mdx).

## Working on the Lingua-Franca Compiler

Expand Down
14 changes: 7 additions & 7 deletions docs/embedded/arduino.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Arduino
description: Developing LF Programs on Arduino.
---

# Overview
## Overview

To run Lingua Franca on an Arduino-compatible microcontroller, you can use the
`C` target with the `platform` target property set to `arduino`. The Lingua
Expand All @@ -13,7 +13,7 @@ To flash the compiled sketch onto a board, you need specify a Fully Qualified
Board Name (FQBN) as well as the port to which your board is connected. On this
page, we explain exactly how to do this.

## Prerequisites
### Prerequisites

- You need a development system that runs on macOS or Linux (there is currently no Windows support).
- [Arduino CLI](https://arduino.github.io/arduino-cli/) must be installed on your development system. Confirm that your installation works by running:
Expand All @@ -22,7 +22,7 @@ page, we explain exactly how to do this.
arduino-cli version
```

# Writing a simple Arduino Program
## Writing a simple Arduino Program

The most basic Arduino program (Blink) can be defined in LF like so:

Expand Down Expand Up @@ -56,7 +56,7 @@ can invoke Arduino library functions, just like one would do in the definition
of an Arduino `loop()`. For any setup that might be needed at the beginning of
execution, a reaction triggered by the built-in `startup` trigger can be used.

## Platform Options
### Platform Options

The `platform` property can also be used so specify more details. Along with `name: "arduino"`,
you can specify which `board`, `port`, and `baud-rate` you are using. If you want the program
Expand All @@ -77,14 +77,14 @@ target C {

The `board` is necessary for [building](#building) and the `port` is necessary for [flashing](#flashing).

### Baud rate of the serial port
#### Baud rate of the serial port

All Arduino boards have at least one serial port (also known as a UART or
USART), and some have several. By default, Lingua Franca will assume a default
baud rate of 9600. This parameter is tunable by adjusting the `baud-rate`
parameter in platform options.

# Building
## Building

In order to have `arduino-cli` compile the generated sketch file, a `board` must
be specified. If no `board` is set, `lfc` will run in `no-compile` mode, meaning
Expand Down Expand Up @@ -112,7 +112,7 @@ If you specify your FQBN under `board` in the `platform` target property, `lfc`
- for threaded programs (`arduino:mbed` boards), run:
`arduino-cli compile -b [FQBN] --build-property compiler.c.extra_flags="-DLF_THREADED -DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10" --build-property compiler.cpp.extra_flags="-DLF_THREADED -DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10"`

# Flashing
## Flashing

Arduino's can be flashed via USB. To find the port oto which your device is connected, run the following command:

Expand Down
10 changes: 5 additions & 5 deletions docs/reference/target-declaration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A target specification may have optional parameters, the names and values of whi
- [**runtime-version**](#runtime-version): Specify which version of the runtime system to use.
- [**rust-include**](#rust-include): (Rust only) A set of Rust modules in the generated project.
- [**scheduler**](#scheduler): (C only) Specification of the scheduler to us.
- [**single-file-project**](#single-file-project): (Rust only) If true, enables [single-file project layout](#single-file-layout).
- [**single-file-project**](#single-file-project): (Rust only) If true, enables [single-file project layout](target-language-details.mdx#single-file-layout).
- [**single-threaded**](#single-threaded): Specify to not use multithreading.
- [**timeout**](#timeout): A time value (with units) specifying the logical stop time of execution. See [Termination](../writing-reactors/termination.mdx).
- [**workers**](#workers): If using multiple threads, how many worker threads to create.
Expand Down Expand Up @@ -139,7 +139,7 @@ This specifies to use compiler `cc` instead of the default `gcc`, to use optimiz
</ShowOnly>

The comma on the last parameter is optional, as is the semicolon on the last line.
A target may support overriding the target parameters on the [command line](#command-line-arguments) when invoking the compiled program.
A target may support overriding the target parameters on the [command line](target-declaration.mdx#command-line-arguments) when invoking the compiled program.

## auth

Expand Down Expand Up @@ -269,7 +269,7 @@ This target does not support the `cargo-features` target option.
<ShowIf rs>
This is a list of features of the generated crate. Supported are:

- "cli" - enable [command-line argument parsing](#command-line-arguments)
- "cli" - enable [command-line argument parsing](target-declaration.mdx#command-line-arguments)

</ShowIf>
</ShowIfs>
Expand Down Expand Up @@ -383,7 +383,7 @@ This target does not support the `export-dependency-graph` target option.
<ShowIf cpp rs>
This parameter takes arguments `true` or `false` to specify whether the compiled binary will export its internal dependency graph as a dot graph when executed. This is a debugging utility.
<ShowOnly rs>
If a [CLI](#command-line-arguments) is generated, the target property is ignored, and the user should instead use the `--export-graph` flag of the generated program.
If a [CLI](target-declaration.mdx#command-line-arguments) is generated, the target property is ignored, and the user should instead use the `--export-graph` flag of the generated program.
</ShowOnly>
</ShowIf>
</ShowIfs>
Expand Down Expand Up @@ -552,7 +552,7 @@ This specifies the scheduler to use. See[Target Language Details](<../reference/
This target does not support the `single-file-project` target option.
</ShowIf>
<ShowIf rs>
If true, enables [single-file project layout](#single-file-layout).
If true, enables [single-file project layout](target-language-details.mdx#single-file-layout).
</ShowIf>
</ShowIfs>

Expand Down
14 changes: 7 additions & 7 deletions docs/reference/target-language-details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@ Which type of messages are actually produced by the compiled program can be cont
</ShowIf>
<ShowIf py>

The Python supports the [logging](<../introduction.md#logging>) target specification. This will cause the runtime to produce more or less information about the execution. However, user-facing functions for different logging levels are not yet implemented (see issue [#619](https://github.com/lf-lang/lingua-franca/issues/619)).
The Python supports the logging target specification. This will cause the runtime to produce more or less information about the execution. However, user-facing functions for different logging levels are not yet implemented (see issue [#619](https://github.com/lf-lang/lingua-franca/issues/619)).

</ShowIf>
<ShowIf ts>
Expand All @@ -2818,7 +2818,7 @@ The executable reacts to the environment variable `RUST_LOG`, which sets the log

Error and warning logs are on by default. Enabling a level enables all greater levels (i.e., `RUST_LOG=info` also enables `warn` and `error`, but not `trace` or `debug`).

Logging can also be turned on with the `--log-level` CLI option, if the application features a [CLI](<../introduction.md#command-line-arguments>).
Logging can also be turned on with the `--log-level` CLI option, if the application features a [CLI](target-declaration.mdx#command-line-arguments).

Note that the `logging` target property is ignored, as its levels do not match the Rust standard levels we use (those of the [`log` crate](https://docs.rs/log/)).

Expand Down Expand Up @@ -2992,7 +2992,7 @@ primitives and sleep functions.

### Multithreaded Implementation

By default, the C runtime system uses multiple worker threads in order to take advantage of multicore execution. The number of worker threads will match the number of cores on the machine unless the `workers` argument is given in the [target](<../introduction.md#threading>) statement or the `--workers` [command-line argument](<../introduction.md#command-line-arguments>) is given.
By default, the C runtime system uses multiple worker threads in order to take advantage of multicore execution. The number of worker threads will match the number of cores on the machine unless the `workers` argument is given in the [target](<../introduction.md#threading>) statement or the `--workers` [command-line argument](target-declaration.mdx#command-line-arguments) is given.

Upon initialization, the main thread will create the specified number of worker threads.
Execution proceeds in a manner similar to the [single threaded implementation](#single-threaded-implementation)
Expand All @@ -3001,17 +3001,17 @@ The execution algorithm ensures that no reaction executes until all reactions th

### Single Threaded Implementation

By giving the `single-threaded` [target option](<../introduction.md#single-threaded>) or the `--single-threaded` [command-line argument](<../introduction.md#command-line-arguments>), the generated program will execute the program using only a single thread. This option is most useful for creating programs to run on bare-metal microprocessors that have no threading support. On such platforms, mutual exclusion is typically realized by disabling interrupts.
By giving the `single-threaded` [target option](<../introduction.md#single-threaded>) or the `--single-threaded` [command-line argument](target-declaration.mdx#command-line-arguments), the generated program will execute the program using only a single thread. This option is most useful for creating programs to run on bare-metal microprocessors that have no threading support. On such platforms, mutual exclusion is typically realized by disabling interrupts.

The execution strategy is to have two queues of pending accessor invocations, one that is sorted by
tag (the **event queue**) and one that is sorted by priority (the **reaction queue**).
Execution proceeds as follows:

1. At initialization, an event for each timer is put on the event queue and logical time is initialized to the current time, represented as the number of nanoseconds elapsed since January 1, 1970.

2. At each logical time, pull all events from event queue that have the same earliest tag, find the reactions that these events trigger, and put them on the reaction queue. If there are no events on the event queue, then exit the program (unless the `--keepalive true` [command-line argument](<../introduction.md#command-line-arguments>) is given).
2. At each logical time, pull all events from event queue that have the same earliest tag, find the reactions that these events trigger, and put them on the reaction queue. If there are no events on the event queue, then exit the program (unless the `--keepalive true` [command-line argument](target-declaration.mdx#command-line-arguments) is given).

3. Wait until physical time matches or exceeds that earliest timestamp (unless the `--fast true` [command-line argument](<../introduction.md#command-line-arguments>) is given). Then advance logical time to match that earliest timestamp.
3. Wait until physical time matches or exceeds that earliest timestamp (unless the `--fast true` [command-line argument](target-declaration.mdx#command-line-arguments) is given). Then advance logical time to match that earliest timestamp.

4. Execute reactions in order of priority from the reaction queue. These reactions may produce outputs, which results in more events getting put on the reaction queue. Those reactions are assured of having lower priority than the reaction that is executing. If a reaction calls `lf_schedule()`, an event will be put on the event queue, not the reaction queue.

Expand Down Expand Up @@ -3381,7 +3381,7 @@ See [Target Declaration](../introduction.md) for the full list of supported targ

### The Executable

The executable name is the name of the main reactor _transformed to snake_case_: `main reactor RustProgram` will generate `rust_program`. See [Command-Line Arguments](<../introduction.md#command-line-arguments>) for details.
The executable name is the name of the main reactor _transformed to snake_case_: `main reactor RustProgram` will generate `rust_program`. See [Command-Line Arguments](target-declaration.mdx#command-line-arguments) for details.

### File layout

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tracing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

Tracing is a powerful tool when it comes to analysis and debugging of applications. Unfortunately, most tracing tools that are readily available are designed specifically for analyzing processes, threads and system calls. Specialized tools are required to enable analysis that is tailored to an alternative model of computation such as Reactors. The tools should be capable of understanding the fundamental concepts of the model, such as the distinction between logical and physical time, as well as structural units such as reactors and reactions. This page gives an overview of the currently supported trace mechanism, as well as an outline of alternative tools that could be useful in the future.

Tracing is different from [logging](<../introduction.md#logging>). Logging produces human-readable output in textual form and incurs significant overhead. Tracing produces binary data that must be further processed to be useful and is designed to have minimal impact on the execution time of a program.
Tracing is different from logging. Logging produces human-readable output in textual form and incurs significant overhead. Tracing produces binary data that must be further processed to be useful and is designed to have minimal impact on the execution time of a program.

Tracing is currently supported in the C, Python, and C++ targets. The mechanism used in C and Python is different from that used in C++. Tracing in C++ requires third-party tools that may only be available in Linux. Tracing in C and Python does not require any third-party tools.

Expand Down
4 changes: 2 additions & 2 deletions docs/writing-reactors/time-and-timers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

A key property of Lingua Franca is **logical time**. All events occur at an instant in logical time. By default, the runtime system does its best to align logical time with **physical time**, which is some measurement of time on the execution platform. The **lag** is defined to be physical time minus logical time, and the goal of the runtime system is maintain a small non-negative lag.

The **lag** is allowed to go negative only if the [`fast` target property](<../introduction.md#fast>) or the [`--fast`](<../introduction.md#command-line-arguments>) command-line argument is set to `true`. In that case, the program will execute as fast as possible with no regard to physical time.
The **lag** is allowed to go negative only if the [`fast` target property](<../introduction.md#fast>) or the [`--fast`](<../reference/target-declaration.mdx#command-line-arguments>) command-line argument is set to `true`. In that case, the program will execute as fast as possible with no regard to physical time.

<ShowOnly c cpp rs>

Expand Down Expand Up @@ -165,7 +165,7 @@ A reaction is always invoked at a well-defined logical time, and logical time do

## Timeout

By default, a Lingua Franca program will terminate when there are no more events to process. If there is a timer with a non-zero period, then there will always be more events to process, so the default execution will be unbounded. To specify a finite execution horizon, you can either specify a [`timeout` target property](<../introduction.md#timeout>) or a [`--timeout` command-line option](<../introduction.md#command-line-arguments>). For example, the following `timeout` property will cause the above timer with a period of one second to terminate after 11 events:
By default, a Lingua Franca program will terminate when there are no more events to process. If there is a timer with a non-zero period, then there will always be more events to process, so the default execution will be unbounded. To specify a finite execution horizon, you can either specify a [`timeout` target property](<../introduction.md#timeout>) or a [`--timeout` command-line option](<../reference/target-declaration.mdx#command-line-arguments>). For example, the following `timeout` property will cause the above timer with a period of one second to terminate after 11 events:

<NoSelectorTargetCodeBlock lf
c={`target C {
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const config: Config = {
projectName: 'lingua-franca', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
onBrokenMarkdownLinks: 'throw',

// Even if you don't use internationalization, you can use this field to set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Hello World.

This should print "Hello World".

We strongly recommend browsing the system tests, which provide a concise overview of the capabilities of Lingua Franca. You can set up a project in the IDE for this using [these instructions](<../developer/regression-tests.mdx#browsing-and-editing-examples-in-the-lf-ide>).
We strongly recommend browsing the system tests, which provide a concise overview of the capabilities of Lingua Franca. You can set up a project in the IDE for this using [these instructions](regression-tests.mdx).

## Working on the Lingua-Franca Compiler

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-0.5.0/embedded/arduino.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Arduino
description: Developing LF Programs on Arduino.
---

# Overview
## Overview

To run Lingua Franca on an Arduino-compatible microcontroller, you can use the
`C` target with the `platform` target property set to `arduino`. The Lingua
Expand All @@ -22,7 +22,7 @@ page, we explain exactly how to do this.
arduino-cli version
```

# Writing a simple Arduino Program
## Writing a simple Arduino Program

The most basic Arduino program (Blink) can be defined in LF like so:

Expand Down Expand Up @@ -84,7 +84,7 @@ USART), and some have several. By default, Lingua Franca will assume a default
baud rate of 9600. This parameter is tunable by adjusting the `baud-rate`
parameter in platform options.

# Building
## Building

In order to have `arduino-cli` compile the generated sketch file, a `board` must
be specified. If no `board` is set, `lfc` will run in `no-compile` mode, meaning
Expand Down Expand Up @@ -112,7 +112,7 @@ If you specify your FQBN under `board` in the `platform` target property, `lfc`
- for threaded programs (`arduino:mbed` boards), run:
`arduino-cli compile -b [FQBN] --build-property compiler.c.extra_flags="-DLF_THREADED -DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10" --build-property compiler.cpp.extra_flags="-DLF_THREADED -DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10"`

# Flashing
## Flashing

Arduino's can be flashed via USB. To find the port oto which your device is connected, run the following command:

Expand Down
Loading