ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/gsl/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/gsl/__pycache__/Main.cpython-311.pyc

�

�܋f���Z	�ddlmZddlTGd�d��ZGd�d��ZGd�d��ZGd	�d
e��ZGd�de��ZGd
�de��ZGd�de��Z	Gd�de��Z
Gd�de��ZGd�de��ZGd�de��Z
Gd�de��ZGd�d��ZGd�de��ZGd�d e��ZGd!�d"e��ZGd#�d$e��ZGd%�d&e��ZGd'�d(e��ZGd)�d*e��ZGd+�d,e��ZGd-�d.e��ZGd/�d0e��ZGd1�d2e��ZGd3�d4e��ZGd5�d6e��ZGd7�d8��ZGd9�d:��ZGd;�d<e��ZGd=�d>e��Z Gd?�d@e��Z!GdA�dBe��Z"GdC�dDe��Z#GdE�dFe#��Z$GdG�dHe#��Z%GdI�dJe��Z&GdK�dLe��Z'GdM�dNe��Z(GdO�dPe(��Z)GdQ�dRe(��Z*GdS�dT��Z+GdU�dVe��Z,GdW�dXe��Z-GdY�dZe��Z.Gd[�d\e��Z/Gd]�d^e��Z0Gd_�d`��Z1Gda�dbe0��Z2Gdc�dde��Z3Gde�dfe��Z4Gdg�dhe��Z5Gdi�dje��Z6Gdk�dle��Z7Gdm�dne��Z8do�Z9Gdp�dq��Z:Gdr�dse:��Z;Gdt�due:��Z<Gdv�dwe:��Z=Gdx�dye:��Z>Gdz�d{e>��Z?Gd|�d}e>��Z@Gd~�dwe>��Z=Gd�d�e>��ZAd��ZBd��ZCd��ZDd��ZEid�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�d�e:�id�e?�d�e@�d�e:�d�e>�d�e>�d�e>�d�e>�d�e:�d�e:�d�e=�d�e>�d�e>�d�e>�d�e:�d�eD�d�eD�d�eD��id�eD�d�eD�d�eD�d�eD�d�eD�d�eD�d�e:�d�e:�d�eA�d�eA�d�eA�d�eA�d�eA�d�eA�d�eA�d�e:�d�e:��e:e:e:e:e:e:e:e:e:d��	�ZFd��ZGGd��d���ZHGd��d���ZIGd��d�eI��ZJGd��d�eI��ZKGd„dæ�ZLGdĄd�eI��ZMGdƄd�eI��ZNGdȄd�eI��ZOGdʄd˦�ZPd�S)��)�property_nondata��*c�X�eZdZd�Zd�Zdeddfd�Zd�Zd�Zd	�Z	d
�Z
dd�Z			dd�ZdS)�SpecEnvc�Z�||_i|_i|_g|_d|_d|_dS�Nr)�mod�imported_packages�importing_packages�
error_reports�
num_errors�num_warnings)�selfr
s  �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/guppy/gsl/Main.py�__init__zSpecEnv.__init__s6�����!#���"$��������������c���d}d}|�b|}|jdz}|j}|�"|j}|�|j���}t	|�d|�d���|rt	d|z��dSdSdS)N�z<unknown file>�)�index�:z    %r)r�src�filename�get_line�print)r�context�linetextr�node�linenors       r�errmsg_contextzSpecEnv.errmsg_contexts�����#�����D��Z�!�^�F��(�C����<���<�<�g�m�<�<�<���h�h�h����/�0�0�0��
+��h��)�*�*�*�*�*���
+�
+rN�rc� �|j�|||||f��|r|xjdz
c_n|xjdz
c_|�|��|rtd|z��ntd|z��t��|D]:\}}|�|��td|z��t���;|jrddl}|���dS|j|j	krtd���|�|�dS)Nrz*   %sz*** %sz    %srzToo many errors, giving up)r
�appendrrr!r�debug�pdb�	set_trace�
max_errors�
TooManyErrors)	r�messager�	exception�more�harmless�msg�ctxr&s	         r�errorz
SpecEnv.errorsA����!�!�
�g�y�$��9�	;�	;�	;��	!�����"�����O�O�q� �O�O����G�$�$�$��	&��(�W�$�%�%�%�%��(�W�$�%�%�%�
�����	�	�H�C������$�$�$��(�S�.�!�!�!��G�G�G�G��:�	 ��J�J�J��M�M�O�O�O�O�O���$�/�1�1�#�$@�A�A�A��$���%�$rc�n�g}|D]/}|�|�|j�����0|S�N)�extend�
get_filers�
output_dir)r�	documents�filers�ds    rr4zSpecEnv.get_filers9s>�����	9�	9�A��M�M�!�,�,�t��7�7�8�8�8�8��
rc��|j�|��}|��||jvr=|�dt	|j�������|��d|j|<|�d|jjj	j
��dz}|�||��}|�|��}||j|<|j|=|S)Nz)Invalid mutual import involving packages r�.�.gsl)
r�getrr0�list�keys�replacer
�IO�path�sep�package_of_filename�	mkPackage)r�namer�pacr�ips      r�import_packagezSpecEnv.import_package?s����$�(�(��.�.���;��t�.�.�.��
�
�
���0�5�5�7�7�8�8�8�;�<C�E�E�E�,-�D�#�D�)��|�|�C����)9�)=�>�>�v�E�H��)�)�(�D�9�9�B��.�.��$�$�C�+.�D�"�4�(��'��-��
rc	��
���
�i�i��
���
fd��
|D]!�
�
���}�
|���"t������D]p\}}t|��dkrXt	d|z��|D]4\�
}t	d�
����d|jdz�����5t	d���qg}t������D]�\}}|�vr�i}|D]#\�
}d|�
���<d|_�$t|�����}|�	��d�
|��}|�|�d	|�������|d
\}}|D]-\�
}�
|urd|_�d|_|jf|j
z|_
�.��|r8|�	��t	d
��|D]}	t	d|	���dSdS)Nc�|��|j}|dkrE|j���}��|g����|f��nS|dkrE|j���}��|g����|f��n|dkrdS|jD]
}�|���dS)N�link_to�define�to_tester_only)�tag�arg�strip�
setdefaultr$�children)r�trE�chr8�defines�links�walks    ����rrWz$SpecEnv.link_documents.<locals>.walkRs������A��I�~�~��x�~�~�'�'��� � ��r�*�*�1�1�1�d�)�<�<�<�<��h����x�~�~�'�'���"�"�4��,�,�3�3�Q��I�>�>�>�>��&�&�&����m�
�
����R�����
�
rrz,Duplicate definition of name %r, defined in:z    z line zWill use the first one.�link_to_unresolved�, z	 used in r�
link_to_local�link_to_externzUnresolved links:z  )�
get_resultr=�items�lenr�get_doc_namerrNr>�sort�joinr$�
doc_name_noderR)rr6rrE�ds�nodefs�used�defd�defnode�ndr8rUrVrWs          @@@@r�link_documentszSpecEnv.link_documentsMso����������	�	�	�	�	�	�	�	��	�	�A��<�<�>�>�D��D��J�J�J�J��W�]�]�_�_�-�-�	1�	1�H�D�"��2�w�w��{�{��D�t�K�L�L�L�!#�O�O�I�Q���E�a�n�n�.>�.>�.>�.>��
�1���M�N�N�N�N��/�0�0�0�����U�[�[�]�]�+�+�	L�	L�H�D�"��7�"�"���!#�4�4�I�Q��-.�D����)�)�*�3�D�H�H��D�I�I�K�K�(�(���	�	�����y�y������
�
����t�t�<�=�=�=�=� '��
�a� 0�
��g�!#�L�L�I�Q���D�y�y�#2����#3���)-�);�(=�d�m�(K��
�
�L��	 ��K�K�M�M�M��%�&�&�&��
 �
 ���d�B�����		 �	 �
 �
 rc�h�t|||��}|j|_|���|Sr2)�PackageDescriptionr5�resolve_all)r�subrFs   rrDzSpecEnv.mkPackage�s1�� ��s�C�0�0�������������
rrc��|j}|�G|�d��r|dd�}n|}|�|jjjd��}|jr&|jj�|j|��}n|jj�|��}|�|}n|j�	|��}|�
��}|�d|�d��z��|�d|�d��z��|�|�d����|�
��}||jvr
|j|S|j�|||���}	|j}
t%d|z��t'|||	||��}|
|jkr
||j|<|S)	Nr;���r:s.filename: %s
zutf-8s.packname: : %s
)�nostripzMaking package subject %r)r
�endswithr?r@rArB�	input_dirra�abspath�	read_file�md5�update�encode�digest�
package_cache�	SpecNodes�node_of_stringrr�PackageSubject)rr�packnamerp�input_stringr
�datarurxr�numerr�packages            rrCzSpecEnv.package_of_filename�s����h����� � ��(�(�
$�#�C�R�C�=���#���'�'������=�=�H��>�	5��v�{�'�'����A�A�H�H��v�{�*�*�8�4�4�H��#��D�D��6�#�#�H�-�-�D��g�g�i�i���
�
�%�����(@�(@�@�A�A�A��
�
�'�(�/�/�'�*B�*B�B�C�C�C��
�
�4�;�;�w�'�'�(�(�(��������S�&�&�&��$�V�,�,��}�+�+�D�(�G�+�L�L�����
�)�H�4�5�5�5� ��d�D�(�H�E�E���T�_�$�$�(/�C��f�%��rFc		���|�|jj}||_|�d}||_||_|�|jj}||_	|�|�||�����}	|	���}
|
s|�ddd���|j	r|r$td��|�|
��|j	r|r|�|
��}d}n#t$rd}YnwxYw|j	sm|D]j}
|jj�|
��}td	d
�t#|j������|����k|jr*td|jdd|jdk�fz��|j	r<td
|j	dd|j	dk�|fz��|rt+d���dSdS)Nz/tmp)r~zNo documents specified.r�r+r-�Linkingrz
 giving up --z	Writing: rYz*   %d warning%s reported.�sz.*** %d error%s reported --%s no files written.zSome error has been reported.)r
rrr5r%r(rDrC�
get_documentsr0rrrir4r)�Filer�filerrar=�writefile_names�writer�HadReportedError)rrrrr5r%r(�process_despite_errors�raise_at_errorsr~rFr6r7�	giving_upr��fs               r�process_mainzSpecEnv.process_main�so������*�I�"������J�$�����
�����,�J�$���	��.�.��!9�!9��|�":�"5�"5�6�6�C��)�)�+�+�I��
7��
�
�4�%)�A��7�7�7��?�
/�&<�
/��i� � � ��#�#�I�.�.�.��?�
4�&<�
4�����3�3���I�I���	(�	(�	(�'�I�I�I�	(������	��
�
���H�N�(�(��/�/���k�4�9�9�T�!�2C�-D�-D�#E�#E�F�F�F����	�	�	�	���	A��.��!�3�'=��(9�A�(=�'=�#>�2@�@�
A�
A�
A��?�	H��B����%9�d�o��&9�%9�!:�I�FG�G�
H�
H�
H��
H�&�'F�G�G�G�		H�	H�
H�
Hs�B#C$�$C3�2C3)NrN)NNFNFFN)
�__name__�
__module__�__qualname__rr!�
ReportedErrorr0r4rHrirDrCr�r"rrrrs����������+�+�+�&*�]��VW� � � � �:������5 �5 �5 �n�������@_c�CH�"&�+H�+H�+H�+H�+H�+Hrrc�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�UntypedDescriptionc�`�||_|j|_|j|_||_||_dSr2��envrFr
�tgtr�rr�r�rs    rrzUntypedDescription.__init__�s-������7����7����������rc�:�|j�|��dSr2)�combined_subjectsr$�r�subjects  r�combine_with_subjectz'UntypedDescription.combine_with_subject�s����%�%�g�.�.�.�.�.rc�V�|���|���dSr2)�resolve_primary�resolve_lookuped�rs rrlzUntypedDescription.resolve_all�s,���������������rc�V�|���|���dSr2)�resolve_type�resolve_tgtr�s rr�z"UntypedDescription.resolve_primary�s,���������������rc�T�|jj}t|d��s|jj|_|jj|jjz|_|jj	|_
|jj|_|jj	|_
|jj|_|jj|_||_dS)N�d_tag)r��description_class�hasattrrNr�r
�
tgt_prefix�fullname�tgtfullnamer�tgtnode�lastname�tgtlastname�srcnoder�srcfullname�srclastname�	__class__)r�dcs  rr�zUntypedDescription.resolve_type�s���
�X�
'���r�7�#�#�	&����D�J��8�.�t�x�/@�@����x�}����8�,����x�}����8�,����8�,�������rN)r�r�r�rr�rlr�r�r"rrr�r��s_���������/�/�/� � � ��������rr�c��eZdZdZdZdZdZdZdZdZ	dZ
d�Zd�Zd*d�Z
defd	�Zd
�Zd�Zd+d
�Zd�Zd�Zd�Zd�Zd�Zd*d�Zd�Zd,d�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d �Z%d!�Z&d"�Z'd-d#�Z(d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.dS).�DescriptionNr"�otherrFc�.�|D�]}	|jj}|rU|j�|��}|r/||ur�3|�d|�d�|jjt��||j|<|j�|j	g��}|j
}|�@t|��dz|kr*|�d||j	fz|jj��|�|��|j
�|����#t$rY��wxYwdS)NzDuplicate aspect z (may be correct in future).rzMore than %d %r aspects.)r�definame�	localviewr<r0r�DuplicateError�aspects_by_tagrQr��d_max_occurr^r$�aspectsr�)r�as_�asp�k�w�bn�ocs       r�aspects_extendzDescription.aspects_extendsN���	�	�C�
��G�$���
,���*�*�1�-�-�A��3���8�8�%��
�
�
�XY�XY�XY�#[�#$�5�:�#1�3�3�3�),�D�N�1�%��(�3�3�C�I�r�B�B���_���>��2�w�w��{�R�'�'��
�
�#=���	�A+�$+�,/�G�L�:�:�:��	�	�#������#�#�C�(�(�(�(�� �
�
�
���
����/	�	s�.D�CD�
D�Dc��|D]N}	t|||��}|���|�|f���?#t$rY�KwxYwdSr2)r�r�r�r�)r�subjects�vr�s    r�aspects_extend_by_subjectsz&Description.aspects_extend_by_subjectss|���	�	�A�
�(��q�!�4�4���#�#�%�%�%��#�#�S�F�+�+�+�+�� �
�
�
���
����	�	s�;A�
A�Ac���|�|}	|j}|j|vr(|�d|jz|jj��|||j<dS#t
$r|j�|��YdSwxYw)NzDuplicate definition of %r)�tgtviewr�r0rr�AttributeErrorr��deftgt)r�former�s   rr�zDescription.deftgt's����=��E�	/��l�G�� �G�+�+��
�
�7� �,�-�.3�i�n�>�>�>�).�G�E�%�&�&�&��
�	#�	#�	#��H�O�O�E�"�"�"�"�"�"�	#���s�A
�
$A2�1A2c�6�|jjj|||fi|��Sr2)rFr�r0�rr.rr+�kwdss     rr0zDescription.error5s%��!�t�x�|�!�#�t�Y�?�?�$�?�?�?rc�N�|jsd|_|���dSdS�Nr)�is_lookuped�resolve_aspectsr�s rr�zDescription.resolve_lookuped8s7����	#� �D��� � �"�"�"�"�"�	#�	#rc�.�|���dSr2)r�r�s rr�zDescription.resolve_tgt=s�����
�
�
�
�
rrc��g}|�dd��}|dvrn|jD]+}|���|�|���,|dkr5|jD]+}|���|�|���,|S|f|z}|jD]4}|j|vr)|���|�|���5|S)N� �_)rrOr)r?�argsr�r$r�r�)rrN�tags�al�as     r�find_aspectszDescription.find_aspects@s���
���k�k�#�s�#�#���,����Y�
�
���"�"�$�$�$��	�	�!������c�z�z���!�!�A��&�&�(�(�(��I�I�a�L�L�L�L��	��v��}����	�	�A��w�$����"�"�$�$�$��	�	�!������	rc���g}|jD]+}|���|�|���,|jD]4}|jdvr)|���|�|���5|S)N)	rO�seq�repeat�altr��	optionals�key_arg�draw�no_arg)r�r�r$r�r�)rr�r�s   r�find_arg_aspectszDescription.find_arg_aspectsSs���
����	�	�A�
��� � � ��I�I�a�L�L�L�L���	�	�A��w�-�-�-��"�"�$�$�$��	�	�!������	rc�x�g}|�d��D]!}|jdvr|�|���!�"|S)Nr)�	attribute�mapping�kind�either�kind_of�	superkind�superkind_of)r�r�r$)r�kasr�s   r�find_kind_aspectszDescription.find_kind_aspects_sQ�����$�$�S�)�)�	�	�C��y�-�-�-��
�
�3�������
rc��|Sr2r")r�descrss  r�merge_policyzDescription.merge_policyis���
rc�V�|js!|j�|j�|��S|Sr2)r��the_less_specific_descr�get_descr_for_aspect)r�aspects  rr�z Description.get_descr_for_aspectls1���|�	M�� <� H��/�D�D�V�L�L�L��rc�0�|�d��}g}|D]{}|jdvr$|�t||�����/|jdvrC||ur?t||��}|���D]}|�||z����||S�Nr)
r�r�r��operator�inplace_operator�reverse_operator�function_operator�delitem�getitem�setitem)r�r��
subkind_of)r�r�r$�beam�get_atom_beams)rr��aksr�r��bs      rrzDescription.get_atom_beamsqs����#�#�C�(�(�����		&�		&�C��y�����
�
�4��c�?�?�+�+�+�+���?�?�?�C�t�O�O���s�O�O���+�+�-�-�&�&�A��J�J�q�1�u�%�%�%�%���
rc���|�|�d��}g}|D]U}|jdvr|�|���!|jdvr+||ur'|�|������V|Sr�)r�r�r$r3�get_atom_kinds)rr�rr�s    r�get_aspects_kindzDescription.get_aspects_kind�s����?��'�'��,�,�G����	1�	1�C��y�����
�
�3�������?�?�?�C�t�O�O��
�
�3�-�-�/�/�0�0�0���
rc�Z�|�|g|�d��z��S)Nr)rr�r�s rr
zDescription.get_atom_kinds�s+���$�$�d�V�d�.?�.?��.D�.D�%D�E�E�Erc��g}|�d��}|D])}|�|������*|S�N�example)r�r3�get_examples)r�get_all�examples�exs�exs     rrzDescription.get_examples�sM�������	�*�*���	/�	/�B��O�O�B�O�O�-�-�.�.�.�.��rc�$��|�d��r\�fd�����D��}|s&��d�jjt
���jjj|�S�jj�	���S)Nrc�N��g|]!}�jj�|����"Sr")r
�RE�Single)�.0�xrs  �r�
<listcomp>z&Description.get_re.<locals>.<listcomp>�s+���H�H�H�q�T�X�[�'�'��*�*�H�H�Hrz+Test coverage error: no examples specified.)
r<rr0r�r�
CoverageErrorr
r�Unionr)r�opt�exress`  r�get_rezDescription.get_re�s�����7�7�>�"�"�	,�H�H�H�H�D�4E�4E�4G�4G�H�H�H�E��
*��
�
�H��8�=�(�*�*�*�%�4�8�;�$�e�,�,��8�;�%�%�d�+�+�+rc���g}|D]G��fd�|D��}|D]}|�urn-|����rn� |�����H|S)Nc�>��g|]}��|���|��Sr")�is_more_specific_than)rrr8s  �rrz8Description.get_most_specific_descrs.<locals>.<listcomp>�s,���D�D�D���)@�)@��)C�)C�D�1�D�D�Dr)r#r$)rr��ndsrr8s    @r�get_most_specific_descrsz$Description.get_most_specific_descrs�s�������	�	�A�D�D�D�D�c�D�D�D�C��
�
����6�6��E��*�*�1�-�-���E���
�
�1�
�
�
���
rc��|jSr2)rFr�s r�get_packagezDescription.get_package�s	���x�rc�J�|j}||up|duo|�|��Sr2)r�r#)rr8�rs   rr#z!Description.is_more_specific_than�s0���(���A�v�G�!�4�-�F�A�,C�,C�A�,F�,F�Grc�$���fd���|��S)Nc����|�d��}|r>t|��dksJ�|djjj���S|jdkr�|j��SdS)Nrrrr�)r�r^rrrOrPr�r�)�e�sa�finds  �rr.z'Description.get_self_name.<locals>.find�sn�������'�'�B��
2��2�w�w�!�|�|�|�|��!�u�y�~�)�/�/�1�1�1��w�)�#�#��t�A�E�{�{�"��4rr")rr.s @r�
get_self_namezDescription.get_self_name�s,���	�	�	�	�	��t�D�z�z�rc��|�d��}|s|�d|jz��dS|D]}|�|���dS)N�descriptionz<NO DESCRIPTION OF %r>)r��gen_textr��gen_doc)r�outrcr8s    r�gen_description_doczDescription.gen_description_doc�sh��
�
�
�}�
-�
-���	��L�L�1�D�4D�D�E�E�E�E�E��
�
���	�	�#�����
�
rc��|jSr2�r�r�s r�get_id_namezDescription.get_id_name������rc��|jSr2r7r�s r�
get_link_namezDescription.get_link_name�r9rc��|jSr2�r�r�s r�get_local_namezDescription.get_local_name�r9rc��|jSr2r7r�s r�
get_test_namezDescription.get_test_name�r9rc��|jSr2r7r�s r�get_namezDescription.get_name�r9rc��|�d��}|s|j}n#|jjj���}|S)NrE)r�r�r�rrOrP)r�nrEs   r�get_NamezDescription.get_Name�sC�����f�%�%���	*��#�D�D��5�:�>�'�'�)�)�D��rc�6�|j�|��Sr2)rF�get_descr_by_subjectr�s  rrGz Description.get_descr_by_subject�s���x�,�,�W�5�5�5rc�v�i|_g|_i|_|s!|�|jj��dSdSr2)r�r�r�r�r�)r�	only_varss  r�init_localviewzDescription.init_localview�sI�������� ����	>��+�+�D�H�,<�=�=�=�=�=�	>�	>rc��������jjr�fd��jjD���_����dS)Nc�D��g|]}�j�|����Sr")r�rG)rrOrs  �rrz/Description.resolve_aspects.<locals>.<listcomp>�s>���/�/�/����6�6����/�/�/r)rJrr��resolve_specialr�s`rr�zDescription.resolve_aspects�sg����������8�=�	/�/�/�/�/� $��
�/�/�/�D�I��������rc��dSr2r"r�s rrMzDescription.resolve_special�s���rc�x�|jjj���}|jrd|jjz|S)NzNo children expected for %r)rrrOrPr�rN�rrOs  r�get_the_one_argumentz Description.get_the_one_argument�s8���h�m��%�%�'�'���<�	:�)�D�I�M�9�9��
rc�*���g���fd��t|��dkr|djdkr|dS|D]
}�|����}t��}d|_||_dd�d�|D����z|_d|_|S)Nc���|jdkr$|���D]
}�|���dS��|��dS)Nr�)r�r�r$)r��k1�flatten�kss  ��rrUz/Description.make_and_test_kind.<locals>.flattensY����w�&� � ��-�-�/�/� � �B��G�B�K�K�K�K� � ��	�	�!�����rrrr��(%s)�&c��g|]	}|j��
Sr"r7�rrs  rrz2Description.make_and_test_kind.<locals>.<listcomp>���+I�+I�+I�a�A�M�+I�+I�+Ir)r^r��Kindr�rar�r�)r�kindsr�rUrVs   @@r�make_and_test_kindzDescription.make_and_test_kind�s�����
��	�	�	�	�	�	�
��J�J�!�O�O��a���&� 8� 8���8�O��	�	�A��G�A�J�J�J�J����F�F�������	��#�(�(�+I�+I�5�+I�+I�+I�"J�"J�K��
���
��rc��t|��dkr|djdvr|dSt��}d|_||_dd�d�|D����z|_d|_d|_|S)	Nrr�r�r�r�rWrXc��g|]	}|j��
Sr"r7rZs  rrz-Description.make_and_kind.<locals>.<listcomp>r[rT)r^r�r\r�rar�r��is_synthetic�rr]r�s   r�
make_and_kindzDescription.make_and_kinds|����J�J�!�O�O��a���1D� D� D���8�O��F�F�������	��#�(�(�+I�+I�5�+I�+I�+I�"J�"J�K��
���
�����rc���t|��dkr|dSt��}d|_||_dd�d�|D����z|_d|_d|_|S)Nrrr�rW�|c��g|]	}|j��
Sr"r7rZs  rrz,Description.make_or_kind.<locals>.<listcomp>)s��/M�/M�/M�!��
�/M�/M�/MrT)r^�	Superkindr�r�rar�r�rbrcs   r�make_or_kindzDescription.make_or_kind"sk���u�:�:��?�?���8�O����A��A�G��A�I�"�c�h�h�/M�/M�u�/M�/M�/M�&N�&N�O�A�M� �A�M�!�A�N��Hrr2r�F�r)/r�r�r�r��d_sub�d_type�d_is_defr�rbr�r�r�r�r�r�r0r�r�r�r�r�r�r�rrr
rr r%r'r#r/r5r8r;r>r@rBrErGrJr�rMrQr^rdrir"rrr�r��sy�������K��E�
�F��H��K��L�"��
�D����6���/�/�/�/�#�m�@�@�@�@�#�#�#�
�������&
�
�
����������

�
�
�����F�F�F�����	,�	,�	,�������H�H�H�
�
�
���� � � � � � � � � � � � � � � ����6�6�6�>�>�>�>����
�
�
�������.
�
�
�
�
�
�
�
rr�c��eZdZdZdZd�ZdS)�
Definitionr�
definitionc��|j|_|jdkr
|j|_n|j|jkrtd���|�|j��dS)N�importzDifferent description tag)r�r��ImportErrorr�r��rrs  r�export_aspectszDefinition.export_aspects3s_�����
��9�� � ��
�C�I�I��y�D�J�&�&�"�"=�>�>�>����4�<�(�(�(�(�(rN)r�r�r�rnrmrvr"rrrprp/s-�������H�
�F�	)�	)�	)�	)�	)rrpc��eZdZdZdZd�ZdS)�DescriptionDescription)�textr1c�:�|j�|��dSr2)r��
arg_accept)rr4s  rr3zDescriptionDescription.gen_docCs�������$�$�$�$�$rN)r�r�r�rlr�r3r"rrrxrx?s-�������E��E�%�%�%�%�%rrxc��eZdZd�ZdS)�Defaultc��|jj����d��}|d}d�|dd���}|�d��|�d��|�d��|�d��|���|�|��|���|�d��|�|��|j�|��|���|�d��dS)	N�
rr�dl�dt�strongz	Default: �dd)	r�rOrP�splitra�openr2�close�children_accept)rr4�arglines�default�rests     rr3zDefault.gen_docHs
���<�#�)�)�+�+�1�1�$�7�7���1�+���y�y��!�"�"��&�&��������������������������[�!�!�!��	�	�������W�����	�	��������������T������$�$�S�)�)�)��	�	�����	�	�$�����rN�r�r�r�r3r"rrr}r}Gs#����������rr}c��eZdZd�ZdS)�DescriptionWithHeaderc���|jj����d��}|d}d�|dd���}|�d��|�|��|�d��|�|��|j�|��|�	��|�	��dS)Nrrrr�r�)
r�rOrPr�rar��gen_outer_dtr2r�r�)rr4r��headerr�s     rr3zDescriptionWithHeader.gen_doc[s����<�#�)�)�+�+�1�1�$�7�7���!����y�y��!�"�"��&�&������������� � � �����������T������$�$�S�)�)�)��	�	�����	�	�����rNr�r"rrr�r�Zs#����������rr�c��eZdZdZdS)�Comment�commentN)r�r�r�r�r"rrr�r�is�������E��Drr�c�$�eZdZdZd�Zd�Zd�ZdS)�Either�	with_argsc�"�t|��gSr2�rr�s rrzEither.get_atom_beamsqs���T�
�
�|�rc��|gSr2r"r�s rr
zEither.get_atom_kindst�	���v�
rc�*�|���Sr2)r�r�s r�
get_alt_kindszEither.get_alt_kindsws���%�%�'�'�'rN)r�r�r�rmrr
r�r"rrr�r�nsF������
�F�������(�(�(�(�(rr�c��eZdZdZd�Zd�ZdS)�Import)�from�
resolve_by�usingr��	conditionr1r��constructorr��methodr�r�r�rrrrrrc�����d�_�jj��jj�jj�jjf��\���jj}���fd��jjD��}t|��dkr	|d}n3t�|td�|D�����jj
��}|j�_�jj
�jjz�_|�_��d���|�������jj������dS)Nrc�t��g|]4\}}�j�||���������5Sr")rFrH�get_descr_by_name)r�	from_name�	from_noder�
using_name�
using_nodes   ���rrz&Import.resolve_tgt.<locals>.<listcomp>�sU���@�@�@�(�9�i��h�%�%�i��;�;���
�J�7�7�@�@�@rrc��g|]	}|j��
Sr")rrZs  rrz&Import.resolve_tgt.<locals>.<listcomp>�s��1D�1D�1D�A�!�%�1D�1D�1Dr)rI)r�r�
imp_using_mapr<r�r�	imp_fromsr^�Product�ProductSubject�imp_resolve_moder�r
r�r�r�r�rJrvr�r�r�)r�import_nodercr8r�r�s`   @@rr�zImport.resolve_tgt�s^��������!%��!7�!;�!;��H���� 1�4�8�=�A�"C�"C��
�J��h�m��@�@�@�@�@�@�,0�H�,>�@�@�@���r�7�7�a�<�<��1��A�A���b�.�1D�1D��1D�1D�1D�"E�"E���1�3�3�A��5����8�.�t�x�/@�@���'(��$����a��(�(�(�	��������'�'���(8�9�9�9����
�
�
�
�
rc��dSr2r"r�s rr�zImport.resolve_aspects�����rN)r�r�r�rlr�r�r"rrr�r�{s9������
�E����0
�
�
�
�
rr�c� �eZdZd�Zd�Zd�ZdS)r�c
��||_|j|_||_||_|j|_|dj}|dd�D]r}|j|urg|�dd|jj�d|jj�d|djj�d|djj�d�	zdz|jj���s||_||_	dS)	Nrrz4Import error when importing from multiple packages:
z  Can not make a product of z (tgt = z) with z)
z  because of different targets.)
r�r
r�moderFr�r0r�rrc)rr�rcrr�r�r8s       rrzProduct.__init__�s�������7��������	��7�����e�i���A�B�B��	'�	'�A��u�C����
�
�R�R� �u�~�~�~�q�u�~�~�~�r�!�u�y�?Q�?Q�?Q�SU�VW�SX�S\�Se�Se�Se�g�g�=�=��5�:�	'�'�'���������rc�D�|jD]}|�|���dSr2)rcrv)rrr8s   rrvzProduct.export_aspects�s4����	"�	"�A�
���S�!�!�!�!�	"�	"rc�R�|jD]}||us|�|��rdS�dS)NTF)rcr#)rr8rs   rr#zProduct.is_more_specific_than�s?����	�	�A��A�v�v��0�0��3�3�v��t�t���urN)r�r�r�rrvr#r"rrr�r��sA���������&"�"�"�����rr�c��eZdZd�ZdS)rkc�V�||_||_|j|_||_||_dSr2r�r�s    rrzPackageDescription.__init__�s+���������7����������rN�r�r�r�rr"rrrkrk�s#����������rrkc��eZdZdZd�Zd�ZdS)�ErrorDescriptionr0c��||_dSr2)r��rr�s  rrzErrorDescription.__init__�s
������rc��dS)Nz<error>.<error>r"r�s rr8zErrorDescription.get_id_name�s�� � rN)r�r�r�r�rr8r"rrr�r��s7�������E����!�!�!�!�!rr�c�R�eZdZdZd�Zd
d�Zd�Zd
d�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
dS)�Package)�andr�r��documentrsr��macror�c�6�t|j��di}|jg}t|j�����D]S}|���}|D]:}t|��|vr'd|t|��<|�|���;�T|Sr�)�idr�r=r�values�get_tgtdictsr$)r�seen�tgtdicts�p�sds�sds      rr�zPackage.get_tgtdicts�s����4�<� � �!�$���L�>���d�,�3�3�5�5�6�6�	(�	(�A��.�.�"�"�C��
(�
(���b�6�6��%�%�#$�D��B���L��O�O�B�'�'�'��
(��rNc	��|�|jj��r|�||��S|}|�d��}|D]t}	|j|}nO#t$rB|sJ�|j�d|�d|�	���d�|t���YnwxYw|����u|S)Nr:zUndefined: � in �r+)�
startswithr
r��get_descr_by_tgt_namer�r��KeyErrorr�r0r8�UndefinedErrorr�)rrErr,�parts�parts      rr�zPackage.get_descr_by_name�s����?�?�4�8�.�/�/�	=��-�-�d�G�<�<�<����
�
�3�����	!�	!�D�
.��K��%�����
.�
.�
.����w������.2�d�d�A�M�M�O�O�O�O�D�g�,��.�.�.�.�.�
.����

��� � � � ��s�
A � A	B,�+B,c� �|j}|�|jdz��r2|t|j��dzd����}n|�d|z|j��|�||j��S)Nr:rz
Undefined: %r)r�r�r�r^rPr0rr��rr�rEs   rrGzPackage.get_descr_by_subject�s�������?�?�4�+�C�/�0�0�	=���D�,�-�-�a�/�0�0�1�7�7�9�9�D�D��J�J���-�w�|�<�<�<��%�%�d�G�L�9�9�9rc��|���}g}|D]L}||vrF||}|���|�d��}|�|���M|s|�d|z|t
��|�|��}t|��dkrT|�|��}t|��dkr,|�d|�dd�|D����|t��|dS)NrzNo definition of tgt %rrzConflicting descriptions of rc�&�g|]}|jj��Sr")rr�)rr8s  rrz1Package.get_descr_by_tgt_name.<locals>.<listcomp>
s��:�:�:�a�1�5�>�:�:�:rr)
r�r�r�r$r0r�r%r^r�r�)rrErr�r��tgtdictr8s       rr�zPackage.get_descr_by_tgt_name�s-���$�$�&�&�����	!�	!�G��w����D�M���"�"�$�$�$��*�*�3�/�/���
�
�a� � � ���	6��J�J�0���$�n�
6�
6�
6��.�.�v�6�6���v�;�;��?�?��&�&�v�.�.�F��6�{�{�Q����
�
�
��D�D�:�:�6�:�:�:�:�<��"�$�$�$�
�a�y�rc��|jjSr2)rrr�s r�get_filenamezPackage.get_filenames
���x� � rc��|Sr2r"r�s rr'zPackage.get_packages���rc��i|_dSr2)r�r�s rr�zPackage.resolve_tgts
������rc�<�i|_|���dSr2)rrJr�s rr�zPackage.resolve_aspectss"��!#����������rc��|j�|��}|�%|j�||��}||j|<|Sr2)rr<r�rH)rrErrFs    rrHzPackage.import_package sF���$�(�(��.�.���;��(�)�)�$��8�8�C�+.�D�"�4�(��
rc��g}|jjD]>}|j}|jj�||��}|�|���?|Sr2)rr6rr
�Documentr�r$)rr6�docrs    rr�zPackage.get_documents'sY���	��8�%�	"�	"�C��8�D��(�#�,�,�T�4�8�8�C����S�!�!�!�!��rr2)r�r�r�rlr�r�rGr�r�r'r�r�rHr�r"rrr�r��s�������
�E�	�	�	�����":�:�:�����.!�!�!�����������������rr�c�H�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZdS)�	Attribute)	r�r�r1�description_with_headerr�r�r�r�rc�R�|j|_|�|j��dSr2)r�r�r�rus  rrvzAttribute.export_aspects5s'�����
����4�<�(�(�(�(�(rc��|jSr2�r�r�s r�
get_attr_namezAttribute.get_attr_name9r9rc��|jSr2r�r�s rrBzAttribute.get_name<r9rc�T�|���}|�|��Sr2)r�rd�rr�s  r�get_kindzAttribute.get_kind?s'���$�$�&�&���!�!�#�&�&�&rc���|���}|jdkrB|���}t|��dkr	|d}nt	d|z���|jS)Nr�rrz$Don't know how to name this kind, %r)r�r�r�r^�
ValueErrorr�)rr�r�s   r�
get_kind_namezAttribute.get_kind_nameCsc���M�M�O�O���7�i����%�%�'�'�C��3�x�x�1�}�}���F��� �!G�$�!N�O�O�O��}�rc��|�|jj������d|jj��}|S�Nr:)rGr��parentr;r�)rr�s  rr;zAttribute.get_link_nameMsG���0�0��H�O���*�]�_�_�-�-�.2�h�.?�.?�
A���rc�T�|���}|�|��Sr2)r�r^r�s  r�
get_test_kindzAttribute.get_test_kindSs'���$�$�&�&���&�&�s�+�+�+rc�X�|�d��o|�d��S)Nr�r��r�r�s r�	is_methodzAttribute.is_methodWs1���!�!�)�,�,�1��%�%�i�0�0�0�	2rc�*�|���Sr2)r�r�s r�get_op_namezAttribute.get_op_name[s���!�!�#�#�#rN)
r�r�r�rlrvr�rBr�r�r;r�r�r�r"rrr�r�1s�������
?�E�)�)�)� � � � � � �'�'�'�������,�,�,�2�2�2�$�$�$�$�$rr�c��eZdZdZdZdS)�KindOfr�r"N�r�r�r�rmrlr"rrrr_s������
�F��E�E�Errc��eZdZdZdZdS)�	SubkindOfr�)r1Nrr"rrrrds������
�F��E�E�Errc��eZdZdZd�Zd�ZdS)r\)r�r�r1r�r�rr�r�r�r�r�rrrrrrc�,�|�d��S)Nr�r�r�s r�get_attributeszKind.get_attributesss��� � ��-�-�-rc�,�|�d��S)Nr�r�r�s r�get_mappingszKind.get_mappingsvs��� � ��+�+�+rN)r�r�r�rlrrr"rrr\r\is9������
�E�.�.�.�,�,�,�,�,rr\c��eZdZdZd�ZdS)rh)r�r1rr�c��|jSr2r=r�s rr>zSuperkind.get_local_name}r9rN)r�r�r�rlr>r"rrrhrhzs(������A�E� � � � � rrhc��eZdZdZdd�ZdS)�SuperkindOfr�rc	�4�t�||��}t|��|kri|���D]T}||ur�|�|�|t|��z
����t|��|krn�U|Sr2)r�rr^r�r3)r�enoughr�kas    rrzSuperkindOf.get_examples�s����+�+�D�&�9�9���x�=�=�6�!�!��,�,�.�.�
�
����:�:���������s�8�}�}�0D� E� E�F�F�F��x�=�=�F�*�*��E�+��rN)r)r�r�r�rmrr"rrrr�s-������
�F�	�	�	�	�	�	rrc�<�eZdZdZdddddd�Zd�Zdd
�Zd�Zd�Zd
S)�Example�r�r1�
in_context�'''�"""�)�]�})rr�(�[�{c��|jjSr2)r�ex_textr�s r�get_ex_textzExample.get_ex_text�s
���x��rFc��|gSr2r")rrs  rrzExample.get_examples�r�rc��|�d��}|sdS|djjj���S)Nrrr)r�r�rrOrP)rr�s  r�get_ctx_textzExample.get_ctx_text�s?������-�-���	��2��1�v�z��"�(�(�*�*�*rc��|Sr2r"�rrs  r�get_use_textzExample.get_use_text�s���rNrj)	r�r�r�rl�partabrrr!r$r"rrrr�su������4�E������	��F� � � �����+�+�+�����rrc��eZdZdZdS)�	InContextrN�r�r�r�r�r"rrr'r'���������K�K�Krr'c��eZdZdZd�ZdS)�Definesr�c�@�d�|�d��D��S)Nc��g|]	}|j��
Sr"r7rZs  rrz1Defines.get_defined_tgt_names.<locals>.<listcomp>�s��@�@�@�!��
�@�@�@rrOr�r�s r�get_defined_tgt_nameszDefines.get_defined_tgt_names�s$��@�@�t�'8�'8��'?�'?�@�@�@�@rN)r�r�r�rmr.r"rrr+r+�s-������
�F�A�A�A�A�Arr+c��eZdZd�Zd�ZdS)�Macroc�6�|j|_|j|_dSr2)r�r�rus  rrvzMacro.export_aspects�s�����
��l����rc�n�|jj�dd|jj|jj��S)N�blockr)r
rz�node_of_tacir�rRr)r�optionss  r�usez	Macro.use�s5���x�!�.�.��R���.���0B�D�D�	DrN)r�r�r�rvr6r"rrr0r0�s7������#�#�#�D�D�D�D�Drr0c��eZdZdZdS)�SelfrNr(r"rrr8r8�r)rr8c�F�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZdS)�Mappingr�)r�rOr�r�r1r��equationr�r�r��precondition�
postconditionr��returnsrr�c
��|�i��}|���}|D�]+}	|�_||krYt|��|krF|�d|j|d|dkd�t|��fz|jj��n�|�Yt|��|krF|�d|j|d|dkd�t|��fz|jj��nZ|�Xt|��|krE|�d|j|d|dkd�t|��fz|jj����#t$rY��)wxYwdS)Nz,%s requires %d argument%s specified, got %d.r�rz5%s requires at least %d argument%s specified, got %d.z4%s can take at most %d argument%s specified, got %d.)�get_args_re�sequnir^r0r�rrr�)r�min�max�re�xsrs      r�chk_num_argszMapping.chk_num_args�s���
�
�
�b�
!�
!��
�Y�Y�[�[���	�	�A�
��?�s�c�z�z�c�!�f�f��m�m��J�J�F� �J��S������^�S��V�V�JE�E���
�'�'�'�'�
�_��Q���#����J�J�O� �J��S������^�S��V�V�SE�E���
�'�'�'�'�
�_��Q���#����J�J�N� �J��S������^�S��V�V�RE�E���
�'�'�'���!�
�
�
���
����'	�	s�DE�
E�Ec��g}|�d��D])}|�t|j�����*|S)Nr�)r�r3r=r�)r�akr�s   r�
get_arg_kindszMapping.get_arg_kinds�sF��
���"�"�6�*�*�	$�	$�A��I�I�d�1�6�l�l�#�#�#�#��	rc�����	ddi}��|��}d}	|���}nl#�jjj$rUtd�jz��td|z��|�|��}|���}YnwxYw���fd�|D��}|S#t$rgcYSwxYw)NrTrz#Infinitely long args example for %sz;Limiting by expanding each Cleene closure 0 up to %d times.c�N��g|]!}t�t|��������"Sr")�ArgsExample�tuple)rr�mapnamer�top_kinds  ���rrz-Mapping.get_args_examples.<locals>.<listcomp>sI���4�4�4�+,�$�D�%��+�+��X�'�'�4�4�4r)	r@rAr
r�
InfiniteErrorrr��limitedr)rrNrOrrD�coveragerErs```     r�get_args_exampleszMapping.get_args_examples�s�����	�!�4�(�C��!�!�#�&�&�B��H�
!��Y�Y�[�[�����8�;�,�
!�
!�
!��;�d�>N�N�O�O�O��Q�T\�\�^�^�^��Z�Z��)�)���Y�Y�[�[����
!����4�4�4�4�4�4�02�4�4�4�H�
�O���	�	�	��I�I�I�	���s2�B4�6�B4�A&B�B4�B�B4�4C�Cc���g}|���D]�}|j}|dkr�|���}||vr|�||��}nK|���}|s-|�d|jjz|jj	��|d}|�
|����J�t|t|��|j
|j��S)NrOziTest coverage error: Can not create precondition for %r
 -- no examples specified for the argument above.r)r�r�rB�
get_arg_valuerr0r�r�rrr$rLrMrNrO)	rr��match�arglistr�rSrEr�rs	         r�get_args_for_argszMapping.get_args_for_argss������&�&�(�(�	�	�A���A��E�z�z��z�z�|�|���5�=�=��*�*�5��;�7�7�A�A����)�)�B����
�
�I�LP�LX�Ld�d��E�J�����1��A����q�!�!�!�!��q��4��w�����t�}�M�M�Mrc��|jjj}|���D]}||�|��z
}�|Sr2�r
r�Epsilonr�r �rrrDr�s    rr@zMapping.get_args_re�D��
�X�[�
 ���&�&�(�(�	 �	 �A��!�(�(�3�-�-��B�B��	rc�*�|���Sr2�r�r�s r�
get_argumentszMapping.get_arguments%s���$�$�&�&�&rc�f�|�d�|�d��D����S)Nc�6�g|]}|�����Sr")r�rZs  rrz+Mapping.get_return_kind.<locals>.<listcomp>*s ��"V�"V�"V�A�1�:�:�<�<�"V�"V�"Vrr>)rdr�r�s r�get_return_kindzMapping.get_return_kind)s3���!�!�"V�"V��9J�9J�9�9U�9U�"V�"V�"V�W�W�Wrc�f�|�d�|�d��D����S)Nc�6�g|]}|�����Sr")r�rZs  rrz0Mapping.get_return_test_kind.<locals>.<listcomp>-s"��'`�'`�'`�a����(9�(9�'`�'`�'`rr>)r^r�r�s r�get_return_test_kindzMapping.get_return_test_kind,s4���&�&�'`�'`�4�CT�CT�U^�C_�C_�'`�'`�'`�a�a�arN)
r�r�r�rmrlrFrIrSrXr@r`rcrfr"rrr:r:�s�������
�F�	
�E����2������0N�N�N�0���'�'�'�X�X�X�b�b�b�b�brr:c�>�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	S)
rLc�f��||_||_�|_||_�fd�|D��|_dS)Nc�&��g|]
}�|����Sr"r")rrrNs  �rrz(ArgsExample.__init__.<locals>.<listcomp>6s!���-�-�-�A�W�W�Q�Z�Z�-�-�-r)r��egsrNrO�negs)rr�rjrNrOs   ` rrzArgsExample.__init__1s>������������ ��
�-�-�-�-��-�-�-��	�	�	rc�6�d�|j��S)NrY)rarkr�s r�__str__zArgsExample.__str__8s���y�y���#�#�#rc���d}|j���D]N}|j}|dkr(|���|kr|j|cSntd|z���|dz
}�OdS)NrrOzNo argument matches: %rr)r�r�r�rBrj�ConditionError)rrE�ir�rSs     rrUzArgsExample.get_arg_value;s���
����.�.�0�0�	�	�A���A��E�z�z��:�:�<�<�4�'�'��8�A�;�&�&�&�(�%�%>��%E�F�F�F�
��F�A�A�	�	rc�6�|j�d��S�Nr<�r�r�r�s r�get_preconditionszArgsExample.get_preconditionsFs���|�(�(��8�8�8rc�6�|j�d��S�Nr=rsr�s r�get_postconditionszArgsExample.get_postconditionsIs���|�(�(��9�9�9rc���|���}|sgS|j}|j}|�d��}|r�|�d��D]�}|�d��D]�}|�d��}|r�|�|�d����}|�=|�||��}t
|���|��gccS����dSgS)Nr<r�r�r=)rtrOr�r��match_torX�SetUpr�)	r�presr��mapr��m�mprerVr�s	         r�get_setups_for_preconditionsz(ArgsExample.get_setups_for_preconditionsLs���%�%�'�'���	��I��}���l������/�/���	��&�&�{�3�3�
�
�����	�2�2���A��>�>�.�9�9�D��!� � �M�M�!�.�.��*I�*I�J�J�E��(� �2�2�4��?�?�� %�a�o�o�&7�&7�� >� >�?�?�?�?�?�?�)���t��	rc��dSr2r")rr�s  r�
match_to_kindzArgsExample.match_to_kindir�rc�R�i}|���D]�}|D]�}|j|jkrot|j��t|j��kr�=i}t	|j|j��D]\}}||vrn|||<�|�|��n��dS��d|vsJ�|S)N�,)rt�cond_idr^�	arg_names�ziprv)r�postsrV�pre�pos�updr�rs        rryzArgsExample.match_tols������)�)�+�+�	�	�C��

�

���;�#�+�-�-��3�=�)�)�S���-?�-?�?�?� ��C� #�C�M�3�=� A� A�����1���:�:�!�E�!"��A������S�)�)�)�����t�t���%������rN)r�r�r�rrmrUrtrwrr�ryr"rrrLrL0s�������.�.�.�$�$�$�	�	�	�9�9�9�:�:�:����:
�
�
�����rrLc� �eZdZd�Zd�Zd�ZdS)rzc�"�||_||_dSr2)rEr�)rrEr�s   rrzSetUp.__init__�s����	���	�	�	rc��|jSr2�rEr�s rrBzSetUp.get_name��
���y�rc��|jSr2)r�r�s r�get_argszSetUp.get_args�r�rN)r�r�r�rrBr�r"rrrzrz�sA����������������rrzc�&�eZdZdZdZdZd�Zd�ZdS)�Operatorrr�)	rOr�r1r�r;r=r<rr>c�H�|jjj���Sr2�rrrOrPr�s rr�zOperator.get_op_name�����x�}� �&�&�(�(�(rc�2�|�dd��dSr��rFr�s rrMzOperator.resolve_special�������!�Q�����rN)r�r�r�rnrmrlr�rMr"rrr�r��sC�������H�
�F�
"�E�
)�)�)� � � � � rr�c��eZdZdS)�ReverseOperatorN�r�r�r�r"rrr�r����������Drr�c��eZdZd�ZdS)�FunctionOperatorc�2�|�dd��dSr	r�r�s rrMz FunctionOperator.resolve_special�r�rN�r�r�r�rMr"rrr�r��s#������ � � � � rr�c��eZdZdS)�InplaceOperatorNr�r"rrr�r��r�rr�c�"�eZdZdZdZd�Zd�ZdS)�SetItemr�)rOr�r1r�r;r=r<rc��dS)Nz[]r"r�s rr�zSetItem.get_op_name�����trc�2�|�dd��dS�N�r�r�s rrMzSetItem.resolve_special�������!�T�"�"�"�"�"rN)r�r�r�rmrlr�rMr"rrr�r��s>������
�F�
�E�
���#�#�#�#�#rr�c��eZdZd�ZdS)�DelItemc�2�|�dd��dSr�r�r�s rrMzDelItem.resolve_special�r�rNr�r"rrr�r���#������#�#�#�#�#rr�c�(�eZdZejdzZd�ZdS)�GetItem)r>c�2�|�dd��dSr�r�r�s rrMzGetItem.resolve_special�r�rN)r�r�r�r�rlrMr"rrr�r��s/�������M�M�)�E�#�#�#�#�#rr�c�8�eZdZdZdZd�Zd�Zee��ZdS)�	Conditionr)rrOr�r1�python_codec��g}|�d��D]A}|jdvr6|�|jjj������B|S)NrrP)r�r�r$rrrOrP)r�anr�s   r�
get_arg_nameszCondition.get_arg_names�s[��
���"�"�3�'�'�	2�	2�A��w�/�)�)��	�	�!�%�*�.�.�.�0�0�1�1�1���	rc��|jj}|Sr2)rr�)r�dns  r�get_def_namezCondition.get_def_name�s��
�X�
���	rN)	r�r�r�rnrlr�r��property�def_namer"rrr�r��sG�������H�D�E��������x��%�%�H�H�Hrr�c��eZdZdZdS)�
PythonCoderN�r�r�r�rlr"rrr�r��s������4�E�E�Err�c�@�eZdZdZd�Zd�Zee��Zd�Zd�Z	dS)�ConditionRef�r�r1c�f�	|jS#t$rt�|��cYSwxYwr2)�	cond_exprr�r��__repr__r�s rr�zConditionRef.__repr__�sD��	.��>�!���	.�	.�	.��'�'��-�-�-�-�-�	.���s�	�$0�0c�D�|jj}|jrd|z}||_|S)N�not )�cond_definitionr��is_notr�)rr�s  r�get_cond_idzConditionRef.get_cond_id�s-���&�2���;�	'��w�&�G�����rc��|jSr2)r�r�s r�get_definitionzConditionRef.get_definition�s���#�#rc�(�|jj}|j�|��|_|jjdz|jz|_|jjj�	��|_
|jj|_|jj|_dSr�)
rr�r�rGr�r��
cond_doc_namerrOrPr�r�r�)r�cond_defs  rrMzConditionRef.resolve_special�ss���8�+��#�x�<�<�X�F�F���%�_�5��;�h�>O�O������*�0�0�2�2�����+����h�o����rN)
r�r�r�rlr�r�rr�r�rMr"rrr�r��sg������'�E�.�.�.������{�+�+�G�$�$�$�&�&�&�&�&rr�c��eZdZdZdS)�PreconditionN�r�r�r��doc_namer"rrr�r��s�������H�H�Hrr�c��eZdZdZdS)�
PostconditionNr�r"rrr�r��s�������H�H�Hrr�c��eZdZd�ZdS)�PostcondCasec�6�|t_|t_dSr2)r�postcond�	variables)r�r�s  rrzPostcondCase.__init__s�� ��
�"����rNr�r"rrr�r�s#������#�#�#�#�#rr�c��eZdZdZdZdS)�Constructorr�r�Nrr"rrr�r�s������
�F�'�E�E�Err�c��eZdZdZdS)�Equation)r�r1r<r=Nr�r"rrr�r�
s������G�E�E�Err�c��eZdZdZdZd�ZdS)�Argsr�)r�r1r�c��|jjj}|���D]}||�|��z
}�|Sr2rZr\s    rr zArgs.get_rer]rN)r�r�r�rmrlr r"rrr�r�s-������
�F�5�E�����rr�c��eZdZd�ZdS)�NoArgc�$�|jjjSr2)r
rr[)rrs  rr zNoArg.get_res���x�{�"�"rN)r�r�r�r r"rrr�r�r�rr�c�,�eZdZdZd�Zd�Zd�Zdd�ZdS)	�Arg)r�r�r1r�rEc�P�|�|�����Sr2)rir�r�s rr�zArg.get_kind$s"��� � ��!7�!7�!9�!9�:�:�:rc�N�	|���S#t$rYdSwxYw�N�?)�get_arg_namer�r�s rrBzArg.get_name's;��	��$�$�&�&�&���	�	�	��3�3�	���s��
$�$c��|jjSr2)r�specified_namer�s rr�zArg.get_arg_name-s
���x�&�&rFc�
�g}|�d��}|D])}|�|������*|r|r;|���}|�|�����|Sr)r�r3rr�)rrrrrr�s      rrzArg.get_examples0s��������	�*�*���	/�	/�B��O�O�B�O�O�-�-�.�.�.�.��	.�g�	.��
�
���A��O�O�A�N�N�,�,�-�-�-��rNrj)r�r�r�rlr�rBr�rr"rrr�r�!sZ������K�E�;�;�;����'�'�'������rr�c�&�eZdZd�Zd�Zd�Zd�ZdS)�KeyArgEGc�"�||_||_dSr2)rE�eg)rrEr�s   rrzKeyArgEG.__init__<s����	�����rc�4�|j���Sr2)r�rr�s rrzKeyArgEG.get_ex_text@s���w�"�"�$�$�$rc�4�|j���Sr2)r�r!r�s rr!zKeyArgEG.get_ctx_textCs���w�#�#�%�%�%rc��|j�d|��S)N�=r�r#s  rr$zKeyArgEG.get_use_textFs���)�)�)�Q�Q�'�'rN)r�r�r�rrr!r$r"rrr�r�;sP���������%�%�%�&�&�&�(�(�(�(�(rr�c��eZdZdd�ZdS)�KeyArgFc�z��|�����fd�t�||��D��S)Nc�0��g|]}t�|����Sr")r�)rr�rEs  �rrz'KeyArg.get_examples.<locals>.<listcomp>Qs#���M�M�M�r���r�"�"�M�M�Mr)r�r�r)rrrEs  @rrzKeyArg.get_examplesOs>���� � �"�"��M�M�M�M�S�-=�-=�d�G�-L�-L�M�M�M�MrNrj)r�r�r�rr"rrr�r�Js.������
N�N�N�N�N�Nrr�c��eZdZdZd�ZdS)�Draw)r�r1r�r�c��|jjj}|���D]#}||�|��d��z
}�$|Sr�rZr\s    rr zDraw.get_reWsN��
�X�[�
 ���&�&�(�(�	%�	%�A��-�!�(�(�3�-�-��$�$�$�B�B��	rN)r�r�r�rlr r"rrr�r�Ts(������:�E�����rr�c��eZdZdZdZd�ZdS)�	Optionals)rOr�r�r�r�r�c�P�������fd���������S)Nc���|s�jjjS|d�����|dd���zd��S)Nrrr�)r
rr[r )r�r�opt_rars ���rrz Optionals.get_re.<locals>.opt_racsQ����
+��x�{�*�*�@�G�A�J�%�%�c�*�*�V�V�G�A�B�B�K�-@�-@�@�#�F�F�Frr_)rrrs``@rr zOptionals.get_rebsM�����	G�	G�	G�	G�	G�	G�	G��v�d�+�+�-�-�.�.�.rN�r�r�r�rlrmr r"rrrr^s-������:�E�
�F�/�/�/�/�/rrc��eZdZdZd�Zd�ZdS)�Repeat)r�rOr�r�r1c�H�|jjj���Sr2r�r�s r�get_argzRepeat.get_argmr�rc�2�|���}|s |�d|jj��|d�|��}|dd�D]}||�|��z
}�|���}d}||vr�|�|��}t|��dkr#|�d|z|jj��d�|D��\}}		t|��}n0#t$r#|�d|jj��YnwxYw|	d	krA	t|	��}	nt#t$r#|�d
|jj��YnHwxYwnC	t|��}n0#t$r#|�d|jj��YnwxYw|}	|dks|	d	kr&|	dkr |�d|jj��|	d	kr#|d	��}
t|��D]}||
z}
�n�|	|kr |�d
|jj��|jjj
}t|��D]}||z
}�|jjj
}t||	��D]}||zd��}�||z}
|
S)NzNo argument aspects.rrz..r�zMore than one %r in argument.c�6�g|]}|�����Sr"�rPrZs  rrz!Repeat.get_re.<locals>.<listcomp>�s ��.�.�.�A�a�g�g�i�i�.�.�.rzExpected int in lower bound.rz!Expected int or * in upper bound.z-Expected int, int..int or int..* in argument.z'Expected non-negative repetition count.z$Expected upper bound >= lower bound.r�)r�r0rrr rr�r^�intr��ranger
rr[)
rrr�rDr�rOrBr��lo�hi�resrprs
             rr z
Repeat.get_reps���#�#�%�%���	>��J�J�-�t�x�}�=�=�=�
��V�]�]�3�
�
���Q�R�R��	 �	 �A��!�(�(�3�-�-��B�B��l�l�n�n�����#�:�:��9�9�S�>�>�D��4�y�y�A�~�~��
�
�:��� $��
�/�/�/�.�.��.�.�.�F�B��
J���W�W�����
J�
J�
J��
�
�9�4�8�=�I�I�I�I�I�
J�����S�y�y�.��R���B�B��!�.�.�.��J�J�B�#�x�}�.�.�.�.�.�.�����
T���X�X�����
T�
T�
T��
�
�C�T�X�]�T�T�T�T�T�
T�����B�
��6�6�b�C�i�i�B��F�F��J�J�@��x�}�
&�
&�
&���9�9��"�S�'�'�C��2�Y�Y�
�
���3�h���
��B�w�w��
�
�A��8�=�*�*�*����#�A��2�Y�Y�
�
���R�������#�A��2�r�]�]�
"�
"���R�!�V�S�M�M����a�%�C��
s6�,C<�<*D)�(D)�3E�*E0�/E0�5F�*F2�1F2N)r�r�r�rlrr r"rrrrjs7������<�E�)�)�)�8�8�8�8�8rrc�&�eZdZdZedz
ZdZd�ZdS)�Seq)rOr�r1r�)r�r�c��|jjj}|���D]}||�|��z
}�|Sr2rZr\s    rr z
Seq.get_re�r]rNrr"rrrr�s7������;�E�	�]��E�
�F�����rrc��eZdZdZdZd�ZdS)�Alt)rOr��
descriptonr�r�r�r�c���|���}|s |�d|jj��|d�|��}|dd�D]}||�|��z}�|S)NzNo alternatives.rr)r�r0rrr )rrr�rDr�s     rr z
Alt.get_re�s{���#�#�%�%���	:��J�J�)�4�8�=�9�9�9�
��V�]�]�3�
�
���Q�R�R��	 �	 �A��!�(�(�3�-�-��B�B��	rNrr"rrrr�s-������J�E�
�F�����rrc�"�eZdZdZdZd�Zd�ZdS)�Returns)r�r�r1r�r�r�r��
with_opt_argsc�P�|�|�����Sr2)rdr�r�s rr�zReturns.get_kind�s"���!�!�$�"8�"8�":�":�;�;�;rc�P�|�|�����Sr2)r^r�r�s rr�zReturns.get_test_kind�s"���&�&�t�'=�'=�'?�'?�@�@�@rN)r�r�r�rlrmr�r�r"rrrr�sC������
,�E�
�F�<�<�<�A�A�A�A�Arrc�d�g}|D]*}|�|�|�����+|Sr2)r3r�)r�rNr��os    r�find_aspects_inseqr�s<��
�C�
�(�(���
�
�1�>�>�#�&�&�'�'�'�'��Jrc��eZdZd�Zd�ZdS)�Beamc�V�|d|_|d|_||_||_dS)Nr���)rr��k_tag�objects)rr$r%s   rrz
Beam.__init__�s*���1�:����2�;�����
�����rc�"�t||��Sr2)�compose)rr�s  r�__add__zBeam.__add__�s���t�U�#�#�#rN)r�r�r�rr(r"rrr!r!�s2���������$�$�$�$�$rr!c��eZdZdS)�KindBeamNr�r"rrr*r*�r�rr*c��eZdZdS)�AtomKindBeamNr�r"rrr,r,�r�rr,c��eZdZdS)�KindMappingBeamNr�r"rrr.r.�r�rr.c�R�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�ZdS)
�
KindOpBeamrc�F�t|���d��S)Nr;�r�
get_op_seqr�s r�find_equationszKindOpBeam.find_equations�s��!�$�/�/�"3�"3�Z�@�@�@rc�F�t|���d��Srvr2r�s r�find_postconditionszKindOpBeam.find_postconditions�s��!�$�/�/�"3�"3�_�E�E�Erc�F�t|���d��Srrr2r�s r�find_preconditionszKindOpBeam.find_preconditions�s��!�$�/�/�"3�"3�^�D�D�Drc�l�|jd}|����||��Sr	)r%�
get_the_oprS)rrNrOs   rrSzKindOpBeam.get_args_exampless-���<��?����� � �2�2�7�H�E�E�Erc�J�|j|j���Sr2)r%�
op_name_indexr8r�s r�get_op_id_namezKindOpBeam.get_op_id_name����|�D�.�/�;�;�=�=�=rc�J�|j|j���Sr2)r%r<r�r�s rr�zKindOpBeam.get_op_namer>rc�*�|j|jd�Sr2�r%�op_indexr�s rr3zKindOpBeam.get_op_seq
s���|�D�M�N�N�+�+rc�N�|������Sr2)r:r/r�s rr/zKindOpBeam.get_self_name
s����� � �.�.�0�0�0rc�&�|j|jSr2rAr�s rr:zKindOpBeam.get_the_ops���|�D�M�*�*rc�N�|������Sr2)r:rfr�s rrfzKindOpBeam.get_return_test_kinds����� � �5�5�7�7�7rN)r�r�r�rBr<r4r6r8rSr=r�r3r/r:rfr"rrr0r0�s��������H��M�A�A�A�F�F�F�E�E�E�F�F�F�>�>�>�>�>�>�,�,�,�1�1�1�+�+�+�8�8�8�8�8rr0c��eZdZd�ZdS)�KindAttributeBeamc��J�r2r"r�s rr:zKindAttributeBeam.get_the_ops���qrN)r�r�r�r:r"rrrGrGs#����������rrGc��eZdZdZdS)�KindAttributeMappingBeamr�N)r�r�r�rBr"rrrJrJs�������H�H�HrrJc��eZdZd�ZdS)r.c��dS)Nz()r"r�s rr�zKindMappingBeam.get_op_name!r�rN)r�r�r�r�r"rrr.r. s#����������rc��eZdZdZdZdS)�	KOKOpBeamr�N)r�r�r�rBr<r"rrrNrN%s�������H��M�M�MrrNc�$�t|dd��Sr�r�)r%s r�subkind_of_kindrP*����������rc��|j|jurd|j�d|j���|j|jdd�z}t|�S)NzComposition error, tgt z is not src r)r�rr%r)r�rr%s   rr'r'.sI���u�A�E����;<�5�5�5�!�%�%�H�H��i�!�)�A�B�B�-�'�G���>�rc�8�t|dg|dd��R�S)Nr�r��r$r%s  r�
remove_1_2rV6s$�����
�)�W�Q�R�R�[�)�)�)�)rc�$�t|dd��Sr�r�rUs  r�remove_0rX:rQr)r�r�)r�r�)r�r�)r�r�r�r�)r�r�r�r)r�r�r�r�)r�r�r�r�)r�r�r�r�)r�r�r�r�)r�r�r�r)r�r�r�r)r�r�r�r)r�r�)r�)r�r�)r�r�r�)r�r�)r�r�r�r�r�)r�r�r�)r�r�)r�r)r�r)r�r)r�r�r`)r�r�r�r�)r�r�)r�r�)r�r�)r�r)r�r)r�rr�r�)r�rr�r)r�rr�r)r�rr�r)r�rr�r�)r�rr�r�)r�rr�r�)r�rr�r�)r�rr�r)r�r�)r�r�r�)r�r�r)r�r�r)r�r�r)r�r�r�)r�r�r�)r�r�r�)r�r�r)r�r�r�)rr�)	)rr�r�)rr�r)rr�r)rr�r)rr�r�)rr�r�)rr�r�)rr�r�)rr�rc�`�td�|D����}t|}||g|�R�S)Nc��g|]	}|j��
Sr")r�rZs  rrzbeam.<locals>.<listcomp>�s��,�,�,�q�1�7�,�,�,r)rM�
beam_table)r%r$�Cs   rrrs@���,�,�G�,�,�,�-�-�E��5��A��1�U��W����rc��eZdZd�ZdS)r�c�b�||_dd�d�|D����z|_dS)NrWrc��g|]	}|j��
Sr"�r�rZs  rrz+ProductSubject.__init__.<locals>.<listcomp>�s��*H�*H�*H�!�1�:�*H�*H�*Hr)r�rar�)rr�s  rrzProductSubject.__init__�s4�� ��
�����*H�*H�x�*H�*H�*H�!I�!I�I��
�
�
rNr�r"rrr�r��s(������J�J�J�J�Jrr�c��eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d+d	�Zd
�Zd�Z
d+d�Zd
�Zdefd�Zd�Zd,d�Zd,d�Zd�Zd�Zd�Zd�Zd+d�Zd�Zd�Zd�Zd�Zd-d�Zd�Zd�Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%d%�Z&d&�Z'd'�Z(d(�Z)d)�Z*d*�Z+dS).�Subjectr"Nc��||_|j|_|jj|_||_|jj|_||_g|_i|_d|_|j	|_	|j�
|j	��|_d|_|j|ur&|j�
|j��|_dS|j|_dSr	)r�rFr
rrr�r�r��
node_indexrN�get_description_classr��aspect_mode�make_child_namer�)rr�rr�s    rrzSubject.__init__�s�������:����8�<�����	���)��
� ��
������
�����8���!%��!?�!?���!I�!I�������;�d�"�"� �K�7�7��
�F�F�D�M�M�M� �M�D�M�M�Mrc�j�|�|d���}|D]}|�||���dS)Nr�rB��get_arglist�add_new_subject�rr�namesrEs    r�_visit_type_definitionzSubject._visit_type_definition�sL��� � ��1� �-�-���	-�	-�D�� � ��t�,�,�,�,�	-�	-rc��|jjj|j}|�|d���}|D]}|�d|��}|�||��� dS)Nrrir)r
rz�reverse_node_aliasesrNrkrl)rr�shtagrnrEs     r�_visit_type_operatorzSubject._visit_type_operator�sp����"�7���A��� � ��1� �-�-���	-�	-�D�#�e�e�T�T�*�D�� � ��t�,�,�,�,�	-�	-rc�0�|�|��dSr2)rl�rrs  r�_visit_type_otherzSubject._visit_type_other�������T�"�"�"�"�"rc���������}��fd�|D��}�����}|r	||_dSdS)Nc�<��g|]}��|�����Sr"��find_subject�rrErrs  ��rrz1Subject._visit_type_with_args.<locals>.<listcomp>��)���@�@�@�$��!�!�$��-�-�@�@�@r�rkrlr��rrrnr�r�s``   r�_visit_type_with_argszSubject._visit_type_with_args�sc����� � ��&�&��@�@�@�@�@�%�@�@�@���&�&�t�,�,���	 ��G�L�L�L�	 �	 rc�������d���}��fd�|D��}�����}|r	||_dSdS)Nrric�<��g|]}��|�����Sr"rzr|s  ��rrz5Subject._visit_type_with_opt_args.<locals>.<listcomp>�r}rr~rs``   r�_visit_type_with_opt_argsz!Subject._visit_type_with_opt_args�sh����� � ��1� �-�-��@�@�@�@�@�%�@�@�@���&�&�t�,�,���	 ��G�L�L�L�	 �	 rc�\�|�||��}|�|��|Sr2)�new_subject�add_subject�rrr�r�s    rrlzSubject.add_new_subject��0���"�"�4��2�2������!�!�!��rc�X�|�|��|���|Sr2)�def_subject�add_top_noder�s  rr�zSubject.add_subject�s-������!�!�!��������rc�>�|j}|�|��dSr2)r�_visit_childrenrus  rr�zSubject.add_top_node�s#���y�����T�"�"�"�"�"rc�\�|�||��}|�|��|Sr2)r�r�r�s    r�def_new_subjectzSubject.def_new_subject�r�rc��|jjrZ|j}||jvr8|�d|z|jd|z|j|jfg���dS||_||j|<nd|_|j�|��dS)NzRedefinition of %r.zPrevious definition of %r.)r,)	r�rnr�r�r0rr�r�r$r�s   rr�zSubject.def_subject�s����$�-�
	$��#�D��t�}�$�$��
�
�0�4�7���;�d�B�#�}�T�2�7�"9�!:�����
��#�G��")�D�M�$���#�G������G�$�$�$�$�$rc�,�|jj|||fi|��Sr2)rFr0r�s     rr0z
Subject.error�s"���t�x�~�c�4��;�;�d�;�;�;rc�:�|j�|||��Sr2)rFr{)rrErs   rr{zSubject.find_subject�s���x�$�$�T�4��6�6�6rrc���|���}|���D]�}|s�|j����d��s,|j����d��rd}nd}|�||d���d�|D��}n��t
|��|kr|�d||fz|��|S)Nr�z9Arg list to definition can not start or end with a comma.zMissing argument to definition.r�c��g|]}|�|��Sr"r"rZs  rrz'Subject.get_arglist.<locals>.<listcomp>�s��3�3�3���3�1�3�3�3rz4Not enough arguments, minimum %d expected to node %s)rkrOrPr�rqr0r^)rrrBrWrOr}s      rrkzSubject.get_arglist�s���"�"�$�$���#�#�%�%�	�	�C��
��8�>�>�#�#�.�.�s�3�3�:�t�x�~�~�7G�7G�7P�7P�QT�7U�7U�:�S�A�A�9�A��
�
�1�d�d�
�3�3�3�3�3�g�3�3�3����
��w�<�<�#����J�J�F���J���
�
�
��rc�\�|�||��}|�|��|Sr2)rk�no_children)rrrBr�s    r�get_arglist_onlyzSubject.get_arglist_only�s0��
�
�
�d�C�
(�
(����������	rc��	t|j��5}t|�����|���}ddd��n#1swxYwYn#t
$rd}YnwxYw|Sr2)r�rr=�	readlines�rstrip�	Exception)rrr�rys    rrzSubject.get_lines���	��d�m�$�$�
;���A�K�K�M�M�*�*�5�1�8�8�:�:��
;�
;�
;�
;�
;�
;�
;�
;�
;�
;�
;����
;�
;�
;�
;����	�	�	��D�D�D�	�����s4�A(�:A�A(�A � A(�#A �$A(�(A7�6A7c��|j�||_n,|j|kr!|�d|�d|j��|��|�|��dS)NzInconsistent aspect mode: z, was: )rfr0r�)rrr�s   r�
_visit_aspectzSubject._visit_aspectsj����#�#�D�����4�'�'��
�
�
�d�d�d�D�L\�L\�]��!�!�!����T�"�"�"�"�"rc	��|jD]�}	|j|jjvr3|�d|j�d|j�d|jj��|��|jj�-d|jj�|ji��|j<|�|��n#t$rYnwxYw|xj
dz
c_
��dS)NzInvalid  tag: z  in: z. Allowed = r)rRrNr�rlr0r
�cover_checkrQ�acceptr�rd)rrrTs   rr�zSubject._visit_childrens����-�
	!�
	!�B�
��6��!7�!=�=�=��J�J�J���������$�*@�*F�*F� H�IM�O�O�O��8�'�3�LM�D�H�(�3�3�D�H�b�A�A�"�&�I��	�	�$������ �
�
�
���
�����O�O�q� �O�O�O�
	!�
	!s�BB � 
B-�,B-c��|j�d|��Sr�r`)r�child_lastnames  rrgzSubject.make_child_names���-�-�-���8�8rc��|j�|j��j}||duksJ�|�
d|jz}|j}|dkrt|||��S|dkrt
|||��St|||��S)Nz<%d>r�r�)r
rerNrnrd�MacroSubject�DocumentSubjectrb)rrrE�is_defrNs     rr�zSubject.new_subject!s�����/�/���9�9�B���$�d�*�+�+�+�+��<��D�O�+�D��h���'�>�>���d�D�1�1�1�
�J�
�
�"�4��t�4�4�4��4��t�,�,�,rc�Z�|jj�|d|j|j��S)Nr)r
rzr4rRr)rrNrs   r�new_tag_nodezSubject.new_tag_node.s%���x�!�.�.�s�B��
�t�z�R�R�Rrc�X�|jr"|�d|jz|d���dSdS)Nz)No children expected for node with tag %rr�)rRr0rNrus  rr�zSubject.no_children1sK���=�	'��J�J�B�T�X�M��!%�
�
'�
'�
'�
'�
'�	'�	'rc��|�|d���D].}|�||��}|�|d���/dS)Nrrir��rkr{r��rrrE�	ofsubjects    r�	visit_andzSubject.visit_and7s\���$�$�T�q�$�1�1�	1�	1�D��)�)�$��5�5�I��#�#�D�%�0�0�0�0�	1�	1rc��|�|d���D].}|�||��}|�|d���/dS)Nrrir�r�r�s    r�visit_aspects_ofzSubject.visit_aspects_of<s\���$�$�T�q�$�1�1�	4�	4�D��)�)�$��5�5�I��#�#�D�(�3�3�3�3�	4�	4rFc���|j���}d}d}|rpd|vrj|�d��}t|��dkr|�d|��d�|D��\}}|r|�||��}|r|}n|}|�|��}	|r||	_|�|	��|r|	j�|�d|��|�
|g|	_	dSdS)Nrr�zMore than 1 colon in argument.c�6�g|]}|�����Sr"rrZs  rrz%Subject.visit_arg.<locals>.<listcomp>Js ��"9�"9�"9��1�7�7�9�9�"9�"9�"9rzNo argument name specified.)
rOrPr�r^r0r{r�r�r�r�)
rr�must_have_namerO�arg_namer��nkrE�	kind_namer�s
          r�	visit_argzSubject.visit_argAs!���h�n�n���������	��c�z�z��Y�Y�s�^�^���r�7�7�Q�;�;��J�J�?��F�F�F�"9�"9�b�"9�"9�"9���i��>��,�,�Y��=�=�D��$�#�H��
���"�"�4�(�(���	.�%-�G�"�����!�!�!��	<�g�4�<��J�J�4�d�;�;�;��� �6�G�L�L�L��rc��dSr2r"rus  r�
visit_commentzSubject.visit_comment`r�rc�p�|�|d���}|D]}|�|d|z���dS)Nrrizcond:%srjrms    r�visit_conditionzSubject.visit_conditioncsQ��� � ��1� �-�-���	9�	9�D�� � ��y�4�'7�8�8�8�8�	9�	9rc�^�|j�|j��}|j���}|�d��}|jdk|kr/|rd|jz}n
d|jz}|�||d���t|d|jz��|��dS)Nrrqz.Tag %r is not a definition, should not have ::z#Tag %r is a definition, requires ::r�z_visit_type_%s)	r
rerNrOrPr�rmr0�getattr)rrr�rO�colonr.s      r�
visit_defaultzSubject.visit_defaulths��� �H�:�:�4�8�D�D���h�n�n�������s�#�#���$��4��>�>��
G�F���Q���;�d�h�F���J�J�s�D�D�J�1�1�1�B���&�):�)A�A�B�B�4�H�H�H�H�Hrc�0�|�|��dSr2)r�rus  r�visit_descriptionzSubject.visit_descriptionurwrc�0�|�|��dSr2)r�rus  r�visit_description_with_headerz%Subject.visit_description_with_headerxs�����t�$�$�$�$�$rc�p�|�|��}|jj}|j���}d|vrp|�|dd���|dd�ksB|�|dd���|dd�ks|�d|dd���d|z}||_dS)	Nrrr#rT���z=Multi-line expression should be in parentheses (for clarity).r�rW)rlr�r%rOrPr<r0r)rrr�r%rs     r�
visit_examplezSubject.visit_example{s����&�&�t�,�,���*�1��
�X�^�^�
�
���2�:�:��J�J�r�"�1�"�v�&�&�"�R�S�S�'�1�1��J�J�r�"�1�"�v�&�&�"�R�S�S�'�1�1��
�
�Z�\`�%)�A��7�7�7��"��B�����rc�P�|�|d���}d}d}g}|jD]�}|j}|dkr0|�|��D]}|�||f����?|dkrX|r|�d|jd����e|j���}|dvr|�d|d���d	}��|d
kr4|�g}|�|��D]}|�||f�����|�d|d�����i}	|��t|��t|��krJtt��t|��krd}
nd
}
|�d|
ztd���t||��D]
\}}||	|<�t|��dkr|�d|��t|��dkr|s|�d|d���d	}|D]-}|�
||��}
||
_|	|
_||
_�.dS)Nrrir�r�zMore than 1 'resolve' clause.r�)r��orzResolve by: and / or expected.r�r�zUnexpected clause in import�few�manyz=Too %s 'using' names, should match number of names in .importrzNo 'from' clausez;Importing from multiple packages but no 'resolve by' clause)rkrRrNr�r$r0rrOrPr^�using_namesr�r�r�r�r�r�)rr�my_names�resolve_mode�usings�fromsrTrSrE�	using_map�manyfewr}�ur�s              r�visit_importzSubject.visit_import�s����#�#�D�a�#�0�0���������-�	N�	N�B���A��F�{�{� �1�1�"�5�5�-�-�D��L�L�$���,�,�,�,�-��l�"�"��	-��J�J�>�!�w�$��8�8�8�8�$&�6�<�<�>�>�L�'�=�8�8��
�
�#C�#%�-1�#�3�3�3�(-����g����>��F� �1�1�"�5�5�.�.�D��M�M�4��*�-�-�-�-�.��
�
�8�"��
�M�M�M�M��	����6�{�{�c�(�m�m�+�+��{�#�#�c�(�m�m�3�3�#�G�G�$�G��
�
�S�V]�]��"��$�$�$��H�f�-�-�
!�
!���1� �	�!����u�:�:��?�?��J�J�)�4�0�0�0��u�:�:��>�>��
%��
�
�X��4��1�1�1�$���	&�	&�D��*�*�4��6�6�G�'3�G�$�$-�G�!� %�G���		&�	&rc�4�|�|d���dS)NT)r�)r�rus  r�
visit_key_argzSubject.visit_key_arg�s�����t�D��1�1�1�1�1rc	�,�|j���}|�d��s|�d|��|j�d||j�dd|j��f���|��dS)Nrz)Tag 'method' is a definition, requires ::r�r�r)rOrPr�r0r
r4rRr�)rrrOs   r�visit_methodzSubject.visit_method�s����h�n�n�����~�~�c�"�"�	J��J�J�B�D�I�I�I�����k�3�#�x�4�4�Y��D�M�R�R�T�	V�	V�V\�V\�]a�Vb�Vb�Vb�Vb�Vbrc��|j�|�d|��|j���}|s|�d|��||_dS)NzDuplicate name specification.zNo name specification.)r�r0rOrP)rrrEs   r�
visit_namezSubject.visit_name�s\����*��J�J�6��=�=�=��x�~�~�����	7��J�J�/��6�6�6�"����rc��|�|d���D].}|�||��}|�|d���/dS)Nrrir�r�r�s    r�visit_orzSubject.visit_or�s\���$�$�T�q�$�1�1�	0�	0�D��)�)�$��5�5�I��#�#�D�$�/�/�/�/�	0�	0rc��|j���}d|vr|�d|��|�d��}|�d��}||kr|�d|��||dz|����}d|vr d�|�d��D��}n|g}|}|d|����}|s|�d|��d	}|�d
��r|dd����}d}|�d��}	|	d
�d��s#d|	d
z|	d
<d�|	��}|�||��}
|�	|��}|
|_
||_||_||_
dS)NrzNo left parenthesisrz#None or misplaced right parenthesisrr�c�6�g|]}|�����Sr"rrZs  rrz/Subject.visit_postcondition.<locals>.<listcomp>�s ��1�1�1�q������1�1�1rzNo condition namerr��r:r#zcond:)rOrPr0rr.r�r�rar{rlr��	cond_namer�r�)rrrO�lpar�rparrDr�r�r�r�r�r�s            r�visit_postconditionzSubject.visit_postcondition�s����h�n�n�����c�z�z��J�J�,�d�3�3�3��y�y��~�~���x�x��}�}���$�;�;��J�J�<�d�C�C�C���Q��t���"�"�$�$���!�8�8�1�1�A�G�G�C�L�L�1�1�1�A�A���A��	�����J�$�$�&�&�	��	2��J�J�*�D�1�1�1�������'�'�	�!�!�"�"�
�+�+�-�-�I��F�����$�$���R�y�#�#�G�,�,�	(���b�	�)�E�"�I�������I��$�$�Y��5�5���&�&�t�,�,��"*���%���%�������rc�0�|�|��dSr2)r�rus  r�visit_preconditionzSubject.visit_preconditions��� � ��&�&�&�&�&rr2rkrj),r�r�r�r�r�rrorsrvr�r�rlr�r�r�r�r�r0r{rkr�rr�r�rgr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r"rrrbrb�s�������
�D��N�*�*�*�&-�-�-�
-�-�-�#�#�#� � � � � � �����
���
#�#�#�����
%�%�%�"#�m�<�<�<�<�7�7�7�����$����
���#�#�#�!�!�!�9�9�9�-�-�-�-�S�S�S�'�'�'�1�1�1�
4�4�4�
"�"�"�"�>
�
�
�9�9�9�
I�I�I�#�#�#�%�%�%����:&�:&�:&�x2�2�2�c�c�c�#�#�#�0�0�0�
" �" �" �H'�'�'�'�'rrbc��eZdZdS)�ErrorSubjectNr�r"rrr�r�r�rr�c�(�eZdZd�Zdefd�Zdd�ZdS)r|c�h�||_||_||_||_|�}t�||||��|�d��d|_d|_t|_
g|_|jD]}||��}||j
|j<�|�|��|`dS)Nr:r#r�)r
�specenvrFrrbrr�r�rNr�r�r6�predefined_subjectsr�r�r�)rr
r�rrErr�s       rrzPackageSubject.__init__	s������������ ��
��t������t�T�4�0�0�0��
�
�3����+��
����!(�������(�	*�	*�A���$���A�()�D�M�!�*�%�%����T�"�"�"��L�L�LrNc�,�|jj|||fi|��Sr2)r�r0r�s     rr0zPackageSubject.errors#��!�t�|�!�#�t�Y�?�?�$�?�?�?rc���|s|�d|z|��d�|�d��D��}|ds|d}|dd�}nd}|dkr|}n~|dkr\|}|�<d	}|j|kr$|j|vr|j}|j|kr	|j|v�|j|vrd}|�|�d
|z|��n|�d|�d|��|��|j}t|��D]n\}	}
|j�|
��}|�C|jd
kr|�d|
�d|�d�|��t||||	d���cS|dz|
z}|}�o|S)NzInvalid subject name: %rc�6�g|]}|�����Sr"rrZs  rrz/PackageSubject.find_subject.<locals>.<listcomp>$s ��4�4�4�q������4�4�4rr:rrr��myfile�mykind)r�r�rsz%mykind tag without such a context: %rzInvalid tag r�rszNo such subject: z  in )	r0r�r�rNr��	enumerater�r<�SubImportSubject)rrErrr�rNr��	kind_tags�snamerprD�nss            rr{zPackageSubject.find_subject s����	@��J�J�1�D�8�$�?�?�?�4�4�D�J�J�s�O�O�4�4�4���Q�x�	���(�C��!�"�"�I�E�E��C��(�?�?��A�A�
�H�_�_��A��}�5�	��h�$�&�&�1�5�	�+A�+A���A��h�$�&�&�1�5�	�+A�+A��5�	�)�)��A��y��
�
�B�� �!%�'�'�'��
�J�J�J����d�d�;�T�B�B�B��
���e�$�$�	�	�D�A�q������"�"�B��z��5�H�$�$��J�J�J� !���5�5�5� *�+/�1�1�1�'��4��q�r�r��;�;�;�;�;��C�K�!�O�E��A�A��rr2)r�r�r�rr�r0r{r"rrr|r|sV���������(#�m�@�@�@�@�%�%�%�%�%�%rr|c��eZdZd�ZdS)r�c��||_||_||_d�|jg|z��|_|d|_dS)Nr:r#)r�r�rnpartsrar�r�)rr�rr�s    rrzSubImportSubject.__init__IsC�������	�������&�/�!2�7�!:�;�;��
�����
�
�
rNr�r"rrr�r�Hs#������$�$�$�$�$rr�c��eZdZd�ZdS)r�c��dSr2r"r�s rr�zMacroSubject.add_top_nodeRr�rN�r�r�r�r�r"rrr�r�Qs#������
�
�
�
�
rr�c��eZdZd�ZdS)r�c�D�|jj�|��dSr2)r�r6r$r�s rr�zDocumentSubject.add_top_nodeWs!�����$�$�T�*�*�*�*�*rNr�r"rrr�r�Vs#������+�+�+�+�+rr�c��eZdZd�ZdS)�
GuppyWorldc�r�||_dx|_|_d|_d|_g|_t|_dS)N�Guppy_Worldz<GuppyWorld>)rFr�r�rrNr�r�r�r�s  rrzGuppyWorld.__init__\s:�����(5�5��
��
���	�!������!,����rNr�r"rrr�r�[s#������-�-�-�-�-rr�c
�4�eZdZdZdZide�de�de�de�de	�de
�d	e�d
e�de
�de�d
e�de�de�de�de�de�de�ide�de�de�de�de�de�de�de�de�de�de �de!�d e"�d!e#�d"e$�d#e%�d$e&��e'e(e)e*e+e,e-e.d%��Z/d&Z0d'Z1d'Z2d(Z3d)�Z4d*�Z5d+�Z6d,�Z7d-�Z8d.�Z9d'S)/�_GLUECLAMP_)z_parent:Documentz_parent:FileIOz_parent.FileIO:IOz
_parent:Filerz_parent:Htmlz
_parent:Latexz_parent:SpecNodesz_parent.SpecNodes:node_of_taciz_parent:Testerz_root.hashlib:md5z_root.guppy.etc:iterpermutez_root.guppy.etc:RE)r��io_dirr(r�rOr�r�r�r�r�r�rUrr1r�r;rr�r�rrrsrr�r�r�r�r�r�r�r�r=r<r�r�r�r�)r�r>rr�rrr�r�z.tgt.N�
c�B�|j�|t��Sr2)�description_classesr<r�)rrNs  rrez!_GLUECLAMP_.get_description_class�s���'�+�+�C��=�=�=rc��tfSr2)r�r�s r�_get_predefined_subjectsz$_GLUECLAMP_._get_predefined_subjects�s
���}�rc��iSr2r"r�s r�_get_package_cachez_GLUECLAMP_._get_package_cache�s���	rc�@�t|��}|j|fi|��dSr2)rr�)rrr��ses    r�mainz_GLUECLAMP_.main�s-��
�T�]�]������)�)�D�)�)�)�)�)rc��dSr2r"r�s r�_test_main_z_GLUECLAMP_._test_main_�r�rc�R�|jj�|��}||_dSr2)r@rArsrr)r�dirs  r�
set_input_dirz_GLUECLAMP_.set_input_dir�s$���g�l�"�"�3�'�'������r):r�r�r��	_imports_�	_chgable_rr�r�r�r�r�r�r}r+r�rxr�r�rr�r�r�r�r�r'r�r�r\rr0r:r�r�r�r�r�r�rr�rrr8rr�rrhrrr�r�rr(rerr
r
rrr"rrrresm������
�I�8�I�+�
�s�+�
�s�+�	��+�	�Y�	+�
	�7�+�	�Y�
+�	�{�+�	�7�+�	�7�+�	�7�+�	�-�+�	"�#8�+�	�H�+�	�7�+�	�&�+� 	��!+�"	�-�#+�+�$	�7�%+�&	�&�'+�(	�i�)+�*	�O�++�,	�6�-+�.	��/+�0	�6�1+�2	��3+�4	�7�5+�6	�%�7+�8	�H�9+�:	��;+�<	��=+�>	�z�?+�@	�O�A+�B	�Y�C+�D	�7�E+�+�F�������#�U+�+�+��Z�J��K�
�F��J�>�>�>�������*�*�*�
�
�
�����rrN)Q�guppy.etc.Descriptorr�guppy.gsl.Exceptionsrr�r�rprxr}r�r�r�r�r�rkr�r�r�rrr\rhrrr'r+r0r8r:rLrzr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr!r*r,r.r0rGrJrNrPr'rVrXr[rr�rbr�r|r�r�r�r�rr"rr�<module>rs���1�1�1�1�1�1�"�"�"�"�PH�PH�PH�PH�PH�PH�PH�PH�f��������Bs�s�s�s�s�s�s�s�l	
)�
)�
)�
)�
)��
)�
)�
)� %�%�%�%�%�[�%�%�%������$����&�����2����	�	�	�	�	�$�	�	�	�

(�
(�
(�
(�
(�[�
(�
(�
(�#
�#
�#
�#
�#
�Z�#
�#
�#
�L�����k����>�����+����!�!�!�!�!�!�!�!�[�[�[�[�[�k�[�[�[�|+$�+$�+$�+$�+$�
�+$�+$�+$�\�����[����
���������
,�,�,�,�,�:�,�,�,�" � � � � �
� � � ������+���������k����4���������A�A�A�A�A�k�A�A�A�D�D�D�D�D�J�D�D�D������;����jb�jb�jb�jb�jb�k�jb�jb�jb�ZN�N�N�N�N�N�N�N�b	�	�	�	�	�	�	�	� � � � � �w� � � �	�	�	�	�	�h�	�	�	� � � � � �x� � � �
	�	�	�	�	�h�	�	�	�#�#�#�#�#�g�#�#�#�#�#�#�#�#�g�#�#�#�
#�#�#�#�#�g�#�#�#�&�&�&�&�&��&�&�&�$5�5�5�5�5��5�5�5�&�&�&�&�&�;�&�&�&�<�����<����
�����L����
#�#�#�#�#�#�#�#�(�(�(�(�(�+�(�(�(�
H�H�H�H�H�{�H�H�H������;����#�#�#�#�#�K�#�#�#�
�����+����4(�(�(�(�(�(�(�(�N�N�N�N�N�S�N�N�N������;����	/�	/�	/�	/�	/��	/�	/�	/�>�>�>�>�>�[�>�>�>�B	�	�	�	�	�+�	�	�	������+����	A�	A�	A�	A�	A�k�	A�	A�	A����$�$�$�$�$�$�$�$�	�	�	�	�	�t�	�	�	�	�	�	�	�	�4�	�	�	�	�	�	�	�	�d�	�	�	�!8�!8�!8�!8�!8��!8�!8�!8�H�����
����
�����z���������j����
�����
����
������*�*�*����>���>��T�>��d�>�2�4�	>�
:�4�>�9�$�
>�0��>�1�$�>�9�$�>�0��>�0��>�0��>��d�>��$�>���>� $�T�!>�"�4�#>�>�$8�9J�%>�&%�&>�'>�(��)>�*"�:�+>�,��->�.��/>�0!�*�1>�2��3>�4-�d�5>�6��7>�8�*�9>�:!�*�;>�<��=>�>�D�?>�@0��A>�B8��C>�D.�z�E>�>�>�F.�z�G>�H7�
�I>�J.�z�K>�L/�
�M>�N7�
�O>�P.�z�Q>�R��S>�T%�d�U>�V-�i�W>�X#�I�Y>�Z#�I�[>�\,�Y�]>�^$�Y�_>�`,�Y�a>�b#�I�c>�d#�D�e>�f�D�g>�>�h*.�15�'+�'+�04�'+�(,�04�'+�y>�>�>�
�B���J�J�J�J�J�J�J�J�v'�v'�v'�v'�v'�v'�v'�v'�r	�	�	�	�	�7�	�	�	�=�=�=�=�=�W�=�=�=�@$�$�$�$�$�$�$�$�
�
�
�
�
�7�
�
�
�
+�+�+�+�+�g�+�+�+�
-�-�-�-�-��-�-�-�W�W�W�W�W�W�W�W�W�Wr

Zerion Mini Shell 1.0