Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave

Importance of Program Correctness

Discuss some of the various methodologies used to establish the correctness of programs. Explain how the ideas and concepts of program correctness can be extended to prove that operating systems are secure.

Correctness of a program in terms of software engineering perceptive can be stated as the obedience to determine how the program should behave and what should be the correct output. The program correctness can be defined by analysing the problem completely, then checking the correctness of program in each phase. To identify the correctness of program is beneficial in many ways as it is used to measure the quality of result. They are helpful in identifying the design defects and these tools checks the program in all possible execution paths. It covers all the aspect of a program and checks all the possibility of faults that may occur in the program. It is important to check the correctness of a program because programs are used to perform all major operations. Many businesses and organisations are dependent on the programs to perform important tasks, if in case program doesn’t work correctly it can cause huge loss to business. Thus it is important to use various tools to check the program for all inputs.

Programs are essential part of every successful business as with the progression in advancements organizations depend on the programs to break down the input and create the right outcome. They are useful for each business as they reduce the manual work of an organisation by performing the actions automatically. Programs have upgraded the work in an organisation by making everything robotized from money related reports to techniques of the organization. Thus it is important to check the correctness of a program as they help in completing the tasks within seconds. Programs have turned out to be important part of every business as they have made the designed all the work in a programed manner. In this report the limelight is thrown on the correctness of program, it’s important and various techniques used to find that the program is correct or not (Livshits and Cochran, 2017). Apart from that security of operating system is also discussed as they also tackle complex issues that are difficult to be handled manually. The complete correctness of a program is determined if it terminates properly and also improves the speed and efficiency of work and helps the business to develop. This report has been used to discuss all the methods and ways to identify weather a program is correct or not (Markoski, 2016). Additionally the detail of what exactly correctness of algorithm means has been discussed.

Methodologies for Establishing Program Correctness

Programming languages are used for designing complex applications; these applications are result in many errors. Thus it is important to check the correctness of a program so that reliable result is produced. A correct program is one which produces the result as the designers have designed. If the correctness of program can be proved mathematically it is called as formally correct program (Fittkau,  Finke, Hasselbring and Waller, 2015). To check the correctness of program user should be aware of all the input specifications of the program. The program is checked on all possible input values if it results the desired output it can be said as functionally correct. On the other hand the program terminates in a proper manner I can be said as completely correct. The correctness of a program is checked by using two strategies. The first one is experimental analysis and the other one is formal analysis. Experimental analysis involves testing of a program at different instance. This is an easy approach but has the disadvantage as testing do not cover the entire possible situation. Some of the input sets are left uncovered. Experimental analysis helps in identifying that part of program when it doesn’t work (Beyer,  Dangl, Dietsch and Heizmann, 2016). The other approach is formal analysis that is used to check the program for every instance of input data.  It basically involves identifying the properties of input data by checking the output data. The basic idea of correctness of program is verification that is done by establishing a detail structure about what is the corresponding step.


It is necessary to monitor the correctness of program whereas testing can’t identify weather a program is correct or not. Correctness of a program is identified by checking the algorithm in all directions. The total correctness of a program depends upon the termination of a program. It checks the functional correctness of a program also that includes the input and output behaviour (Linden, 2015). If a program terminates properly, it can be stated that it is correctly implemented. There are various methods that are used to test the correctness of a program. Black box testing is a way to check the functions and interface of a program. The internal structure of a program is checked via white box testing. Program correctness is necessary to be evaluated as it predicates the pre-condition of evaluating the program by checking the initial state. Then the final condition of the algorithm is matched by checking the post condition of the program (De Angelis,  Fioravanti, Pettorossi and Proietti, 2015). A program is said to be correct if the pre-condition is true then checking that the post condition is relevant.

Program Correctness and Programming Languages

Correctness of an algorithm is dependent on the statement that needs to be proven. All the assumptions need to be checked and the reasoning from assumptions needs to be stated. All the borderlines cases are analysed to check that program works correctly. The entire result of a program is dependent on the program thus it is important to check that algorithm works correctly and always give desired result. All the major operations are dependent on the program thus it is important to verify its correctness. Correctness of a program can be checked by testing all the cases. Once all the cases have been identified it needs to verify that t has given the correct result or not (D’Antoni,  Samanta and Singh, 2016). A program is said to be correct if it produces the right output foe every possible input. A proof that checks that a program is correct is obtained in two stages. One is verifying the partial correctness of a program that is showing that the correct result is obtained if the program terminates properly without leaving any abrupt result. Other scenario is that program always terminates that is it always provide end result. The partial correctness of a program is said to be produce a correct result by making sure that initial assertion ‘p’ gives the properties that input values should have. The second assertion is ‘q’ that gives the properties that output values should have. The values will be same if the program is intended to work correctly (Beringer, Petcher, Katherine and Appel, 2015). Thus a program will be said to be partial correct if the initial assertion p and the final assertion q is true for some value S.


There are various algorithms used for proving the correctness of program the objective of these techniques is to make program free from all errors. Correctness of program is directly related to the errors in a program (Gaines, 2015). The correctness of a program is decided by checking the errors. The axiomatic approach is used to check all the properties of program statically from text to programs without generating the output of the program. The first part of this approach is used to state all the properties of operations and statements that are used in a program. The second part involves review process. It is used for detecting eh defects in the code (Armstrong, Gomes and Struth, 2014). The review reduces the chances of defects in the code. These reviews improve the correctness of a program by detecting all kind of errors in coding process. It includes activities like symbolic execution of code, code reading and static analysis. In additional to checking the defects the quality of a program is also checked. The program is said to be correct if the resources occupied are fully utilized and there is no wastage of memory and computer time (Slides, 2015).  The program is said to be completely correct if it follows all the coding standards.

Testing and Verifying Program Correctness

Some of the basic things that are checked for knowing that program works correctly is checking that data exploit the capabilities of the language, there are no dangling pointers and that loop always terminate after checking all the conditions. It is important to check all the branch conditions along with checking that all the indexes are properly initialized so that program ends properly. Thus the correctness of a program cannot be determined completely at the initial stage. It depends on elementary symbolic execution of the program.


To check the correctness of program in industry variety of techniques are used. That includes testing that is carried in many ways. Apart from formal proof there re automated verifications methods to experience the program from all safety measures. The correctness of a program actually means that a program perform the task that it is supposed to. It make sure that all conforms of specifications are met (Salvaneschi,  Amann, Proksch and Mezini, 2014). The correctness of a program is checked by analysing all the specification of what program is supposed to do. Then pre condition is used to check what restrictions need to be applied and post condition states what program does. The pre-condition of program is checked by setting limitations on how programs need to be used. The true part of program is stated and then checking the program based on these assumptions and limitations (Osera and Wonnacott, 2017). After defining the pre-condition of program the post conditions is checked by stating factors that affects the program.

One of the techniques used for analysing the correctness of program is Hoare triples. In this P and R are considered as pre and post condition respectively. This rule says that the program will be correct only if you know that a program is true for P then the program should halt properly and give the desired result R for any particular input value. If the result of R is not true but somehow it is managed to get the desired result, that it states that program is partially correct (Walker, 2018). The complete correctness is only when program halts or terminates properly.

The concepts of program correctness can be extended to prove that operating systems are secure. The interest of checking the correctness of program has increased increasingly. The correctness of a program is future linked with checking that operating system is secure or not. Most of the tools used for proving correctness of program are written in higher level language. But these tools are future used to check the security of hardware’s and operating system on which programs are running (Nielson, Nielson and Hankin, 2015). In both cases there is a high priority on correctness, and one would like to be assured of correctness long before testing becomes possible. Thus these tools are used to check the correctness of operating system

Techniques for Checking Program Correctness

Conclusion

Thus it can be concluded from this report that correctness of a program is necessary to be determined. Correctness of a program helps in determining that the outcome would be reliable or not. Correctness of a program is identified by checking all possible input sets and checking that the business terminates. Two strategies have been discussed that are used in checking the correctness of program. The experimental analysis and formal approach has been used to analyse the correctness of a program. It is important to monitor the correctness of program and from the conclusion it can be started that complete correctness of program is when it terminates properly. The pre-condition and post condition is checked to find the correctness of a program. A program is said to be partially correct if it do not terminate properly but gives a correct result. By checking the correctness of a program help in removing the errors and making it function accurately. In this report the analysis has been extended to prove that operating system is secure as the correctness of program is somewhere dependent on operating system and hardware on which it is operating

References

Armstrong, A., Gomes, V.B. and Struth, G. (2014). Algebras for program correctness in Isabelle/HOL. In International Conference on Relational and Algebraic Methods in Computer Science (pp. 49-64). Springer, Cham.

Beringer, L., Petcher, A., Katherine, Q.Y. and Appel, A.W. (2015). Verified Correctness and Security of OpenSSL HMAC. In USENIX Security Symposium (pp. 207-221).

Beyer, D., Dangl, M., Dietsch, D. and Heizmann, M. (2016). Correctness witnesses: exchanging verification results between verifiers. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (pp. 326-337). ACM.

D’Antoni, L., Samanta, R. and Singh, R. (2016) Qlose: Program repair with quantitative objectives. In International Conference on Computer Aided Verification (pp. 383-401). Springer, Cham.

De Angelis, E., Fioravanti, F., Pettorossi, A. and Proietti, M. (2015). Proving correctness of imperative programs by linearizing constrained Horn clauses. Theory and Practice of Logic Programming, 15(4-5), pp.635-650.

Fittkau, F., Finke, S., Hasselbring, W. and Waller, J.  (2015) Comparing trace visualizations for program comprehension through controlled experiments. In Proceedings of the 2015 IEEE 23rd International Conference on Program Comprehension (pp. 266-276). IEEE Press.

Gaines, R. (2015). Protection in Operating Systems. Available from https://www2.seas.gwu.edu/~poorvi/Classes/CS283_2005/HRUModel.pdf Accessed on 15 May 2018.

Linden, T. (2015). A summary of progress toward proving program correctness. Available from https://www.computer.org/csdl/proceedings/afips/1972/5080/00/50800201.pdf Accessed on 15 May 2018

Livshits, B. and Cochran, R.A., Microsoft Technology Licensing LLC (2017). Program boosting including using crowdsourcing for correctness. U.S. Patent 9,753,696.

Markoski, B.  (2016). Dijkstra's interpretation of the approach to solving a problem of program correctness. Yugoslav Journal of Operations Research, 20(2).

Nielson, F., Nielson, H.R. and Hankin, C ( 2015). Principles of program analysis. Springer.

Osera, P.M. and Wonnacott, D.G. (2017). A blocks-based language for program correctness proofs. In Blocks and Beyond Workshop (B&B), 2017 IEEE (pp. 49-52). IEEE.

Salvaneschi, G., Amann, S., Proksch, S. and Mezini, M. (2014) An empirical study on program comprehension with reactive programming. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (pp. 564-575). ACM.

Slides, (2015). Getting it Right: Testing, Proofs and Program Correctness. Available from https://www.cs.cornell.edu/info/courses/spring-98/cs211/lecturenotes/08-Correctness.pdf Accessed on 15 May 2018

Walker, H.M. (2018). CLASSROOM VIGNETTES Software correctness and usefulness in the classroom. ACM Inroads, 9(1), pp.28-3

Cite This Work

To export a reference to this article please select a referencing stye below:

My Assignment Help. (2019). Various Methodologies To Establish Program Correctness And Extend It To Essay On OS Security.. Retrieved from https://myassignmenthelp.com/free-samples/concepts-of-program-correctness.

"Various Methodologies To Establish Program Correctness And Extend It To Essay On OS Security.." My Assignment Help, 2019, https://myassignmenthelp.com/free-samples/concepts-of-program-correctness.

My Assignment Help (2019) Various Methodologies To Establish Program Correctness And Extend It To Essay On OS Security. [Online]. Available from: https://myassignmenthelp.com/free-samples/concepts-of-program-correctness
[Accessed 29 May 2024].

My Assignment Help. 'Various Methodologies To Establish Program Correctness And Extend It To Essay On OS Security.' (My Assignment Help, 2019) <https://myassignmenthelp.com/free-samples/concepts-of-program-correctness> accessed 29 May 2024.

My Assignment Help. Various Methodologies To Establish Program Correctness And Extend It To Essay On OS Security. [Internet]. My Assignment Help. 2019 [cited 29 May 2024]. Available from: https://myassignmenthelp.com/free-samples/concepts-of-program-correctness.

Get instant help from 5000+ experts for
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing: Proofread your work by experts and improve grade at Lowest cost

loader
250 words
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Plagiarism checker
Verify originality of an essay
essay
Generate unique essays in a jiffy
Plagiarism checker
Cite sources with ease
support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close