
Downloaded from orbit.dtu.dk on: Oct 05, 2021 SOFTM: a software maintenance expert system in Prolog Pau, L.; Negret, J. M. Published in: Proceedings of the Conference on Software Maintenance Link to article, DOI: 10.1109/ICSM.1988.10181 Publication date: 1988 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Pau, L., & Negret, J. M. (1988). SOFTM: a software maintenance expert system in Prolog. In Proceedings of the Conference on Software Maintenance (pp. 306-311). IEEE. https://doi.org/10.1109/ICSM.1988.10181 General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. Users may download and print one copy of any publication from the public portal for the purpose of private study or research. You may not further distribute the material or use it for any profit-making activity or commercial gain You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. L. Pau J.M. Negret Technical University of Denmark Battelle Memorial Institute Bldg. 348/EMI, DK 2800 Lyngby, Denmark ABSTRACT: This paper describes a software maintenance - software maintenance personnel selection (SM) knowledge based system ealled SOFTM, serving the - performance goals, and quality control during mainte- three following purposes: (1) assisting a software programmer ance or analyst in his application code maintenFce tasks, (2) gen- - software maintenance work breakdown erating and updating automatically sonware correction docu- - distribution of responsibilities amongst code users, dew- mentation, (3) helping the end user register, and possibly in- loppers, quality assurance, and maintenance terpret, observed errors on the successive application code ver- - audits and user reviews sions. The knowledge based system SOFTM is written in - problem reporting systems PROLOG 11, and is largely applicable to application codes - maintenance logs written in different programming languages, provided code - use of specification formalisms, typically of the SAD1' descriptors can be retrieved. SOFTM does not address any of model the syntactic, input-output, or procedural errors normally de- - use of program design languages tected by the syntactic analyzer, compiler, or by the operating - use of structured techniques to maintain unstructured system environment. SOFTM is relying on a unique ATN code network based code description, on diagnostic inference proce- - designing in code maintainability dure based on context based pattern classification, on main- tenance log report generators, and on interfacing capabilities Amongst the tools in use, or at the research stage, can he of PROLOG I1 to a variety of other languages. mentioned: - specification and program design languages - software configuration systems - conversion of source code in its structural control-flow graphs (e.g.S3, ADA, Z specification languages) 1. INTRODUCTION - source code controllers, formatters and comparators - declarative constructs 1) The current concern about software maintenance is - paragraph parsers justified by the cost and quality of code repair and up- - cross referencing and linking facilities (mapping) dates, while at least maintaining software reliability - display of data flows and performances. The estimated productivity gains ex- - symbolic debuggers pected from software maintenance are, according to Bar- - test data generation ry Boehm, TRW [451 - sequence analysis tools (for synchronization and recoverability) Corrective maintenance: 18%of current effort - interpreters of abnormal endings - coverage analysis Adaptative maintenance: 14% of current effort - diagnostic metarules Perfective maintenance: 7 % of current effort Many of the above are still at an early stage, thus result- ing in the still overwhelming use of debugging he1.r- Update: due to mismatch between user requirements and istics as the basic software maintenance approach and software specification: 14% of current effort tool. The major issues in software maintenance and its role in the software production process, are discussed in 2) Some research focusses on knowledge based programm- ing, where code is being written with user driven access [3,8,9,13,14,21,22,24,25,26,27,28,35,43,45,461. The classical approaches followed are: thru an intelligent editor to: 306 CH261S-3/88/oooO/030$01.@IQ 1988 IEEE Authorized licensed use limited to: Danmarks Tekniske Informationscenter. Downloaded on October 16, 2009 at 09:11 from IEEE Xplore. Restrictions apply. gnowledgeeources TOOlS This obeys the diagnostic strategies described in 1291 Data flow models and Data flow design and using context based pattern classification. This is descriptors Transform aids essentially a backward chaining process where root Design rules Transaction analysis error ceusdcorrection goals are found from their Data dictionary Procedural templates consequences and partially known attributes C501. Abstract procedures Design codes Common data structures The knowledge base of SOFTM is divided into three Structured programming rules parts: Common algorithms KB-1: Facts in predicate form, about error types, error Examples of such related CASE projects are (non ex- localizations, diagnostic classes, the environment, haustively): Tediummedious Enterprises, Pro- and observables. Observable8 are passive if measured grammers ApprenticeJMIT, USE-IT/Higher order Soft- without modifying code execution, and active if ware, RlOOOAXational, REFINWReasoning systems, external perturbations are necessary. Knowledge-based software assistant (KBSA)/Kestrel In- KB-2 Code independent kernel rules, applying to the stitute, Intelligent program editor/Advanced Informa- general software maintenance task. tion and decision systems, POISE Interactive pro- KB-S: ,Symbolic descriptors of C(L), derived by gramming environment/Univ. of Massachusetts, IN- rewriting in predicate form C(L) features provided by FORM/Univ. Stuttgart [ll, KBPAlEsprit 121 and also in the compiler, the specification language, or the data AI related CASE research 13,6,13,15.16,21,24,40,43,44, flow model, in an augmented transition network 45,473. (ATN) form. Research has been reported on experthowledge based All three part are assigned to different sub-worlds in debugging: Message trace analyzer - Source code debug- germniv. Waterloo [4l,SPEAWDigital Eqipment [5l,FA- Prolog, for separation and decomposition; they are edited each by knowledge base editor specific to each of the LOSYNniv. Minnesota [7l,SOFTM/ Technical Univ. a three parts. The knowledge base KB-3 is interfaced to Denmark & Battelle C301, besides [6,8,13,15,19,36,37,41, other tools as indicated. 47,481. Regarding inferences and queries, the access is as fol- lows: However, little work has dealt so far with knowledge ba- sed software maintenance, incorporating some of the re- the code developper, can query and update KB-1 alone, levant approaches and tools mentioned above in 1): see - [10,11,17,20,21,30,421.It is the purpose of this paper to de- and update C(L) thru the editor of that L language; he scribe the structure of a software maintenance expert can also execute C(L) the code user, can query and run C(L) system SOFI'M, written in Prolog I1 1493 , and operating - KB-1 the code maintenance programmer, can query and up- on the source code of a diversity of programming langu- - ages. date KB-1, query KB-3, and update KB- 2. 1) On a specific piece of application code C(L), written in a programming language L for which there is an 3. APPLICATION DEPENDENT CODE KNOWLEDGE RE- interpretor, compiler, linker, and editor, the actual PRESENTATION knowledge based software maintenance system SOFTM The code representation is treated as fact predicates in a speci- carries out essentially error diagnosis and provides for fic knowledge base world. It consists the propagation of corrective changes (see Figure 2): of: a) code structure: it describes the information flows between 1. detection of errors: except : a) syntactic errors code modules and arguments, stressing the call order detected by the compiler during execution. The representation is an augmented b) cross-referencing errors transition network (ATN) with attributes, written in pre- c) calculation errors due to a wrong algorithm dicate logic. The node labels are provided by the linker, d) search, query or IO errors due to a wrong algorithm and the attributes by a standard run of the code (altemati- vely by a Petri-net based simulator). 2. location of errors, except 1) a,b,c,d b) module structure: each module of the application code is 3. error diagnosis represented by a frame, attached to the corresponding ATN node. The frame fields are: pointers to U0 argu- 4. maintenance guidance for C(L) ments, pointers to internal arguments, ordered textual description of the functional purpose of each successive 5. generation of explanation facilities for 1.-4. block in the module (as specified e.g. in structured or functional programming). These frame fields are provi- 6. automatic generation of code maintenance logs, to be ded by the linker or compiler, and by the module docu- incorporated into the C(L) code documentation. mentation located
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-