next up previous
Next: 3.2 Weight Learning Up: 3 Quick Start Previous: 3 Quick Start

3.1 Input Files

Predicates and functions are declared and first-order formulas are specified in .mln files. For example, at the top of univ.mln, we declare the predicates professor, student, etc., and the function motherOf as well as the types of their parameters. The first appearance of a predicate or function in a .mln file is taken to be its declaration. You can express arbitrary first-order formulas in a .mln file (more on this in Section 4). Note that a variable must begin with a lowercase character, and a constant with an uppercase one in a formula. A formula can be preceded by a weight or terminated by a period, but not both. A period signifies that a formula is ``hard'' (i.e., worlds that violate it should have zero or negligible probability).

Types and constants are also declared in .mln files. For example, in univ-train.mln we declare the types person, title, etc., and their associated constants. These declarations must occur before formulas in the .mln file.

Ground atoms are defined in .db (database) files. Ground atoms preceded by ! (e.g., !professor(Bart)) are false, by ? are unknown, and by neither are true. If the closed-world assumption is made for a predicate, its ground atoms that are not defined in a .db file are false, while if the open world assumption is made, its undefined ground atoms are unknown. In univ-train.db, we specified all the true ground atoms of the predicates professor, student, etc. Function mappings are defined in the .db file, as well.

Linked-in functions and predicates are defined in a separate C++ file. An example file, functions.cpp is supplied. There are certain guidelines which must be followed when defining linked-in functions. This is discussed in Section 5.


next up previous
Next: 3.2 Weight Learning Up: 3 Quick Start Previous: 3 Quick Start
Marc Sumner 2010-01-22