# Problems implementing some basic machine instructions for a WAM based Prolog

**URL:** <https://swi-prolog.discourse.group/t/problems-implementing-some-basic-machine-instructions-for-a-wam-based-prolog/927>\
**Category:** Help!\
**Created:** [July 6, 2019, 2:51am UTC](https://swi-prolog.discourse.group/t/problems-implementing-some-basic-machine-instructions-for-a-wam-based-prolog/927 "2019-07-06T02:51:42Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [July 7, 2019, 6:14pm UTC](https://swi-prolog.discourse.group/t/problems-implementing-some-basic-machine-instructions-for-a-wam-based-prolog/927/12 "2019-07-07T18:14:09Z")

</div>

Since you are creating test cases, just the other day Jan listed a [unification case](https://swi-prolog.discourse.group/t/wiki-discussion-how-to-unification/692/10) that I have not seen before.

```prolog
?- X=f(X), Y=f(Y), X=Y.
X=Y, Y=f(Y).

```

and the [explanation](https://github.com/SWI-Prolog/swipl-devel/blob/9ed270918b425d123be31c323366dc5e871f52cc/src/pl-prims.c#L52-L205) in the code.

Would be interesting to see if your WAM can do it.

---

_[View the full topic](https://swi-prolog.discourse.group/t/problems-implementing-some-basic-machine-instructions-for-a-wam-based-prolog/927)._
