Skip to content

Commit

Permalink
Adrian Pop, adrpo@ida.liu.se
Browse files Browse the repository at this point in the history
2005-06-12
Fixed so that:
- server_loop
- server_loop_corba 
are completly deterministic.
Please, if you add things to the first rule of these relation
add it also to the second rule, otherwise the RML doesn't turn
the two rules into a conditional.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1807 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Jun 12, 2005
1 parent 7231194 commit de3df4c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Compiler/Main.rml
Expand Up @@ -166,6 +166,7 @@ relation server_loop: (int,Interactive.InteractiveSymbolTable) => Interactive.I
Debug.fprint ("interactivedump" ,"------- Recieved Data from client -----\n") &
Debug.fprint ("interactivedump" , str ) &
Debug.fprint ("interactivedump", "------- End recieved Data-----\n") &
Print.clear_error_buf &
Print.clear_buf &
handle_command (str,isymb) => (false,replystr,newsymb) &
(* 2004-11-27 - adrpo added part ends here *)
Expand Down Expand Up @@ -263,8 +264,8 @@ relation handle_command: (string,Interactive.InteractiveSymbolTable) =>
(bool, string, Interactive.InteractiveSymbolTable) =

rule strncmp("quit()",str,6) => true
-------------------------------
handle_command (str, isymb) => (false,"Ok\n",isymb)
-------------------------------
handle_command (str, isymb) => (false,"Ok\n",isymb)

rule (*check_classdef str => true &*)
Debug.fcall0 ("dump", Print.clear_buf) &
Expand Down Expand Up @@ -681,7 +682,12 @@ relation server_loop_corba: (Interactive.InteractiveSymbolTable) => Interactive
-----------------------------
server_loop_corba (isymb) => ressymb

rule Print.print_buf "Exiting\n" &
rule (* start - 2005-06-12 - adrpo added this part to make the loop deterministic *)
Corba.wait_for_command() => str &
Print.clear_buf &
handle_command (str,isymb) => (false,replystr,newsymb) &
(* end - 2005-06-12 - *)
Print.print_buf "Exiting\n" &
Corba.sendreply("quit requested, shutting server down\n") &
Corba.close
---------------------
Expand Down

0 comments on commit de3df4c

Please sign in to comment.