Skip to content

Commit

Permalink
making events to input to strix lower case (to prevent an error with …
Browse files Browse the repository at this point in the history
…docker in windows)
  • Loading branch information
shaunazzopardi committed Apr 27, 2021
1 parent a8a6acc commit 90942b0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions strix/strix_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@


def strix(ltl: str, in_act: [Atom], out_act: [Atom], end_act: Atom, docker: str) -> Tuple[bool, Monitor]:
in_act_string = ",".join([str(a) for a in in_act])
out_act_string = ",".join([str(a) for a in out_act])
in_act_string = ",".join([str(a).lower() for a in in_act])
out_act_string = ",".join([str(a).lower() for a in out_act])
ltl_string = ltl
for inp in in_act:
ltl_string = ltl_string.replace("\"" + str(inp) + "\"", str(inp).lower())
for out in out_act:
ltl_string = ltl_string.replace("\"" + str(out) + "\"", str(out).lower())

try:
cmd = "strix -k -f '" + ltl_string + "' --ins='" + in_act_string + "' --outs='" + out_act_string + "'"
cmd = "strix -k -f \"" + ltl_string + "\" --ins=\"" + in_act_string + "\" --outs=\"" + out_act_string + "\""
if docker is not None:
cmd = "docker run " + docker + " " + cmd
so = subprocess.getstatusoutput(cmd)
Expand Down

0 comments on commit 90942b0

Please sign in to comment.