Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Roqc/dev/tools/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 795 B image not shown  

Quelle  deprecate_file.sh   Sprache: Shell

 
#!/bin/sh
usage()
{
        cat 1>&2 <<EOF
Usage: $0 FILE VERSION NOTE

        Write deprecation attributes in a Rocq source file for all commands that
        support it.
        Example: $0 Heap.v 8.3 "Use mergesort.v"
EOF
}

case $# in
        3) ;;
        *) usage; exit 1
esac

file=$1
vers=$2
note=$3

if ! [ -f "$file" ]; then
        printf '%s: %s: No such file\n' "$0" "$file" 1>&2
        exit 1
fi

attr="((Local|Global|Program|Canonical)[[:space:]]+)"

deprable="Theorem|Lemma|Fact|Corollary|Proposition|Property|\
Definition|Example|Fixpoint|\
Instance|Axiom|Parameter|Notation|Coercion"

annot="#[deprecated(since=\"$vers\", note=\"$note\")]"

tmp="$file".depr

sed -E "s/(^[[:space:]]*)(($attr)*($deprable).*\$)/\\1$annot\\n\\1\\2/" \
        "$file" >"$tmp"
mv "$tmp" "$file"

92%


¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.