United States Patent (1O) Patent No.: US 7,668,796 B2 Hinchey Et Al
Total Page:16
File Type:pdf, Size:1020Kb
mu uuuu ui iiui iiui mu iuu lull uui mu uui iuui uu uii mi (12) United States Patent (1o) Patent No.: US 7,668,796 B2 Hinchey et al. (45) Date of Patent: Feb. 23, 2010 (54) AUTOMATA LEARNING ALGORITHMS AND (51) Int. Cl. PROCESSES FOR PROVIDING MORE G06N 5102 (2006.01) COMPLETE SYSTEMS REQUIREMENTS G06N 3108 (2006.01) SPECIFICATION BY SCENARIO (52) U.S. Cl . ......................................... 706/48; 717/100 GENERATION, CSP-BASED (58) Field of Classification Search .................... 706/48 SYNTAX-ORIENTED MODEL See application file for complete search history. CONSTRUCTION, AND R2D2C SYSTEM (56) References Cited REQUIREMENTS TRANSFORMATION OTHER PUBLICATIONS (75) Inventors: Michael G. Hinchey, Bowie, MD (US); Pdschel et al., "Spiral: A Generator for Platform-Adapted Libraries Tiziana Margaria, Dortmund (DE); of Signal Processing Alogorithms", 2004.* James L. Rash, Davidsonville, MD (US); Christopher A. Rouff, Beltsville, * cited by examiner MD (US); Bernard Steffen, Dortmund Primary Examiner David R Vincent (DE) Assistant Examiner Nathan H Brown, Jr. (74) Attorney, Agent, or Firm Heather Goo (73) Assignee: The United States of America as represented by the Administrator of (57) ABSTRACT the National Aeronautics and Space Administration, Washington, DC (US) Systems, methods and apparatus are provided through which in some embodiments, automata learning algorithms and (*) Notice: Subject to any disclaimer, the term of this techniques are implemented to generate a more complete set patent is extended or adjusted under 35 of scenarios for requirements based programming. More spe- U.S.C. 154(b) by 337 days. cifically, a CSP-based, syntax-oriented model construction, which requires the support of a theorem prover, is comple- (21) Appl. No.: 11/536,132 mented by model extrapolation, via automata learning. This (22) Filed: Sep. 28, 2006 may support the systematic completion of the requirements, the nature of the requirement being partial, which provides (65) Prior Publication Data focus on the most prominent scenarios. This may generalize requirement skeletons by extrapolation and may indicate by US 2007/0162410 Al Jul. 12, 2007 way of automatically generated traces where the requirement specification is too loose and additional information is Related U.S. Application Data required. (60) Provisional application No. 60/757,559, filed on Jan. 6, 2006. 44 Claims, 27 Drawing Sheets 1oa 102 AUTOMATA SCENARIO(S) LEARNING RESOURCE 106 AUTOMATA LEARNING GENERATOR 108 SCENARIO(S) 110 IMPLEMENTATION GENERATOR 112 IMPLEMENTATION 100 U.S. Patent Feb. 23, 2010 Sheet 1 of 27 US 7,668,796 B2 102 104 AUTOMATA SCENARIO(S) LEARNING RESOURCE 106 AUTOMATA LEARNING GENERATOR 108 SCENARIO(S) 110 IMPLEMENTATION GENERATOR 112 IMPLEMENTATION FIG. 1 ^ 100 U.S. Patent Feb. 23, 2010 Sheet 2 of 27 US 7,668,796 B2 202 GENERATE SCENARIO(S) IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 204 GENERATE SYSTEM IMPLEMENTATION FROM SCENARIO(S) FIG. 2 I\,— 200 U.S. Patent Feb. 23, 2010 Sheet 3 of 27 US 7,668,796 B2 302 INITIALIZE LEARNING ALGORITHM WITH TRACE(S) OF REQUIREMENTS 202 304 CONSTRUCT CONSISTENT BEHAVIORAL MODEL FIG. 3 I\— 300 U.S. Patent Feb. 23, 2010 Sheet 4 of 27 US 7,668,796 B2 202 GENERATE SCENARIO(S) IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 204 GENERATE FORMAL SPECIFICATION FROM SCENARIO(S) 402 ANALYZE FORMAL SPECIFICATION 404 NO -LAW IN FORMAL SPECIFICATION o YES 406 CORRECT THE FLAW IN THE SCENARIO(S) FIG. 4 400 U.S. Patent Feb. 23, 2010 Sheet 5 of 27 US 7,668,796 B2 202 GENERATE SCENARIO(S) IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 502 TRANSLATE SCENARIO(S) INTO A FORMAL SPECIFICATION 504 ANALYZE THE FORMAL SPECIFICATION 506 TRANSLATE THE FORMAL SPECIFICATION INTO SCRIPT FIG. 5 500 U.S. Patent Feb. 23, 2010 Sheet 6 of 27 US 7,668,796 B2 202 GENERATE SCENARIO(S) IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 602 MECHANICALLY TRANSLATE DOMAIN KNOWLEDGE INTO FORMAL SPECIFICATION SEGMENTS 604 AGGREGATE THE FORMAL SPECIFICATION SEGMENTS INTO A SINGLE FORMAL SPECIFICATION 606 TRANSLATE THE SINGLE FORMAL SPECIFICATION INTO SCRIPT(S) 608 GENERATE A SCRIPT FROM THE SCRIPT(S) FIG. 6 I\,"— 600 U.S. Patent Feb. 23, 2010 Sheet 7 of 27 US 7,668,796 B2 702 VERIFY SYNTAX 704 MAP TO FORMAL SPECIFICATION 602 706 VERIFY CONSISTENCY OF FORMAL SPECIFICATION 708 VERIFY LACK OF OTHER PROBLEMS FIG. 7 I\"— 700 U.S. Patent Feb. 23, 2010 Sheet 8 of 27 US 7,668,796 B2 GENERATE SCENARIO(S) 202 IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 802 PATTERN-MATCHING SCENARIO(S) INTO PROCESS-BASED SPECIFICATION SEGMENTS 804 AGGREGATE THE PROCESS-BASED SPECIFICATION SEGMENTS INTO A SINGLE PROCESS-BASED SPECIFICATION 806 TRANSLATE THE SINGLE PROCESS-BASED SPECIFICATION INTO HIGH LEVEL LANGUAGE INSTRUCTIONS 808 COMPILE THE HIGH LEVEL LANGUAGE INSTRUCTIONS INTO EXECUTABLE CODE FIG. 8 I\"-- 800 U.S. Patent Feb. 23, 2010 Sheet 9 of 27 US 7,668,796 B2 902 VERIFY SYNTAX OF THE SCENARIO(S) 904 MAP THE SCEANRIO(S) TO PROCESS-BASED SPECIFICATION 802 906-\", VERIFY CONSISTENCY OF THE PROCESS-BASED SPECIFICATION WITH THE SCENARIO(S) 908 VERIFY LACK OF OTHER PROBLEMS IN THE PROCESS- BASED SPECIFICATION FIG. 9 900 U.S. Patent Feb. 23, 2010 Sheet 10 of 27 US 7,668,796 B2 1002 ANALYZE A SCENARIO 1004 NO FLAW IN SCENARIO No YES 1006 CORRECT THE FLAW IN THE SCENARIO FIG. 10 1000 U.S. Patent Feb. 23, 2010 Sheet 11 of 27 US 7,668,796 B2 202 GENERATE SCENARIO(S) IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 1102 PATTERN-MATCHING THE SCENARIO(S) INTO A FORMAL SPECIFICATION 1104 ANALYZE THE FORMAL SPECIFICATION 1106 TRANSLATE THE FORMAL SPECIFICATION INTO AN IMPLMENTATION FIG. 11 \^ 1100 U.S. Patent Feb. 23, 2010 Sheet 12 of 27 US 7,668,796 B2 GENERATE SCENARIO(S) 202 IN REFERENCE TO AUTOMATA-LEARNING RESOURCES 1202 MECHANICALLY PATTERN-MATCH THE SCENARIO(S) INTO FORMAL SPECIFICATION SEGMENTS 1204 AGGREGATE THE FORMAL SPECIFICATION SEGMENTS INTO A SINGLE FORMAL SPECIFICATION FIG. 12 1200 U.S. Patent Feb. 23, 2010 Sheet 13 of 27 US 7,668,796 B2 1302 VERIFY SYNTAX OF SCENARIO(S) MAP 1304 SCENARIO(S) TO A FORMAL SPECIFICATION SEGMENT 1202 1306 CONSISTENCY OF THE FORMAL SPECIFICATION SEGMENT VERIFY LACK OF 1308 OTHER PROBLEMS IN THE FORMAL SPECIFICATION SEGMENT FIG. 13 1300 U.S. Patent Feb. 23, 2010 Sheet 14 of 27 US 7,668,796 B2 00 ow w O O M U O U r r Z C) co M Q> O N N T T y VM l' J coW U r ^ ^ Z r Q Z _U Z_ > U) w O p a- O a cl w Q Qw m w (!) rN Y r 00 W vl- Q O Qof 0 T U ^0 U H J Z U) w cl O C- O O O z r r rNt r r N ON r r r T U.S. Patent Feb. 23, 2010 Sheet 15 of 27 US 7,668,796 B2 a FIG. 15 ^ 1500 U.S. Patent Feb. 23, 2010 Sheet 16 of 27 US 7,668,796 B2 C r I U. '110 `-- 1600 U.S. Patent Feb. 23, 2010 Sheet 17 of 27 US 7,668,796 B2 a FIG. 17 1700 U.S. Patent Feb. 23, 2010 Sheet 18 of 27 US 7,668,796 B2 00 N r CO N r N r N N N O r r r r U.S. Patent Feb. 23, 2010 Sheet 19 of 27 US 7,668,796 B2 104 102 AUTOMATA SCENARIO(S) LEARNING RESOURCE 106 AUTOMATA LEARNING GENERATOR 108------ 1902 INFERENCE SCENARIO(S) ENGINE 1904 TRANSLATOR 1906 / 1908 SPECIFICATION ANALYZER 1910 SCRIPT TRANSLATOR 1912 SCRIPT FIG. 19 "1,-1900 U.S. Patent Feb. 23, 2010 Sheet 20 of 27 US 7,668,796 B2 102 104 AUTOMATA SCENARIO(S) LEARNING RESOURCE 106 AUTOMATA LEARNING GENERATOR 2002 I- - - - - 1902 LAWS OF SCENARIO(S) I INFERENCE CONCURRENCY 108 I ENGINE 1904 TRANSLATOR 1906, 1908 FORMAL SPECIFICATION ANALYZER 2004 REVERSE 1910 SCRIPT SCRIPT TRANSLATOR TRANSLATOR 1912 SCRIPT FIG. 20 2000 U.S. Patent Feb. 23, 2010 Sheet 21 of 27 US 7,668,796 B2 Nco T N T N T N N N O T T T T U.S. Patent Feb. 23, 2010 Sheet 22 of 27 US 7,668,796 B2 102104ALUTOMATA SCENARIOS) EARNING RESOURCE 106 AUTOMATA 108 LEARNING SCENARIO(S) GENERATOR 2201 THEOREM LAWS OF 2002 PROVER CONCURRENCY 2202 CSPCSp 2204 TRANSLATOR SPECIFICATION 2208 2210 VISUALIZATION ANALYZER TOOL 2206 CSP TOOL 2214 CODE 2204 TRANSLATOR MODIFIED CSP SPECIFICATION HIGH-LEVEL 2216 COMPUTER LANGUAGE FIG. 22 PROGRAM ^ 2200 U.S. Patent Feb. 23, 2010 Sheet 23 of 27 US 7,668,796 B2 00 N W Q^W co O CD Lu2 co o coo N Z_U A'-) 0 Z Z Q r J > N CD T NC) NC) N N N N N O C'7 00 U co z ^ ^ O ^ O w CD Y W J Z W OU ^ U Z Z Z> co Z O w Y Q Q O W m W W N Y W 00 C\l (n Q 0 U O Q ^ w ^ w 0 0 0 o co z N O U.S. Patent Feb. 23, 2010 Sheet 24 of 27 US 7,668,796 B2 104 102 AUTOMATA SCENARIO(S) LEARNING RESOURCE 106 AUTOMATA LEARNING GENERATOR 108 1902 INFERENCE SCENARIO(S) ENGINE 2402 PATTERN MATCHER 2404 2406 FORMAL / ^^ ANALYZER SPECIFICATION _ I 2408 TRANSLATOR 2410 IMPLEMENTATION FIG. 24 ^,— 2400 U.S. Patent Feb. 23, 2010 Sheet 25 of 27 US 7,668,796 B2 00 N w [If LO T O?w cV W LL LL co O O O NLO ZU - O z m Q C',T > 00 (D C14 T J O O O Nt O N N N O N ^ ^r ^ r m 00 U r r Y Z O N (n O CD w Q J J w J z U LO w z z` Wz ?W O ^-- a cl w Qelf Y Q O W m W ^ rN Y r w co T O U a o a^O U I- QJ W ww w o co c4 0 0 ° z T T r T T ^N ^O r T T r^ U.S.