Plugins

Herbie allows plugins to define additional functions, rewrite rules, and even number representations. Plugins are be separately installed. Once installed, Herbie automatically loads and uses them.

Posit arithmetic

The softposit-herbie plugin implements support for posit arithmetic. Install it with:

raco pkg install --auto softposit-herbie

Note that this plugin uses the SoftPosit library, which only supports Linux platforms, and even then is reported to misbehave on some machines.

Once softposit-herbie is installed, specify :precision posit16 to inform Herbie that it should assume the core's inputs and outputs are posit numbers. Other posit sizes (from 8 to 128 bits) and also quires (for 8, 16, and 32 bits) are available, but are poorly supported.

Developing plugins

The plugin functionality is currently highly experimental; if you would like to develop your own plugins, please write to the mailing list.