COIN-OR::LEMON - Graph Library

Ticket #166: 956a29f30887.patch

File 956a29f30887.patch, 4.0 KB (added by Peter Kovacs, 12 years ago)
  • doc/migration.dox

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1225215231 -3600
    # Node ID 956a29f3088780b83149718f6ae7756cb187d5fe
    # Parent  3e906e6c08a9621adf2dcb63610f911637d81c78
    Improve the migration script and guide (#166)
    
     - Safer replacement of 'graph' and 'edge'.
     - Fix the erroneous renaming of [Gg]raphToEps.
     - Fixes and improvements in the migration guide.
    
    diff --git a/doc/migration.dox b/doc/migration.dox
    a b  
    2525to the 0.x release series.
    2626
    2727Many of these changes adjusted automatically by the
    28 <tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
     28<tt>lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
    2929update are typeset <b>boldface</b>.
    3030
    3131\section migration-graph Graph Related Name Changes
     
    5353  for <tt>Arc</tt>s (directed edges).
    5454
    5555\warning
    56 <b>The <tt>script/lemon-0.x-to-1.x.sh</tt> tool replaces all instances of
    57 the words \c graph, \c digraph, \c edge and \c arc, so it replaces them
    58 in strings, comments etc. as well as in all identifiers.</b>
     56<b>The <tt>lemon-0.x-to-1.x.sh</tt> script replaces the words \c graph,
     57\c ugraph, \c edge and \c uedge in your own identifiers and in
     58strings, comments etc. as well as in all LEMON specific identifiers.
     59So use the script carefully and make a backup copy of your source files
     60before applying the script to them.</b>
    5961
    6062\section migration-lgf LGF tools
    6163 - The \ref lgf-format "LGF file format" has changed,
  • tools/lemon-0.x-to-1.x.sh

    diff --git a/tools/lemon-0.x-to-1.x.sh b/tools/lemon-0.x-to-1.x.sh
    a b  
    1414    TMP=`mktemp`
    1515    sed -e "s/undirected graph/_gr_aph_label_/g"\
    1616        -e "s/undirected edge/_ed_ge_label_/g"\
    17         -e "s/graph_/_gr_aph_label__/g"\
    18         -e "s/_graph/__gr_aph_label_/g"\
    1917        -e "s/UGraph/_Gr_aph_label_/g"\
    20         -e "s/uGraph/_gr_aph_label_/g"\
    21         -e "s/ugraph/_gr_aph_label_/g"\
     18        -e "s/u[Gg]raph/_gr_aph_label_/g"\
     19        -e "s/\<Graph\>/_Digr_aph_label_/g"\
     20        -e "s/\<graph\>/_digr_aph_label_/g"\
     21        -e "s/\<Graphs\>/_Digr_aph_label_s/g"\
     22        -e "s/\<graphs\>/_digr_aph_label_s/g"\
     23        -e "s/_Graph/__Gr_aph_label_/g"\
     24        -e "s/\([Gg]\)raph\([a-z_]\)/_\1r_aph_label_\2/g"\
     25        -e "s/\([a-z_]\)graph/\1_gr_aph_label_/g"\
    2226        -e "s/Graph/_Digr_aph_label_/g"\
    2327        -e "s/graph/_digr_aph_label_/g"\
    2428        -e "s/UEdge/_Ed_ge_label_/g"\
    25         -e "s/uEdge/_ed_ge_label_/g"\
    26         -e "s/uedge/_ed_ge_label_/g"\
     29        -e "s/u[Ee]dge/_ed_ge_label_/g"\
    2730        -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
     31        -e "s/\<Edge\>/_Ar_c_label_/g"\
     32        -e "s/\<edge\>/_ar_c_label_/g"\
     33        -e "s/\<Edges\>/_Ar_c_label_s/g"\
     34        -e "s/\<edges\>/_ar_c_label_s/g"\
     35        -e "s/_Edge/__Ed_ge_label_/g"\
     36        -e "s/Edge\([a-z_]\)/_Ed_ge_label_\1/g"\
     37        -e "s/edge\([a-z_]\)/_ed_ge_label_\1/g"\
     38        -e "s/\([a-z_]\)edge/\1_ed_ge_label_/g"\
    2839        -e "s/Edge/_Ar_c_label_/g"\
    2940        -e "s/edge/_ar_c_label_/g"\
    30         -e "s/ANode/_Re_d_label_/g"\
    31         -e "s/BNode/_Blu_e_label_/g"\
    32         -e "s/A-Node/_Re_d_label_/g"\
    33         -e "s/B-Node/_Blu_e_label_/g"\
    34         -e "s/anode/_re_d_label_/g"\
    35         -e "s/bnode/_blu_e_label_/g"\
    36         -e "s/aNode/_re_d_label_/g"\
    37         -e "s/bNode/_blu_e_label_/g"\
     41        -e "s/A[Nn]ode/_Re_d_label_/g"\
     42        -e "s/B[Nn]ode/_Blu_e_label_/g"\
     43        -e "s/A-[Nn]ode/_Re_d_label_/g"\
     44        -e "s/B-[Nn]ode/_Blu_e_label_/g"\
     45        -e "s/a[Nn]ode/_re_d_label_/g"\
     46        -e "s/b[Nn]ode/_blu_e_label_/g"\
    3847        -e "s/_Digr_aph_label_/Digraph/g"\
    3948        -e "s/_digr_aph_label_/digraph/g"\
    4049        -e "s/_Gr_aph_label_/Graph/g"\
     
    4857        -e "s/_Blu_e_label_/Blue/g"\
    4958        -e "s/_re_d_label_/red/g"\
    5059        -e "s/_blu_e_label_/blue/g"\
     60        -e "s/DigraphToEps/GraphToEps/g"\
     61        -e "s/digraphToEps/graphToEps/g"\
    5162        -e "s/\<DefPredMap\>/SetPredMap/g"\
    5263        -e "s/\<DefDistMap\>/SetDistMap/g"\
    5364        -e "s/\<DefReachedMap\>/SetReachedMap/g"\