Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Aspects of Computer Science - Week11 Real Application of Logic Lee McCluskey, room 2/07

Similar presentations


Presentation on theme: "Formal Aspects of Computer Science - Week11 Real Application of Logic Lee McCluskey, room 2/07"— Presentation transcript:

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

2 School of Computing and Mathematics, University of Huddersfield 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 School of Computing and Mathematics, University of Huddersfield Creating a Formal Specification of Software Requirements: A Real Life Case Study

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

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 School of Computing and Mathematics, University of Huddersfield 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 CPS lp [(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,Seg ment2,10):- are_subject_to_oceanic_cpr(Segmen t1,Segment2), both_are_flown_at_supersonic_spee d(Segment1,Segment2), (both_are_flown_at_the_same_mach_nu mber_in_level_flight(Segment1,Seg ment2) ; 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,Segme nt2) ),.. ETC

11 School of Computing and Mathematics, University of Huddersfield Goal: Improve Software Quality 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 FAROAS Goal-Oriented Quality Tree

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

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

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


Download ppt "Formal Aspects of Computer Science - Week11 Real Application of Logic Lee McCluskey, room 2/07"

Similar presentations


Ads by Google