common

File common.str
Author unknown
Since unknown

This module defines generic strategies for packing aset of modules reachable from a root module and forflattening a set of modules into a single program.

Module systems allow the definition of a program to besplit into separate units stored in separate files. Forlanguages that do not support separate compilation (suchas grammar formalisms) these separate units need to becombined to create the whole program.

Aspects of module packing and flattening

- finding the module associated with the module name- doing something with the module, i.e., adding it to the result- finding the imports in a module- keeping track of which modules have already been inlined




Statistics


General
Lines of code 89
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 8 (100% documented)
Rule number 0
DynamicRule number 0



Strategy summary


flatten(Strategy imp, Strategy nameeq, Strategy getcontent) <flatten> (root, mods)| produces a flattened version of the root module common.str
get-imports(Strategy imp) n/a common.str
pack(Strategy parser, Strategy imp) Packing a module consists of collecting all modules into a single file common.str
unpack(Strategy wrapper, Strategy getname, Strategy ext) Unpacking is the reverse of packing, i common.str

Rule summary


PackInit n/a common.str
WriteMod(Strategy getname, Strategy write, Strategy ext) n/a common.str



Strategy details


ATerm flatten(Strategy imp, Strategy nameeq, Strategy getcontent)
File common.str
Author unknown
Since unknown
 

<flatten> (root, mods)| produces a flattened version of the root module.



 
ATerm pack(Strategy parser, Strategy imp)
File common.str
Author unknown
Since unknown
 

Packing a module consists of collecting all modules intoa single file.



 
ATerm unpack(Strategy wrapper, Strategy getname, Strategy ext)
File common.str
Author unknown
Since unknown
 

Unpacking is the reverse of packing, i.e., writing each modulein a list of modules to a separate file.