
    ni                     N    S SK Js  Js  Jr  S SKJs  Js  Js  Jr   " S S5      r	g)    Nc                   <    \ rS rSrSS\S\S\S\S\4
S jjrS	 rS
r	g)Fact   N	fact_textname
start_timeend_timestaticc                     [         R                  " U5      u  pgpX l        X0l        X@l        XPl        [        R                  " U5      U l        Xpl	        Xl
        Xl        g)av  Define a PyReason fact that can be loaded into the program using `pr.add_fact()`

:param fact_text: The fact in text format. Example: `'pred(x,y) : [0.2, 1]'` or `'pred(x,y) : True'`
:type fact_text: str
:param name: The name of the fact. This will appear in the trace so that you know when it was applied
:type name: str
:param start_time: The timestep at which this fact becomes active
:type start_time: int
:param end_time: The last timestep this fact is active
:type end_time: int
:param static: If the fact should be active for the entire program. In which case `start_time` and `end_time` will be ignored
:type static: bool
N)fact_parser
parse_factr   r   r	   r
   labelLabelpred	componentboundtype)
selfr   r   r   r	   r
   r   r   r   	fact_types
             U/home/james-whalen/.local/lib/python3.13/site-packages/pyreason/scripts/facts/fact.py__init__Fact.__init__   sL     -8,B,B9,M)	$ KK%	"
	    c                     U R                    SU R                   SU R                   3nU R                  (       a  US-  nU$ USU R                   SU R
                   3-  nU$ )N(z) : z	 | staticz
 | start: z	 -> end: )r   r   r   r
   r   r	   )r   ss     r   __str__Fact.__str__   sd    yyk4>>*$tzzl;;;A  :doo.iGGAr   )r   r   r	   r   r   r   r
   r   )Nr   r   F)
__name__
__module____qualname____firstlineno__strintboolr   r   __static_attributes__ r   r   r   r      s1    # S S X[ im 0r   r   )
"pyreason.scripts.utils.fact_parserscriptsutilsr   5pyreason.scripts.numba_wrapper.numba_types.label_typenumba_wrappernumba_types
label_typer   r   r'   r   r   <module>r/      s    8 8 E E r   