# Can you overload if-else-blocks? (for bounded model checking)

**URL:** <https://discourse.julialang.org/t/can-you-overload-if-else-blocks-for-bounded-model-checking/118364>\
**Category:** General Usage\
**Tags:** testing\
**Created:** [August 19, 2024, 9:04am UTC](https://discourse.julialang.org/t/can-you-overload-if-else-blocks-for-bounded-model-checking/118364 "2024-08-19T09:04:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [August 19, 2024, 9:24am UTC](https://discourse.julialang.org/t/can-you-overload-if-else-blocks-for-bounded-model-checking/118364/2 "2024-08-19T09:24:07Z")

</div>

> [@phK3](#):
>
> Are these statements just functions (since they return a value) that I can overload?

No they can’t be since function evaluate their arguments _before_ they are called.

For true formal verification you likely need to work on the IR level, i.e. write a custom interpreter of sorts. IIRC, the topic arose on this forum before but I can’t find a good thread.

In the meantime you can try Supposition.jl by @Sukera which maybe gets you close enough to what you want 🙂 See also [the announcement of Supposition.jl](https://discourse.julialang.org/t/ann-supposition-jl/111338) for a brief discussion about formal verification.  
Anyways @Sukera is probably one of the best folks around here to discuss formal verification

---

_[View the full topic](https://discourse.julialang.org/t/can-you-overload-if-else-blocks-for-bounded-model-checking/118364)._
