diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-03-30 03:59:05 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-03-30 03:59:05 +0000 |
commit | 10cabf82a20258da80be53eb6d23b1a536e82eb5 (patch) | |
tree | d8262298ed5fba5a3c51681cc5739551747f7a90 /contrib/update-copyright.pl | |
parent | d35d086268fa2a3d9b3c387157e4c54f1b967e0e (diff) |
Add Valuation::getSatValue() so that theories can access the current
(propositional) assignment for theory atoms.
Fixed Debug/Trace as discussed in bug ticket #252 and on the mailing list.
This implementation leads to some compiler warnings in production builds,
but these will be corrected in coming days. There appears to be a small
speedup in the parser as a result of this fix:
http://goedel.cims.nyu.edu/regress-results/compare_jobs.php?job_id=1902&reference_id=1886&p=5
Cleaned up a few CD Boolean attribute things.
Various small fixes to coding guidelines / test coverage.
This commit:
* Resolves bug 252 (tracing not disabled in production builds)
* Resolves bug 254 (implement CDAttrHash<>::BitIterator::find())
Diffstat (limited to 'contrib/update-copyright.pl')
-rwxr-xr-x | contrib/update-copyright.pl | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/contrib/update-copyright.pl b/contrib/update-copyright.pl index db3ac47da..93ec5e6f0 100755 --- a/contrib/update-copyright.pl +++ b/contrib/update-copyright.pl @@ -4,16 +4,19 @@ # Morgan Deters <mdeters@cs.nyu.edu> for CVC4 # Copyright (c) 2009, 2010, 2011 The CVC4 Project # -# usage: update-copyright [ files/directories... ] +# usage: update-copyright [-m] [files/directories...] # # This script goes through a source directory rewriting the top bits of # source files to match a template (inline, below). For files with no # top comment, it adds a fresh one. # -# usage: contrib/update-copyright.pl [dirs...] -# if dirs... are unspecified, the script scans its own parent directory's -# "src" directory. Since it lives in contrib/ in the CVC4 source tree, -# that means src/ in the CVC4 source tree. +# if no files/directories are unspecified, the script scans its own +# parent directory's "src" directory. Since it lives in contrib/ in +# the CVC4 source tree, that means src/ in the CVC4 source tree. +# +# If -m is specified as the first argument, all files and directories +# are scanned, but only ones modifed in the current working directory +# are modified (i.e., those that have status M in "svn status"). # # It ignores any file/directory not starting with [a-zA-Z] # (so, this includes . and .., vi swaps, .svn meta-info, @@ -62,6 +65,14 @@ use Fcntl ':mode'; my $dir = $0; $dir =~ s,/[^/]+/*$,,; +# whether we ONLY process files with svn status "M" +my $modonly = 0; + +if($#ARGV >= 0 && $ARGV[0] eq '-m') { + $modonly = 1; + shift; +} + my @searchdirs = (); if($#ARGV == -1) { (chdir($dir."/..") && -f "src/include/cvc4_public.h") || die "can't find top-level source directory for CVC4"; @@ -112,8 +123,9 @@ while($#searchdirs >= 0) { sub handleFile { my ($srcdir, $file) = @_; - next if !($file =~ /\.(c|cc|cpp|C|h|hh|hpp|H|y|yy|ypp|Y|l|ll|lpp|L|g)$/); - next if ($srcdir.'/'.$file) =~ /$excluded_paths/; + return if !($file =~ /\.(c|cc|cpp|C|h|hh|hpp|H|y|yy|ypp|Y|l|ll|lpp|L|g)$/); + return if ($srcdir.'/'.$file) =~ /$excluded_paths/; + return if $modonly &&`svn status "$srcdir/$file" 2>/dev/null` !~ /^M/; print "$srcdir/$file..."; my $infile = $srcdir.'/'.$file; my $outfile = $srcdir.'/#'.$file.'.tmp'; |