Commits

HongboZhang committed 52aa6dd

fix

Comments (0)

Files changed (15)

 (* let ()  = reset ~until:3 () *)
 
 let _ =
-  try 
-    while true do 
-      (* List.iter parse_instruction_eoi lines *)
-      let line = read_line () in
-      let ()  =  prerr_endline line in
-      parse_instruction_eoi line
-    done
-  with
-    End_of_file ->
-      prerr_endlinef "finished"
-        
+
+  let () = reset ~until:5 () in
+  let file_name = Sys.argv.(1) in
+  if Sys.file_exists file_name then 
+    let chan = open_in file_name in
+    try      
+      while true do 
+        (* List.iter parse_instruction_eoi lines *)
+        let line = input_line chan in 
+        let ()  =  prerr_endline line in
+        parse_instruction_eoi line
+      done
+    with
+      End_of_file ->
+        prerr_endlinef "finished"
+  else 
+    prerr_endlinef "file %snot exists" file_name
 
 then you will see a link to DSL_util.byte
 
-         ./DSL_util.byte < leader_sce.ml
+         ./DSL_util.byte  leader_sce.ml
          or type line by line to check
          leader_sce.ml is a very *complex* scenario, it will generate more than
          3000 messages.
          (alice bob marry) 1000 interval 0.00
          means the three guys will take turns to speak, with interval 0.00
          (so concurrency happens here), and do it 1000 times
-         
+
          the log is in the same directory, after it finished,
          i.e,
          alice.log, alice.err.log

Binary file modified.

Binary file modified.

Binary file modified.

_build/DSL_util.ml

 (* let ()  = reset ~until:3 () *)
 
 let _ =
-  try 
-    while true do 
-      (* List.iter parse_instruction_eoi lines *)
-      let line = read_line () in
-      let ()  =  prerr_endline line in
-      parse_instruction_eoi line
-    done
-  with
-    End_of_file ->
-      prerr_endlinef "finished"
-        
+
+  let () = reset ~until:5 () in
+  let file_name = Sys.argv.(1) in
+  if Sys.file_exists file_name then 
+    let chan = open_in file_name in
+    try      
+      while true do 
+        (* List.iter parse_instruction_eoi lines *)
+        let line = input_line chan in 
+        let ()  =  prerr_endline line in
+        parse_instruction_eoi line
+      done
+    with
+      End_of_file ->
+        prerr_endlinef "finished"
+  else 
+    prerr_endlinef "file %snot exists" file_name
 "Rule: ocaml dependencies ml (%=util )": "p7����$����V\152b��"
-"Resource: /mnt/castor/seas_home/h/hongboz/html/hongbo_zhang_files/dsl/DSL_util.ml": "d D�\t�\157x\157\151�x�rE"
+"Resource: /mnt/castor/seas_home/h/hongboz/html/hongbo_zhang_files/dsl/DSL_util.ml": "wu^p\145\026<�M�\157�\029��k"
 "Resource: /mnt/castor/seas_home/h/hongboz/html/hongbo_zhang_files/dsl/util.ml": "A�P��\151\140�\005\004gG��2?"
 "Rule: ocaml: ml -> cmo & cmi (%=util )": "�|#C�2�Q��-8E\148;"
-"Rule: ocaml: ml -> cmo & cmi (%=DSL_util )": "�\146\1541�x\016\154\025\031�\139�\151\030="
-"Rule: ocaml dependencies ml (%=DSL_util )": "4���<l\141�Cg�N\132��?"
-"Rule: ocaml: cmo* -> byte (%=DSL_util )": "�\148���\r�\012�m]R�\004uv"
+"Rule: ocaml: ml -> cmo & cmi (%=DSL_util )": "��,��I©�\157��ӽ��"
+"Rule: ocaml dependencies ml (%=DSL_util )": "���\159�\141\149\157��0\159<M\024�"
+"Rule: ocaml: cmo* -> byte (%=DSL_util )": "`1��c��T\027\128�?�\133\158�"
 ### Starting build.
 # Target: DSL_util.ml.depends, tags: { extension:ml, file:DSL_util.ml, ocaml, ocamldep, quiet }
-/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamldep.opt -pp camlp4of -modules DSL_util.ml > DSL_util.ml.depends # cached
+/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamldep.opt -pp camlp4of -modules DSL_util.ml > DSL_util.ml.depends
 # Target: util.ml.depends, tags: { extension:ml, file:util.ml, ocaml, ocamldep, quiet }
 /home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamldep.opt -pp camlp4of -modules util.ml > util.ml.depends # cached
 # Target: util.cmo, tags: { byte, compile, extension:cmo, extension:ml, file:util.cmo, file:util.ml, implem, ocaml, quiet }
 /home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -c -I +camlp4 -pp camlp4of -o util.cmo util.ml # cached
 # Target: DSL_util.cmo, tags: { byte, compile, extension:cmo, extension:ml, file:DSL_util.cmo, file:DSL_util.ml, implem, ocaml, quiet }
-/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -c -I +camlp4 -pp camlp4of -o DSL_util.cmo DSL_util.ml # cached
+/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -c -I +camlp4 -pp camlp4of -o DSL_util.cmo DSL_util.ml
++ /home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -c -I +camlp4 -pp camlp4of -o DSL_util.cmo DSL_util.ml
+File "DSL_util.ml", line 34, characters 13-16:
+Warning 8: this pattern-matching is not exhaustive.
+Here is an example of a value that is not matched:
+[]
 # Target: DSL_util.byte, tags: { byte, dont_link_with, extension:byte, file:DSL_util.byte, link, ocaml, program, quiet }
-/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -I +camlp4 dynlink.cma camlp4lib.cma str.cma unix.cma util.cmo DSL_util.cmo -o DSL_util.byte # cached
+/home1/h/hongboz/SourceCode/godi-rocketboost-20110811/ocaml/bin/ocamlc.opt -I +camlp4 dynlink.cma camlp4lib.cma str.cma unix.cma util.cmo DSL_util.cmo -o DSL_util.byte
 # Compilation successful.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.