[Pntool-developers] SF.net SVN: pntool:[255] pnheaders
Brought to you by:
compaqdrew,
miordache
From: <mio...@us...> - 2011-07-21 20:36:15
|
Revision: 255 http://pntool.svn.sourceforge.net/pntool/?rev=255&view=rev Author: miordache Date: 2011-07-21 20:36:08 +0000 (Thu, 21 Jul 2011) Log Message: ----------- Modified Paths: -------------- pnheaders/pns.c pnheaders/pns.h Modified: pnheaders/pns.c =================================================================== --- pnheaders/pns.c 2011-07-21 14:49:26 UTC (rev 254) +++ pnheaders/pns.c 2011-07-21 20:36:08 UTC (rev 255) @@ -2087,6 +2087,11 @@ return pn->t[t].l; } +inline int get_marking(pns* pn, int place) { +/* Returns the (initial) marking of the place */ + if(!pn->marking) return 0; + return pn->marking[place]; +} //========================================================================= Modified: pnheaders/pns.h =================================================================== --- pnheaders/pns.h 2011-07-21 14:49:26 UTC (rev 254) +++ pnheaders/pns.h 2011-07-21 20:36:08 UTC (rev 255) @@ -1,5 +1,5 @@ -/* PNS.H -- Version 2.2 (12/13/2010) +/* PNS.H -- Version 2.3 (July 2011) This is the main header file. It defines the data types used for Petri net representation as well as other data types used for the input specification @@ -13,8 +13,8 @@ #include<stdlib.h> #include<stdarg.h> #include<string.h> -#include "general.h" -#include "matrix.h" +#include"general.h" +#include"matrix.h" typedef struct TransInfo { @@ -138,6 +138,10 @@ /* Returns the label of t or zero if no label is defined */ +inline int get_marking(pns* pn, int place); +/* Returns the (initial) marking of the place */ + + pns createpn(const char *str, ...); /* Creates pns objects. This is the format: createpn("param1 param2 param3 ...", param1, param2, param3, ...) @@ -445,6 +449,11 @@ } specs; +int satisfied_expr(expression2 *expr); +/* Returns 1 if the expression is satisfied at the initial marking. Otherwise, + it returns 0. */ + + void extractLHCB(specs* sp, pns* pn, matrix* L, matrix* H, matrix* C, int** B); /* Extracts a SC specification of the form Lm + Hq + Cv <= B from sp. Also This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |