#!/bin/sh # Logic puzzle - Get all solutions # Author: Bruno Wolff III # Last updated: 2020-08-10 # You may use/modify this code for any purpose cp puzzle41.start puzzle41.assert while : do z3 puzzle41.run > puzzle41.temp grep -q unsat puzzle41.temp && break sed 's/^ *((/(/' puzzle41.temp > puzzle41.assert done rm puzzle41.temp # puzzle41.assert will include negations of each of the solutions.