<commit_before>"""
Fulara Usage Analysis
=========================

:Author: <NAME>
"""

from lyra.abstract_domains.container.fulara.interval_wrappers import IntervalKWrapper
from lyra.abstract_domains.usage import fulara_usage_domain
from lyra.abstract_domains.usage.fulara_usage_domain import FularaUsageState
from lyra.core.types import DictLyraType
from lyra.engine.backward import BackwardInterpreter
from lyra.engine.container.fulara.fulara_analysis import FularaAnalysis
from lyra.engine.forward import ForwardInterpreter
from lyra.engine.runner import Runner
from lyra.semantics.backward import DefaultBackwardSemantics
from lyra.semantics.forward import DefaultForwardSemantics


class FularaUsageAnalysis(Runner):
    def interpreter(self):
        forward = ForwardInterpreter(self.cfg, DefaultForwardSemantics(), 3)
        return BackwardInterpreter(self.cfg, DefaultBackwardSemantics(), 2, forward)

    def state(self):  # initial state
        forward = FularaAnalysis()
        forward._cfg = self.cfg
        init_forward = forward.state()
        scalar_vars = {v for v in self.variables if type(v.typ) in
                       fulara_usage_domain.scalar_types}
        dict_vars = {v for v in self.variables if type(v.typ) == DictLyraType}
        return FularaUsageState(IntervalKWrapper, scalar_vars, dict_vars, precursory=init_forward)<commit_msg>small fix<commit_after>"""
Fulara Usage Analysis
=========================

:Author: <NAME>
"""

from lyra.abstract_domains.container.fulara.interval_wrappers import IntervalKWrapper
from lyra.abstract_domains.usage import fulara_usage_domain
from lyra.abstract_domains.usage.fulara_usage_domain import FularaUsageState
from lyra.core.types import DictLyraType
from lyra.engine.backward import BackwardInterpreter
from lyra.engine.container.fulara.fulara_analysis import FularaAnalysis
from lyra.engine.forward import ForwardInterpreter
from lyra.engine.runner import Runner
from lyra.semantics.backward import DefaultBackwardSemantics
from lyra.semantics.forward import DefaultForwardSemantics


class FularaUsageAnalysis(Runner):
    def interpreter(self):
        forward = ForwardInterpreter(self.cfg, DefaultForwardSemantics(), 3)
        return BackwardInterpreter(self.cfg, DefaultBackwardSemantics(), 2, forward)

    def state(self):  # initial state
        forward = FularaAnalysis()
        forward._cfg = self.cfg
        init_forward = forward.state()
        scalar_vars = {v for v in self.variables if type(v.typ) in
                       fulara_usage_domain.scalar_types}
        dict_vars = {v for v in self.variables if type(v.typ) == DictLyraType}
        return FularaUsageState(IntervalKWrapper, init_forward, scalar_vars, dict_vars)
{'fraction_non_alphanumeric': 0.0891089108910891, 'fraction_numerical': 0.0014668133480014668, 'mean_word_length': 4.707112970711297, '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': '6431214', 'n_tokens_mistral': 812, 'n_tokens_neox': 784, 'n_words': 186}