Automatic Conversion of VHDL Programs into Cases.

Paulo Gomes, Carlos L. Bento · ICCBR Workshops · 1999

Software programming is a complex task. To help the user with this task, we are developing a case-based reasoning tool capable of suggesting code to the programmer (software reuse). But, due to the dimension and complexity of software programs, acquisition of the case library is a hard task in this domain. In this paper, we show how a software program can be automatically converted into a case, which are described at a functional and behavioural level. The conversion rules presented here have been developed for procedural languages and enable conversion of basic language constructs into functional and behavioural knowledge. We also show some experimental results. 1 This work was partially funded by the Portuguese Ministery of Science and Technology under program PRAXIS XXI Motivations and Goals Software programming is a hard design task, mainly due to the complexity involved in the process. Nowadays this complexity is increasing to levels in which reuse of previous software code is very useful to short cut the programming time. Case-Based Reasoning (CBR) (Kolodner 1993; Maher, Balachandran, and Zhang 1995) is a useful paradigm to develop tools for aiding software programmers in the coding phases. The working knowledge in case-based systems is its case library. Cases can be used to elaborate problems (Gomes and Bento 1997), solve old and new problems (Goel 1991), to do situation interpretation (Kolodner 1993), and other tasks. These cases are part of the corporate memory and can be reused by other company programmers, cutting down the coding phase of software development. Building a CBR system to do software design or just to help the software engineer in the task of code generation passes through a first hard phase. This phase is the creation of a case library. Software programs are big files describing what the computer system is supposed to do. But, they are not only big; they are also complex and require the knowledge engineer (the one responsible for the case library building) to know how each language instruction works. In order to overcome the case library construction phase we developed a method to do the automatic conversion of software files into case files. The goal of this method is to speed up the construction of the case library, by short cutting the case acquisition phase. We also developed a case representation for software design called Function-Behaviour Case Representation (FBCR). This paper focuses on the case acquisition method, which will be described in more detail. This method is applied in CREATOR II, a case-based reasoning system for digital circuit design using VHDL (VSIC Hardware Description Language). CREATOR II works in the domain of software programming (as defined by Althoff et al. 1997). CBR can be used in the software design domain at different levels. For example, Tautz and Althoff (1997) and Finnie et. al. (1997) use it at an organisational level, reusing the software knowledge used in the software development process. Others, like Fouque and Matwin (1993) and Smyth and Keane (1995) have applied CBR to the software programming phase, like we do. The next chapter presents CREATOR II architecture. Then the FBCR formalism is presented, and then we will present the case conversion method and some experimental results.

Read the paper · More papers on PaperTik