Rules are called all the information about the problem domain (in our case the geometry of convex polyhedra) polymake needs to response adequately to user's requests. They include descriptions of properties, algorithms computing new properties, as well as some technical staff.
Rules are kept in special rule files. A rule file has nearly the same
format as the data files: it consists of
sections separated by empty lines. The first line of a section is called
rule header, the rest makes up the rule body. Long header lines can be
broken into several lines, placing the continuation character
\ at the end of each but the last line. Comments can be scattered
everywhere in the rule file; they are recognized by the leading
# character.
Polymake parses the rule files (either specified in the
argument list or the default file
poly.rules) during the startup, before it reads the data file.
There are several kinds of sections that may occur in a rule file. They are recognized by the header syntax. In the simplest case it is a fixed keyword staying alone in the header line.
package Rules; use strict;/') is tried as is;./' or `../'
is tried relatively to the directory containing the including rule file;.rules. Any other
names lead polymake to suppose that the file is a normal perl script, and thus it
parses it much the same way as the require directive does.
INCLUDE by the perl subdirectories found beneath installation directory/modules.
--help mode. In the meanwhile, these sections became nearly out of use,
as the whole helpful (as we hope) documentation has been migrated to HTML files.
All other sections are treated as production rules.