|
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
.
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 ISV
and structures, i.e. SV'max becomes ISV.max for integer
variables and RSV.max for real variables.
One exception is the functions for creating statistical variables,
they remain SV'createint and SV'createreal.
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.
IntInf to/from Real conversion functions
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.
|