Skip to content

Commit 34e48a8

Browse files
authored
Fix broken links to source code (#30)
1 parent bff4584 commit 34e48a8

File tree

7 files changed

+61
-63
lines changed

7 files changed

+61
-63
lines changed

docs/how-to-guides/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For convenience, `make lint` will run `dune build @fmt` and `make fix` will run
3434
## Git Blame
3535

3636
Since automatic code formatting commits will obscure `git blame` we maintain a
37-
file [.git-blame-ignore-revs](.git-blame-ignore-revs) that will contain the
37+
file [.git-blame-ignore-revs](https://github.com/miking-lang/miking/blob/develop/.git-blame-ignore-revs) that will contain the
3838
commit hashes of code formatting commits. We can then run `git blame`, ignoring
3939
these commits as:
4040

docs/reference/externals.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ in an early stage of development. The example below only covers the case where
1414
OCaml is the target language.
1515

1616
You can find an example of externals definitions in
17-
[stdlib/ext/math-ext.mc](stdlib/ext/math-ext.mc) and
18-
[stdlib/ext/math-ext.ext-ocaml.mc](stdlib/ext/math-ext.ext-ocaml.mc).
17+
[stdlib/ext/math-ext.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/math-ext.mc) and
18+
[stdlib/ext/math-ext.ext-ocaml.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/math-ext.ext-ocaml.mc).
1919

2020
For the sake of this example, lets say we want to define the exponential
2121
function and that miking targeting OCaml should use `Float.exp` from OCaml's
2222
standard library for its implementation.
2323

24-
We first define the external in a file under [stdlib/ext](stdlib/ext), let's
25-
say [stdlib/ext/math-ext.mc](stdlib/ext/math-ext.mc), as
24+
We first define the external in a file under [stdlib/ext](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext), let's
25+
say [stdlib/ext/math-ext.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/math-ext.mc), as
2626

2727
```mc
2828
external externalExp : Float -> Float
@@ -49,7 +49,7 @@ partially applied.
4949
As a temporary solution, the next step is to supply a list of implementation for
5050
our external in the language we target for compilation (in this case OCaml). We
5151
do this by creating a file
52-
[stdlib/ext/math-ext.ext-ocaml.mc](stdlib/ext/math-ext.ext-ocaml.mc)
52+
[stdlib/ext/math-ext.ext-ocaml.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/math-ext.ext-ocaml.mc)
5353
and in it we define a map from external
5454
identifiers to a list of implementations as follows:
5555

@@ -75,7 +75,7 @@ let mathExtMap =
7575
This map associates the `externalExp` external to a list of expressions in the
7676
target language, which here only has one element, namely the function
7777
`Float.exp` from OCaml's standard library. The field `ty` encode the OCaml type
78-
of this value (see [stdlib/ocaml/ast.mc](stdlib/ocaml/ast.mc)), which is needed
78+
of this value (see [stdlib/ocaml/ast.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ocaml/ast.mc)), which is needed
7979
to convert values between miking and OCaml. In the case where you have multiple
8080
implementations, the compiler will try to pick the implementation which gives
8181
the least amount of overhead when converting to and from OCaml values. The
@@ -85,11 +85,11 @@ none are needed since it is part of the standard library. If let's say we wanted
8585
to use `Float.exp` from a library `foo`, then we should instead have the field
8686
`libraries = ["foo"]`. Finally, we need to add `mathExtMap` to
8787
`globalExternalImplsMap` in
88-
[stdlib/ocaml/external-includes.mc](stdlib/ocaml/external-includes.mc).
88+
[stdlib/ocaml/external-includes.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ocaml/external-includes.mc).
8989

9090
### Conversion between values
9191
Conversion between Miking values and OCaml values is defined in
92-
[stdlib/ocaml/external.mc](stdlib/ocaml/external.mc). Since externals are in an
92+
[stdlib/ocaml/external.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ocaml/external.mc). Since externals are in an
9393
early stage of development these conversions are not complete and subject to
9494
change.
9595

@@ -139,16 +139,16 @@ type MyType
139139
```
140140
then no conversion is performed to and from this type.
141141

142-
Please consult [stdlib/ext/ext-test.mc](stdlib/ext/ext-test.mc) and
143-
[stdlib/ext/ext-test.ext-ocaml.mc](stdlib/ext/ext-test.ext-ocaml.mc), for more
142+
Please consult [stdlib/ext/ext-test.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/ext-test.mc) and
143+
[stdlib/ext/ext-test.ext-ocaml.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/ext-test.ext-ocaml.mc), for more
144144
examples.
145145

146146
### Sundials
147147
A more involved example on the use of externals is an interface to the
148148
[Sundials](https://computing.llnl.gov/projects/sundials) numerical DAE solver.
149149
You find the implementation in
150-
[stdlib/sundials/sundials.mc](stdlib/sundials/sundials.mc) and
151-
[stdlib/sundials/sundials.ext-ocaml.mc](stdlib/sundials/sundials.ext-ocaml.mc).
150+
[stdlib/sundials/sundials.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/sundials/sundials.mc) and
151+
[stdlib/sundials/sundials.ext-ocaml.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/sundials/sundials.ext-ocaml.mc).
152152
Note that these externals depends on the library `sundialsml`.
153153

154154

@@ -198,8 +198,8 @@ To install for the current user, run `make install` as usual.
198198
### Ipopt
199199
Another example use of externals is an interface to the constrained Non-Linear
200200
Program solver [Ipopt](https://coin-or.github.io/Ipopt/). This interface is
201-
defined in [stdlib/ipopt/ipopt.mc](stdlib/ipopt/ipopt.mc) and
202-
[stdlib/ipopt/ipopt.ext-ocaml.mc](stdlib/ipopt/ipopt.ext-ocaml.mc). This library
201+
defined in [stdlib/ipopt/ipopt.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ipopt/ipopt.mc) and
202+
[stdlib/ipopt/ipopt.ext-ocaml.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/ipopt/ipopt.ext-ocaml.mc). This library
203203
depends on both the OCaml library [ipoptml](https://github.com/br4sco/ipoptml)
204204
and the ipopt c library.
205205

docs/reference/parallel-programming.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ atomic operations and threads running on multiple cores.
1010
The parallel programming primitives consist of atomic references and functions
1111
for creating and synchronizing threads. In addition to the examples below, more
1212
documentation can be found in the standard library at
13-
[stdlib/multicore](stdlib/multicore/).
13+
[stdlib/multicore](https://github.com/miking-lang/miking/blob/develop/src/stdlib/multicore/).
1414

1515
## Atomic References
1616

1717
Atomic references are similar to ordinary references, except that operations
1818
performed on them are *atomic*, which means that no other execution thread can
1919
interfere with the result. In other words, they are safe to use in
2020
multi-threaded execution. Atomic references are provided in
21-
[multicore/atomic.mc](stdlib/multicore/atomic.mc).
21+
[multicore/atomic.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/multicore/atomic.mc).
2222

2323
`atomicMake` creates a new atomic reference and gives it an initial value. The
2424
value of the atomic reference can be read by `atomicGet`:
@@ -65,7 +65,7 @@ utest atomicFetchAndAdd a (subi 0 45) with 3 in
6565
## Multi-Threaded Execution
6666

6767
Functions for handling threads are provided in
68-
[multicore/threads.mc](stdlib/multicore/threads.mc).
68+
[multicore/threads.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/multicore/threads.mc).
6969
The following example program spawns 10 threads that compete for printing their
7070
IDs:
7171

@@ -110,8 +110,8 @@ different runs.
110110

111111
Externals for thread synchronization in the form of mutual exclusion locks and
112112
condition variables are defined in
113-
[multicore/mutex.mc](stdlib/multicore/mutex.mc) and
114-
[multicore/cond.mc](stdlib/multicore/cond.mc), respectively.
113+
[multicore/mutex.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/multicore/mutex.mc) and
114+
[multicore/cond.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/multicore/cond.mc), respectively.
115115

116116
## Probability distributions
117-
Externals for probability distributions are defined in `stdlib/ext/dist-ext.mc`. To use these, you must install the `opam` package `owl` (i.e., `opam install owl`)
117+
Externals for probability distributions are defined in `https://github.com/miking-lang/miking/blob/develop/src/stdlib/ext/dist-ext.mc`. To use these, you must install the `opam` package `owl` (i.e., `opam install owl`)

docs/tutorials/mexpr-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ utest tensorGetExn t0 [] with 'b' in
509509
()
510510
```
511511

512-
The file [tensor.mc](stdlib/tensor.mc) contains a wide variety of useful tensor
512+
The file [tensor.mc](https://github.com/miking-lang/miking/blob/develop/src/stdlib/tensor.mc) contains a wide variety of useful tensor
513513
functions. We can import it into a program using the `include`
514514
keyword (more on this [later](#MLang)). We can construct a rank 1
515515
tensor (i.e. vector) as

docusaurus.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ const config = {
1414
organizationName: 'miking-lang',
1515
trailingSlash: false,
1616
deploymentBranch: 'gh-pages',
17-
// TODO We should eventually fix broken links and throw if any are found
18-
// onBrokenLinks: 'throw',
19-
onBrokenLinks: 'warn',
20-
onBrokenMarkdownLinks: 'warn',
17+
onBrokenLinks: 'throw',
18+
onBrokenMarkdownLinks: 'throw',
2119
favicon: 'img/favicon.ico',
2220

2321
presets: [

src/pages/miking-dppl-readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ For this to be used, the `SMC` macro call in main must be
277277
changed to: `SMC(sampleMean);`
278278

279279
This example can be found in
280-
[`rootppl/models/simple-examples/coin_flip_mean.cu`](rootppl/models/simple-examples/coin_flip_mean.cu)
280+
[`rootppl/models/simple-examples/coin_flip_mean.cu`](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/simple-examples/coin_flip_mean.cu)
281281
and, being in the `rootppl` directory, compiled with:
282282
```
283283
rppl models/simple-examples/coin_flip_mean.cu
@@ -301,7 +301,7 @@ no statements that alter the weights of the particles.
301301
Below follows some examples, these are all models that are defined within one single block.
302302

303303
##### Coin Flip Posterior
304-
Full example: [`rootppl/models/simple-examples/coin_flip.cu`](rootppl/models/simple-examples/coin_flip.cu)
304+
Full example: [`rootppl/models/simple-examples/coin_flip.cu`](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/simple-examples/coin_flip.cu)
305305

306306
In this model, a bias for a coin is sampled from the prior beta distribution. Then we observe that the coin flip is true. This model thus infers the
307307
posterior distribution of the bias, conditioned on the observation.
@@ -316,7 +316,7 @@ BBLOCK(coinFlip, {
316316
```
317317

318318
##### Gaussian Mixture Model
319-
Full example: [`rootppl/models/simple-examples/mixture.cu`](rootppl/models/simple-examples/mixture.cu)
319+
Full example: [`rootppl/models/simple-examples/mixture.cu`](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/simple-examples/mixture.cu)
320320

321321
This model demonstrates an example of *stochastic branching*, meaning that different code is executed depending on the outcome of the sample.
322322
```CUDA
@@ -333,7 +333,7 @@ BBLOCK(mixture, {
333333
```
334334

335335
##### Geometric Distribution (Recursive)
336-
Full example: [`rootppl/models/simple-examples/geometric_recursive.cu`](rootppl/models/simple-examples/geometric_recursive.cu)
336+
Full example: [`rootppl/models/simple-examples/geometric_recursive.cu`](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/simple-examples/geometric_recursive.cu)
337337

338338
This model combines stochastic branching with recursion. Basic blocks do not fully support recursion themselves, as they take no custom arguments or return values. Instead, a helper function is used to express the recursive model:
339339

@@ -357,7 +357,7 @@ Note that the helper function takes its return value and parameters comma-separa
357357

358358
While recursive functions is supported by CUDA, iterative solutions are encouraged. Below is the same model, implemented with a loop instead.
359359
##### Geometric Distribution (Iterative)
360-
Full example: [`rootppl/models/simple-examples/geometric_iterative.cu`](rootppl/models/simple-examples/geometric_iterative.cu)
360+
Full example: [`rootppl/models/simple-examples/geometric_iterative.cu`](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/simple-examples/geometric_iterative.cu)
361361
```CUDA
362362
BBLOCK(geometric, {
363363
int numFlips = 1;
@@ -370,8 +370,8 @@ BBLOCK(geometric, {
370370

371371
#### Phylogenetic Models
372372

373-
More sophisticated models can be found in the [phylogenetics directory](rootppl/models/phylogenetics). These probabilistic
374-
models to inference on observed phylogenetic trees. These observed trees can be found in [phylogenetics/tree-utils/trees.cuh](rootppl/models/phylogenetics/tree-utils/trees.cuh).
373+
More sophisticated models can be found in the [phylogenetics directory](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/phylogenetics). These probabilistic
374+
models to inference on observed phylogenetic trees. These observed trees can be found in [phylogenetics/tree-utils/trees.cuh](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/phylogenetics/tree-utils/trees.cuh).
375375
The correct phylogenetic models contain a link in the top of the file to the WebPPL source code used as reference when implementing them.
376376
These models contain a number of new things, e.g.:
377377
- Multiple basic blocks
@@ -381,8 +381,8 @@ These models contain a number of new things, e.g.:
381381
- Resampling throughout the traversal of the observed tree
382382

383383
##### Constant-rate birth-death
384-
In [phylogenetics/crbd](rootppl/models/phylogenetics/crbd), the constant-rate birth-death models can be found.
385-
The most interesting file here is [crbd.cu](rootppl/models/phylogenetics/crbd/crbd.cu) as it is a correct model
384+
In [phylogenetics/crbd](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/phylogenetics/crbd), the constant-rate birth-death models can be found.
385+
The most interesting file here is [crbd.cu](https://github.com/miking-lang/miking-dppl/blob/master/rootppl/models/phylogenetics/crbd/crbd.cu) as it is a correct model
386386
used by evolutionary biologists. This model uses a pre-processed DFS traversal path over the observed tree, rather than using a call stack.
387387

388388
##### Further phylogenetic models

0 commit comments

Comments
 (0)