Research Article

A Novel Algorithm for Intrusion Detection Based on RASL Model Checking

Algorithm 1

Translation from a RASL formula to a TNFG.
TNFG( )
Begin
 PRO(Untime(P)); CL(P):= CL(Untime(P)); EL(P):= EL(Untime(P));
     /* produce the NFG in which no clock constraint exists, where CL(Untime(P)) is the set of nodes
     of the NFG of ASL formula Untime(P), and EL(Untime(P)) is the set of edges of the NFG of ASL
      formula Untime(P)
is defined as a set, and it consists of all the nodes which have been converted from NFG to TNFG.
 for all Qs of CL(P) in the order of building NFG’s nodes, do the following:
  
  for all and and
  and , do /* for all the clock constraints holding the conditions
   new(x); /* allocate a new clock
   for all , do
      /* means that constraint I is satisfied when , where
   for all , do
     /* the edges of NFG is converted to the ones of TNFG
   for all do /* the current interval is over, where is a state formula which may be
   empty or not.
   if then
    /* in the TNFG, the clock constraint is appended if it is satisfied.
  end for
  end for
 end for
 for all of e in do /* for all the converts which deal with no clock constraint
if , /* the edges of NFG is converted to the ones of TNFG
 end for
end TNFG