Legal foundations of the national innovation system