United States Patent (1O) Patent No.: US 7,979,848 B2 Hinchey Et Al
Total Page:16
File Type:pdf, Size:1020Kb
mu uuuu ui iiui iiui mu uui mu uui uui mii uuii uu uii mi (12) United States Patent (1o) Patent No.: US 7,979,848 B2 Hinchey et al. (45) Date of Patent: Jul. 129 2011 (54) SYSTEMS, METHODS AND APPARATUS FOR (58) Field of Classification Search ........................ None PATTERN MATCHING IN PROCEDURE See application file for complete search history. DEVELOPMENT AND VERIFICATION (56) References Cited (75) Inventors: Michael G. Hinchey, Bowie, MD (US); U.S. PATENT DOCUMENTS James L. Rash, Davidsonville, MD (US); Christopher A. Rouff, Beltsville, 5,247,651 A * 9/1993 Clarisse .......................... 703/13 6,898,791 131* 5/2005 Chandy et al ................. 719/314 MD (US) * cited by examiner (73) Assignee: The United States of America as Primary Examiner Chuck O Kendall represented by the Administrator of (74) Attorney, Agent, or Firm Heather Goo the National Aeronautics and Space Administration, Washington, DC (US) (57) ABSTRACT (*) Notice: Subject to any disclaimer, the term of this Systems, methods and apparatus are provided through which, patent is extended or adjusted under 35 in some embodiments, a formal specification is pattern- U.S.C. 154(b) by 1329 days. matched from scenarios, the formal specification is analyzed, and flaws in the formal specification are corrected. The sys- (21) Appl. No.: 11/533,837 tems, methods and apparatus may include pattern-matching an equivalent formal model from an informal specification. (22) Filed: Sep. 21, 2006 Such a model can be analyzed for contradictions, conflicts, use of resources before the resources are available, competi- (65) Prior Publication Data tion for resources, and so forth. From such a formal model, an implementation can be automatically generated in a variety of US 2007/0067755 Al Mar. 22, 2007 notations. The approach can improve the resulting implemen- tation, which, in some embodiments, is provably equivalent Related U.S. Application Data to the procedures described at the outset, which in turn can improve confidence that the system reflects the requirements, (63) Continuation-in-part of application No. 11/461,669, and in turn reduces system development time and reduces the filed on Aug. 1, 2006, which is a continuation-in-part amount of testing required of a new system. Moreover, in of application No. 11/203,590, filed onAug. 12, 2005, some embodiments, two or more implementations can be now Pat. No. 7,739,671, which is a "reversed" to appropriate formal models, the models can be continuation-in-part of application No. 10/533,376, combined, and the resulting combination checked for con- filed on Apr. 29, 2005, now Pat. No. 7,484,688. flicts. Then, the combined, error-free model can be used to generate a new (single) implementation that combines the (51) Int. Cl. functionality of the original separate implementations, and G06F 9144 (2006.01) may be more likely to be correct. G06F 9145 (2006.01) (52) U.S. Cl. ......... 717/127; 717/128; 717/131; 717/141 27 Claims, 25 Drawing Sheets 1102 PATTERN-MATCHING SCENARIOS INTO PROCESS-BASED SPECIFICATION SEGMENTS 1104 AGGREGATE THE PROCESS-BASED SPECIFICATION SEGMENTS INTO A SINGLE PROCESS-BASED SPECIFICATION 1106 TRANSLATE THE SINGLE PROCESS-BASED SPECIFICATION INTO HIGH LEVEL LANGUAGE INSTRUCTIONS 1108 COMPILE THE HIGH LEVEL LANGUAGE INSTRUCTIONS INTO EXECUTABLE CODE 1100 U.S. Patent Jul. 129 2011 Sheet 1 of 25 US 7,979,848 B2 102 104 INFORMAL LAWS OF SPECIFICATION CONCURRENCY 106 TRANSLATOR 108 PROCESS- BASED SPECIFICATION 110 112 CODE ANALYZER TRANSLATOR 114 COMPUTER LANGUAGE PROGRAM FIG. 1 1ao U.S. Patent Jul. 129 2011 Sheet 2 of 25 US 7,979,848 B2 202 210 FIG. 2 Ix,-- 200 U.S. Patent Jul. 129 2011 Sheet 3 of 25 US 7,979,848 B2 102 104 INFORMAL LAWS OF SPECIFICATION CONCURRENCY 302 PATTERN MATCHER 108 PROCESS- BASED SPECIFICATION 110 112 CODE ANALYZER TRANSLATOR 114 COMPUTER LANGUAGE PROGRAM FIG. 3 I\,— 300 U.S. Patent Jul. 129 2011 Sheet 4 of 25 US 7,979,848 B2 202 406 FIG. 4 1^11-- 400 U.S. Patent Jul. 129 2011 Sheet 5 of 25 US 7,979,848 B2 502 TRANSLATE INFORMAL SPECIFICATION INTO PROCESS-BASED SPECIFICATION SEGMENTS 504 AGGREGATE THE PROCESS-BASED SPECIFICATION SEGMENTS INTO A SINGLE PROCESS-BASED SPECIFICATION 506 TRANSLATE THE SINGLE PROCESS-BASED SPECIFICATION INTO HIGH LEVEL LANGUAGE INSTRUCTIONS 508 COMPILE THE HIGH LEVEL LANGUAGE INSTRUCTIONS INTO EXECUTABLE CODE FIG. 5 500 U.S. Patent Jul. 129 2011 Sheet 6 of 25 US 7,979,848 B2 602 VERIFY SYNTAX 604 MAP TO PROCESS-BASED SPECIFICATION 502 606 CONSISTENCY WITH OTHER PROCESS-BASED SPECIFICATIONS 608 VERIFY LACK OF OTHER PROBLEMS FIG. 6 111^_ 600 U.S. Patent Jul. 129 2011 Sheet 7 of 25 US 7,979,848 B2 702 ANALYZE A SCRIPT DERIVED FROM RULES 704 NO FLAW IN SCRIPT p YES 706 CORRECT THE FLAW IN THE RULES FIG. 7 I\"— 700 U.S. Patent Jul. 129 2011 Sheet 8 of 25 US 7,979,848 B2 802 TRANSLATE SCENARIOS INTO A FORMAL SPECIFICATION 804 ANALYZE THE FORMAL SPECIFICATION 806 TRANSLATE THE FORMAL SPECIFICATION INTO SCRIPT FIG. 8 800 U.S. Patent Jul. 129 2011 Sheet 9 of 25 US 7,979,848 B2 902 MECHANICALLY TRANSLATE DOMAIN KNOWLEDGE INTO FORMAL SPECIFICATION SEGMENTS 904 AGGREGATE THE FORMAL SPECIFICATION SEGMENTS INTO A SINGLE FORMAL SPECIFICATION 906 TRANSLATE THE SINGLE FORMAL SPECIFICATION INTO SCRIPT(S) 908 GENERATE A SCRIPT FROM THE SCRIPT(S) FIG. 9 1\1'-- 900 U.S. Patent Jul. 129 2011 Sheet 10 of 25 US 7,979,848 B2 1002 VERIFY SYNTAX 1004 MAP TO FORMAL SPECIFICATION 902 1006 VERIFY CONSISTENCY OF FORMAL SPECIFICATION 1008 VERIFY LACK OF OTHER PROBLEMS FIG. 10 ^\-- 1000 U.S. Patent Jul. 129 2011 Sheet 11 of 25 US 7,979,848 B2 1102 PATTERN-MATCHING SCENARIOS INTO PROCESS-BASED SPECIFICATION SEGMENTS 1104 AGGREGATE THE PROCESS-BASED SPECIFICATION SEGMENTS INTO A SINGLE PROCESS-BASED SPECIFICATION 1106 TRANSLATE THE SINGLE PROCESS-BASED SPECIFICATION INTO HIGH LEVEL LANGUAGE INSTRUCTIONS 1108 COMPILE THE HIGH LEVEL LANGUAGE INSTRUCTIONS INTO EXECUTABLE CODE FIG. 11 I\,-- 1100 U.S. Patent Jul. 129 2011 Sheet 12 of 25 US 7,979,848 B2 1202 VERIFY SYNTAX OF INFORMAL REQUIREMENTS 1204 MAP INFORMAL REQUIREMENTS TO PROCESS- BASED SPECIFICATION 1102 1206 PROCESS-BASED SPECIFICATION WITH OTHER PROCESS-BASED SPECIFICATIONS 1208 VERIFY LACK OF OTHER PROBLEMS IN THE PROCESS- BASED SPECIFICATION FIG. 12 I\"-- 1200 U.S. Patent Jul. 129 2011 Sheet 13 of 25 US 7,979,848 B2 1302 ANALYZE A SPECIFICATION DERIVED FROM SCENARIOS 1304 NO FLAW IN SPECIFICATION --^ YES 1306 CORRECT THE FLAW IN THE SCENARIOS FIG. 13 ^ 1300 U.S. Patent Jul. 129 2011 Sheet 14 of 25 US 7,979,848 B2 1402 PATTERN-MATCHING SCENARIOS INTO A FORMAL SPECIFICATION 1404 ANALYZE THE FORMAL SPECIFICATION 1406 TRANSLATE THE FORMAL SPECIFICATION INTO AN IMPLMENTATION FIG. 14 1400 U.S. Patent Jul. 129 2011 Sheet 15 of 25 US 7,979,848 B2 1502 MECHANICALLY PATTERN-MATCH DOMAIN KNOWLEDGE INTO FORMAL SPECIFICATION SEGMENTS 1504 AGGREGATE THE FORMAL SPECIFICATION SEGMENTS INTO A SINGLE FORMAL SPECIFICATION FIG. 15 "Il'- 1500 U.S. Patent Jul. 129 2011 Sheet 16 of 25 US 7,979,848 B2 1602-,,VERIFY SYNTAX OF DOMAIN KNOWLEDGE MAP DOMAIN 1604 KNOWLEDGE TO A FORMAL SPECIFICATION SEGMENT 1502 1606 CONSISTENCY OF THE FORMAL SPECIFICATION SEGMENT VERIFY LACK OF 1608 OTHER PROBLEMS IN THE FORMAL SPECIFICATION SEGMENT FIG. 16 I\\-- 1600 U.S. Patent Jul. 129 2011 Sheet 17 of 25 US 7,979,848 B2 1722 1724 1726 1702 DISPLAY SPEAKER I I SPEAKER 1728 1730 1704 NIC LAN NIC CPU 1706 POWER 1734 1732 1736 REMOTE RAM WAN COMPUTER 1708--, ROM 1710 MASS STORAGE 1712 1716 COMM 1700 1718 POINTING FIG. 17 1714INTER C NE>T JKEYBOARD J^ DEVICE 1720 U.S. Patent Jul. 129 2011 Sheet 18 of 25 US 7,979,848 B2 102 104 INFORMAL LAWS OF SPECIFICATION CONCURRENCY 1802 CSP TRANSLATOR 1804 CSP SPECIFICATION 1806 1808 1810 VISUALIZATION TOOL ANALYZER CSP TOOL 1804 MODIFIED CSP SPECIFICATION 112 CODE TRANSLATOR 114 COMPUTER FIG. 18 LANGUAGE PROGRAM 1800 U.S. Patent Jul. 129 2011 Sheet 19 of 25 US 7,979,848 B2 1722 1724 1726 1702 DISPLAY SPEAKER SPEAKER 1728 1730 1704 NIC LAN NIC CPU 1706 POWER 1734 1732 1736 REMOTE R AM 1738 WAN COMPUTER 1708 1802 CSP ROM TRANSLATOR 1710 1806 MASS ANALYZER STORAGE 1712 1716 112 CODE COMM TRANSLATOR 1900 POINTING FIG. 19 17141718INTERNET KEYBOARD DEVICE 1720 U.S. Patent Jul. 129 2011 Sheet 20 of 25 US 7,979,848 B2 202 104 204 INFERENCE LAWS OF SCENARIOS CONCURRENCY ENGINE 206 TRANSLATOR 208 210 FORMAL SPECIFICATION P ANALYZER 212 2002 REVERSE SCRIPT SCRIPT TRANSLATOR TRANSLATOR 214 SCRIPT FIG. 20 2000 U.S. Patent Jul. 129 2011 Sheet 21 of 25 US 7,979,848 B2 1722 1724 1726 1702 DISPLAY SPEAKER SPEAKER 1728 1730 1704 NIC LAN NIC CPU 1706 1734 1732 1736 POWER REMOTE RAM 1738 [WAN COMPUTER 1708 212 _ SCRIPT ROM -' TRANSLATOR 1710 210 MASS SCRIPT STORAGE ANALYZER 1712 1716 REVERSE 2002 COMM SCRIPT TRANSLATOR 1500 1714 1718 POINTING FIG. 21 INTERNET KEYBOARD DEVICE 1720 U.S. Patent Jul. 129 2011 Sheet 22 of 25 US 7,979,848 B2 102 ^ / ) -104 INFORMAL LAWS OF SPECIFICATION CONCURRENCY 2202 IMPLEMENTATION PATTERN MATCHER 2204 IMPLEMENTATION 2206 2208 2210 VISUALIZATION TOOL ANALYZER TOOL 2212--, MODIFIED IMPLEMENTATION 112 CODE TRANSLATOR 114 COMPUTER FIG. 22 LANGUAGE PROGRAM 2200 U.S. Patent Jul. 12 9 2011 Sheet 23 of 25 US 7,979,848 B2 1722 1724 1726 1702 DISPLAY SPEAKER I I SPEAKER 1728 1730 1704 NIC LAN NIC CPU 1706 1734 1732 1736 POWER REMOTE RAM 1738 [WAN COMPUTER 1708 IMPLEMENTATION 2202 ROM PATTERN MATCHER 1710 2206 MASS - ANALYZER STORAGE ► 1712 1716 112 CODE COMM TRANSLATOR 2300 POINTING FIG.