HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/__pycache__/Spec.cpython-37.pyc
B

�][��@s6dZdZdd�ZGdd�d�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�ZGd$d%�d%e�ZGd&d'�d'e�ZGd(d)�d)e�ZGd*d+�d+�ZGd,d-�d-e�ZGd.d/�d/�ZGd0d1�d1e�ZGd2d3�d3e�ZGd4d5�d5�ZGd6d7�d7e�ZGd8d9�d9e�ZGd:d;�d;e�ZGd<d=�d=e�ZGd>d?�d?e �Z!Gd@dA�dAe �Z"GdBdC�dCe �Z#GdDdE�dE�Z$GdFdG�dG�Z%GdHdI�dI�Z&dJS)Ka
Contains some experimental set constructions.
In the current state, not to be used by the faint-hearted.
It is likely due for some major refactoring and has probably
many bugs, it was a long time since I run the tests.
You don't get any other documentation than this right now.

�cCsJy
t|d�Stk
rDt|t�r<dd�dd�|D��St|�SXdS)N�briefz(%s)�,cSsg|]}t|��qS�)�briefstr)�.0Zxirr�C/opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/Spec.py�
<listcomp>szbriefstr.<locals>.<listcomp>)�getattr�AttributeError�
isinstance�tuple�join�str)�xrrrrs

rc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�
SpecFamilycCs&||_|�|j�|j|g8_dS)N)�specmodZdefrefining�AnythingZ	disjoints)�selfZ	unisetmodrrrr�__init__szSpecFamily.__init__cCs|�||�S)N)�Set)r�argrrr�__call__szSpecFamily.__call__cCs.t|t�r|jj�||f�S|j�||�SdS)N)rr�mod�fam_And�_cons�famZ	_and_ATOM)r�a�brrr�c_and s
zSpecFamily.c_andc	Csj|jj}|j��}x@|jD]6}y|�||d�Wntk
rDYqX|�|�qW|jj�	|j�
|��S)Nzselect contains)r�_static_test_envr�
mutnodeset�nodes�
test_contains�	Exception�add�fam_IdentityrZ
immnodeset)rrr�env�res�birrr�_and_ID&s
zSpecFamily._and_IDcCs0|jj}y|�||d�Stk
r*dSXdS)Nz
Spec containsF)rrr"�	TestError)rrrr&rrr�
c_contains2s
zSpecFamily.c_containscCs*|j}t|�|kr&|d|d�d}|S)N�z...)r�len)rrZmax_lenrrrr�c_getlimstr9szSpecFamily.c_getlimstrcCsd|jjt|j�fS)Nz<%s(%s)>)�	__class__�__name__rr)rrrrr�c_get_brief?szSpecFamily.c_get_briefN)
r0�
__module__�__qualname__rrrr)r+r.r1rrrrrsrc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�ArgNamesFamilycGs|�||�S)N)r)r�argsrrrrDszArgNamesFamily.__call__cCsN|jjj}|�|�\}}}|dk	r0|�d|�|dk	rF|�d|�t|�S)Nz*%sz**%s)r�_root�inspect�getargs�appendr)r�coder7r5�varargs�varkwrrr�getargnamesGs
zArgNamesFamily.getargnamescCs.y|j}|�|�|kStk
r(dSXdS)NF)�__code__r=r
)r�fr5r:rrr�
func_argnamesPs
zArgNamesFamily.func_argnamescCs<y"|j}|j}|�|�dd�|kStk
r6dSXdS)NrF)�__func__r>r=r
)r�mr5r?r:rrr�
meth_argnamesWszArgNamesFamily.meth_argnamescs���fdd�}��fdd�}�jjj}||�p�||�p�t|t�rTt|d�rT||j�p�t|t�rrt|d�rr||j�p�t|d�o�||j�S)Ncs��|�j�S)N)r@r)r?)rrrrr@`�z0ArgNamesFamily.c_contains.<locals>.func_argnamescs��|�j�S)N)rCr)rB)rrrrrCarDz0ArgNamesFamily.c_contains.<locals>.meth_argnamesrr)rr6�typesr�type�hasattrrr)rrrr@rCrEr)rrrr+_s







zArgNamesFamily.c_containsN)r0r2r3rr=r@rCr+rrrrr4Cs
	r4c@s&eZdZddd�Zdd�Zdd�ZdS)	�AttributeFamilyNcCs8|dkr|jj}nt||jj�s*|�|�}|�||f�S)N)r�anyrr�UniSetZc_from�specotup)r�namerFrrrrqs


zAttributeFamily.__call__cCs"|j\}}|�||�}|�||�S)N)r�
gengetattrr")rrrr&rLrFrrrr�c_test_containsys
zAttributeFamily.c_test_containscCs@d|jdf}|jddk	r4|d|jdj}n|d}|S)Nz<AttributeFamily(%r%%s>�rr�)rr)rrrrrr�c_get_brieflimstr~s
z!AttributeFamily.c_get_brieflimstr)N)r0r2r3rrNrQrrrrrHps
rHc@s$eZdZdd�Zdd�Zdd�ZdS)�AdaptupleFamilycOs&tj|f|�|�|�ddd��dS)N�newcSs
|jdS)NrO)r)rrrr�<lambda>�rDz*AdaptupleFamily.__init__.<locals>.<lambda>)rr�
add_export)rr�krrrr�szAdaptupleFamily.__init__cCs0|j�|�\}}|j�|�}|�||f||f�S)N)r�_exodoc�setcast�specoargtup)r�funcrF�docrrrr�szAdaptupleFamily.__call__cCsN|j\}}t|t�r>y||�}WqBtk
r:|�d�SXn|}|�||�S)Nzcalling func failed)rrrr#�failed_exc_infor")rrrr&rZrFrrrrrN�s

zAdaptupleFamily.c_test_containsN)r0r2r3rrrNrrrrrR�srRc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�CartesianProductFamilycGs|�||�S)N)r)rrErrrr�szCartesianProductFamily.__call__cCs&|j}t|�dkr|dStd��dS)N�rOz*Domain is defined on binary relations only)rr-�	TypeError)rrrErrr�c_domain�szCartesianProductFamily.c_domaincCsbg}xJt|j�D]<\}}t|�|��}|sB|�d|dd|�sBgS|�|�qW|jjjj	j
|�S)Nzcartesian productzthe argument #%d)�	enumerater�list�get_examples�failed_coverager9rr6�guppy�etc�iterpermute)rrr&�exs�i�ai�exrrr�c_get_examples�sz%CartesianProductFamily.c_get_examplescCs&d}x|jD]}|t|j�}qW|S)Nr)rr-)rr�lrjrrr�c_len�szCartesianProductFamily.c_lencCsj|j}t|�}t|�t|�kr:|�dt|�t|�f�n,x&t||�D]\}}|�||�sFdSqFWdSdS)Nz*cprod of length %d: argument has length %dFT)rrr-�failed�zipr")rrrr&rE�bs�trrrrN�sz&CartesianProductFamily.c_test_containsN)r0r2r3rr`rlrnrNrrrrr]�s

r]c@s$eZdZdd�Zdd�Zdd�ZdS)�SequenceFamilycCs
|�|�S)N)�specoarg)rrFrrrr�szSequenceFamily.__call__cCs$x|D]}|j�||�sdSqWdS)NFT)rr")rrrr&rrrrrN�s
zSequenceFamily.c_test_containsccsBx<t|j�D].}x(|�|jj|jg|��D]
}|Vq,WqWdS)N)�range�max_sequence_examples_lengthrcr�cprodr)rrr&rirrrrrl�s zSequenceFamily.c_get_examplesN)r0r2r3rrNrlrrrrrs�srsc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
MappingFamilycs*tj�f|�|���d�fdd��dS)N�arrowcs��fdd�S)Ncs���|�S)N)�c_arrow)r?)rrrrrT�rDz:MappingFamily.__init__.<locals>.<lambda>.<locals>.<lambda>r)r)r)rrrT�rDz(MappingFamily.__init__.<locals>.<lambda>)rrrU)rrrVr)rrr�szMappingFamily.__init__cCs|j\}}}t|||�S)N)r�Arrow)rrr?�tf�ts�retrrrrz�szMappingFamily.c_arrowcGs�g}g}d}d}|jj}�x|t|�k�r6||}t|t��r|dkrt|d7}|t|�dksftd��|||�}n�|�d�r�|d7}|||�}|�d|dd�t|�f�|�|�nN|dkr�|d7}|||�}|�d	t|��|�|j�|��ntd
|��n |�dt|��|�||��|d7}qWdd
�	|�d}	t
|	�}
|jj|�}|dk�rp|jj}|�
||
||f�S)NrOz->rz<The '->' specifier must be next to last in the argument list�=z%s=%args[%d]����*z	*args[%d]zInvalid argument specifier: %rzargs[%d]zlambda f: lambda *args: f(r�))rrXr-rr�SyntaxError�endswithr9�sequencer
�evalrwrr)rr5r}�as_r~rirXrjrr�fnr?rrrr�sD

zMappingFamily.__call__cs.|j\�}��|����fdd�}|�||�S)NcsBy�|�}Wntk
r"�YnX�dk	r:|��|d�SdSdS)NzMapping Return TypeT)r#r")r&r5�r)r?r~rr�g
sz(MappingFamily.c_test_contains.<locals>.g)r�forall)rrrZr&r}r�r)r?r~rrNszMappingFamily.c_test_containscCs |j\}}}dd�|�|�D�S)Ncsg|]��fdd��qS)cs�S)Nr)r5�kwds)rrrrTrDz9MappingFamily.c_get_examples.<locals>.<listcomp>.<lambda>r)rr)rrrsz0MappingFamily.c_get_examples.<locals>.<listcomp>)rrc)rrr&r?r}r~rrrrlszMappingFamily.c_get_examplesN)r0r2r3rrzrrNrlrrrrrx�s
(rxc@seZdZdd�Zdd�ZdS)�PredicateFamilycCs|�|||f�S)N)r)rrr[rrrr"szPredicateFamily.__call__cCs0|j\}}|||�s,|�d||�|�f�SdS)Nz(pred: doc = %r; failed for element == %sT)rrorL)rrrr&�predr[rrrrN%s

zPredicateFamily.c_test_containsN)r0r2r3rrNrrrrr�!sr�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�PowersetFamilycGs$tj|f|��|�ddd��dS)N�unioncSs|jS)N)r)rrrrrT/rDz)PowersetFamily.__init__.<locals>.<lambda>)rrrU)rr5rrrr-szPowersetFamily.__init__cCs
|�|�S)N)rt)r�setrrrr1szPowersetFamily.__call__cCs8|jj|jg}y|�|j�}Wntk
r2|SX|S)N)r�Nothingrrcr#)rrr&r�yrrrrl4szPowersetFamily.c_get_examplescs>||jjkr"|�d|j�|��|j�|�|�fdd�d�S)Nz%powerset.test_contains: not a set: %scs|��|d�S)N�powerset)r")r&r)r�rrrTCrDz0PowersetFamily.c_test_contains.<locals>.<lambda>r�)rr�ro�isorr�)rrrr&r)r�rrN>s
zPowersetFamily.c_test_containsN)r0r2r3rrrlrNrrrrr�,s
r�c@seZdZddd�Zdd�ZdS)�	DocFamilyNcCs>|dkr|jjj}n||jjkr.|jj�|�}|�|||f�S)N)rrJZ
NotNothingr��convertr)rr[rFrrrrGs
zDocFamily.__call__cCs|j\}}|�||�S)N)rr")rrrr&r[rFrrrrNOs
zDocFamily.c_test_contains)N)r0r2r3rrNrrrrr�Fs
r�c@s.eZdZdd�Zd
dd�Zdd�Zdd	�ZdS)�RelOpFamilycOs<tj|f|�|�|�ddd��|�ddd��i|_dS)N�domaincSs
|jdS)NrO)r)rrrrrTWrDz&RelOpFamily.__init__.<locals>.<lambda>rucSs
|jdS)Nr^)r)rrrrrTXrD)rrrU�memo)rrrVrrrrUszRelOpFamily.__init__NcCs�|j�|�}|dkr|}n|j�|�}|j�|||f�}|dkr�|dkr\td|�}||_n|}|j|_|�||||f�}||j|||f<|S)N)
�<z<=z==z!=�>z>=�inznot in�iszis notzlambda x,y: x %s y)rrXr��getr�rLr0r)rr��oprurrZrrrr_szRelOpFamily.__call__cCs�t|�|j��}|s(td|jdd�gSt|�|j��}|sPtd|jdd�gSg}x2|jjjj�	||�D]}|�
||�rj|�|�qjW|S)N�relationr�ru)rbrcr�rdrurr6rerfrg�containsr9)rrr&�domZranrhrkrrrrlqszRelOpFamily.c_get_examplescCs |j\}}}||�s|��SdS)NT)rro)rrrr&�dr�r�rrrrN�szRelOpFamily.c_test_contains)N)r0r2r3rrrlrNrrrrr�Ts

r�c@s$eZdZdd�Zdd�Zdd�ZdS)�EqualsFamilycGs|s|jjS|�|�S)N)rr�rK)rr5rrrr�szEqualsFamily.__call__cCs||jkrdS|�d�S)NT�equals)rro)rrrr&rrrrN�s
zEqualsFamily.c_test_containscCs|jS)N)r)rrr&rrrrl�szEqualsFamily.c_get_examplesN)r0r2r3rrNrlrrrrr��sr�c@s$eZdZdd�Zdd�Zdd�ZdS)�
ExampleFamilycGs|�|||f�S)N)r)rr��examplesrrrr�szExampleFamily.__call__cCs|j\}}|�||�S)N)rr")rrrr&r�r�rrrrN�s
zExampleFamily.c_test_containscCs|j\}}|S)N)r)rrr&r�r�rrrrl�s
zExampleFamily.c_get_examplesN)r0r2r3rrNrlrrrrr��sr�c@seZdZdd�Zdd�ZdS)�SynonymsFamilycGs|�||�S)N)r)r�namesrrrr�szSynonymsFamily.__call__cCsr|j}|jj��}x"|D]}|�||�}|�|�qWt|�sL|�d|�t|�dkrn|�dt|�|f�dS)NzSynonyms: no such names: %rrz*Synonyms: %d different nodes for names: %rT)rrrJr r	r$r-ro)rrrr&r��msrLrrrrrN�s
zSynonymsFamily.c_test_containsN)r0r2r3rrNrrrrr��sr�c@s$eZdZdd�Zdd�Zdd�ZdS)�InstanceFamilycCs,t||j�s(|�d|j�|�|jf�dS)Nz+InstanceFamily: %s is not an instance of %sT)rrrorr�)rrrr&rrrrN�szInstanceFamily.c_test_containscCs|�|j�|j��S)N)rcrrXr)rrr&rrrrl�szInstanceFamily.c_get_examplescs|jj�fdd�|jD��S)Ncsg|]}t|�j�r|�qSr)rr)rr()rrrr�sz*InstanceFamily._and_ID.<locals>.<listcomp>)rr%r!)rrrr)rrr)�szInstanceFamily._and_IDN)r0r2r3rNrlr)rrrrr��sr�c@seZdZdd�Zdd�ZdS)�ExpressionPredicateFamilycCsd}|�||||f�S)N)r)rr��
expressionrZrrrr�sz"ExpressionPredicateFamily.__call__c
Csh|j\}}}tdd�|�|f�}i}x |D]}|�||�}	|	||<q,W|f|�}	|	sd|�d|�dS)Nzlambda %s:%srzFalse expression: %sT)rr�r
r	ro)
rrrr&r�r�rZr�rLrrrrrN�s

z)ExpressionPredicateFamily.c_test_containsN)r0r2r3rrNrrrrr��sr�c@seZdZdd�Zdd�ZdS)�ExpressionSetFamilycGsd}|�||||f�S)N)r)rr�r�rZrrrr�szExpressionSetFamily.__call__c
	Cs�|j\}}}|j�dd�dt|��|f�}d|ji}x |D]}|�||�}	|	||<q>W|f|�}	|�|	|d|d�|�f�S)Nzlambda %s:(%s)r)�LEr�zexpset(%s, %s))rrr�r
rr�r	r")
rrrr&r�r�rZr�rLrrrrrN�s


z#ExpressionSetFamily.c_test_containsN)r0r2r3rrNrrrrr��sr�c@s$eZdZdd�Zdd�Zdd�ZdS)�
MatchesFamilycOs"tj|f|�|�|jjj|_dS)N)rrrr6�sre)rrrVrrrr�szMatchesFamily.__init__cCs|�|j�|�|f�S)N)rYr��compile)rZregexprrrr�szMatchesFamily.__call__cCs*|j}|j�||�}|dkr&|�d�SdS)Nz
Did not matchT)rr��matchro)rrrr&Z	regexpobjrBrrrrN�s

zMatchesFamily.c_test_containsN)r0r2r3rrrNrrrrr��sr�c@s&eZdZdd�Zd	dd�Zdd�ZdS)
�RecurSelfFamilycOs.tj|f|�|�Gdd�d|j�}||_dS)Nc@seZdZdZdS)z+RecurSelfFamily.__init__.<locals>.RecurSpec)rZ�recursion_level�recursion_limitN)r0r2r3�	__slots__rrrr�	RecurSpec�sr�)rrrr�)rrrVr�rrrr�szRecurSelfFamily.__init__�
cCs|�||�}||_d|_|S)NrO)r�r�r�)r�exprr��srrrrszRecurSelfFamily.__call__c	Cs�y
|j}Wn.tk
r8|j}|�d|�}|_YnX||jj�}y|�||d�}|s^t�Wnbtk
r�||�}|j	}z6||j
kr�|�d|j
�S|d|_	|�||d�}Wd||_	XYnX|S)Nzlambda self:%szrecur with Nothing, ok to failzrecurself: recursion_level = %srZrecur)rZr
rr�rr�r"r*r#r�r�ro)	rrrr&rZr�r�r|ZrlrrrrN
s(


zRecurSelfFamily.c_test_containsN)r�)r0r2r3rrrNrrrrr��s
r�c@seZdZdS)�DummyN)r0r2r3rrrrr�#sr�c@seZdZdd�Zdd�ZdS)�TupleformFamilycCs|�||f�S)N)rK)r�formr�rrrr(szTupleformFamily.__call__c
Cst|j\}}t|�}t|�t|�kr<|�dt|�t|�f�St�}x"t||�D]\}}	t|||	�qNW|�||d�S)Nz+tupleform: wrong length: got %d expected %dZ	tupleform)rrr-ror�rp�setattrr")
rrrr&r�r�Zbt�obrL�valrrrrN+s
zTupleformFamily.c_test_containsN)r0r2r3rrNrrrrr�'sr�c@s$eZdZdd�Zdd�Zdd�ZdS)r{cCs||_||_||_dS)N)�category�source�target)rr�r�r�rrrr;szArrow.__init__cCs|j�|�}|j�||�S)N)r��validate�compose)r�otherrrr�of@szArrow.ofcCs|j�|�}|j�||�S)N)r�r�r�)rr�rrr�toFszArrow.toN)r0r2r3rr�r�rrrrr{:sr{c@seZdZdd�Zdd�ZdS)�
IdentityArrowcCst�||||�dS)N)r{r)rr��objectrrrrNszIdentityArrow.__init__cCs|S)Nr)rrrrrrQszIdentityArrow.__call__N)r0r2r3rrrrrrr�Msr�c@seZdZdd�ZdS)�
FunctionArrowcCst�||||�||_dS)N)r{rr)rr�r�r��functionrrrrVszFunctionArrow.__init__N)r0r2r3rrrrrr�Usr�c@s4eZdZdZdZdd�Zdd�Zdd�Zdd	�ZdS)
�RepresentationCategoryNcCs |�t�}|�||�||_dS)N)�family�RepresentationObjectFamily�init2�_fam)rr�specrrrrr_s
zRepresentationCategory.__init__cCs||kS)Nr)rr�rrr�__eq__dszRepresentationCategory.__eq__cCstt|��S)N)�hash�id)rrrr�__hash__gszRepresentationCategory.__hash__cCs|j�|�}||j|<|S)N)r��	getobject�__dict__)rrLr�rrr�__getattr__js
z"RepresentationCategory.__getattr__)	r0r2r3�_derive_origin_�_origin_rr�r�r�rrrrr�[sr�c@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)r�cCs`||_i|_i|_i|_|�d|j�|j}Gdd�d|�}||_Gdd�d|�}||�|_dS)N�
fromuniversalc@seZdZdZdS)z>RepresentationObjectFamily.init2.<locals>.RepresentationObject)r��fromN)r0r2r3r�rrrr�RepresentationObject{sr�c@seZdZdd�Zdd�ZdS)zDRepresentationObjectFamily.init2.<locals>.RepresentationCategorySpeccSs||_|j|_dS)N)r��cat�_cat)rrrrrr�szMRepresentationObjectFamily.init2.<locals>.RepresentationCategorySpec.__init__cSs@t|jd|�r4t|d|�|jj�}||j|<|St|��dS)Nz_get_%s)rGr/r	r�rr�r
)rrLr�rrrr��s

zPRepresentationObjectFamily.init2.<locals>.RepresentationCategorySpec.__getattr__N)r0r2r3rr�rrrr�RepresentationCategorySpec�sr�)r��objects�specs�arrowsrUr�rr�)rr�r�rr�r�rrrr�qsz RepresentationObjectFamily.init2cCs$||f}||jkr|j|St�dS)N)r��	SpecError)rr�ZcodZdcrrr�getarrow�s

z#RepresentationObjectFamily.getarrowcCsb||jkr|j|S|�|�}||jkrB|j||j|<|j|S||�}||j|<|j|<|S)NzNo such object: %r)r��	normonamer�)rrLZnormname�orrrr��s




z$RepresentationObjectFamily.getobjectcCs\|j}||jkr|j|St|jd|d�}|dk	rL||j�}||j|<|Std|��dS)Nz_get_spec_%szgetspec: No spec of %r)rr�r	r�rr�)r�objrLZgs�sprrr�getspec�s



z"RepresentationObjectFamily.getspecc
s|j}d|}|�jkr"�j|Si�t�j|��|<xzt�j�D]l}|�d�rBd|ksZqB|�d�\}}|dd�}||krBt�j|��t	�jt�j|�|��fdd���|<qBW��fdd�}d	|}�j
�|d
|�}	|	�j|<�|�}
Gdd�dt
�}|�j|
|��}|�j|<|S)
Nz%s.fromuniversalZmap_Z_to_�cs��j|�S)N)r)r)r?rrrrT�rDz:RepresentationObjectFamily.fromuniversal.<locals>.<lambda>csry|\}}Wntk
r&|�d�SXt|dd�}|�k	rF|�d�St|dd�}|�krd|�d�S|�||d�S)NzNot a sequence with length 2rz#Tag is not an object of this familyrz%Object is not a source of this targetz&Value is not an element of this object)r#ror	r")r&�e�O�ArZname_)�Srrr�p�s

z3RepresentationObjectFamily.fromuniversal.<locals>.pz%s.universalzSpecification-set for %rc@s$eZdZdd�Zdd�Zdd�ZdS)z:RepresentationObjectFamily.fromuniversal.<locals>.AlphaSumcSst�||||�||_dS)N)r{r�_S)rr�r�r�r�rrrr�szCRepresentationObjectFamily.fromuniversal.<locals>.AlphaSum.__init__cSs|j|jj�|�S)N)r�r�rr�)rrrrr�__getitem__�szFRepresentationObjectFamily.fromuniversal.<locals>.AlphaSum.__getitem__cSs|\}}||j|�S)N)r)rZxxx_todo_changemer��Errrr�szCRepresentationObjectFamily.fromuniversal.<locals>.AlphaSum.__call__N)r0r2r3rr�rrrrr�AlphaSum�sr�)rr�r�r��dirr��
startswith�splitr	r�r�	predicater�r{)
rr�rLZ	arrownameZanr�rrr�Zuniname�Pr�r�ryr)r�r?rrr��s0






z(RepresentationObjectFamily.fromuniversalcCsjt|jdd�}|dk	rfxN|jjD]B}d}x8|D]0}|��r>|}||kr.|dk	rR|Std|��q.Wq W|S)N�_isos_z*No numeric object name corresponding to %r)r	r�r��isdigitr�)r�onZisosrm�nn�nrrrr��s
z$RepresentationObjectFamily.normonamecCs&|�|�}Gdd�d�}||�|_|S)Nc@s(eZdZdZdd�Zdd�Zdd�ZdS)	z/RepresentationObjectFamily.__call__.<locals>.To)r�cSs
||_dS)N)r�)rr�rrrrsz8RepresentationObjectFamily.__call__.<locals>.To.__init__cSs|jj�|j|�S)N)r�rr�)rr�rrrrsz8RepresentationObjectFamily.__call__.<locals>.To.__call__cSs"|j}|j}|�|�}|�||�S)N)r�rr�r�)rrLr�rr�rrrr�s
z;RepresentationObjectFamily.__call__.<locals>.To.__getattr__N)r0r2r3r�rrr�rrrr�Tosr)rtr�)rrLr�rrrrrs

z#RepresentationObjectFamily.__call__cCs|�|�}|�||d�S)Nz7RepresentationObjectFamily: not in object specification)r�r")rrrr&r�rrrrNs
z*RepresentationObjectFamily.c_test_containscCs|�|�}|�|�S)N)r�rc)rrr&r�rrrrls
z)RepresentationObjectFamily.c_get_examplesN)r0r2r3r�r�r�r�r�r�rrNrlrrrrr�ps
Cr�c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�AbstractSetFamilycOs.tj|f|�|�Gdd�d|j�}||_dS)Nc@seZdZdZdd�ZdS)z/AbstractSetFamily.__init__.<locals>.AbstractSet)�_memocSs||_||_d|_i|_dS)N)rrr�r)rrrrrrr'sz8AbstractSetFamily.__init__.<locals>.AbstractSet.__init__N)r0r2r3r�rrrrr�AbstractSet$sr)rrr)rrrVrrrrr!szAbstractSetFamily.__init__cCs|�||f�}i|_|S)N)rKr)rryr�r�rrrr.szAbstractSetFamily.__call__cCsB|j|kr4|j\}}|j\}}||kr4||||@�S|j�||�S)N)rrZ
_rand_ATOM)rrrZaa�sa�abZsbrrrr3s


zAbstractSetFamily.c_andcs\||jkr|j|S|j\}�||��j����fdd�}|j�|d|�}||j|<|S)Ncs,|��|d�}|r(�|�}|��|d�}|S)Nz AbstractSet: not in arrow.sourcez AbstractSet: not in argument set)r"r�r�)r&rrrr�)�pararrowr��srcsetrrr�Cs

z'AbstractSetFamily.c_getattr2.<locals>.pzAbstract set attribute: %r)rrr�rr�)rrrryr�r�r)rr�r	r�
c_getattr2;s



zAbstractSetFamily.c_getattr2cCs8|j\}}|�|j|d�}|r4||�}|�||d�}|S)Nz AbstractSet: not in arrow.sourcez AbstractSet: not in argument set)rr"r�)rrrr&ryr�rrr�rrrrNRs
z!AbstractSetFamily.c_test_containsN)r0r2r3rrrr
rNrrrrr s

rc@seZdZdd�Zdd�ZdS)�
ElemFamilycCs
|�|�S)N)rt)rrZrrrr]szElemFamily.__call__cCs|j}||�}|�||d�S)Nr)rr")rrrr&rZr�rrrrN`szElemFamily.c_test_containsN)r0r2r3rrNrrrrr\src@seZdZdd�Zdd�ZdS)�IntersectionFamilycCs|�||f�S)N)rK)rr�r�rrrrgszIntersectionFamily.__call__cs |j\}�|�|��fdd��S)Ncs|��|��d�S)NZIntersection)r")r&r)rr�rrrTlsz4IntersectionFamily.c_test_contains.<locals>.<lambda>)rr�)rrrr&r�r)rr�rrNjs
z"IntersectionFamily.c_test_containsN)r0r2r3rrNrrrrrfsrc@seZdZdS)r�N)r0r2r3rrrrr�psr�c@seZdZdS)r*N)r0r2r3rrrrr*tsr*c@seZdZdS)�
CoverageErrorN)r0r2r3rrrrr
xsr
c@s"eZdZdZddd�Zdd�ZdS)	�LocalEnv�ADDrcCs||_||_d|_||_dS)N)�_mod�_specr��nodoc)rrr�rrrrrszLocalEnv.__init__cCsb|j}t|j|�}|j�|jjjj�|j	��}|jj
�|j	||j|j
|j�}|d�}||j|<|S)Nr)rr	r�_load_namesr6rerf�Code�co_findloadednamesr>rE�FunctionTyper0�__defaults__�__closure__r�)rZattribute_namerr?r��nfr�rrrr��s
zLocalEnv.__getattr__N)r)r0r2r3r�rr�rrrrr|s
rc@s�eZdZdZdZdZdZeZdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd1dd�Zdd�Zdd�Zdd �Zd2d"d#�Zd$d%�Zd&d'�Zd3d(d)�Zd4d*d+�Zd5d,d-�Zd6d.d/�Zd0S)7�TestEnvrFr^cCsr||_g|_i|_|dk	rn|�|_}y
|j}Wntk
rHd}YnXt||�}||_||_|�	|j
�|_dS)NrP)r�messagesr�r��LocalEnvExprr
rZ_OBJ_r�r�ZGlueTypeExpr�topspec)rr�Specr�Zlexr�rrrr�s


zTestEnv.__init__c	Cs.|j}|jj}t|tf�r4|j�d|�}||j�Sg}d}t|j�	��}|�
�x�|D]�}t||�}	y
|	j}
Wnt
k
r�wXYnX|
jd|
j�dkr�|�|jjjj�|
��}|jj�|	j||	j|	j|	j�}|d�}
|dkr�|
}n|�|�||
��qXtd��qXW|dk	�r|�|�|jj�|�}|S)Nzlambda LE:(
%s
))�INrZ_SELF_z#TestEnv.eval: invalid argument mode)rr6rErrr�r�rbr��keys�sortr	r>r
�co_varnames�co_argcountrrerfrrrr0rrr9�attrr�rJrr)rr�rrErZZlsZselfsetr�rLr?�cor�rr�r�rrrr��sB





zTestEnv.evalcCsvyt|�}Wndtk
rpy|j|}Wn8tk
rbt||jjj�rV|�|�}nt|�}YnXt|�}YnX|S)N)	�iterr_r��KeyErrorrrrJrcrb)r�
collection�itrkrrrrc�szTestEnv.get_examplescCs�d|krl|}x�|�d�D]N}yt||�}Wqtk
rd|�d|�|�|fd|�|�|f�SXqWn>yt||�}Wn.tk
r�tr��|�d|�|�|f�SX|S)N�.zgetattr: %s has no attribute %rz ,
because %s has no attribute %rzattr: %s has no attribute %r)r�r	r#rorL�DEBUG)rr�rLr�subnamerrrr	�szTestEnv.getattrcsjt|t�r���|�St|t�r^t|�dkrD|d�jjkrD|dSt��fdd�|D��Sntd��dS)Nr^rOrcsg|]}���|��qSr)rM)r�nt)r�rrrr	sz&TestEnv.gengetattr.<locals>.<listcomp>z0gengetattr: I am picky, required string or tuple)rrr	rr-r�quoter_)rr�Z
name_or_tupler)r�rrrMs

zTestEnv.gengetattrcCs|j�|�dS)N)rr9)r�messagerrr�log
szTestEnv.logcCs,t||jjj�rt|�Sd|j�|�SdS)Nz%s)rrrJrr�)rr�rrrrLszTestEnv.namecCsd|S)Nz%sr)rr(rrr�	name_collszTestEnv.name_collcCsP|�|�y|�|j|d�Wn,tk
rJ|jjj��}|�|�YnXdS)NzTop spec)	�get_obj_examplesr"rr#rr6�sys�exc_info�dump_failure)rr��tvtrrr�tests
zTestEnv.testcCsh|j�||�}xT|D]L}|dd�}|d}|j�|g�}x$|D]}|�|�|�||d�q@WqWdS)NrrOztesting example of set)r�ZGetExamplesr��
setdefaultr9r")rr�rkr��vsr��vrrrr2!s


zTestEnv.get_obj_examplesrOc
Cs�|\}}}g}|}x2|dk	rD|j}|j|jjjkr<|�|�|j}qWxL|D]D}|j}	td|	df�td|	df�td|	d�td�qLW|r�|j	j
j�|||�n�dS)Nza = %rrzb = %rrz
message = r/z-----)
�tb_frame�f_coder"rAr>r9�tb_next�f_locals�printrr6�	traceback�print_exception)
rZxxx_todo_changeme3�noraiserF�valuer@rb�tbr?�lorrrr5+s"




zTestEnv.dump_failurecCs@y|�||d�}Wn(tk
r(�Yntk
r:dSX|S)Nr�F)r"r
r#)rrrrrrrr�?szTestEnv.containscCs|�||�S)N)r")rrrr/rrrr"HszTestEnv.test_containscCsLy|�||�Wn(tk
r&�Yn"tk
r8dSX|�d|�SdS)NTztest_contains_not, from: %s)r"r
r#ro)rrrr/rrr�test_contains_notKszTestEnv.test_contains_notrPcCs |js|�d|�t|��dS)NzFailed:F)�issilentr0r*)rr/rrrroUszTestEnv.failedcCs&||jjkrdStd|||f��dS)NTz0%s: no examples for collection = %s, message: %s)rr�r
)rZforwhatr(rZr/rrrrd[szTestEnv.failed_coveragecCs8|jjj��}|\}}}|js4|�d|�||��dS)NzFailed:F)rr6r3r4rGr0)rr/r4rFrCr@rrrr\as
zTestEnv.failed_exc_infoc	Cs�|�|�}d}x6|D].}|||�s:|�d|�|�|f�S|d7}qW|s�yt|�}|dkr`t�Wn$tk
r�|�d|||�YnXdS)NrOzforall: e = %s, from: %srr�T)rcrorLr-r
r#rd)rr(rZr/rkrr�rrrrr�is


zTestEnv.forallc	Cs||�|�}d}xT|D]L}xF|�|�D]8}||||�sT|�d|�|�|�|�|f�|d7}q$WqW|sx|�d|||�dS)NrOz&forall_pairs: a = %s, b = %s, from: %sr�forall_pairsT)rcrorLrd)rr(rZr/r�rrrrrrrH{s

zTestEnv.forall_pairsc	Cs�|�|�}d}xr|D]j}xd|�|�D]V}xP|�|�D]B}|||||�sn|�d|�|�|�|�|�|�|f�|d7}q4Wq$WqW|s�|�d|||�dS)NrOz.forall_triples: a = %s, b = %s, c=%s, from: %sr�forall_triplesT)rcrorLrd)	rr(rZr/r�rrr�crrrrI�s

"zTestEnv.forall_triplesc		Cs�g}xXt|�D]L\}}y||�}Wn.tk
rP|�||jjj��f�wYnX|rdSqWx*|D]"\}}td|�|j|dd�qdW|�	|�dS)NTz%forsome: exception at collection[%d]:r)rB)
rar#r9rr6r3r4r?r5ro)	rr(rZr/Zfailuresrirrr6rrr�forsome�szTestEnv.forsomeN)rO)rP)rP)rP)rP)rP)r0r2r3r�Z
iscompleterGrvr*rr�rcr	rMr0rLr1r7r2r5r�r"rFrordr\r�rHrIrKrrrrr�s45

	




rc@s�eZdZdZdZdZdZdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd}dd�Zdd�Zdd�Zd d!�Zd"d#�Zd~d$d%�Zd&d'�Zd(d)�Zdd+d,�Zd-d.�Zd�d/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Z d;d<�Z!d=d>�Z"d?d@�Z#dAdB�Z$dCdD�Z%dEdF�Z&dGdH�Z'dIdJ�Z(dKdL�Z)dMdN�Z*dOdP�Z+dQdR�Z,dSdT�Z-dUdV�Z.dWdX�Z/dYdZ�Z0d[d\�Z1d]d^�Z2d_d`�Z3dadb�Z4dcdd�Z5dedf�Z6dgdh�Z7didj�Z8dkdl�Z9dmdn�Z:dodp�Z;dqdr�Z<dsdt�Z=dudv�Z>dwdx�Z?dydz�Z@d{d|�ZAdS)��_GLUECLAMP_)�_loaded)	r��Docr�r�rXr��wrap_source_stringrr�)�_hiding_tag_)z_parent:Usez_parent.Use:isoz_parent.Use:NothingcCs|jjS)N)�_parentrJ)rrrr�_get_UniSet�rDz_GLUECLAMP_._get_UniSetcCs|jjS)N)rQrN)rrrr�_get_Doc�rDz_GLUECLAMP_._get_DoccCs|jjS)N)rQZView)rrrr�	_get_View�rDz_GLUECLAMP_._get_ViewcCs|j�|jjd�S)Nzguppy.heapy.Spec)rN�	attribute�root)rrrr�
_get__origin_�sz_GLUECLAMP_._get__origin_cCsZ|j}|dkry|�||�|j|��}Wn,|jk
rTtd���td|�YnX|S)N�setofr@zno wrap:)rN�wraprUr�ZDocError�
__import__�	print_excr?)rr�rLrNrrr�
_wrapattr_�sz_GLUECLAMP_._wrapattr_cCs
|�t�S)N)r�r)rrrr�_get_abstractset�sz_GLUECLAMP_._get_abstractsetcCs
|�t�S)N)r�rR)rrrr�_get_adaptuple�sz_GLUECLAMP_._get_adaptuplecCs|jS)N)r�)rrrr�_get_any�sz_GLUECLAMP_._get_anycCs
|�t�S)N)r�r4)rrrr�
_get_argnames�sz_GLUECLAMP_._get_argnamescCs
|�t�S)N)r�rH)rrrr�	_get_attr�sz_GLUECLAMP_._get_attrNcCs(|j}x|D]}||�||�M}qW|S)N)rIr$)rr�rFrrrrr�attrs�s
z_GLUECLAMP_.attrscCsdd�}|�|d�S)NcSs,y|rWntk
r&|�d�YnXdS)Nz#boolean: 'if x' raised an exceptionT)r#ro)r&rrrrr��sz#_GLUECLAMP_._get_boolean.<locals>.p�boolean)r�)rr�rrr�_get_boolean�sz_GLUECLAMP_._get_booleancCs|�dd�d�S)NcSst|�S)N)�callable)r&rrrrrT�rDz+_GLUECLAMP_._get_callable.<locals>.<lambda>re)r�)rrrr�
_get_callable�sz_GLUECLAMP_._get_callablecsb|jj}|jj�|jj�	dd��dd��t�fdd�t|j�D�����t�fdd�t�	j	�
��D����fdd	����	fd
d�}�fdd
��dd��dd�}dd�}dd�}t�fdd�t�	j	�
��D�����t�fdd�t|j�D���|�|j<xdD]}|�t||�<�qW|�|j
<�fdd��G���	fdd�d��
|�
��
���
fdd�}|S)NcSs|S)Nr)�noder?rrr�mapchildren_id�sz0_GLUECLAMP_._get_compile.<locals>.mapchildren_idcs$|dg�fdd�|dd�D�S)NrOcsg|]}�|��qSrr)rr)r?rrr�szI_GLUECLAMP_._get_compile.<locals>.mapchildren_default.<locals>.<listcomp>rr)rgr?r)r?r�mapchildren_default�sz5_GLUECLAMP_._get_compile.<locals>.mapchildren_defaultcsg|]}|�f�qSrr)rrC)rhrrr�sz,_GLUECLAMP_._get_compile.<locals>.<listcomp>csg|]\}}|�f�qSrr)rrCrL)rirrr�scs�|d||�S)NrOr)rgr?)�mapchildren_dispatchrr�mapchildren�sz-_GLUECLAMP_._get_compile.<locals>.mapchildrencsP����x4t�j���D]"\}}t||�rt||�j�|<qW��fdd���S)Ncs�|d|��S)NrOr)rg)�_visitr�rrrlrDz9_GLUECLAMP_._get_compile.<locals>.visitor.<locals>._visit)�copyrb�sym_name�itemsrGr	rA)�CrCrL)rj�symbol)rlr�r�visitors
z)_GLUECLAMP_._get_compile.<locals>.visitorcs,x&|dd�D]}�|d||�qWdS)NrrOr)rgrmr)�recover_source_dispatchrr�recover_source_node	sz5_GLUECLAMP_._get_compile.<locals>.recover_source_nodecSs,|r|ddkr|�d�|�|d�dS)Nr��(� r)r9)rgrmrrr�recover_source_token
s
z6_GLUECLAMP_._get_compile.<locals>.recover_source_tokencSs,|r|ddkr|�d�|�|d�dS)Nr�)r*rurvr)r9)rgrmrrr�recover_source_names
z5_GLUECLAMP_._get_compile.<locals>.recover_source_namecSs|�|d�dS)Nr)r9)rgrmrrr�recover_source_tight_leftsz;_GLUECLAMP_._get_compile.<locals>.recover_source_tight_leftcSs@|r.|ddd���s.|ddks.|�d�|�|d�dS)Nr�rurvr)�isalnumr9)rgrmrrr�recover_source_lpars$
z5_GLUECLAMP_._get_compile.<locals>.recover_source_lparcsg|]\}}|�f�qSrr)rrCrL)rtrrrscsg|]}|�f�qSrr)rrC)rwrrr"s)	�RPAR�LSQB�RSQB�COLON�COMMA�SEMI�DOT�LBRACE�RBRACEcs g}�|d||�d�|�S)NrOrP)r
)rgrm)rsrr�recover_source-sz0_GLUECLAMP_._get_compile.<locals>.recover_sourcecseZdZ���fdd�ZdS)z._GLUECLAMP_._get_compile.<locals>.wrap_lambdefc#s�t|�dkr�|dd�jkrƈ|d�}�|d|�}dddddd	d
ddd
dddddddd|ffdddddddd	d
ddd
ddddd|ffffffffffffffffdfffffffffffffS�||�S)Nr^rrOi$i%i&i'i)i*i+i,i-i.i/i0)i1)rrOi4)�rui=i>)�ri1r,z%r)�r�)r-Zlambdef)rgr?ZlsourceZlnode)rkr�rqrrr73s2z3_GLUECLAMP_._get_compile.<locals>.wrap_lambdef.testN)r0r2r3r7r)rkr�rqrr�wrap_lambdef2sr�csT|dkrt|||f|��S��|�}�j|dd�}�|��}��|�}��|�}|S)Nr�r)Z	line_info)r�r�Z	ast2tupleZ	tuple2astZ
compileast)r��filename�moder5�astrgr%)rk�parserr�rr�compile_Es



z*_GLUECLAMP_._get_compile.<locals>.compile_)r6�tokenr�rq�dictru�N_TOKENS�updaterbrnro�NAMEr	�LPAR)rr�rrrxryr{�tokr�r)rkrirjrhr�r�rsrtrwrqr�r�_get_compile�s:	


z_GLUECLAMP_._get_compilecCs
|�t�S)N)r�r])rrrr�
_get_cprodSsz_GLUECLAMP_._get_cprodcCs|jj�|�S)N)rJZbyclodo�dictof)rr�rrrr�Vsz_GLUECLAMP_.dictofcCs
|�t�S)N)r�r�)rrrr�_get_docYsz_GLUECLAMP_._get_doccCs$|j|j��}t|�}t|�|S)N)r[r�Zshortestrr?)rr�r[Zdorrr�docof\sz_GLUECLAMP_.docofrOcCsX|r
d}nd}|�|d|�}|�|jjjj�|��}|dk	rN|��}t||�t	||�S)Nr�r�rP)
r�rr6rerfrrrm�execr�)rr��initrr�r%r�rrrr�bs
z_GLUECLAMP_.evalcCs:ddi}x,tjD]"}|�d�r*|dd�}d||<qW|S)Nr6rZ_get_�)rLr�r�)rr�rrrr�_get_all_namesps
z_GLUECLAMP_._get_all_namescCst|dkr4d|jkrZx|jD]}t||�qWd|_n&|j}x|D]}||kr@t||�q@W|j}|jjd|d<|S)NrMr�__builtins__)r�Z	all_namesr	rMr�__globals__)rr�r�allrLr�rrrrxs

z_GLUECLAMP_._load_namescCs
|�t�S)N)r�r�)rrrr�_get_eg�sz_GLUECLAMP_._get_egcCs
|�t�S)N)r�r)rrrr�	_get_elem�sz_GLUECLAMP_._get_elemc	Cs�||jjkr&|�|�}||j�|�fS||jjkr�|jjdkr�|jj	�
d�r�|jj	}|�d�}|jj}|j
j}t||d��|�||d��}d�|�}||j�|�fS||j�|�fSdS)Nz<lambda>z<!SPECEVAL!>�
)r��stringr�rNZanon�TypeZFunctionr>�co_name�co_filenamer�r��co_firstlinenor6r7r?�getblockr
�getdoc)	rr�r�r��lines�lnumr7�blockr�rrrrW�s


z_GLUECLAMP_._exodoccCs
|�t�S)N)r�r�)rrrr�_get_expred�sz_GLUECLAMP_._get_expredcCsdd�}|�|d�S)NcSs8ytd|�Wn"tk
r2|�d|�YnXdS)Nzlambda : %szNot a valid expression: %rT)r�r�ro)r&rrrrr��s
z&_GLUECLAMP_._get_expression.<locals>.pr�)r�)rr�rrr�_get_expression�sz_GLUECLAMP_._get_expressioncCs
|�t�S)N)r�r�)rrrr�_get_expset�sz_GLUECLAMP_._get_expsetcCs
|�t�S)N)r�r�)rrrr�_get_equals�sz_GLUECLAMP_._get_equalscOs|jj||f|�|�S)N)rJZfam_mixin_argatom)rrr5r�rrrr��sz_GLUECLAMP_.familycCs|jjS)N)rJrP)rrrr�_get__hiding_tag_�sz_GLUECLAMP_._get__hiding_tag_cCs
|�t�S)N)r�r�)rrrr�
_get_instance�sz_GLUECLAMP_._get_instancecCs
|�t�S)N)r�r)rrrr�_get_intersection�sz_GLUECLAMP_._get_intersectioncCst||jj�S)N)rZ_Specification_r)rrrr�_get_LE�sz_GLUECLAMP_._get_LEcCs|jS)N)r�)rrrr�	_get_SPLE�sz_GLUECLAMP_._get_SPLEcCs
|�t�S)N)r�rx)rrrr�_get_mapping�sz_GLUECLAMP_._get_mappingcCs
|�t�S)N)r�r�)rrrr�_get_matches�sz_GLUECLAMP_._get_matchescCs
t||�S)N)r)rrrrr�	mkTestEnv�sz_GLUECLAMP_.mkTestEnvcCs|�dd�|�S)NcSsdS)Nrr)r�rrrrrT�rDz%_GLUECLAMP_.newtype.<locals>.<lambda>)r�)rrLrrr�newtype�sz_GLUECLAMP_.newtypecCs|jjS)N)�User�)rrrr�_get_nothing�sz_GLUECLAMP_._get_nothingcCs |�d|�|�|jj@|j@�S)N�	partition)r[�union_equalsr�ZnonemptyZset_of_disjoint_sets)rr�rrrr��sz_GLUECLAMP_.partitioncCs
|�t�S)N)r�r�)rrrr�_get_predicate�sz_GLUECLAMP_._get_predicatecCs
|�t�S)N)r�r�)rrrr�
_get_powerset�sz_GLUECLAMP_._get_powersetcCs|jjS)N)rJr)rrrr�
_get_Anything�sz_GLUECLAMP_._get_AnythingcCsgS)Nr)rrrr�
_get_quote�sz_GLUECLAMP_._get_quotecCs
|�t�S)N)r�r�)rrrr�_get_recurself�sz_GLUECLAMP_._get_recurselfcCsGdd�d�}|�|�S)Nc@sneZdZdddddgZdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Z	e
Zdd�Zdd�Z
dd�Zdd�ZdS)z/_GLUECLAMP_._get_relation.<locals>.RelationSpec)�1Zpaxb)�2�paxa)�3�defiop�fuop)�4Zdefipair)�5Z
defitriplecSs|�|�|j|j��S)N)rXrwr)rr�rrr�_get_spec_1�sz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get_spec_1cSs|�|�|j|j��S)N)rXrwr)rr�rrr�_get_spec_2�sz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get_spec_2c
Ss.|j|j|jf>|�ddddddddd	d
�
BS)Nr�z<=z==z!=r�z>=r�znot inr�zis not)rcrr�)rr�rrr�_get_spec_3sz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get_spec_3cSs|�|j|jj�S)N)rwr�r�r�)rr�rrr�_get_spec_4sz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get_spec_4cSs|�|j|jj|j�S)N)rwr�r�r�)rr�rrr�_get_spec_5	sz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get_spec_5cSs
|�t�S)N)r�r�)rr�rrr�_get__relopsz;_GLUECLAMP_._get_relation.<locals>.RelationSpec._get__relopcSs
|j|fS)N)r)rr�r�rrr�
map_3_to_4rDz:_GLUECLAMP_._get_relation.<locals>.RelationSpec.map_3_to_4cSs|�|j|�S)N)�_relopr)rr�r�rrr�
map_3_to_2rDz:_GLUECLAMP_._get_relation.<locals>.RelationSpec.map_3_to_2cSs
|j|�S)N)r�)rr�r5rrr�
map_4_to_2rDz:_GLUECLAMP_._get_relation.<locals>.RelationSpec.map_4_to_2cSs
|j|�S)N)r�)rr�r5rrr�
map_5_to_1rDz:_GLUECLAMP_._get_relation.<locals>.RelationSpec.map_5_to_1N)r0r2r3r�r�r�r�r�r�r�r�Z
map_2_to_1r�r�r�r�rrrr�RelationSpec�s r�)�repcat)rr�rrr�
_get_relation�s
"z_GLUECLAMP_._get_relationcCs|jjjjS)N)r�r�r�r�)rrrr�
_get_relopsz_GLUECLAMP_._get_relopcCs
t||�S)N)r�)rr�rrrr�sz_GLUECLAMP_.repcatcCs
|�t�S)N)r�rs)rrrr�
_get_sequencesz_GLUECLAMP_._get_sequencecCs|�|jj�S)N)�instancerJ)rrrr�_get_set sz_GLUECLAMP_._get_setcCsdd�}|�|d�S)NcSs|�|dd�d�S)NcSs||kp|�|�S)N)Zdisjoint)r&rrrrrrT%rDzB_GLUECLAMP_._get_set_of_disjoint_sets.<locals>.p.<locals>.<lambda>za == b or a.disjoint(b))rH)r&rrrrr�$sz0_GLUECLAMP_._get_set_of_disjoint_sets.<locals>.pzset of disjoint sets)r�)rr�rrr�_get_set_of_disjoint_sets#sz%_GLUECLAMP_._get_set_of_disjoint_setsc	CsBt||jj�s>|j�|�}|j�||j�|j�|jd�|��}|S)NrX)rrJr�rNrYZcallfuncrUr�)rrrrrrX)sz_GLUECLAMP_.setcastcCs|jS)N)r�)rrrr�
_get_setof1sz_GLUECLAMP_._get_setofcCs
|�d�S)N)r�)rrrr�_get__static_test_env4sz!_GLUECLAMP_._get__static_test_envcCs
|�t�S)N)r�r�)rrrr�
_get_synonyms7sz_GLUECLAMP_._get_synonymscCs
|�t�S)N)r�r�)rrrr�_get_tupleform:sz_GLUECLAMP_._get_tupleformcCs|jjS)N)r�r�)rrrr�	_get_Type=sz_GLUECLAMP_._get_TypecCs |�|�d|�|��|�|��S)Nr�)Zegr$r�r�)rr�rrrr�@sz_GLUECLAMP_.union_equalscCs|j�|�|_|S)N)rNr�r�)rrZrrrrrODsz_GLUECLAMP_.wrap_source_string)N)N)NrO)N)Br0r2r3Z	_chgable_Z_nowrap_Z	_preload_Z	_imports_rRrSrTrWr\r]r^r_r`rarbrdrfr�r�r�r�r�r�r�rr�r�rWr�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�rXr�r�r�r�r�r�rOrrrrrL�s~

g


	.rLN)'�__doc__r+rrr4rHrRr]rsrxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r{r�r�r�r�rrrr#r�r*r
rrrLrrrr�<module>sP	,-*J7(1<