next up previous contents
Next: Class/Object Hierarchy Up: Overview Previous: Aims of the Project   Contents

Naming and Font Conventions

I have tried to be consistent with naming, particularly during the recent reorganisation in preparation for going open source. However, at this stage the project was around 4 years old and there are some exceptions to the rules.

The following table should explain all the font usage in this manual:

Thing Example Description Exceptions
Perl program or package perlgp-run.pl normal font, with trailing .pl or .pm  
File or directory name `results/best.pl' normal font, in single quotes see text
Environment variable PERLGP_LIB normal capitals, no $  
Public object method loadSet() typewriter font, trailing (), no underscores, capitalised words, except first word, which is usually a verb Fitness(), Age(), mutation operators
Private object method _init_tree() typewriter font, leading underscore, usually all lowercase with underscores between words  
Mutation operator copy_subtree() typewriter font, lowercase with underscores, trailing ()  
Other Perl functions eval() typewriter font, trailing ()  
Object attribute AlarmTime typewriter font, no underscores, capitalised words don't forget the get and set forms: $self->KeepBest() and $self->KeepBest(5)
Variables fitness italics  
Data types NUMBER small capitals  



Finally, some subroutines and methods take a hash table as their argument. This is a way of having ``named'' arguments, which don't have to be given in any particular order (and can be left out if not required). In the manual, this is presented as:

Arguments: ArgName1 => TYPE1, ArgName2 => TYPE2

Be extremely careful typing these argument names, because if you spell them wrong, it will probably silently ignore it.

The type called ATTRIBUTE-HASH is just a hash where the keys are valid Attribute names, and the values are the values you want them to have.

Non absolute file names are always relative to the current ``experiment directory'', which is the directory which contains the Algorithm.pm, Individual.pm and so on.


next up previous contents
Next: Class/Object Hierarchy Up: Overview Previous: Aims of the Project   Contents
Bob MacCallum 2003-02-03