Home

Home   Downloads   Tutorial   Sample Code   Screenshots   Getting Started   Support   RSS feed


F1 Compiler Future Development

Generally, there is a new release of the FormulaOne IDE/Compiler approximately every six months. You can check if there is a new release available either by visiting the FormulaOne compiler home page, or from within the FormulaOne IDE by "Update Check".

Current Status

The latest release is F1 Release42C. At present we are testing F1 Release43, which will have numerous performance improvements. The new release will implement a new type L32. As the name implies, the type corresponds to a 32 bit integer. The new type will suport the same constraints as the type L. In many cases it will be possible to simply replace the type L with the new type L32 and recompile the program in order to improve the performance. In most cases, the expected performance improvement should be around 100%; twice as fast compared to the type L. Of course, there are some caveats: The the range of the new type is limited to 32 bits as opposed to practically unlimited range of the type L, hence some problems will fail due to the integer overflow error. There is also the problem of actually correctly detecting the integer overflow. A great care has been taken to detect them at run-time, but there is never any guarantee that all of them are detected. But to put things in perspective: Most other compilers don't even bother checking for run-time overflows.
The new release MAY also include proper Unicode support: UTF-8, UTF-16, UTF-32, with corresponding changes in editor (such as handling non-US keyboards properly). The Unicode support will be extended for the FormulaOne syntax as well. The compiler is a Windows application, but it should be possible to run the compiler under Linux using Wine as well.
We expect the new release to be available for download in December 2012/January 2013.

Long Term Research and Development

Manual and Automatic Multithreading, Multi-core CPUs.

Dual core CPUs are already quite common and within a few years we expect CPUs with dozens of cores. FormulaOne (and logic languages in general) are particularily suitable to take the advantage of multiple CPUs. Imagine a common situation:
    ...PredicateA(x) & PredicateB(y) ...
Now imagine that PredicateA takes really long time to calculate, and PredicateB eventually fails. Since expressions are evaluated left to right, the execution time depends on the order of the predicates, although the result of the calculation will remain the same. Clearly, the sequence
    ...PredicateB(y) & PredicateA(x) ...
will be calculated much quicker. Currently, the onus on determing the best order of the predicates is on the programmer. However, the programmer cannot easily determine the ideal order (nor should he care). Now if each of the two predicates was executed in parallel in a separate thread, the order of the predicates would be irrelevant. The compiler could dispatch suitable predicates to various threads automatically based on a cost/benefit analysis, or the programmer would use multithreading syntax such as
    ...PredicateB(y) && PredicateA(x) ...
On a single core CPU threads do not really run in parallel, but the program can still benefit immensely: If one of the predicates fails, there is no need to finish calculating the other one, as the result is a logical AND of both predicates. (Obviously, logical OR of predicates would benefit from multithreading in similar fashion.) The biggest win would be to run individual threads each on a separate CPU. As a matter of fact constraint logic languages are particularily suitable to take advantage of multi-core CPUs, as the compiler can relatively easily determine code that can run in a separate thread.

While the concept of multithreading is easy to explain and the benefits are easy to see, the actual implementation is quite difficult. The long term goal here is to have a compiler that can generate application that can automatically take advantage of multiple CPU cores and scale performance accordingly. In other words, if you run the same application on a system with more CPU cores, the application performance should improve accordingly. While this may sound obvious, it is important to realize that at the present time the vast majority of applications do not benefit from multi-core CPUs, you only benefit by being able to run multiple applications concurrently.





Valid XHTML 1.0 Transitional


Page last updated: December 8, 2012