Ejemplo n.º 1
0
def p_entry_thm(p):
    'entry : KW_THM IDENT params COLON expr DEF expr DOT'
    p[0] = [
        sig.Symbol(p[2], term.mk_pies(p[3], p[5]), sig.Scope.PUBLIC,
                   sig.Staticity.DEFINABLE),
        sig.Rule(None, [], term.Const(p[2]), term.mk_lams(p[3], p[7]))
    ]
Ejemplo n.º 2
0
def p_entry_typed_def(p):
    'entry : priv KW_DEF IDENT params COLON expr DEF expr DOT'
    p[0] = [
        sig.Symbol(p[3], term.mk_pies(p[4], p[6]), p[1],
                   sig.Staticity.DEFINABLE),
        sig.Rule(None, [], term.Const(p[3]), term.mk_lams(p[4], p[8]))
    ]
Ejemplo n.º 3
0
def p_entry_smb_ac(p):
    'entry : priv KW_DEFAC IDENT LEFTSQU expr RIGHTSQU DOT'
    p[0] = [
        sig.Symbol(p[3], term.mk_pies([(None, p[5]), (None, p[5])], p[5]),
                   p[1], sig.Staticity.DEFINABLEAC)
    ]
Ejemplo n.º 4
0
def p_entry_smb_inj(p):
    'entry : priv KW_INJ IDENT params COLON expr DOT'
    p[0] = [
        sig.Symbol(p[3], term.mk_pies(p[4], p[6]), p[1],
                   sig.Staticity.INJECTIVE)
    ]
Ejemplo n.º 5
0
def p_entry_smb_def(p):
    'entry : priv KW_DEF IDENT params COLON expr DOT'
    p[0] = [
        sig.Symbol(p[3], term.mk_pies(p[4], p[6]), p[1],
                   sig.Staticity.DEFINABLE)
    ]
Ejemplo n.º 6
0
def p_entry_smb_decl(p):
    'entry : priv IDENT params COLON expr DOT'
    p[0] = [
        sig.Symbol(p[2], term.mk_pies(p[3], p[5]), p[1], sig.Staticity.STATIC)
    ]