Index: src/dgp/Makefile
===================================================================
--- src/dgp/Makefile	(revision e7de6cc88c605c4f810cbc852e843294b4b0e8ac)
+++ src/dgp/Makefile	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -11,5 +11,5 @@
 #vpath %.o  .
 
-CXXFLAGS = -g -static
+CXXFLAGS = -g -Wno-deprecated -static
 
 sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp1.cc cmdline.cc \
@@ -47,4 +47,5 @@
 	rm -f ${bin} ${objs} cmdline.*
 	rm -f *.d
+	rm -f *~
 
 .PHONY: prof
Index: src/dgp/dgp1.cc
===================================================================
--- src/dgp/dgp1.cc	(revision 519eaf508529829bbfe93c12c3e94f44afccf5ed)
+++ src/dgp/dgp1.cc	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -82,9 +82,9 @@
 	  {
 	    ret = *ps;
-	    fprintf(stderr,"#\tsucceeded because of LH/LV equality ()\n");
+	    if(debug) fprintf(stderr,"#\tsucceeded because of LH/LV equality ()\n");
 	  }
 	else
 	  {
-	    fprintf(stderr,"#\tfailed beacause of LH/LV inequality\n");
+	    if(debug) fprintf(stderr,"#\tfailed beacause of LH/LV inequality\n");
 	  }
     }
@@ -517,4 +517,5 @@
 			  if(debug) fprintf(stderr," ...SUCCESS!\n");
 			  connect_left( j, i, **ri, new_head_boubbles, new_dep_boubbles);
+			  lvi.update_edge(sgraph,i);
 			}
 		      else
Index: src/dgp/grammar.cc
===================================================================
--- src/dgp/grammar.cc	(revision 3b02b04ff9c7c3446ca477cd84c2bc7f737c38b4)
+++ src/dgp/grammar.cc	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -31,10 +31,10 @@
   Cat::add(s);
 
-  if(connect.size() <= Cat::count())
-  {
-    connect.resize(Cat::count()+RESIZE_DELTA);
-    for(int i=0; i<connect.size(); ++i)
-      if(connect[i].size() <= Cat::count()) connect[i].resize(Cat::count()+RESIZE_DELTA);
-  }
+  // if(connect.size() <= Cat::count())
+  // {
+  //   connect.resize(Cat::count()+RESIZE_DELTA);
+  //   for(int i=0; i<connect.size(); ++i)
+  //     if(connect[i].size() <= Cat::count()) connect[i].resize(Cat::count()+RESIZE_DELTA);
+  // }
   if(connect1.size() <= Cat::count())
   {
@@ -331,5 +331,5 @@
 
 	  if( chk_cat(cat1) && chk_cat(cat2) && chk_type(type) )
-	    set_connect(cat1,parse_flags(flags1,"+"),parse_flags(flags1,"-"),cat2,parse_flags(flags2,"+"),parse_flags(flags2,"-"),type,parse_props(props));
+	    set_connect(cat1,parse_flags(flags1,"+"),parse_flags(flags1,"-"),cat2,parse_flags(flags2,"+"),parse_flags(flags2,"-"),type,parse_props(props),lineno);
 	  else if( chk_cat(cat1) && chk_cat(cat2) && chk_long(type) )
 	    {
@@ -504,9 +504,9 @@
       if(obl[c].test(r)) fprintf(f,"REQ\t%s\t%s\n",c.str(),r.str());
   
-  for(Cat c=1; c<Cat::count(); ++c)
-    for(Cat d=1; d<Cat::count(); ++d)
-      for(Role t=1; t<Role::count(); ++t)
-	if(connect[c][d].count(t))
-          fprintf(f,"LINK\t%s\t%s\t%s\n",c.str(),d.str(),t.str());
+  // for(Cat c=1; c<Cat::count(); ++c)
+  //   for(Cat d=1; d<Cat::count(); ++d)
+  //     for(Role t=1; t<Role::count(); ++t)
+  // 	if(connect[c][d].count(t))
+  //         fprintf(f,"LINK\t%s\t%s\t%s\n",c.str(),d.str(),t.str());
 
   for(LongRel i=1; i<LongRel::count(); ++i)
Index: src/dgp/grammar.hh
===================================================================
--- src/dgp/grammar.hh	(revision 519eaf508529829bbfe93c12c3e94f44afccf5ed)
+++ src/dgp/grammar.hh	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -27,6 +27,6 @@
 struct Link
 {
-  Link(Role r, Flag dfplus="NULL", Flag dfminus="NULL") : role(r), dflagplus(dfplus), dflagminus(dfminus) { }
-  Link(Role r, PropSet ps=EmptyPropSet, Flag hfp="NULL", Flag hfm="NULL", Flag dfp="NULL", Flag dfm="NULL")
+  // Link(Role r, Flag dfplus="NULL", Flag dfminus="NULL") : role(r), dflagplus(dfplus), dflagminus(dfminus) { }
+  Link(Role r, PropSet ps=EmptyPropSet, Flag hfp="NULL", Flag hfm="NULL", Flag dfp="NULL", Flag dfm="NULL", int lineno=0)
     : role(r), props(ps), hflagplus(hfp), hflagminus(hfm), dflagplus(dfp), dflagminus(dfm) { }
   //Link(Role r) : role(r), dflagplus("NULL") { }
@@ -38,4 +38,5 @@
   Flag dflagminus;
   PropSet props;
+  int lineno;
 
   bool operator<(const Link& l) const 
@@ -67,7 +68,4 @@
   Grammar() {} ;
 
-  Roles&  connectable(Cat h, Cat d);
-  Roles   connectable(Cat h, Cat d, FlagSet f, FlagSet df);
-
   list<const Link*> connectable2(Cat h, Cat d, FlagSet hfs, FlagSet dfs);
 
@@ -109,5 +107,5 @@
   vector< FlagSet >            pass;     //[Role]
 
-  vector< vector< Roles > >    connect;  //[Cat][Cat]
+  // vector< vector< Roles > >    connect;  //[Cat][Cat]
 
   vector< vector< Links > >    connect1; //[Cat][Cat]
@@ -143,5 +141,5 @@
   //  void set_connect(Cat c, Cat d, Flag f, Role r)   { connect1[c][d].insert(Link(r,f)); }
 
-  void set_connect(Cat h, Flag hfp, Flag hfm, Cat d, Flag dfp, Flag dfm, Role r, PropSet ps )   { connect1[h][d].insert(Link(r,ps,hfp,hfm,dfp,dfm)); }
+  void set_connect(Cat h, Flag hfp, Flag hfm, Cat d, Flag dfp, Flag dfm, Role r, PropSet ps, int lineno )   { connect1[h][d].insert(Link(r,ps,hfp,hfm,dfp,dfm,lineno)); }
 
   void set_include(Role r, Role s)         { include[r].set(s); }
@@ -160,25 +158,4 @@
 
 inline
-Roles&  Grammar::connectable(Cat h, Cat d)
-{
-  return connect[h][d];
-}
-
-//----------------------------------------------------------------------------------------------------
-
-inline
-Roles Grammar::connectable(Cat h, Cat d, FlagSet hfs, FlagSet dfs)  // ZBYT WOLNE!!!!!!!!!!!!!!!!!!!!!!!!!! (-> Roles&)
-{
-  Roles ret;
-  for(Links::const_iterator l = connect1[h][d].begin(); l != connect1[h][d].end(); l++)
-    if( (l->hflagplus==0 || hfs[l->hflagplus]) && (l->hflagminus==0 || !hfs[l->hflagminus]) )
-      if( (l->dflagplus==0 || dfs[l->dflagplus]) && (l->dflagminus==0 || !dfs[l->dflagminus]) )
-	ret.insert(l->role);
-  return ret;
-}
-
-//----------------------------------------------------------------------------------------------------
-
-inline
 list<const Link*> Grammar::connectable2(Cat h, Cat d, FlagSet hfs, FlagSet dfs)  // ZBYT WOLNE!!!!!!!!!!!!!!!!!!!!!!!!!! (-> Roles&)
 {
@@ -190,18 +167,4 @@
   return ret;
 }
-
-//----------------------------------------------------------------------------------------------------
-
-// inline
-// bool Grammar::check_constr(NodeProp& hprop, NodeProp& dprop, int dir, Role role)    // dir: 0-left 1-right
-// {
-//   return 
-//     !hprop.forbidden[role] &&
-//     ( dir==1 || !right[role] ) &&
-//     ( dir==0 || !left[role]  ) &&
-//     ( dir==1 || (hprop.attached&init).none() ) &&
-//     ( dir==0 || (hprop.attached&fin).none() )
-//     ;
-// }
 
 //----------------------------------------------------------------------------------------------------
Index: src/dgp/sgraph.cc
===================================================================
--- src/dgp/sgraph.cc	(revision 519eaf508529829bbfe93c12c3e94f44afccf5ed)
+++ src/dgp/sgraph.cc	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -179,7 +179,7 @@
   buf+=sprint_node(buf,n,anc,HEADS|DEPS|SETS|CONSTRAINTS);
   
-  // buf+=sprintf(buf,"/");
-  // for(vector<int>::iterator e = nodes[n].edge.begin(); e != nodes[n].edge.end(); e++ )
-  //   buf += sprintf(buf,"%d ", *e);
+  buf+=sprintf(buf,"/");
+  for(vector<int>::iterator e = nodes[n].edge.begin(); e != nodes[n].edge.end(); e++ )
+    buf += sprintf(buf,"%d ", *e);
 
   buf+=sprintf(buf,"\n");
Index: src/dgp/sgraph.hh
===================================================================
--- src/dgp/sgraph.hh	(revision 519eaf508529829bbfe93c12c3e94f44afccf5ed)
+++ src/dgp/sgraph.hh	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -296,4 +296,5 @@
   LViterator(SGraph& sg, int n, bool s);
   int next();
+  void update_edge(SGraph& sg, int e);
 
 private:
@@ -308,4 +309,5 @@
   void push_lh(int i);
   void push_ln(int i);
+
 };
 
@@ -326,4 +328,13 @@
 	}
       
+    }
+}
+
+inline void LViterator::update_edge(SGraph& sg, int n)
+{
+  for(vector<int>::iterator i=sg[n].edge.begin(); i!=sg[n].edge.end(); ++i)
+    {
+      push_ld(*i);
+      push_ln(*i);
     }
 }
Index: src/dgp/thesymbols.hh
===================================================================
--- src/dgp/thesymbols.hh	(revision e7de6cc88c605c4f810cbc852e843294b4b0e8ac)
+++ src/dgp/thesymbols.hh	(revision d484a3254b584fb1c97577bdc58ee2ae3796028c)
@@ -18,6 +18,6 @@
 typedef list<Role>::iterator   RoleListIter;
 typedef bitset<MAXTYPES>       RoleSet;
-typedef set<Role>              Roles;
-typedef Roles::iterator        RolesIter;
+// typedef set<Role>              Roles;
+// typedef Roles::iterator        RolesIter;
 
 typedef Symbol<3>              Constr;
