Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 1999 16:51:22 -0700
From:      Gregory Sutter <gsutter@pobox.com>
To:        Nik Clayton <nik@nothing-going-on.demon.co.uk>
Cc:        freebsd-chat@FreeBSD.ORG
Subject:   Re: bde?
Message-ID:  <19990616165122.C37775@001101.zer0.org>
In-Reply-To: <19990616220038.A37789@catkin.nothing-going-on.org>; from Nik Clayton on Wed, Jun 16, 1999 at 10:00:39PM %2B0100
References:  <Pine.BSF.3.95.990614233546.4637D-100000@current1.whistle.com> <199906150710.RAA17773@cimlogic.com.au> <19990616224131.N372@daemon.ninth-circle.org> <19990616220038.A37789@catkin.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 16, 1999 at 10:00:39PM +0100, Nik Clayton wrote:
> On Wed, Jun 16, 1999 at 10:41:31PM +0200, Jeroen Ruigrok/Asmodai wrote:
> > This sounds too much alike to the jordan thread where we finally
> > found out that jordan is just a very sophisticated AI perl program.
> > 
> > Is bruce mayhaps a more advanced AI/Lint? =)
> 
> With all the whitespace and formatting dependencies, bde would have to
> be written in Python.

#!/usr/local/bin/python

# progcheck.py
# checks a program for correctness of code, using the bde algorithms.
#
# $Id$

# get standard os and system functions
import os,sys

import string

# ensure program correctness
sys.path.append("/rmt/au/bde/")
import bde

def doc(progname):
  print ("%s checks a program for correctness, using the" % progname)
  print ("intelligent 'bde' algorithms.")
  print ("Usage: %s <program to check>" % progname)

def exitfunc(retval):
  sys.exit(retval)

def main(argv, stdout, environ):
  progname = argv[0]
  if len(argv) != 2:
    doc(progname)
    exitfunc(-1)
  prog_to_check = argv[1]

  problems = []

# choose desired level of checking.  currently only "bofh" is implemented.
  level = "bofh"

# use bde
  problems = bde(prog_to_check,level)
  for problem in problems:
    print ("bde didn't like: %s" % problem)

if __name__ == "__main__":
  main(sys.argv, sys.stdout, os.environ)

# eof

Greg
-- 
Gregory S. Sutter                   I got a Pentium II for my girlfriend.
mailto:gsutter@pobox.com            Good trade, eh?
http://www.pobox.com/~gsutter/
PGP DSS public key 0x40AE3052


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990616165122.C37775>