Skip to content

assert false in int modulo #649

Description

@amenahh

For the following example an exception is thrown.

let expr = Smtml.Typed.Int.mod_ (Smtml.Typed.Int.v 4) (Smtml.Typed.Int.v 2)  

let expr = Smtml.Typed.Int.eq expr (Smtml.Typed.Int.v 0) 

module Z3 = Smtml.Solver.Batch (Smtml.Z3_mappings)

let solver = Z3.create ()

let () =
  match Z3.check solver [ Smtml.Typed.Unsafe.unwrap expr ] with
  | `Sat -> Format.printf "SAT@\n"
  | `Unsat -> Format.printf "UNSAT@\n"
  | `Unknown -> Format.printf "UNKNOWN@\n"

Here's the stack trace

Fatal error: exception File "src/smtml/typed.ml", line 938, characters 28-34: Assertion failed
Raised at Smtml__Typed.Int.mod_ in file "src/smtml/typed.ml", line 938, characters 28-40
Called from Dune__exe__Bug6.expr in file "bug/bug6.ml", line 2, characters 11-75

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions