%set debug_print_ccode = true main module badforest // causes print_node to loop forever. I think the types point to each other. declare C is structure Joe : integer range 1..10 endstructure B is structure This_C : C endstructure A is structure This_B : B endstructure This_A : static A i_type is integer initially 444 a4_type is array[1..5] of i_type a3_type is structure a3: integer a4: a4_type endstructure a2_type is structure a2: a3_type endstructure a1_type is structure a1: a2_type endstructure a0 = a1_type(a1: a2_type(a2: a3_type(a3: 12345, a4: a4_type([1]:123,[2]:234,[3]:7,[4]:5) ))) dec_type is array[1..5] of integer dec = dec_type ([1]:0,[2]:1,[3]:2,[4]:3,[5]:4) enddeclare This_A . This_B . This_C . Joe := a0.a1.a2.a4[5] This_A . This_B . This_C . Joe := a0.a1.a2.a4[dec[5]] This_A . This_B . This_C . Joe := a0.a1.a2.a4[dec[dec[5]]] This_A . This_B . This_C . Joe := a0.a1.a2.a4[dec[dec[dec[5]]]] This_A . This_B . This_C . Joe := a0.a1.a2.a4[dec[dec[dec[dec[5]]]]] endmodule