Skip to content

Instantly share code, notes, and snippets.

@vstakhov
Created January 13, 2014 14:19
Show Gist options
  • Select an option

  • Save vstakhov/8401012 to your computer and use it in GitHub Desktop.

Select an option

Save vstakhov/8401012 to your computer and use it in GitHub Desktop.
#!/bin/sh
[ -z "$CLASP_OPTS" ] && CLASP_OPTS="--opt-heu=1 --sat-prepro --restarts=L,128 --heuristic=VSIDS --opt-hierarch=1 --local-restarts --del-max=200000,250 --save-progress=0"
[ -z "$CLASP" ] && CLASP="clasp"
[ -z "$GRINGO_OPTS" ] && GRINGO_OPTS="/usr/local/share/aspcud/misc2012.lp"
[ -z "$GRINGO" ] && GRINGO="gringo"
[ -z "$CUDF2LP_OPTS" ] && CUDF2LP_OPTS=""
[ -z "$CUDF2LP" ] && CUDF2LP="cudf2lp"
( $CUDF2LP $CUDF2LP_OPTS ) | ( $GRINGO $GRINGO_OPTS - ) | ( $CLASP $CLASP_OPTS ) \
| grep -A 1 "Answer" | sed -e '1d' | tr " " "\n" \
| grep 'in(' | sed -e 's/in("\([^,]*\)",\([0-9]*\))/package: \1\
version: \2\
installed: true\
/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment