I want to show that non-emptiness of context free language is P-complete. So, I am trying to reduce CVP to this problem by generating grammar from circuit. I consider all type of gates in circuit and I make right production in grammar. I hope that it is good way to prove that it is P-complete, but I have a problem with showing that it is log-space reduction. I think that if I have this circuit, I need only one pointer to the structure, because I can directly write the production. Howerver, I need also have information how the non-terminal symbol is named. Of course, I can use binary numbers for variable names (and it is log-space), but it seems to me that I need know all names to produce grammar production. I have no idea how to go in this graph (circuit) and give a names of next non-terminals and use only log-space.Could anyone explain me how to prove that it is log-space reduction? 
Reduction CVP to CFG problem
context free;reductions