{% extends "generator/index.html" %} {% from "generator/_macros.html" import info, section, number_field, range_field, probability_field %} {% block title %}Generate random feature models{% endblock %} {% block wizard_content %} {% if errors.get('global') %}
{{ errors['global'] }}
{% endif %} {# Hidden carry-over fields so the validator sees the step-2 level flags. #}
{{ section('Constraints', 'How many cross-tree constraints each model gets and how wide they are.') }} {{ range_field('num_constraints_min', 'num_constraints_max', 'Number of constraints', 'Min / Max number of cross-tree constraints in each generated model.', values, errors, default_min=1, default_max=10, hard_min=1) }} {{ range_field('vars_per_ctc_min', 'vars_per_ctc_max', 'Variables per constraint', 'Min / Max number of features referenced in a single constraint. Max cannot exceed the maximum number of features selected in step 3.', values, errors, default_min=1, default_max=10, hard_min=1, hard_max=values.get('max_features', 10000)) }} {{ number_field('extra_constraint_repr', 'Extra constraint representativeness', 'Maximum times a feature can appear in each constraint. Must be ≤ Max variables per constraint.', values, errors, default=1, min=1, max=10000) }} {% if values.get('arithmetic_level') or values.get('type_level') %}
{{ section('Constraint type distribution', 'How often a constraint is Boolean, arithmetic (integer/real attributes) or string. Drag the handles OR type exact values — both stay in sync and always add up to 1. Disabled levels score 0.') }}
{% if values.get('arithmetic_level') %}
{% else %} {% endif %} {% if values.get('string_constraints') %}
{% else %} {% endif %}
{% if errors.get('ctc_dist_sum') %}
{{ errors['ctc_dist_sum'] }}
{% endif %}
{% endif %}
{{ section('Boolean operators', 'Probabilities used to sample the shape of Boolean constraints. AND/OR/⇒/⇔ always add up to 1.') }}
{{ probability_field('prob_not', 'NOT', 'Probability of a NOT term in a constraint.', values, errors, default=0.3, symbol='¬') }}
{% if values.get('arithmetic_level', False) %}
{{ section('Arithmetic operators', 'Probabilities for arithmetic terms inside constraints. Must add up to 1.') }}
{% if values.get('aggregate_functions', False) %}
{% endif %}
{% if errors.get('arithmetic_sum') %}
{{ errors['arithmetic_sum'] }}
{% endif %}

{{ section('Comparison operators', 'Probability of each comparison operator. Must add up to 1.') }}
{% if errors.get('cmp_sum') %}
{{ errors['cmp_sum'] }}
{% endif %}
{% endif %} {% if values.get('string_constraints', False) %}
{{ section('String constraints', 'Probability of string functions. Only used because Type level + String constraints are enabled.') }}
{{ probability_field('prob_len', 'Length', 'Probability of len() appearing in string constraints (otherwise an equality with a literal is used).', values, errors, default=0.7, symbol='len') }}
{% if errors.get('prob_len') %}
{{ errors['prob_len'] }}
{% endif %} {% endif %}
{% endblock %} {% block wizard_scripts %} {% endblock %}