<commit_before>/*#
 *# Copyright 2014, NICTA
 *#
 *# This software may be distributed and modified according to the terms of
 *# the BSD 2-Clause license. Note that NO WARRANTY is provided.
 *# See "LICENSE_BSD2.txt" for details.
 *#
 *# @TAG(NICTA_BSD)
 #*/

/*# Ignore the following line. It is intended to apply to the output of this
 *# template.
#*/
(* THIS FILE IS AUTOMATICALLY GENERATED. YOUR EDITS WILL BE OVERWRITTEN. *)
theory /*? os.path.splitext(os.path.basename(options.outfile.name))[0] ?*/
imports Types Abbreviations Connector
begin

/*- macro show_native_type(type) -*/
    /*- if type.type in ['int', 'int8_t', 'int16_t', 'int32_t', 'int64_t'] -*/
        int
    /*- elif type.type in ['unsigned int', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'uintptr_t'] -*/
        nat
    /*- elif type.type in ['char', 'character'] -*/
        char
    /*- elif type.type == 'bool' -*/
        bool
    /*- elif type.type == 'string' -*/
        string
    /*- else -*/
        <UNIMPLEMENTED TYPE>
    /*- endif -*/
/*- endmacro -*/

/*- macro show_wrapped_type(type) -*/
    /*- if type.type in ['int', 'int8_t', 'int16_t', 'int32_t', 'int64_t'] -*/
        Integer
    /*- elif type.type in ['unsigned int', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'uintptr_t'] -*/
        Number
    /*- elif type.type in ['char', 'character'] -*/
        Char
    /*- elif type.type == 'bool' -*/
        Boolean
    /*- elif type.type == 'string' -*/
        String
    /*- else -*/
        <UNIMPLEMENTED TYPE>
    /*- endif -*/
/*- endmacro -*/

/*- set instances = composition.instances -*/
/*- set connections = composition.connections -*/
/*- set components = reduce(lambda('xs, b: xs + ([b.type] if b.type not in xs else [])'), instances, []) -*/

(* Connections *)
datatype channel =
/*- set j = joiner('|') -*/
/*- for c in connections -*/<commit_msg>Throw generation-time exceptions when dealing with unsupported types.<commit_after>/*#
 *# Copyright 2014, NICTA
 *#
 *# This software may be distributed and modified according to the terms of
 *# the BSD 2-Clause license. Note that NO WARRANTY is provided.
 *# See "LICENSE_BSD2.txt" for details.
 *#
 *# @TAG(NICTA_BSD)
 #*/

/*# Ignore the following line. It is intended to apply to the output of this
 *# template.
#*/
(* THIS FILE IS AUTOMATICALLY GENERATED. YOUR EDITS WILL BE OVERWRITTEN. *)
theory /*? os.path.splitext(os.path.basename(options.outfile.name))[0] ?*/
imports Types Abbreviations Connector
begin

/*- macro show_native_type(type) -*/
    /*- if type.type in ['int', 'int8_t', 'int16_t', 'int32_t', 'int64_t'] -*/
        int
    /*- elif type.type in ['unsigned int', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'uintptr_t'] -*/
        nat
    /*- elif type.type in ['char', 'character'] -*/
        char
    /*- elif type.type == 'bool' -*/
        bool
    /*- elif type.type == 'string' -*/
        string
    /*- else -*/
        /*? raise(NotImplementedError()) ?*/
    /*- endif -*/
/*- endmacro -*/

/*- macro show_wrapped_type(type) -*/
    /*- if type.type in ['int', 'int8_t', 'int16_t', 'int32_t', 'int64_t'] -*/
        Integer
    /*- elif type.type in ['unsigned int', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'uintptr_t'] -*/
        Number
    /*- elif type.type in ['char', 'character'] -*/
        Char
    /*- elif type.type == 'bool' -*/
        Boolean
    /*- elif type.type == 'string' -*/
        String
    /*- else -*/
        /*? raise(NotImplementedError()) ?*/
    /*- endif -*/
/*- endmacro -*/

/*- set instances = composition.instances -*/
/*- set connections = composition.connections -*/
/*- set components = reduce(lambda('xs, b: xs + ([b.type] if b.type not in xs else [])'), instances, []) -*/

(* Connections *)
datatype channel =
/*- set j = joiner('|') -*/
/*- for c in connections -*/
{'fraction_non_alphanumeric': 0.1934134866701516, 'fraction_numerical': 0.018295870360690015, 'mean_word_length': 2.4854280510018216, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3720047', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1323, 'n_words': 353}