[Image] [Image] [Image] [Image]
Next: Zdatr 2.0 builtin library Up: Zdatr Version 2.0 Reference Previous: Log file

Library

The DATR Standard Library RFC 2.0 should be consulted for descriptions and examples of the library functions. In order to inherit from a library node, it must be defined as specified in the RFC 2.0, for example:

#uses Calc Permute Random Sort .

The library functions can be assigned to four main classes:

  1. Input-Output and Inter Process Control
  2. Calculator
  3. String
  4. Boolean
  5. Meta-object

A number of features of DATR implementations have not been standardised, and the RFC 2.0 does not take a position on the following issues, for which implmentation specific decisions have therefore been taken:

  1. Treatment of non-functional (non-DATR) theories with LHS path duplicates and implementations differ wildly in their solutions. A strict solution would be to reject the theory, a lax solution would be to take an arbitrary member of such a set. In Zdatr 2.0 the outcome is defined as unpredictable.
  2. The implementation of standard library functions can conceivably be in the form of builtins or, as is common practice with many other languages, as standard library files implemented in DATR. In Zdatr 2.0 the following division of labour between builtins and DATR defined functions is defined:[Image]

  3. The external library functions, which are implemented in DATR, use Zdatr 2.0 specific naming conventions in order to avoid name space clashes. These conventions must be avoided in user theories.
  4. Character level tokenisation conventions based on common implementation practice had to be defined for Zdatr 2.0:

The Zdatr 2.0 library functions are RFC compliant, but introduce a few (ignorable) additional properties for convenience in developing large and possibly hybrid theories in practical project contexts.

Builtins are required by RFC to be declared by the #uses directive. Optionally, builtins may be renamed.




[Image] [Image] [Image] [Image]
Next: Zdatr 2.0 builtin library Up: Zdatr Version 2.0 Reference Previous: Log file

© Dafydd Gibbon Sun Sep 13 17:17:46 MET DST 1998