Heta compiler of version 0.8 follows the Heta standard 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.
See also Migrate to v0.6, Migrate to v0.7.
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.
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.
-
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.
-
Install the latest version of Heta compiler.
npm install -g heta-compiler heta -v # must be v0.8.0 or newer
-
If you use declaration file platform.json update the property to
builderVersion: ^0.7.0
.{ "builderVersion": "^0.8.0", "id": "my-platform", "notes": "platform notes", "version": "v0.1.0", ... }
-
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 versionnthRoot(x)
=>sqrt(x)
Only for one argument version
- 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
x1 := 15 * sinh(l1);
New code
#defineFunction sinh {
arguments: [x],
math: "(exp(x) - exp(-x)) / 2"
};
x1 := 15 * sinh(l1);
-
Run build to check units consistency and fix if necessary.
-
Check building with
heta build
and make a commit if you use git.