Go to the first, previous, next, last section, table of contents.
The LaSt engine processes a document in several passes, some of which only have to be made in certain occasions. In the list below the steps are explained in more detail.
- Reading inputs
-
The program inputs are read and analyzed for errors. All included files are read and parsed using the
PiLLoW parser [CHV99], and program exit is made on fatal errors.
- Loading packages
-
The named packages are loaded if changed on disk or not previously loaded. In server operation, loading will normally only occur once for each package, where after it's contents are stored internally in a compiled form. Prolog files will only be loaded once, even if they change on disk.
- Reading RadioWeb document
-
The RadioWeb document is further parsed for dynamic objects, and each object is processed as follows:
- WSDL data is created
-
The WSDL interface is called, thus producing the structured data to use and causing initial calls to the WOF interpreter if necessary.
- Initializing
-
Choices for the particular object are set and the library routines are initialized.
- Layout processing
-
The LaSt rules are processed, finding the corresponding layout for the object.
- Constraining default values
-
Default values are set for all free variables, and constraints are applied to these bindings. If the constraints fail, any set of default values are returned.
- Result output
-
The result for all the objects is collected and output.
The current LaSt engine is not complete with regard to the LaSt language, but implements almost all features. There are also some improvements to do regarding the actual implementation, as listed below. The list of shortcomings is not ordered in any way.
- There are currently no checks for applying the same rule twice, which must be avoided.
- No handling of `
package
' attributes in `<process-rule>
', as required in the LaSt language.
- There is no internal support for handling multiple pages, as this is not yet specified in the LaSt language.
- When constraints fail, there should be some reasonable error messages or remarks associated with all chosen values. More advanced would be to print a text from the constraint itself.
- When some input choice do not comply with the constraints, the constraints fail and any set of default values is chosen. Instead a smart choosing algorithm should be used, minimizing the number of failed constraints.
- The program is slow when all the constraints fail, and all possible solutions must be tested. It's simply a combinatorial explosion depending on the number of free variables.
- The defaults `
alias-for
' attribute is used only to produce values, but does not imply constraining them after both criteria.
- The Prolog terms in the attribute string to `
call-succeeds
' and `call-fails
' are read with the
string2term/2
predicate, but should be echoed and read with
read/2
. Doing that implies some porting difficulties and problems with variable substitutions.
- Prolog code will only be reloaded when the package file also changes.
- Reloading of Prolog code cause predicates defined in multiple source files to be abolished, but it's hard to create some other reasonable semantics.
Go to the first, previous, next, last section, table of contents.