next up previous contents index
Next: Summary of xmc: Model-checking Up: Summary of flora2: Programming Previous: Installing LORA-2 in Windows.   Contents   Index

Running LORA-2.

LORA-2 is fully integrated into the underlying XSB engine, including its module system. In particular, LORA-2 modules can invoke predicates defined in other Prolog modules, and Prolog modules can query the objects defined in LORA-2 modules.

Due to certain problems with XSB, LORA-2 runs best when XSB is configured with local scheduling, which is the default XSB configuration. However, with this type of scheduling, many Prolog intuitions that relate to the operational semantics do not work. Thus, the programmer must think ``more declaratively'' and, in particular, to not rely on the order in which answers are returned.

The easiest way to get a feel of the system is to start LORA-2 shell and begin to enter queries interactively. The simplest way to do this is to use the shell script

 .../flora2/runflora
where ``...'' is the directory where LORA-2 is downloaded. For instance, to invoke the version supplied with XSB, you would type something like
   ~/XSB/packages/flora2/runflora

At this point, LORA-2 takes over and F-logic syntax becomes the norm. To get back to the Prolog command loop, type Control-D (Unix) or Control-Z (Windows), or

| ?- flEnd.

If you are using LORA-2 shell frequently, it pays to define an alias, say (in Bash):

 alias runflora='~/XSB/packages/flora2/runflora'
LORA-2 can then be invoked directly from the shell prompt by typing runflora. It is even possible to tell LORA-2 to execute commands on start-up. For instance,
 foo>  runflora -e "flHelp."
will cause the system to execute the help command right after after the initialization. Then the usual LORA-2 shell prompt is displayed.

LORA-2 comes with a number of demo programs that live in

.../flora2/demos/
The demos can be run issuing the command ``flDemo(demo-filename).'' at the LORA-2 prompt, e.g.,
flora2 ?- flDemo(flogic_basics).
There is no need to change to the demo directory, as flDemo knows where to find these programs.


next up previous contents index
Next: Summary of xmc: Model-checking Up: Summary of flora2: Programming Previous: Installing LORA-2 in Windows.   Contents   Index
Luis Fernando P. de Castro 2003-06-27