Design/CPN Online

Design/CPN 4.x manual addendum

This page describes the changes that has been made to the tool, but not covered by the manuals.

SML'97

The language used for declarations and net inscriptions is now based on the SML'97 standard. This has required some changes to the Design/CPN tool:
  • The REAL type can no longer be used as a color type. Time values now have the type IntInf.
  • Multiset addition is ++, subtraction is --, scaling is **, selection is //.
  • Timed mutiset addition is +++.
  • size is no longer overloaded, use String.size/mssize for strings/multisets.
  • min is no longer overloaded, use imin/rmin for integers/reals.
  • max is no longer overloaded, use imax/rmax for integers/reals.
For general SML changes, refer to the SML'97 Conversion Guide .

IntInf to/from real and int conversion functions

You may use the functions IntInf.fromInt and IntInf.toInt in order to convert from and to integers.

If you need conversion from and to reals you may wish to use following functions supporting fixed point arithmetics:

    val RealToIntInf : int -> real -> IntInf.int
    val IntInfToReal : int -> IntInf.int -> real
    
RealToIntInf p r
Converts the real r to a IntInf.int with a precission of p digits.
IntInfToReal p i
Converts the IntInf.int i to a Real with a precission of p digits.

Typically one would use something like
    val RealToTime = RealToIntInf 6;
    val TimeToReal = IntInfToReal 6;
    
and then use the these functions to convert between Real's and time.

See also this posting from the mailing list.

Charts

The chart functions BC_create, HC_upd_bar, HC_upd_chart, LC_create, LC_upd_chart, LC_upd_line, LC_upd_pline, SC_upd_bar, SC_upd_chart, and SC_upd_part are no longer overloaded. Suffix the above names with _int or _real to access the functions, i.e. BC_create_int or BC_create_real.

Statistical Variables

The functions related to statistical variables are no longer overloaded on integers and reals, but are now available in the CPN'IUSV and CPN'RUSV structures. The function names are slightly different as most of them are now capitalized, i.e. SV'max becomes CPN'IUSV.Max for integer variables and CPN'RUSV.Max for real variables. The functions for creating statistical variables are USV'CreateInt and USV'CreateReal. More specifically, the following functions are available for creating, updating and accessing statistical variables:

Integer statistical variables:

  USV'CreateInt  : unit -> IntInf.int Statvar
  CPN'IUSV.Avrg  : IntInf.int Statvar -> real
  CPN'IUSV.Count : IntInf.int Statvar -> int
  CPN'IUSV.First : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.Init  : IntInf.int Statvar -> unit
  CPN'IUSV.Max   : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.Min   : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.SS    : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.SSD   : IntInf.int Statvar -> real
  CPN'IUSV.StD   : IntInf.int Statvar -> real
  CPN'IUSV.Sum   : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.Upd   : IntInf.int Statvar * int -> unit
  CPN'IUSV.Value : IntInf.int Statvar -> IntInf.int
  CPN'IUSV.Vari  : IntInf.int Statvar -> real

Real statistical variables:

  USV'CreateReal : unit -> real Statvar
  CPN'RUSV.Avrg  : real Statvar -> real
  CPN'RUSV.Count : real Statvar -> int
  CPN'RUSV.First : real Statvar -> real
  CPN'RUSV.Init  : real Statvar -> unit
  CPN'RUSV.Max   : real Statvar -> real
  CPN'RUSV.Min   : real Statvar -> real
  CPN'RUSV.SS    : real Statvar -> real
  CPN'RUSV.SSD   : real Statvar -> real
  CPN'RUSV.StD   : real Statvar -> real
  CPN'RUSV.Sum   : real Statvar -> real
  CPN'RUSV.Upd   : real Statvar * real -> unit
  CPN'RUSV.Value : real Statvar -> real
  CPN'RUSV.Vari  : real Statvar -> real

Occurrence graphs

  • The following functions are no longer overloaded:
    • LowerMultiset - Use LowerMultiset/LowerTimedMultiset for untimed/timed multisets
    • UpperMultiset - Use UpperMultiset/UpperTimedMultiset for untimed/timed multisets


  • Delete of Occurrence Graph
    In the the Design/CPN Occurrence Graph Tool it is now possible to delete a generated occurence graph without having to make a reswitch to the Occurrence Graph Tool. This feature is supported by means of the ML function
    	  DeleteOccGraph : unit -> unit
    	
    The ML function DeleteOccGraph can also be used in the Design/CPN OE/OS tool to delete an OE/OS Graph.

  • Improved Implementation of the State Space/Occurrence Graph Generation Algorithm
    The algorithm for state space generation has been reimplemented resulting in a significantly more time-efficient state space generation. The data-structures for storage of state spaces is not affected by the reimplementation. This means that memory consumption has not increased. Moreover, both depth-first and breadth-first generation of the state space is now supported.

    Some experiments demonstrating the performance improvement of the new implementation on the Data Base system can be found below.
    Depth-first generation of the state space is supported by the ML function
    	  CalculateOccGraphDepthFirst : unit -> unit
    	
    Breadth-first generation is supported by the ML function
    	  CalculateOccGraphDepthFirst unit -> unit
    	
    The menu entry "Calculate Occ Graph" corresponds to a breadth-first generation. The improved algorithm is also available in the OE/OS Graph Tool as
    	  CalculateOEGraphDepthFirst : unit -> unit
    	
    and
    	  CalculateOEGraphBreadthFirst : unit -> unit
    	

    You can get access to the improved implementation of the algorithm by adding the ML code: 'NewOGGeneration:= true;' to the top of the global declaration node of your CPN model. Currently the improved implementation is only available for untimed CPN models.
Home
Valid
      HTML4.0! Last modified: Mon Aug 18 15:20:09 2003 -- Design/CPN Online admin