Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Cobol/verschiedene-Autoren/Petri-Nets/   (Columbo Version 0.7©)  Datei vom 21.4.2008 mit Größe 1 kB image not shown  

Quelle  Valk p56-1.cob   Sprache: Cobol

 
       identification division.
       program-id. bound-live-reversible.
      * aus Valk-Girault Petri-Nets p56
      * the initial marking is not a home state
       author"JD".
       date-written. 16.5.2008.
       date-compiled.
       data division.
       working-storage section.
        77 p1       pic 9.
        77 p2       pic 9.
        77 p3       pic 9.
        77 p4       pic 9.
        77 p5       pic 9.
        77 blocked  pic 9.
       procedure division.
         display "gestartet"
         move 0 to p1 p4 p5 blocked 
         move 1 to p2 p3
         perform until blocked=1
           move 1 to blocked
           if      p1>0 then 
             subtract 1 from p1 
             add 1 to p2 p4
             move 0 to blocked
           else if p1>0 then 
             subtract 1 from p1 
             add 1 to p3 p5
             move 0 to blocked
           else if p2>0 then 
             subtract 1 from p2 
             add 1 to p5
             move 0 to blocked
           else if p3>0 then 
             subtract 1 from p3 
             add 1 to p4
             move 0 to blocked
           else if p4>0 and p5>0 then 
             subtract 1 from p4 p5 
             add 1 to p1
             move 0 to blocked
           end-if 
         end-perform.
         display "beendet"
        end-program subs.

Messung V0.5
C=96 H=100 G=97

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.