home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / ddjmag / ddj8910.zip / LAZAREV.LST < prev    next >
File List  |  1989-09-07  |  2KB  |  50 lines

  1. _Executable Specifications With Prolog_
  2. by Gregory Lazarev
  3.  
  4. [LISTING ONE]
  5.  
  6.  
  7. project( i( User_req), o( System, Budg_sched) ):-
  8.   survey( i( User_req), o( Feas_doct) ),
  9.   str_anal( i( User_req, Feas_doct), 
  10.             o( Struct_spec, Budg_sched, Phys_req) ),
  11.   hw_study( i( Phys_req), o( Config_data, Hardw) ),
  12.   str_design( i( Struct_spec, Config_data), 
  13.               o( Test_plan, Pack_design) ),
  14.   implem( i( Hardw, Test_plan, Pack_design), o( System) ).
  15.  
  16. str_anal( i( User_req, Feas_doct), 
  17.           o( Struct_spec, Budg_sched, Phys_req) ):-
  18.   study_curr_environ( i( User_req), o( Curr_phys_DFD) ),
  19.   derive_log_equiv( i( User_req, Curr_phys_DFD), 
  20.                     o( Curr_log_DFD) ),
  21.   model_new_log_sys( i( User_req, Curr_log_DFD, Feas_doct), 
  22.                      o( New_log_DFD, DD, Trans_desc) ),
  23.   model_new_phys_sys( i( New_log_DFD), 
  24.                       o( New_phys_DFD, Budg_sched, Phys_req) ),
  25.   produce_struct_spec( i( New_phys_DFD, DD, Trans_desc), 
  26.                        o( Struct_spec) ).
  27.  
  28. survey( i( user_req0), o( feas_doct0) ).
  29. hw_study( i( phys_req0), o( config_data0, hardw0) ).
  30. str_design( i( struct_spec0, config_data0), 
  31.             o( test_plan0, pack_design0) ).
  32. implem( i( hardw0, test_plan0, pack_design0), o( system0) ).
  33. study_curr_environ( i( user_req0), o( curr_phys_DFD0) ).
  34. derive_log_equiv( i( user_req0, curr_phys_DFD0), 
  35.                   o( curr_log_DFD0) ).
  36. model_new_log_sys( i( user_req0, curr_log_DFD0, feas_doct0), 
  37.                    o( new_log_DFD0, dd0, trans_desc0) ).
  38. model_new_phys_sys( i( new_log_DFD0), 
  39.                     o( new_phys_DFD0, budg_sched0, phys_req0) ).
  40. produce_struct_spec( i( new_phys_DFD0, dd0, trans_desc0), 
  41.                      o( struct_spec0) ).
  42.  
  43. [LISTING TWO]
  44.  
  45. bb( i( B, B1, nil), o( nil, E) ) :- 
  46.     bb'( i( B, B1), o(E) ).
  47. bb( i( nil, nil, C), o( D, nil) ) :- 
  48.     bb''( i( C), o( D) ).
  49.  
  50.