Loading ...
Sorry, an error occurred while loading the content.

RE: [XP] Formal Methods and XP and Software Engineering in genera l.

Expand Messages
  • kari.hoijarvi@vaisala.com
    Some formal methods are very useful. My favorite example is lex+yacc. It s just a practical way to formally describe syntax in Backus-Naun form. If you re
    Message 1 of 1 , Feb 1, 2001
    • 0 Attachment
      Some formal methods are very useful. My favorite example is lex+yacc. It's
      just a practical way to formally describe syntax in Backus-Naun form. If
      you're programming in yacc, you're doing formal work.

      Another is FSM. Every time I come across a piece of complicated UI code, I
      wish formal method classes were more practical. After describing the UI
      behaviour formally with a finite state machine, you have much better chances
      to get the implementation right. I don't care if you use UML, GoF state
      pattern, an FSM translator or two enums and switches. But I don't like to
      decode hundreds of lines of unreadable UI code into a formal state machine.
      The other way around is much easier.

      This does not mean, that I would be using every formal method that I came
      across. For example Ruediger R. Asche wrote technical articles "Detecting
      Deadlocks in Multithreaded Win32 Applications" and "The implementation of
      DLDETECT.EXE" for Microsoft Development Library in 1994. He's method
      involves creating a Petri Net model of the program control flow and using
      that model to prove, that your application cannot deadlock. I have been
      doing multithreaded programming for years so you could guess, that I'm using
      something like that. Wrong.

      The article itself is interesting, but I cannot recommend that approach for
      anyone who's doing practical work. For DB kernel guru's, maybe. Deadlocks
      are a difficult issue, but you don't need petri net's to do that. Ordering
      locking works easily if you have only a few locks and raisin and exception
      or aborting a transaction if a deadlock occurs is also a way to go. And of
      course, just writing plain old single threaded applications is a working
      solution to most of use, most of the time.

      Kari
    Your message has been successfully submitted and would be delivered to recipients shortly.