Previous topic  Top  Next topic  Print this Topic
 

Modules

 
Modules help to organize knowledge of different domains
You may define for each statement in which module it is valid
In one obl file only content for one module is allowed

Sample

File one

:- default prefix = "http://www.carsoftheworld.com#".

:- module = <http://www.carsoftheworld.com/british>.

 

Jaguar:Car.

 

File two

:- default prefix = "http://www.animalsoftheworld.com#".

:- module = <http://www.animalsoftheworld.com/asia>.

 

Jaguar:animal.

 

Querying modules:

?- $module(?M).

?- ?X:?Y@?M.

?- ?X:<http://www.carsoftheworld.com#Car>@?M.

?- ?X:Car@<http://www.carsoftheworld.com/british>.