MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Looking for a notebook-aware Unify or Diff to compare notebook differences

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118654] Looking for a notebook-aware Unify or Diff to compare notebook differences
  • From: dontdont9 <dontdont9 at yahoo.com>
  • Date: Fri, 6 May 2011 07:22:23 -0400 (EDT)

Does anyone know of a Unify, in the Prolog sense, for notebooks?
This would take two similar notebooks and return the simplest set of
changes to turn one into the other.

If not then is there a notebook-aware Diff, in the Unix utility sense?
This would do something similar to Unify, but might not recognize that
a few changes might eliminate hundreds of "you need to change this to
that on this line too"  messages and other low information content
messages. Unix diff by itself isn't appropriate because it is
overwhelmed by superficial tiny changes in the notebook representing
formatting and layout instead of the actual mathematical content.

I am aware of the Notebook Compare in Workbench, but unless I
misunderstand that seems to be a comparison free of any mathematical
content with a result of "your two notebooks do or do not have the
same cell hierarchy."

I am looking for almost the reverse of this, comparing the
mathematical content and ignoring newlines, Rowboxes and cell
structure if possible.

If neither of those is available then would someone be polite enough
to take a few minutes to write a function that would read the contents
of two notebooks, split apart the arguments to CompoundExpression in
each cell without evaluating anything at all and return a list of
pairs of corresponding arguments? Perhaps with that I can see how I
might start writing a Unify or diff or at least I can find a way to
DeleteCases[list,{x_,x_}] without evaluating anything and do other
manipulation looking for differences.

Thank you


  • Prev by Date: Re: Bug in ListContourPlot?
  • Next by Date: Re: Error bars
  • Previous by thread: Strange behavior with comment
  • Next by thread: Import - a cautionary tale