Skip to content

What is "compile time"? #2598

Answered by triska
jjtolton asked this question in Q&A
Oct 4, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

This does not mean Rust compile time, since this is—and refers to—Prolog code and thus presumes a working Prolog engine.

Scryer Prolog compiles Prolog code to Warren Abstract Machine (WAM) instructions, and in the future will compile such instructions to native code (#2424). When preparing Prolog text for execution, Scryer Prolog gives us a chance to automatically rewrite code in this phase, i.e., during compilation time (of Prolog code), by means of defining the predicates goal_expansion/2 and term_expansion/2 that relate Prolog terms that occur in the program to target terms that are compiled instead. See for instance library(dcgs) for usage examples of these facilities:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@UWN
Comment options

Answer selected by jjtolton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants