lib/Tools/findlogics
author wenzelm
Thu, 27 Feb 2014 12:37:43 +0100
changeset 55781 b3a4207fb9a6
parent 33915 44a10fe6bd10
child 57414 fe1be2844fda
permissions -rwxr-xr-x
proper update of text perspective for nodes with changed blobs, which is important to refresh the corresponding command perspective (otherwise it might refer to invalid thy_load commands and cause full execution of the node by the prover);

#!/usr/bin/env bash
#
# Author: Markus Wenzel, TU Muenchen
#
# DESCRIPTION: collect heap names from ISABELLE_PATH


PRG=$(basename "$0")

function usage()
{
  echo
  echo "Usage: isabelle $PRG"
  echo
  echo "  Collect heap file names from ISABELLE_PATH."
  echo
  exit 1
}


## main

[ "$#" -ne 0 ] && usage

declare -a LOGICS=()
declare -a ISABELLE_PATHS=()

splitarray ":" "$ISABELLE_PATH"; ISABELLE_PATHS=("${SPLITARRAY[@]}")

for DIR in "${ISABELLE_PATHS[@]}"
do
  DIR="$DIR/$ML_IDENTIFIER"
  for FILE in "$DIR"/*
  do
    if [ -f "$FILE" ]; then
      NAME=$(basename "$FILE")
      LOGICS["${#LOGICS[@]}"]="$NAME"
    fi
  done
done

echo $({ for L in "${LOGICS[@]}"; do echo "$L"; done; } | sort | uniq)