1 / 14

Formal Aspects of Computer Science - Week11 Real Application of Logic

Lee McCluskey, room 2/07 Email lee@hud.ac.uk. Formal Aspects of Computer Science - Week11 Real Application of Logic. Formal Methods - an approach to reducing the instance of software bugs in complex systems.

Download Presentation

Formal Aspects of Computer Science - Week11 Real Application of Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lee McCluskey, room 2/07 Email lee@hud.ac.uk Formal Aspects of Computer Science - Week11Real Application of Logic

  2. Formal Methods - an approach to reducing the instance of software bugs in complex systems Encode system requirements in an application-oriented formal language - the encoding is called a “formal specification” Thoroughly validate the specification because bugs that remain in a requirements specification turn out to be the most costly Rigorously Transform the specification into software

  3. Creating a Formal Specification of Software Requirements: A Real Life Case Study

  4. FAROAS - A Case Study involving Aircraft Separation Criteria segment2 segment1 Shanwick Oceanic Area

  5. The FAROAS Project contract research from NATS Ltd: encoded part of the requirements of a system that is to maintain separation between aircraft over the Atlantic Ocean in an expressive, structured logic The kernel of this specification was written in about 500 logic axioms and is called the CPS A validation environment was built around the CPS and helped “debug” it

  6. Knowledge Sources Training Manuals Operational Manuals Existing software tools Existing Software Documentation ATC personnel

  7. Example of Separation Requirement Paragraph 3.6.4.1 of the Manual of Air Traffic Services, Part 2, Section 3 - separation standards states: “For subsonic aircraft, the minimum longitudinal separation between turbojet aircraft, meeting the MNPS, and operating wholly or partly in MNPS airspace, shall 10 minutes, provided that …….ETC”

  8. Requirements / Benefits Creating a Formal Specification of ATC conceptualisation => Precise, Unambiguous representation of Safety Related concepts Strong basis for future software contracts Strong basis for prototype software tools

  9. Specification vs Program Code [(one_or_both_of Segment1 and Segment2 are_flown_at_subsonic_speed) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) meet_mnps) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) are_jets & (the_Profile_containing(Segment1) & the_Profile_containing(Segment2) are_wholly_or_partly_in_the_ mnps_airspace) ] => [(the_basic_min_longitudinal_sep _Val_in_mins_required_for Segment1 and Segment2) = 10 <=> …. ETC while (res != EOF) { res = fscanf(mfd, "%s %s %c %s\n", temp->part_no, temp->drawing_no, &temp->loc_code, temp->revision); if (res != EOF) { temp->left = NULL; temp->right = NULL; root = insert(temp,root); } }

  10. CPS Auto-generated CPSlp [(one_or_both_of Segment1 and Segment2 are_flown_at_subsonic_speed) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) meet_mnps) & ( the_Aircraft_on(Segment1) and the_Aircraft_on(Segment2) are_jets & (the_Profile_containing(Segment1) & the_Profile_containing(Segment2) are_wholly_or_partly_in_the_ mnps_airspace) ] => [(the_basic_min_longitudinal_sep _Val_in_mins_required_for Segment1 and Segment2) = 10 <=> …. ETC the_basic_min_longitudinal_sep_Val_in_mins_required_for(Segment1,Segment2,10):- are_subject_to_oceanic_cpr(Segment1,Segment2), both_are_flown_at_supersonic_speed(Segment1,Segment2), (both_are_flown_at_the_same_mach_number_in_level_flight(Segment1,Segment2) ; the_Aircraft_on_segment(Segment1,Aircraft1), the_Type_of(Aircraft1,Type1), the_Aircraft_on_segment(Segment2,Aircraft2), the_Type_of(Aircraft2,Type2), Type1=Type2, are_cruise_climbed(Segment1,Segment2) ), .. ETC

  11. Goal: Improve Software Quality FAROAS Improve Accuracy and Completeness of Statement of Requirements Improve Software Development Process Rigorously Transform Requirements into Software Build an Effective Requirements Validation Tools Environment Produce Formal Statement of Requirements Goal-Oriented Quality Tree

  12. Opportunities for bug detection in a Formal Model Expert Visual Inspection Automated Syntax Checking CPS -an ATC requirements statement DETECT BUGS Automated Reasoning Automated Translation to Executable Software Batch Testing Simulation

  13. CPS: Many-Sorted Logic Specification + tests html THE STUDENT CPS CPS Grammar PARSER + TRANSLATORS Envelope Tests in Prolog CPS -structured English CPS -logic program Enveloped Logic Program and Tests Theory Revision Test Harness Oracle TEST RESULTS CPS Refinements

  14. Major Outcome of FAROAS Validation and Maintenance of Complex Models (Ontologies? Domain theories? Formal Specifications? KBs?) require automated tool support to identify bugs and help remove them. Such “models” are not written like programs to allow systematic testing but are designed to decrease the semantic gap between model and what is modelled. See http://scom.hud.ac.uk/scomtlm/faroas.html

More Related