OBJECT society IS

 PASSIVE

DESCRIPTION

PROBLEM

Referenced Documents (text)

This application is the HOOD version of "Dining Philosophers - Ada95 edition" from Michael B. Feldman, The George Washington University, July 1995.
HOOD adaptation was performed by Pierre Dissaux, TNI, June 1998, with STOOD toolset.

Local Environment

Parent General Description (text)

Please refer to parent module description.

PROVIDED_INTERFACE

TYPES

Unique_DNA_Codes

type attributes (hood)

ATTRIBUTES NONE

type enumeration (hood)

ENUMERATION NONE

type definition (ada)

subtype Unique_DNA_Codes is Positive range 1..5;

OPERATIONS

get_name

operation declaration (hood)

get_name(Code : in Unique_DNA_Codes) return String;

real time attributes (hood)

WCET

REQUIRED_INTERFACE

OBJECT standard;
        TYPES
                String; Positive;
        CONSTANTS
                NONE
        OPERATION_SETS
                NONE
        OPERATIONS
                NONE
        EXCEPTIONS
                NONE

INTERNALS

DATA

Name_Register

data declaration (ada)

Name_Register : array(Unique_DNA_Codes) of String(1..18) :=
  ("Philosopher #1    ",
   "Philosopher #2    ",
   "Philosopher #3    ",
   "Philosopher #4    ",
   "Philosopher #5    ");

data access from pseudo_code

(da) society.Name_Register IS USED BY NONE

data access from Ada code

(da) society.Name_Register IS USED BY 
        (op) society.get_name [R]

data access from C code

(da) society.Name_Register IS USED BY NONE

data access from C++ code

(da) society.Name_Register IS USED BY NONE

OPERATION_CONTROL_STRUCTURES

OPERATION get_name IS

operation code (ada)

begin
  return Name_Register(Code);

call tree from Ada code

END get_name

END society