     
--     
--  Sigurd Meldal <meldal@anna.stanford.edu>     
--     

--------------------------------------------------------------------
--
-- Here's where the abstraction starts, mapping the flat structure
-- of networks to that of enclaves and WANs
--
-- The first version simply maps single events to single events.
--
--------------------------------------------------------------------

type Enclave is interface
    action out internal(); 
	-- modeling the generic internal activity
	-- used for constraint purposes, later
    service
		wan_conn : network_comm;
end;

type absWan is interface
-- an abstraction from the WAN, enabling the representation of a
-- transmission as a single event
    action out transmission(fromm, too : NetID);
-- include WAN
	provides        
		net_no 	: NetID;
	service
		ws_conn : dual network_comm;  -- to the workstations on the net     
-- end include WAN
end;

module MISSI() return root is
    enclaves 	: array (integer, Enclave);
    net 	: absWAN;
end;

map federation() from n: netskeleton to MISSI is
rule
    (?ws : COTSWorkstation) 
	?ws.user_conn.to_user or ?ws.user_conn.to_workstation 
  ||>
	enclaves[?ws.network_address.net_no].internal();;

     (?sndr : firewall; ?rcvr : firewall;
      ?data : Data; ?dest : address) 
	(?sndr.wan_conn.to_net(?data, ?dest) 
	) 
  ||> 
	net.transmission(?sndr.network_address.net_no,?dest.net_no);;
end map;

module ref_arch() return root is
     m is map federation (netskeleton());
end ref_arch; 
