home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / WISR / wisr6 / proceedings / ascii / stillman.ascii < prev    next >
Text File  |  1993-10-19  |  15KB  |  367 lines

  1.  
  2.  
  3.  
  4.  
  5.                        Reuse  and  Formal  Methods  for  Ada
  6.  
  7.  
  8.  
  9.                                             Maureen Stillman
  10.  
  11.  
  12.  
  13.                                     Odyssey Research Associates
  14.  
  15.                                             Ithaca, NY 14850
  16.  
  17.                                            Tel:  (607) 277-2020
  18.  
  19.                                    Email:  maureen@oracorp.com
  20.  
  21.  
  22.  
  23.                                                   Abstract
  24.  
  25.  
  26.     We support the application of formal methods to the process of developing software. Reuse is
  27. an important piece of this software development process. Our aim is to give softwareengineers
  28. access  to  reusable  designs, comp onents  and  systems  developed  using  formal  methods.  This
  29. paper describes a variety of formal methods tools and techniques, requiring different levels of
  30. training and sophistication from their users. The result of applying these tools and techniques
  31. will be high assurance, high quality systems composed of reusable building blocks.
  32.  
  33.  
  34. Keywords: Reuse, Formal methods, Ada, Reuse libraries
  35.  
  36.  
  37. Workshop Goals: To advance the state of the theory and practice combining formal methods
  38. and reuse.
  39.  
  40.  
  41. Working Groups: reuse and formal methods, reuse process models, reuse education.
  42.  
  43.  
  44.  
  45.                                                  Stillman- 1
  46.  
  47.  
  48. 1      Background
  49.  
  50.  
  51.  
  52. We  believe  that  trust  and  reliability  are  the  central  issues  in  reuse.  When  a  software  engineer
  53. contemplates reuse of even the smallest fragment of code he will begin the process with uneasy and
  54. suspicious feelings. Unanswered questions will haunt him such as:
  55.  
  56.  
  57.  
  58.     fflWhat is this software?
  59.  
  60.  
  61.     fflWho wrote this software?
  62.  
  63.  
  64.     fflWill I be sued for using this software?
  65.  
  66.  
  67.     fflWill this software work the way I need it to work?
  68.  
  69.  
  70.     fflWill this software work at all?
  71.  
  72.  
  73.     fflHow buggy will this software be?
  74.  
  75.  
  76.     fflDoes this software contain viruses?
  77.  
  78.  
  79.     fflHow hard will I have to work to modify this software to do whatI want it to do?
  80.  
  81.  
  82.     fflCan I really trust one or more software engineers who I don't know to write more reliable
  83.        software than I can write myself?
  84.  
  85.  
  86.  
  87. In many cases, these nagging questions lead the software engineer to conclude, "I just better do it
  88. myself.  It's safer.  It will also be a lot less work and aggravation to debug my own code than to
  89. understand and fix someone else's code."
  90.  
  91.  
  92. We believe that the use of formal methods will help mitigate some of these fears and encourage
  93. more software engineers to attempt reuse. Software should be labeled in some way with the degree
  94. of reliability of the code. One possibility is that the method by which the software was developed
  95. could be described and the formal approach used (if any) would b e identified.
  96.  
  97.  
  98.  
  99. 2      Experience  in  Reuse
  100.  
  101.  
  102.  
  103. ORA is  a  member  of  the  Paramax  STARS/ARPA  team.  Paramax  has  produced  a  Conceptual
  104. Framework for Reuse Processes (CFRP) [1, 2].  ORA is also a DSSA contractor and works in the
  105. domain of intelligent control systems [3]. We are well known for our expertise in the area of formal
  106. methods. Our experience in the reuse area includes the verification of a number of Booch reusable
  107. components using ORA's Penelope verification system [4].  We are currently working with NASA
  108. and Honeywell on a Boeing 777 reuse and formal methods project in avionics. ORA is writing a
  109. formal specification of the navigation control system.
  110.  
  111.  
  112.  
  113. 3      Position
  114.  
  115.  
  116.  
  117. Our approach is to offer a range of formally based tools and techniques that are designed for use by
  118. software engineers with different levels of sophistication and training. Each of these methods offer
  119.  
  120.  
  121.                                                         Stillman- 2
  122.  
  123.  
  124. increasing levels of assurance but require increased user training in exchange for greater assurance.
  125. We  address  the  issue  of  reuse  at each  assurance  level.   Finally,  we  discuss  libraries  of  reusable
  126. components that have different formal metho ds techniques and tools applied to them.
  127.  
  128.  
  129.  
  130. 3.1     Lightweight Tools
  131.  
  132.  
  133.  
  134. The "lightweight" formal metho ds tools require little user training and no knowledge of specification
  135. languages or proof techniques. ORA  has developed a set of these tools called AdaWise based on
  136. our formal work in Ada semantics. The AdaWise tools, while easy to use, are rigorous because they
  137. are based on existing formal methods technology developed at ORA. With these to ols,  we have
  138. combined the advantages of two approaches: the precision of formal verification and the automation
  139. of compilers.  Our tools provide the precision of formal verification without requiring the user to
  140. write formal specifications or do proofs.  The tools automatically check any Ada program for the
  141. presence of potential errors that typically are not detectedat compile time by a compiler.
  142.  
  143.  
  144. Currently  under  development  is  an alias  checking  tool,  an  elaboration  order  checking  tool, an
  145. incorrect  order  dependence  checker, and  a  definedness  checker.  These  AdaWise  tools  verify  a
  146. limited  class  of  specialized  properties  for  large  programs.  These  properties  include  the  absence
  147. of  run-time  anomalies, such  as  accessing  variables  before  they  have  been  assigned a  value,  and
  148. independence of a program's behavior from compiler choice bychecking for erroneous executions
  149. and  incorrect  order  dependences.  The  automatic  checks  for  these  properties  are  conservative  ,
  150. meaning that if no warnings are issued by the tool, then the property holds, but if warnings are
  151. issued, the property may or may not be violated.  Ifthe to ol issues a warning, it also points out
  152. a specific region where a possible error may be. The user then has a localized region in which to
  153. look for a violation.
  154.  
  155.  
  156. These tools can address areas where subtle bugs are introduced particularly when mo difying co de
  157. (for purposes of reuse).  For example, changing the properties of variables and violating implicit
  158. assumptions can introduce unexpected bugs.
  159.  
  160.  
  161.  
  162. 3.2     Middleweight Tools
  163.  
  164.  
  165.  
  166. "Middleweight" formal methods tools are specification languages that allow software engineers to
  167. state properties of their design or implementation. The language we have developed is based on
  168. Larch and is called Larch/Ada [5].  Formal sp ecification of requirements, design or code can help
  169. users identify what the software or system is supposed to do in rigorous terms.  This will give the
  170. software engineer a better idea of specifically what the software is intended to do.  Thus, he can
  171. more intelligently select components for reuse andhave greater confidence in their ability to work
  172. correctly.
  173.  
  174.  
  175. These tools require educating programmers in a specification language. They would also have to
  176. be taught how to write formal specifications.
  177.  
  178.  
  179.  
  180. 3.3     Verification Tools
  181.  
  182.  
  183.  
  184. Finally, we offer a formal verification system that requires the software engineer to write specifica-
  185. tions and do proofs. This provides the highest level of assurance, but requires significanttraining.
  186.  
  187.  
  188.  
  189.                                                         Stillman- 3
  190.  
  191.  
  192. The user must be trained in formal specifications and must understand first order logic and be able
  193. to guide the theorem proving system through proofs.
  194.  
  195.  
  196. Our Ada verification system is called Penelope [6]. Penelope is an interactive verification CASEtool,
  197. developed by ORA, that helps programmers develop programs and their correctness proofs from
  198. mathematical specifications. Penelope can be used to formally verify the correctness of programs
  199. written in a large subset of Ada.
  200.  
  201.  
  202. Penelope generates a set of verification conditions (VCs) from an Ada program specified in Larch/Ada.
  203. A proof of the VCs implies that the program meets its formal specifications.
  204.  
  205.  
  206.  
  207. 3.4     Libraries of Components built using Formal Methods
  208.  
  209.  
  210.  
  211. ORA presented work on verification libraries at Tri-Ada in 1991 [7 ]. Real world software projects
  212. will vary in their use of formal methods and some will use none.  We must generalize the idea of
  213. verification libraries to include support for software developed with different degrees of assurance.
  214.  
  215.  
  216.  
  217. Background to Ada Libraries
  218.  
  219.  
  220.  
  221. One  of  the  design  goals  of  Ada  was  to  maintain  semantic  consistency  across  several  separately
  222. compiled units. The Ada library was introduced to provide a repository of information about the
  223. various units that can be accessed by the compiler.  In this way a newly compiled program will be
  224. semantically consistent with the units currently in the library.
  225.  
  226.  
  227. Program units may be changed, however, and a change may invalidate the consistency of other units.
  228. The typical mechanism used to address this problemis to mark certain units as obsolete whenever
  229. any  of  their  assumptions  have  changed.  An  obsolete  unit  has  to  be  recompiled.  Recompilation
  230. constitutes a change, and so this process is transitive.
  231.  
  232.  
  233. Changes  to  an  Ada  program  library  may  have  far-reaching  effects,  and  may  require  significant
  234. amounts of recompilation.  In the case of compilation, this is only a minor problem.  In a library
  235. where the components need to meet a high level of assurance, the traditionalobsolescence mech-
  236. anism becomes unacceptable.  The fact that a modified piece of software now compiles does not
  237. mean that it meets the previous level of reliability or that it now performs the new functions we
  238. presume it will perform.
  239.  
  240.  
  241.  
  242. High Assurance Libraries
  243.  
  244.  
  245.  
  246. Formal  methods  libraries  must  deal with  reliability  problems  on  a  global  level:  the  meeting  of
  247. previous assurance levels after the code has been modified or the design has been altered.
  248.  
  249.  
  250. Superficially, the  problems  of  a  formal  methods  library  are  the  same  as  those  of  a  conventional
  251. Ada library: in addition to static semantic consistency,we now need to be concerned with dynamic
  252. semantic  consistency, i.e.   the  correctness  proofs.   The  details,  however,  are  quite  different.  In
  253. addition to program objects, a high assurance library needs to deal with specifications, lemmas and
  254. proofs.  New dependencies arise between these comp onents.  Automatic mechanisms to support a
  255. mix of reliability levels is a topic of further research.
  256.  
  257.  
  258.  
  259.                                                         Stillman- 4
  260.  
  261.  
  262. We advocate some way of labeling library components in ordinary libraries with some measure of
  263. their reliability and the method used to achieve this.  This will help the software engineer in making
  264. a decision concerning reuse. In formal methods libraries, with a fixed range of methods in use, we
  265. can use the above techniques, with a certain amount of automated assistance, to re-establish the
  266. original assurance level at a minimum cost.
  267.  
  268.  
  269.  
  270. 4      Related work
  271.  
  272.  
  273.  
  274. Several  researchers  are  working  on connections  between  formal  methods  and  reuse  and  have  a
  275. variety  of  approaches  [8,  9,  10].  Our  approach  is  more  low  level  than  those  cited  since  it  deals
  276. directly with the reliability and correctness of design and co de. Cheng has done work in the area
  277. of specifying software using a hierarchical approach.
  278.  
  279.  
  280.  
  281. 5      Conclusions
  282.  
  283.  
  284.  
  285. Formal methods can be applied to systems and designs to increase system reliability.  A software
  286. engineer's level of confidence in the correctness of other systems and components will encourage
  287. reuse. The method used to ensure the reliability of a reusable system or component should be kept
  288. with the system. The software engineer should restore the system to its previous level of assurance
  289. after making modifications for reuse.
  290.  
  291.  
  292.  
  293. 6      Bibliography
  294.  
  295.  
  296.  
  297. References
  298.  
  299.  
  300.  
  301.   [1] Software Technology for Adaptable Reliable Systems (STARS), "STARSReuse Concepts Vol-
  302.       ume  I -  Conceptual  Framework  for  Reuse  Processes," Paramax  STARS  Technical  Report
  303.       STARS-TC-04040/001/01, US  Air  Force  Systems  Command,  Electronic  Systems  Division,
  304.       Hanscom Air Force Base, MA, Septemb er 1992.
  305.  
  306.  
  307.   [2] Software  Technology  for  Adaptable  Reliable  Systems  (STARS),  "STARS Reuse  Concepts
  308.       Volume  II -  Reuse  Process  Architecture," Paramax  STARS Technical  Report  STARS-TC-
  309.       04040/002/00, US Air Force Systems Command, Electronic Systems Division, Hanscom Air
  310.       Force Base, MA, September 1992.
  311.  
  312.  
  313.   [3] D. J. H. Taylor and D. R. Platek, "Domain-Specific Software Architectures for Hybrid Con-
  314.       trol," Sp ecial  Rep ort CMU/SEI-92-SR-9,  Carnegie-Mellon  University  Software  Engineering
  315.       Institute, June 1992.
  316.  
  317.  
  318.   [4] C.  T.  Eichenlaub,  C.  D.  Harper,  and  G.  Hird,  "Using  Penelop e  to Assess  the  Correctness
  319.       of NASA Ada Software: A Demonstration of Formal Methods as a Couterpart to Testing,"
  320.       NASA Contract Report 4509, Odyssey Research Associates, Inc., Ithaca, NY, May 1993.
  321.  
  322.  
  323.   [5] O. R. Associates., Larch/Ada Reference Manual. Ithaca, NY, September 1989.
  324.  
  325.  
  326.  
  327.                                                         Stillman- 5
  328.  
  329.  
  330.   [6] D. Guaspari, C. Marceau, and W. Polak, "Formal verification of Ada programs," IEEE Soft-
  331.       ware Engineering, vol. 16, pp. 1058-1075, Sept 1990.
  332.  
  333.  
  334.   [7] G. R. Hird, "Towards Reuse of Verified Ada Software," in Proceedings of Tri-Ada '90, (Ithaca,
  335.       NY), pp. 14-21, December 1990.
  336.  
  337.  
  338.   [8] M. Simos, "Towards an industry-wide consensus reuse process mo del,"  in Proceedings of the
  339.       Fifth Annual Workshop on Software Reuse, IEEE Computer Society and University of Maine,
  340.       1992.
  341.  
  342.  
  343.   [9] J.  Knight  and  D.  M.  Kienzle,  "Reuse  of  specifications,"  in  Proceedings  of  the  Fifth  Annual
  344.       Workshop on Software Reuse, IEEE Computer So ciety and University of Maine, 1992.
  345.  
  346.  
  347. [10]  B. Cheng and J. jang Jeng, "Formal methods applied to reuse," in Proceedings of the Fifth
  348.       Annual Workshop on Software Reuse, IEEE Computer Society and University of Maine, 1992.
  349.  
  350.  
  351.  
  352. 7      Biography
  353.  
  354.  
  355.  
  356. Maureen J. Stillman is VP of Engineering at ORA Corporation. Ms. Stillman has been manager
  357. of  the  Penelope  formal  methods  project  for  six  years.  At  ORA,  she  has  managed  a  numb er of
  358. projects in formal methods, security, and network management.  From 1985-1987 she workedfor
  359. Bolt, Beranek and Newman as manager of a network management project.  From 1978-1983 she
  360. worked for MIT Lincoln Lab oratory designing network protocols for distributed mobile packet radio
  361. networks. She received an MS in Computer Science from Northwestern University in 1985 and a
  362. BS in Mathematics from the University of Illinoisin 1977.
  363.  
  364.  
  365.  
  366.                                                         Stillman- 6
  367.