Skip to content

Commit 4c3fa6c

Browse files
committed
Added --no-retry
1 parent cb6fa30 commit 4c3fa6c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

chc2c.py

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def main():
3131

3232
parser.add_argument("-o", "--out", default="chc.c")
3333
parser.add_argument("--recursive", action="store_true")
34+
parser.add_argument("--no-retry", action="store_true")
3435

3536
args = parser.parse_args()
3637
with open(args.filename, "r") as f_in:
@@ -40,6 +41,11 @@ def main():
4041
try:
4142
program = LinearCHC2C().chc_to_c_program(text, args.out)
4243
except RecursiveException:
44+
if args.no_retry:
45+
print(
46+
"Unable to map without recursion, but --no-retry is enabled. Exiting."
47+
)
48+
return
4349
print("Retrying with recursive mapping...")
4450
if not program:
4551
program = NonLinearCHC2C().chc_to_c_program(text, args.out)

0 commit comments

Comments
 (0)