• Best of luck to the class of 2024 for their HSC exams. You got this!
    Let us know your thoughts on the HSC exams here
  • YOU can help the next generation of students in the community!
    Share your trial papers and notes on our Notes & Resources page
MedVision ad

Incremental Compilation (1 Viewer)

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
with interpretation a disadvantage is that it is inefficient in that each time a loop is to be executed by the program it must be compiled each time
so as incremental compilation compiles some and interprets other parts, does this mean that inc comp will keep this loop compiled when used again by the program rather than compile it each time?
i dont understand how it compiles some parts and interprets others
thanks for any help
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
crammy90 said:
i dont understand how it compiles some parts and interprets others
Not entirely sure what you mean. Interpretation compiles one line of code at a time (not just an entire loop for example, but every single line of code). Incremental compilation does parts of a program at a time.
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
From HSC online:
Incremental compilation is a hybrid between interpretation and compilation where some frequently used sections of the program are translated into machine code and stored. The program is then translated using an interpreter until the compiled sections are reached. These sections are executed from the object code in memory. This system is faster but retains some of the advantages of interpretation.
My teacher:
Whole source code is compiled to .exe, any changes made to source code are recorded by the development environment (VB) and only those parts changed are compiled and updated to the .exe.

whats right???
 

Graceofgod

Member
Joined
Feb 17, 2008
Messages
136
Location
Now? A computer.
Gender
Undisclosed
HSC
2008
Incremental compilation is a broad term.

It means what it says, the code is compiled in parts.

However, in relation to the syllabus, course and common usage, incremental compilation is as follows:

The code is compiled at first all in one go. Then as changes are made, they are added to the compiled product. Ie, only the changed sections are compiled, not the whole thing, saving time.
This is especially usefull with big projects being worked on by multiple people, allowing each to add their own compiled pieces of code to the finished product.
 

Graceofgod

Member
Joined
Feb 17, 2008
Messages
136
Location
Now? A computer.
Gender
Undisclosed
HSC
2008
crammy90 said:
From HSC online:
Incremental compilation is a hybrid between interpretation and compilation where some frequently used sections of the program are translated into machine code and stored. The program is then translated using an interpreter until the compiled sections are reached. These sections are executed from the object code in memory. This system is faster but retains some of the advantages of interpretation.
Even though this definition is technically correct, I have no idea why it is on 'HSC online'. It is not the best or most common definition and is in relation to the course, I guess wrong.
 

zvyx

Member
Joined
Aug 10, 2006
Messages
95
Location
NSW
Gender
Male
HSC
2008
o srs? i remember distinctly that my teacher said one of the negatives of incremental compiling is that code can still be seen in the solution, and wait, lemme get the Heinemann textbook...

"When a program is run using incremental compilation the commonly executed routines are translated into machine code and stored (i.e. compiles these routines). The program itself is translated using an interpreter, but when these compiled routines are needed they are run from the stored code rather than being retranslated each time the code is reached. This speeds up the process of running the interpreted program while keeping the advantages of an interpreter."
 

Graceofgod

Member
Joined
Feb 17, 2008
Messages
136
Location
Now? A computer.
Gender
Undisclosed
HSC
2008
zvyx said:
o srs? i remember distinctly that my teacher said one of the negatives of incremental compiling is that code can still be seen in the solution, and wait, lemme get the Heinemann textbook...

"When a program is run using incremental compilation the commonly executed routines are translated into machine code and stored (i.e. compiles these routines). The program itself is translated using an interpreter, but when these compiled routines are needed they are run from the stored code rather than being retranslated each time the code is reached. This speeds up the process of running the interpreted program while keeping the advantages of an interpreter."
This is not good. Davis textbook says my definition. I looked up on net, got a similar definition.
I remember asking my teacher this, and got the same definition.

But if heinemann says that...Argh.

EDIT: I am really thinking that perhaps incremental compilation varies depending on language. And it simply means, the code isn't just compiled in one big go at the end.
The specifics maybe irrelevant?
 
Last edited:

zvyx

Member
Joined
Aug 10, 2006
Messages
95
Location
NSW
Gender
Male
HSC
2008
maybe its time to call up HSC Advice Line and ask one of em? cause many of the teachers there are HSC markers so they'll know what to look for.

I dunno, its a pretty significant difference.
Incremental compilation defined by Heinemann means that you've got a solution that isn't really acceptable for any commercial products - it seems half done, and its not entirely in binary meaning there is some serous copyright issues that could form.
Incremental compilation defined by Davis/your teacher/whatever means you've got a fully compiled product at the end of the day, ready for commercial release.

big difference there...
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
In contrast, an incremental compiler is part of a running program that uses that compiler. This allows new program items to be compiled at any time, either extending the previously compiled programs or replacing some parts of the program.
Because an incremental compiler is part of the runtime system, source code can be read in at any time, from the terminal, from a file, or possibly from a data-structure constructed by the running program, and translated into a machine code block or function (which may replace a previous function of the same name), and the newly compiled program fragment is then immediately available for use by the running system.
from a wikianswers
A computer-aided software development system includes programs to implement edit, compile, link and run sequences, all from memory, at very high speed. The compiler operates on an incremental basis, line-by-line, so if only one line is changed in an edit session, then only that line need be recompiled if no other code is affected. Scanning is done incrementally, and the resulting token list saved in memory to be used again where no changes are made. All of the linking tables are saved in memory so there is no need to generate link tables for increments of code where no changes in links are needed. The parser is able to skip lines or blocks of lines of source code which haven't been changed; for this purpose, each line of source text in the editor has a change-tag to indicate whether this line has been changed, and from this change-tag information a clean-lines table is built having a clean-lines indication for each line of source code, indicating how many clean lines follow the present line. All of the source code text modules, the token lists, symbol tables, code tables and related data saved from one compile to another are maintained in virtual memory rather than in files so that speed of operation is enhanced. Also, the object code created is maintained in memory rather than in a file, and executed from this memory image, to reduce delays. A virtual memory management arrangement for the system assures that all of the needed data modules and code is present in real memory by page swapping, but with a minimum of page faults, again to enhance operating speed.

its a bit overwhelming lol i sorta get lost but my current understanding of it is
  • The compiler batch translated the source code to object code. In this translation process it goes through the three stages of lexical analysis (identifying each syntactic element to generate the token lists and tables), syntactic analysis (ensuring the syntactic elements i.e. tokens are combined in a way that is legal in the syntax of the language) and type checking (checking the integrity of data types i.e. arrays only have the same data type, text not used in calculations instead of integers). The token lists here are stored in virtual memory (whats this exactly?? is it like a non-volatile memory in RAM?)
  • Upon opening the development environment for editing the source code, each line of code is, automatically by the environment, assigned a change-tag address. Through the editing of lines of code, those changed lines' tags change; the rest are considered clean-lines (unchanged)
  • Upon clicking to translate this editted source code, the parser produces tokens for only those lines whos change-tag information reflects a change has been made. They are translated and updated into the executable lower-level machine code
do you rekon thats right
  • Basically it does record what changes are made to the source code and then updates the machine code to reflect these changes. It only needs to compile those changes which were made to the source code so it can update the exe. Code that hasnt changed is ignored.
  • Lol so basically its Davis's definition. i think...
What i dont understand fully is:
  • During a normal compilation, does a compiler compile a module each time its referenced within each module, or does it compile it once, make it a dll and then put a linker between it and all its calling modules? Because then all modules would have to be dll's and then if you use structured programming where each task is a module, youd have heaps of these dll's and no exe? or is the exe just a little bit of code which contains the user interface to allow for input of user actions....


ahaha and both from excell
"incremental compilation combines the benefits of compiling and interpreting, resulting in a process that is interactive, yet still produces a complete, compiled program."

however....
"Independant compilation is sometimes used for large programs. Individual modules can be compiled without compiling the whole program. They are joined using a linker at a later stage"

can some1 explain all of this... this is crazy i didnt know about independant compilation baha i think is sorta answers my question above about compiling
 
Last edited:

zvyx

Member
Joined
Aug 10, 2006
Messages
95
Location
NSW
Gender
Male
HSC
2008
tl;dr, sorry.
The thing with using other definitions is that it'll be correct for incremental compilation in the workforce/real usage, but it won't be for the hsc. An example is balanced equations in chemistry; the hsc definition for it is different to what sites say. The fact is that you're learning under the Board of Studies, so basically, whatever they say is correct, you've gotta accept that it is correct, at least for the time being. And if they favour one definition over another, so be it.

I've never heard of independant compilation, maybe thats where the confusion is coming from.. all I know is that that the Heinemann textbook done in 2000 states the definition I gave, and HSC Online backed it up. If in doubt, ask Advice Line for a HSC marker and they'll tell you what they're looking for. If you can't be bothered asking them, go with HSC Online/Heinemann, since thats the mainstream, and HSC Online is affiliated with the Board of Studies; if they're wrong, you can blame them. If you choose the other one, what are you going to say if its wrong? "Wikianswers gave me this definition, I think it's right too. So gimme the marks"
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top