Skip to content

Commit

Permalink
update license, migrate-to-v0.8 page
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Feb 21, 2024
1 parent 0a843b9 commit 1a3b194
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2019-2023 InSysBio LLC
Copyright 2019-2024 Heta project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

To read the full documentation, visit the Heta project homepage: <https://hetalang.github.io/#/heta-compiler/>.

See also [Migrate to v0.6](./migrate-to-v0.6) and [Migrate to 0.7](./migrate-to-v0.7).
See also [Migrate to v0.6](./migrate-to-v0.6), [Migrate to 0.7](./migrate-to-v0.7), [Migrate to 0.8](./migrate-to-v0.8).

## Table of contents

Expand Down Expand Up @@ -218,4 +218,4 @@ The original author of the project is [Evgeny Metelkin](https://github.com/metel
- In 2020 the tool was renamed to **Heta compiler** and published as a Free Open Source project on [GitHub](https://GitHub.com/hetalang/heta-compiler) under Apache 2.0 license. Since then Heta compiler has been developed in the framework of [Heta project](https://hetalang.github.io/).
Copyright 2019-2023, InSysBio LLC
Copyright 2019-2024, Heta project
2 changes: 1 addition & 1 deletion migrate-to-v0.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Heta compiler of **version 0.7** follows the [Heta standard](/specifications/) of **version 0.4.4**.

To use the newer Heta compiler you should make some updates to thee platform files. To see the other updates see [change log](./CHANGELOG).
To use the newer Heta compiler you should make some updates to the platform files. To see the other updates see [change log](./CHANGELOG).

See also [Migrate to v0.6](./migrate-to-v0.6).

Expand Down
73 changes: 73 additions & 0 deletions migrate-to-v0.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Migrate from v0.7 to v0.8

Heta compiler of **version 0.8** follows the [Heta standard](/specifications/) of **version 0.4.5**.

To use the newer Heta compiler you should make some updates to the platform files. To see the other updates see [change log](./CHANGELOG).

See also [Migrate to v0.6](./migrate-to-v0.6), [Migrate to v0.7](./migrate-to-v0.7).

## Changes in core mathematical functions

The most critical changes in heta-compiler refers to list of supported mathematical functions.
It follows the new Heta standard v0.4.5, see details [here](https://hetalang.github.io/#/specifications/math?id=list-of-functions).

### Update of units check

The new version extends checking units of measurements, namely it checks units consintency not only in left and right sides of expressions but also in ODEs which will be producesed after compilation.

## Update modeling code

1. **Check** that your platform can be build without errors in the current builder v0.7.x.

*If you use Git you should commit the latest changes before updating formats.*

1. Install the latest version of **Heta compiler**.

```bash
npm install -g heta-compiler
heta -v
# must be v0.8.0 or newer
```
1. If you use declaration file **platform.json** update the property to `builderVersion: ^0.7.0`.

```json
{
"builderVersion": "^0.8.0",
"id": "my-platform",
"notes": "platform notes",
"version": "v0.1.0",
...
}
```

1. Check if you use the mathematical functions which change their rules and update the code based on the list.

- `log(x, b)` => `logbase(x, b)` Only for two argument version
- `nthRoot(x)` => `sqrt(x)` Only for one argument version

1. Check if you use the mathematical functions which currently is not supported and add `#defineFunction` to support them.

__List of unsupported functions__

`acosh(x)`, `acoth(x)`, `acsch(x)`, `asech(x)`, `asinh(x)`, `atanh(x)`, `cosh(x)`, `coth(x)`, `csch(x)`, `sech(x)`, `sinh(x)`, `tanh(x)`

__Example:__

Old code
```heta
x1 := 15 * sinh(l1);
```

New code
```heta
#defineFunction sinh {
arguments: [x],
math: "(exp(x) - exp(-x)) / 2"
};
x1 := 15 * sinh(l1);
```

1. Run build to check units consistency and fix if necessary.

1. Check building with `heta build` and make a commit if you use git.

0 comments on commit 1a3b194

Please sign in to comment.