java -jar taq.jar gaming
Running query gamble in global scope
spin(apple, orange, lemon, banana)
spin(lemon, banana, orange, apple)
spin(banana, orange, lemon, apple)
gaming.taq demonstrates dynamic axiom list initialization with parameters. In this case the parameters are 3 pseudo-generated random numbers to achieve an unpredictable result of every query. The example console output shown above is just one of innumerable fruit permutations.
The parameters r1, r2 and r3 are set before, and separately from, the “crank” axiom list which depends on them, so both are placed in the “machine” scope to indicate they are associated. The query therefore provides an example of using a 2-part name to reference the axiom source
query<axiom> gamble(machine.crank : spin)