|Did you know ...||Search Documentation:|
|Pack canny_tudor -- prolog/docker/random_names.pl|
The engine-based implementation has two key features: generates random permutations of both left and right sub-names independently; does not repeat until after unifying all permutations. This implies that two consecutive names will never be the same up until the boundary event between two consecutive randomisations. There is a possibility, albeit small, that the last random name from one sequence might accidentally match the first name in the next random sequence. There are 23,500 possible combinations.
The implementation is not the most efficient, but does perform accurate randomisation over all left-right name permutations.
Allows Name to collapse to semi-determinism with ground terms without continuous random-name generation since it will never match an atom that does not belong to the Docker-random name set. The engine-based non-determinism only kicks in when Name unbound.
Only ever fails if Name is bound and fails to match the next random Name, without testing for an unbound argument. That makes little sense, so fails unless Name is a variable.
Note, this does not naturally work in (+, ?) or (?, +) or (+, +) modes, even if required. Predicate random_member/2 fails semi-deterministically if the given atom fails to match the randomised selection. Unifies semi-deterministically for ground atoms in order to work correctly for non-variable arguments. It collapses to failure if the argument cannot unify with random-name possibilities.