Frontend driver (monolithic)

This module provides the main entry points for loading source programs (in a suitable form for performing analysis and transformations) and print them back as source.

Adding new frontend

(to be written)


Documentation on exports

supported_language(L)

Indicates that a translation is available from language L to Ciao Prolog language.

language_extension(L,E)

E is an extension (including the dot) for files that must be translated from language L to Ciao.

language_output_extension(L,E)

E is the extension of the file produced as output by the Ciao printer for language L.

PREDICATEmodule/1

Usage 1:module(FileName)

Reads the code of FileName and its preprocessing unit, and sets it as the current module.

  • The following properties should hold at call time:
    (nonvar/1)FileName is currently a term which is not a free variable.
    (sourcename/1)FileName is a source name.

Usage 2:module(FileNameList)

Reads the code of the list of file names FileNameList (and their preprocessing units), and sets them as the current modules.

  • The following properties should hold at call time:
    (nonvar/1)FileNameList is currently a term which is not a free variable.
    (list/2)FileNameList is a list of atms.

PREDICATEmodule/2

Usage:module(Ms,Info)

Same as module/1 but it also prints the time required to read the module and returns extra information (including the time) on its second argument.

  • The following properties should hold at call time:
    (nonvar/1)Ms is currently a term which is not a free variable.
    (var/1)Info is a free variable.

Usage:entry_assertion(Goal,Call,Name)

There is an entry assertion for Goal with call pattern Call, uniquely identifiable by Name.

  • The following properties should hold upon exit:
    (cgoal/1)Goal is a term which represents a goal, i.e., an atom or a structure.

Usage:assrt_used_as_entry(Sg,AssrtType)

Assertion with head Sg and assertion type AssrtType is used as an analysis entry (depending on values of entry_points_auto and entry_calls_scope).

  • The following properties should hold at call time:
    (cgoal/1)Sg is a term which represents a goal, i.e., an atom or a structure.
    (atm/1)AssrtTYpe is an atom.

PREDICATEis_library/1

Usage:is_library(Base)

  • The following properties should hold at call time:
    (nonvar/1)Base is currently a term which is not a free variable.

Usage:

Cleanup history items.

    Usage:push_history(X)

    Push history item X.

    • The following properties should hold at call time:
      (atom/1)X is currently instantiated to an atom.

    PREDICATEpop_history/1

    Usage:pop_history(X)

    Pop history item X.

    • The following properties should hold at call time:
      (atom/1)X is currently instantiated to an atom.

    Usage:get_output_path(UseHistory,Path)

    Default output file name based. Encode analysis/transformation history if UseHistory is yes.

    • The following properties should hold upon exit:
      (atm/1)UseHistory is an atom.
      (atm/1)Path is an atom.

    PREDICATEoutput/0

    Usage:

    Outputs the current module preprocessing state with the default output options. Equivalent to output(File,[]).

      PREDICATEoutput/1

      Usage:output(File)

      Outputs to File the current module preprocessing state with the default output options. If unbound, File is unified with a default name (encoding the preprocessing steps). Equivalent to output(File,[]).

        PREDICATEoutput/2

        Usage:output(File,Opts)

        Outputs the current module preprocessing state to a file File. If unbound, File is unified with a default name (encoding the preprocessing steps). The output format (which should be valid for the loaded program) is guessed from the file extension. Opts is a list of options for this predicate (see output_option/1)

        • The following properties should hold at call time:
          (nonvar/1)Opts is currently a term which is not a free variable.

        PREDICATEoutput_ext/1

        Usage:output_ext(Ext)

        Extension Ext is a supported output extension.

        • The following properties should hold at call time:
          (atm/1)Ext is an atom.

        Usage:output_by_ext(Ext,File)

        Produce output File for the given extension Ext.

        • The following properties should hold at call time:
          (atm/1)Ext is an atom.
          (sourcename/1)File is a source name.

        No further documentation available for this predicate.

        Usage:

        Ensure that the libcache is loaded (if use_libcache is enabled and the cache is generated) (see p_unit:load_libcache/1).

          Usage:

          Generate and load the libcache (see p_unit:gen_libcache/1).

            (UNDOC_REEXPORT)get_data/2
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)clean_ciaopp_db/1
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)clean_all_ciaopp_db/0
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)dump/2
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)dump_dir/1
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)add_to_db/1
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)show_dump/1
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)restore/2
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)restore/1
            Imported from p_dump (see the corresponding documentation for details)

            (UNDOC_REEXPORT)dump/1
            Imported from p_dump (see the corresponding documentation for details)

            Documentation on multifiles

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.

            No further documentation available for this predicate. The predicate is multifile.
            The predicate is of type dynamic.

            No further documentation available for this predicate. The predicate is multifile.
            The predicate is of type dynamic.