YAP 7.1.0
Directing and Configuring the Compiler

The YAP system also includes a number of primitives designed to set compiler parameters and to track the state of the compiler. More...

Detailed Description

The YAP system also includes a number of primitives designed to set compiler parameters and to track the state of the compiler.

One important example is the number of directivees that allow setting up properties of predicates It is also possible to enable or disable waraanings about possible issues with the code in the program, sich as the occurrence

This section presents a set of built-ins predicates designed to set the environment for the compiler


 Internal Clause Rewriting
 YAP supports several clause optimisation mechanisms, that are designed to improve execution of arithmetic and term construction built-ins.
 YAP Style Checker
 YAP implements a style-checker thay currently verifies whether:
 Conditional Compilation
 Conditional compilation builds on the same principle as term_expansion/2 , goal_expansion/2 and the expansion of grammar rules to compile sections of the source-code conditionally.
 Declaring Properties of Predicates
 The YAP Compiler allows the programmer to include declarations with important pproprties of predicates, such as where they can be modified during execution time, whether they are meta-predicates, or whether they can be defined across multiple files.

Class Documentation

◆ prolog_to_os_filename/2

class prolog_to_os_filename/2

prolog_to_os_filename(+ PrologPath,- OsPath)

This is an SWI-Prolog built-in Converts between the internal Prolog pathname conventions and the operating-system pathname conventions The internal conventions are Unix and this predicates is equivalent to =/2 (unify) on Unix systems On DOS systems it will change the directory-separator, limit the filename length map dots, except for the last one, onto underscores

◆ initialization/1

class initialization/1

initialization(+ G)

defined in the ISO standard

The compiler will execute goals G after consulting the current file

Notice that the goal will execute in the calling context, not within the file context, In other words, the source module and execution directory will be the ones of the parent environment Use initialization/2 for more flexible behavior

◆ initialization/2

class initialization/2

initialization(+ Goal,+ When)

Similar to initialization/1 , but allows specifying when Goal is executed while loading the program-text:

+ now
  Execute  _Goal_ immediately.

+ after_load
  Execute  _Goal_ after loading program-text. This is the same as @ref initialization/1 .

+ restore
  Do not execute  _Goal_ while loading the program, but only when restoring a state (not implemented yet).