Closed tytus-metrycki closed 4 years ago
The example can be further simplified to
.type Tree = [x: number, y: TreeX]
.type TreeX = [x: Tree, y: unsigned, z: Tree]
.decl TreeHeight(t:Tree, height:unsigned)
TreeHeight([0,[nil, 0, nil]],0).
TreeHeight([1,[left,1,right]], 1) :-
TreeHeight(left,0),
TreeHeight(right,0).
.output TreeHeight(IO="stdout")
Hey @darth-tytus!
I've simplified it down to:
.decl TreeHeight(x:number, height:unsigned)
TreeHeight(0,0).
TreeHeight(1,1) :-
TreeHeight(left,0).
.output TreeHeight(IO="stdout")
I believe that the following program produces correct results with the interpreter, but incorrect when the synthesizer is used.
Program
Interpreter (correct result)
Synthesiser (incorrect result)