Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brand new #5

Merged
merged 2 commits into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions probably/pgcl/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def get_type(program: Program,

if check and expr.operator in [
Binop.LEQ, Binop.LT, Binop.GEQ, Binop.GT, Binop.EQ, Binop.PLUS,
Binop.MINUS, Binop.TIMES, Binop.MODULO, Binop.POWER
Binop.MINUS, Binop.TIMES, Binop.MODULO, Binop.POWER, Binop.DIVIDE
]:
rhs_typ = get_type(program, expr.rhs, check=check)
if isinstance(rhs_typ, CheckFail):
Expand All @@ -177,7 +177,7 @@ def get_type(program: Program,

# binops that take numeric operands and return a numeric value
if expr.operator in [
Binop.PLUS, Binop.MINUS, Binop.TIMES, Binop.MODULO, Binop.POWER
Binop.PLUS, Binop.MINUS, Binop.TIMES, Binop.MODULO, Binop.POWER, Binop.DIVIDE
]:
# intentionally lose the bounds on NatType (see NatType documentation)
if isinstance(lhs_typ, NatType) and lhs_typ.bounds is not None:
Expand Down