Skip to content

Commit

Permalink
better handling of numbers
Browse files Browse the repository at this point in the history
git-svn-id: svn://R_E_D_A_C_T_E_D/icfp/hw12@370 b3d0796d-73f4-44f3-a614-c7306c265f62
  • Loading branch information
dwrenshaw committed Jun 19, 2011
1 parent 206ecdd commit 5f195af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions abstracteval.sml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,14 @@ open LTG;
| AVSucc =>
(case v2 of
AVInt n => AVInt (clamp (n + 1))
| AVUnknown (UnknownInt n) => AVUnknown (UnknownInt(clamp (n + 1)))
| AVUnknown u => AVUnknown (UnknownInt 1)
| _ => raise AbsEvalError "argument to succ not int")
| AVDbl =>
(case v2 of
(AVInt n) => (AVInt (clamp (n * 2)))
| AVUnknown (UnknownInt n) => AVUnknown (UnknownInt(clamp (n * 2)))
| AVUnknown u => AVUnknown (UnknownInt 0)
| _ => raise AbsEvalError "argument to dbl not int")
| AVGet => (
case v2
Expand Down

0 comments on commit 5f195af

Please sign in to comment.