LEMMA_PRINT/lemma_print_compute_derivation [ Functions ]

[ Top ] [ Functions ]

NAME

lemma_print_compute_derivation - constructs derivation instruction SYNOPISIS lemma_print_compute_derivation(out_buff, src_string, target_string, target_string_len);

FUNCTION

The function constructs the shortest instruction to transform src_string to target_string. The choice is between two possible instruction:

   * SET(str) which has a target string as an argument. Its opcode is *str.
   * CUT(n,str) which forgets n characters (not bytes) from the end of
     src_string and appends str instead of them. Its opcode is nstr

OUTPUT

Output is stored to address out_buff. The buffer must by large enougth to holt the output. Its size if limited by bytes lentgth of target_string + 1 (star at the beginning) + 1 ('\0' terminating character).