This section outlines some examples that illustrate the CASL language constructs for use in libraries.
The specifications and views in a self-contained library are simply listed in a bottom-up order: a name has to be defined before it is referenced.
library CoFI_Beans
- spec
- Nat = ...
- view
- ... = ...
- arch spec
- ... = ...Nat...
- unit spec
- ... = ...
Other libraries may refer to specifications in registered libraries at other Internet sites by including explicit downloadings, optionally providing a different local name for the remote specification:
from CoFI_Beans get List, Nat |-> NaturalLibraries may have different versions, indicated by their names, both when defining libraries and downloading specifications from them:
library CoFI_Beans version 1.2If the version number is omitted in a library definition, it is implicitly 0. The default version when referring to a library is the one that has been registered with the greatest version number.from CoFI_Plant version 1.0.1 get...