# Proofs (and Refutations) using Z3

DevFeed: [Proofs (and Refutations) using Z3](<https://devfeed.tech/articles/proofs-and-refutations-using-z3-20206.md>)

Original publisher: [Read original article](<https://blog.janestreet.com/proofs-and-refutations-using-z3/>)

Author: Xavier Clerc

Published: 2018-02-15T00:00:00Z

Content type: article

Language: en

Sources: [Jane Street](<https://devfeed.tech/sources/jane-street.md>)

Topics: [Formal methods](<https://devfeed.tech/topics/formal-methods.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [OCaml](<https://devfeed.tech/topics/ocaml.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [development](<https://devfeed.tech/tags/development.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [ocaml](<https://devfeed.tech/tags/ocaml.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

This article describes how Jane Street used the Z3 theorem prover to validate optimizations for the OCaml compiler and identify a subtle bug in one proposed optimization.

## Source excerpt

People often think of formal methods and theorem provers as forbidding tools, cool in theory but with a steep learning curve that makes them hard to use in real life. In this post, we're going to describe a case we ran into recently where we were able to leverage theorem proving technology, Z3 in particular, to validate some real world engineering we were doing on the OCaml compiler. This post is aimed at readers interested in compilers, but assumes no familiarity with actual compiler development.