lua prolog like