Q:

What are the phases of the OCAML compiler?

A:

The Objective CAML compiler goes through the following stages: lexical analysis, parsing, semantic analysis, generation of intermediate code, optimization of intermediate code and generation of pseudo code. Code generated and represented internally by OCAML is referred to as intermediate language.

Know More

Full Answer

Lexical analysis converts characters in a sequence to a lexical element sequence. During parsing, a syntax tree is constructed that verifies the lexical element sequence to ensure it is correct in reference to the grammar used with the language. Semantic analysis checks type inference for program correctness. The next two phases create and optimize the code, and the last step generates the program binary.

Learn more in Computer Programming

Related Questions

  • Q:

    What is the difference between brownfield and greenfield?

    A:

    The Environmental Protection Agency defines a brownfield as land or buildings, typically in urban areas, the further use of which may be hampered by the presence of pollution or contaminants. Greenfields are areas available for development on the edges of urban areas or in suburban locations.

    Full Answer >
    Filed Under:
  • Q:

    How do you get the square root in Python?

    A:

    The Python math library contains a "sqrt(x)" function that returns the square root of a number. Another option is to type "x**(0.5)", which returns the same value.

    Full Answer >
    Filed Under:
  • Q:

    What are some methods for manipulating strings in Java?

    A:

    Among the many String methods listed in the Java API, the manipulation methods are concat, format, replace, toLowerCase, toUpperCase and trim. One of these methods is static, but the rest return Strings. Those that are static simply need to be called on an existing String. Static methods, however, must be called in an expression setting the desired String equal to the String calling this method.

    Full Answer >
    Filed Under:
  • Q:

    What does "queued seed" mean?

    A:

    A queued seed is a user who begins seeding to you once certain uploads or downloads are finished. Because many ISPs have bandwidth restrictions, some users limit the amount they upload or download at once. A queued seed is available and has the file you are downloading but is busy with other upload or downloads up to their limit and seeds to you when their bandwidth is available.

    Full Answer >
    Filed Under:

Explore