TYPICAL / Guided Tour / Module system
Bottom 

Case-study: Module System of TYPICAL 0.51

IMAGE: container_acces

Use of module container_access

File containter_application
Output of type checking (container_application.tap)

Module container_access

non-variable body section parts

container_access.pl
container_lib.pl

variant 1

variant 2

container_quicksort.pl container_keysort.pl
container_quicksort.tap container_keysort.tap

The case study demostrates the possibilities of the module system of TYPICAL.

The module container_access is implemented in several files. It offers the types and predicates in order to handle a simple container structure. We show two different variants of the module container_access. The first variant consists of the files container_access.pl, container_lib.pl and container_quicksort.pl. The second variant uses the file container_keysort.pl instead of container_quicksort.pl (the two variants of the module use different sorting methods).

The interface section is in the corresponding module file container_access.pl. The non-variant body section parts are in the file container_access.pl and container_lib.pl. The variant body section part is in container_quicksort.pl or container_keysort.pl.

The module container_application (completely implemented in the corresponding module file) uses some exported predicates of the module container_access.

Top 
PREV: Use of a distributed body section
NEXT: Checking of given type definitions and predicate declarations

TYPICAL / Guided Tour / Module system