fpcl...@silvermono.co.za wrote:
Hi guys,

Over the last few years, I have written hundreds of thousands of lines of object pascal code that compiles successfully using the FPC and Delphi. To date, I have not encountered any problems with the code generated by the FP Linux compiler. I don't have much experience with FPC within the MS Windows environment as my current interest lies in developing console Linux apps.

Like most developers, I strive to write code that is as bug free as possible and at the end of each day, I'm left with a feeling of great satisfaction and achievment.

IMO and experience, the code generated by the FPC is as resilient as the operating system it runs on. My question is directed to the FPC team and in particular, to those involved in the development of the compiler and more specific, the Linux compiler. (I would expect that Florian would have a say here).

In your opinion, how would you rate the suitability of the FPC generated code for use in an environment where there is near zero tolorance to failure? Consider the question assuming that the ideal condition where that the source code is as close to being perfect as possible, (and I'm not suggesting that this perfect code would be written by me. I'm not that good).

...

Regards,
Nino


Actually this is a very difficult question to answer properly .
As a very productive program writer since ( approximately ) 1973
I can say that the problem has a significant number of parameters
to consider such as :

- Specifications about software
- Algorithm design of the software by the programmer
- Used language constructs of selected compiler
- Compiler itself
- Libraries used by the compiler
- Operating system
- Testing the developed software
- Hardware running the software
- and others ...

There is a definition that reliability of a system can not be greater than its reliability of weakest
component ( having minimum reliability ) .

All of the above components and other unspecified components will comprise a system as a whole .

When considering FPC :

- There are internal error points generated during run time triggered by the user program . It is necessary to write programs which avoid those points ( if possible ) .

For an error free program , FPC generates very good code with the reminder that all of the software may contain bugs and an exhaustive test of FPC to generate a fault-tolerant compiler may require combinatorial steps which is beyond the existing capabilities .

In that respect ADA could not be adopted widely because its compilation depended on C compilers which they ( C compilers ) are not conforming to ADA specifications .

- FPC is NOT compliant to Delphi ( a very obvious feature , at least FPC is for cross-platform whereas Delphi is only for Windows platform ) . A program compiled and working perfectly in one of them is not a guarantee that it will work perfectly when compiled by the other .

- FPC ( and Lazarus are ) is using external libraries such as GTK and/or QT which those are beyond of FPC team control . Bugs in FPC ( and Lazarus ) are corrected promptly by generating a very good work by the FPC teams , but other libraries have their own development teams and
work schedules .

Since May 2008 I am trying to learn FPC as much as possible . Nearly all of my problems are caused by the libraries used , NOT by the FPC itself ( except a few ) .

- It is necessary to write programs to handle run-time exceptions properly . Compiler can not do anything much about that . A ( try ... except raise exception ) structure may have disastrous effects on outcome of a program when it is run when a life-critical system is controlled by such a program . The program should be designed properly to handle such situations without causing disasters . For example , in an airplane fall-down many years before ( approximately 110 deaths ) it has been found that in the automatic pilot software an error situation used a STOP statement . During landing it caused release of control of the airplane by the automatic pilot ( then the related company had discontinued the software automatic pilot and reverted to mechanical control ) .

These are my ( partial ) opinions about the above question .

Thank you very much .

Mehmet Erol Sanliturk













_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to