scholarly journals Utilizing Hoare Logic to Strengthen Testing for Error Detection in Programs

10.29007/fml1 ◽  
2018 ◽  
Author(s):  
Shaoying Liu

Hoare logic (also known as Floyd-Hoare logic) can be used to formally verify the correctness of programs while testing provides a practical way to detect errors in programs. Unfortunately, the former is rarely applied in practice and the later is difficult to detect all existing errors. In this paper, we propose a novel technique that makes good use of Hoare logic to strengthen testing. The essential idea is first to use specification-based testing to discover all traversed program paths and then to use Hoare logic to prove their correctness. During the proof process, all errors on the paths can be detected. A case study is conducted to show its feasibility; an example taken from the case study is used to illustrate how the proposed method is applied; and discussion on the potential challenges to the method is presented.

2001 ◽  
Vol 12 (01) ◽  
pp. 97-124 ◽  
Author(s):  
EDGAR F. A. LEDERER ◽  
ROMEO A. DUMITRESCU

Two-Stage Programming (2SP) is an experimental programming language, the first implementation of the Specification-Consistent Coordination Model (SCCM). The SCCM proposes a new, mixed-paradigm (functional/imperative) approach to developing reliable programs based on complete run-time checking of computations with respect to a given specification. A 2SP program consists of a functional specification and an imperative coordination tightly connected to the specification. The coordination maps the specification to an imperative and possibly parallel/distributed program. Normal termination of a 2SP program execution implies the correctness of the computed results with respect to the specification, for that execution. We present the basic feautures of the SCCM/2SP, a new message-spassing system of 2SP with integrated run-time checking, and a larger case study. We show that 2SP provides: functional specifications, specification-consistent imperative coordinations, automatic run-time result verification and error detection, enhanced debugging support, and good efficiency.


Author(s):  
Colin Stagner ◽  
Sarah Seguin ◽  
Steve Grant ◽  
Daryl Beetner

The accurate and timely discovery of radio receivers can assist in the detection of radio-controlled explosives. By detecting radio receivers, it is possible to indirectly infer the presence of an explosive device. Radio receivers unintentionally emit low-power radio signals during normal operation. By using a weak stimulation signal, it is possible to inject a known signal into these unintended emissions. This process is known as stimulated emissions. Unlike chemical traces, these stimulated emissions can propagate through walls and air-tight containers. The following case study discusses methods for detecting and locating two different types of radio receivers. Functional stimulated emissions detectors are constructed, and their performance is analyzed. Stimulated emissions are capable of detecting super-regenerative receivers at distances of at least one hundred meters and accurately locating superheterodyne receivers at distances of at least fifty meters. These results demonstrate a novel technique for detecting potential explosive threats at stand-off detection distances.


2012 ◽  
Vol 241-244 ◽  
pp. 3020-3025
Author(s):  
Ling Ling Dong ◽  
Yong Guan ◽  
Xiao Juan Li ◽  
Zhi Ping Shi ◽  
Jie Zhang ◽  
...  

Considerable attention has been devoted to prove the correctness of programs. Formal verification overcomes the incompleteness by applying mathematical methods to verify a design. SpaceWire is a well known communication standard. For safety-critical applications an approach is needed to validate the completeness of SpareWire design. This paper addresses formal verification of SpareWire error detection module. The system model was constructed by Kripke structure, and the properties were presented by linear temporal logic (LTL). Compared the verification of LTL with CTL (branch temporal logic), LTL properties could improve the verification efficiency due to its linear search. The error priority was checked using simulation guided by model checking. After some properties were modified, all possible behaviors of the module satisfied the specification. This method realizes complete validation of the error detection module.


2015 ◽  
Vol 110 ◽  
pp. 205-221 ◽  
Author(s):  
Jie Chen ◽  
Xiwei Xu ◽  
Leon J. Osterweil ◽  
Liming Zhu ◽  
Yuriy Brun ◽  
...  

Author(s):  
YUTING CHEN ◽  
SHAOYING LIU ◽  
W. ERIC WONG

The application of specification-based program verification techniques (e.g., black-box testing, formal proof) faces strong challenges in practice when the gap between the structure of a specification and that of its program is large. This paper describes a view-based program review approach to addressing these challenges. The essential idea of the approach is first to derive comparable views from the specification and program, and then detect and eliminate the violations of structural consistency in the program views on the basis of a set of criteria. We also developed a prototype tool to support the review approach, and conducted a case study to assess the effectiveness of the approach.


2021 ◽  
Vol 12 (2) ◽  
pp. 295-314
Author(s):  
Eka Resti Wulan ◽  
Subanji Subanji ◽  
Makbul Muksar

This research aims to describe the students’ metacognitive failure in constructing proof and the scaffolding support. The participants of this qualitative case study were eight preservice mathematics teachers of six-semester, State University of Malang. We carried out a test about proof construction problems in Abstract Algebra. Then we verified the data using triangulation of constant comparative method from a test and a task-based interview with the stimulated recall. The results indicated two groups of students in proving strategy.  Group I performed “appropriate” syntactic strategy and Group II vice versa. Blindness was experienced by the subject that does not recognize errors detection or the ambiguity of the proof. Mirage occurred when the subject recognizes an error detection on the proper strategy or application of a theorem, then is unable to verify the truth of his work. Misdirection appeared when the subject recognizes a lack of progress, then uses an incomplete or irrelevant concept. Vandalism emerged with no progress or detection of errors of the strategy then the subject performs some irrelevant steps to the issue or uses a misconception. Practically, the teachers can use these results for learning innovations in scaffolding-based proof courses. The scaffolding might need some development and application in supporting students to overcome difficulty in proving mathematical sentences. 


Sign in / Sign up

Export Citation Format

Share Document