+1

The children correct a given piece of text, writing out the corrected version.
I read the above in one of the documents about story writing.
What is the grammatical form and function of "writing out..."?
Do we need a comma before that part?
Is "the children" the subject for "writing out..."?

+1
Jigneshbharati

The children correct a given piece of text, writing out the corrected version.
...
What is the grammatical form and function of "writing out..."?
Do we need a comma before that part?
Is "the children" the subject for "writing out..."?

"writing out ..." is a participle clause. It contains supplementary information about the situation described in the main clause. The relationship between the clauses here is "means" or "method" because the participle clause gives the means by which the children corrected the text.

The comma helps. I would keep it.

Yes. "the children" is the implicit subject of the participle clause, as is generally true for these kinds of clauses.

CJ

Comments  

"Writing out" is a phrasal verb: "to write out".

"writing out the corrected version" is a dependent adverbial clause that describes the verb "correct" - it lets us know how the children corrected the 'piece of text'.

Yes, the adverbial clause needs the comma before it.

Similar sentence structure:

"The children built a sandcastle, using ten buckets of sand. "

 CalifJim's reply was promoted to an answer.