archive-fr.com » FR » N » NICOLASPOUILLARD.FR

Total: 307

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • as List open import Data Sum open import Data Maybe NP open import Data Product Extras open import NomPa Implem using nomPa open import NomPa Record import NomPa Encodings AlphaCaml open NomPa nomPa open NomPa Encodings AlphaCaml nomPa open ML

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Encodings.AlphaCaml.Test.html (2015-10-11)
    Open archived version from archive



  • Rebind P P α β Op Op from Binders Unbound In Rec P names in the pattern P scope recursively over any terms embedded in P itself However Rec P itself is also a pattern so names in P also scope externally over any term that binds Rec P Intuitively Rec is just a recursive version of Rebind Rec Rec P α β Op P Op α β Op module FreeVars where hum there seems to be an Agda bug behind this If I import Fv from here the Fv is still parameterized by NomPa open Cαml FreeVars public using Fv fv fv fvNeutral fvName mk Fv Fv fv fv fvBinder fvInner fvOuter fvNeutral Fv Set Fv E E List Name Fv Set Fv P P Fv fvBind P E Fv P Fv E Fv Bind P E fvBind fvP fvE bind p e with fvP p mk fvO fvI rmP fvO rmP fvI fvE e fvEmbed E Fv E Fv Embed E fvEmbed Cαml FreeVars fvOuter fvEmbed fvE embed e mk fvE e id fvRec P Fv P Fv Rec P fvRec fvP p with fvP p mk fvO fvI rmP mk rmP fvO fvI rmP fvRebind P P Fv P Fv P Fv Rebind P P fvRebind fvP fvP p p with fvP p fvP p mk fvO fvI rmP mk fvO fvI rmP mk fvO rmP fvO fvI fvI rmP rmP module Example where mutual no mutual data Exp where V Name Exp Π Bind Tele Exp Exp Bind Tele Exp Exp Exp List Exp Exp set 1 Exp data Tele where 1 Tele Rebind Binder Embed Exp Tele Tele α β Tele α β id neutral α β Op b Exp α Tele b α β Op Tele α β Op b b τ Γ binder

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Encodings.BindersUnbound.html (2015-10-11)
    Open archived version from archive


  • Common r where open Rec r using binders s α β Op s α β Op List Binder binders V binder b b binders embed binders tt binders inj p binders p binders inj p binders p binders p p binders p binders p binders rebind p p binders p binders p binders rec p binders p P α β Op El r P α β Op World World p α binders p α open FreeVars mutual fv s Fv s fv tt fv t u fv t fv u fv inj t fv t fv inj t fv t fv roll t fv t fv V x x fv bind bind p e fvO p rmP p fv e fvO s α β Op s α β Op List Name α fvO tt fvO p q fvO p fvO q fvO inj p fvO p fvO inj p fvO p fvO V fvO embed embed t fv t fvO rebind p q fvO p rmP p fvO q fvO rec p rmP p fvO p rmP s α β γ Op s α β Op List Name Op γ List Name γ rmP tt id rmP p q rmP p rmP q rmP inj p rmP p rmP inj p rmP p rmP V binder x rm x rmP embed embed id rmP rebind p q rmP p rmP q rmP rec p rmP p fv s Fv s fv p mk fvO p rmP p open import Data Nat open import Data Vec as Vec Vec U U Vec zero Vec suc n P P Vec n P module Vec E where open Rec E using Vec U Vec n P Vec n P P α β Vec zero P α β id tt infixr 4 n P

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Encodings.BindersUnbound.Generic.html (2015-10-11)
    Open archived version from archive


  • Extras module NomPa Examples LC CC nomPa NomPa Cst Set showCst Cst String where open NomPa nomPa open NomPa Derived nomPa open NomPa Traverse nomPa open NomPa Examples LC nomPa Cst showCst open FreeVars using fv module CCs Tm World Set V α Name α Tm α α b Tm b α Tm α Let α b Tm α Tm b α Tm α α Tm α Tm α Tm α α Tm ø Tm α Tm α proj α Tm α Tm α tup α List Tm α Tm α α Cst Tm α fv α Tm α List Name α substTm Subst Tm Tm where cc close α Tm α Tm α cc close α t e substTm 1 Φ t tup L map V xs where xs uniqBy fv t e Binder e 0 dummy dummy 0 Φ Name α Tm e ø Φ x proj maybe id dummy index x xs V name e module CC where cc α Tm α Tm α cc V x V x cc t u cc t cc u cc b t cc close b cc t cc Let b t u Let b cc t cc u cc n

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LC.CC.html (2015-10-11)
    Open archived version from archive


  • bottom up w t monadic βlet ø Tm ø CTm monadic βlet ø t monadic βlet ø t ap f α Tm α α Tm α Tm α ap f t f t ap f α Tm α α Tm α Tm α Tm α ap f t u f t u apGen unit bind CTm CTm apGen unit bind mf mx bind V mf f bind V mx x unit V f V x where mf 0 mx 1 f 2 x 3 Cont R A A R R module ContTm where unit CTm unit x k V k V x where x 0 k 1 bind CTm bind mx f k V mx x V f V x V k where mx 0 f 1 k 2 x 3 ap CTm ap apGen unit bind run CTm run mx V mx idTm where mx 0 module CPS where open M ContTm unit ContTm bind ContTm ap public renaming monadic β to cps β to cps monadic β ø to cps β ø monadic βlet to cps βlet monadic βlet ø to cps βlet ø module Cont where Without instance agruments unit α Supply α Tm α Tm α unit s x k V k x where x coerceTm s x k Supply seed s bind α Supply α Tm α Tm α Tm α bind s mx f k mx x f x k where mx coerceTm s mx f coerceTm suc s coerceTm s f k Supply seed s k coerceTm suc s V k x Supply seed suc s x V x ap α Supply α Tm α Tm α Tm α ap s mf mx bind s mf f bind suc s coerceTm s mx x unit suc suc s fT xT where f Supply

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LC.Monadic.html (2015-10-11)
    Open archived version from archive


  • open NomPa nomPa public open NomPa Derived nomPa public open NomPa Examples LC nomPa λ public open NomPa Examples LC Equiv nomPa public open NomPa Examples LC Monadic nomPa public open ContTm public open CPS public x 0 x x x α Tm x α x V x f 0 f f f α Tm f α f V f cps id CTm cps id cps idTm cpsβ id CTm cpsβ id cps β ø idTm t CTm t Let f idTm f f cps t Tm ø cps t cps t cpsβ t Tm ø cpsβ t cps β ø t cps t ref Tm ø cps t ref bind unit x unit x f ap unit f unit f cpsβlet t Tm ø cpsβlet t cps βlet ø t open Cont renaming bind to bind unit to unit ap to ap cpsβ t ref Tm ø cpsβ t ref bind 0 unit 0 x unit 1 x f ap 1 unit 1 f unit 1 f where 0 0 1 1 β cpst ref Tm ø β cpst ref β reduce bottom upø cps t ref βlet cps t ref Tm ø βlet cps t ref βlet reduce

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LC.Monadic.Tests.html (2015-10-11)
    Open archived version from archive


  • subtract to subtractPreTm close to closePreTm open SubstGen PreTm V shiftPreTm TraversePreTm id app public renaming substVarG to substVarPreTm subst to substPreTm module FreeVarsPreTm where fa α PreTm α List Atom fa V fa V x x fa fct arg fa fct fa arg fa t fa t fa Let t u fa t fa u closeTm Atom Tm AbsTm closeTm a t 0 shiftPreTm 1 1 t where α Name α PreTm α PreTm α y V x if x a then V y else V x y V x V x y t u y t y u y t suc y t y Let t u Let y t suc y u openSubstTm Tm AbsTm Tm openSubstTm t substPreTm exportWith t Name elim ø 1 ø STARTING FROM HERE THIS IS THE EXACT SAME CODE AS WITH NomPa Examples LocallyNamed openTm Atom AbsTm Tm openTm openSubstTm V mapAbsTm Atom Tm Tm AbsTm AbsTm mapAbsTm s f closeTm s f openTm s app Tm List Tm Tm app foldl Atom Tm Tm x t closeTm x t let Atom Tm Tm Tm let x t u Let t closeTm x u id Tm id x V x where x 0 false Tm false x x V x where x 0 true Tm true x y V x where x 0 y 1 ap Tm ap x y V x V y where x 0 y 1 Ω Tm Ω let δ x V x V x V δ V δ where δ 0 x 1 module Size where size Tm size V 1 size fct arg 1 size fct size arg size abs 1 size openTm 0 abs size Let t abs 1 size t size openTm 0 abs size V x Nameø elim x fuel extended to

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LN.html (2015-10-11)
    Open archived version from archive


  • arg fa fct fa arg fa t fa t fa Let t u fa t fa u openSubstTm Tm AbsTm Tm openSubstTm v t t 0 v closeTm Atom Tm AbsTm closeTm a t closePreTm 0 ø t where closePreTm b α b α PreTm b α PreTm b 1 b α closePreTm pf V x V coerce pf x closePreTm V x if a x then V name else V x closePreTm pf t u closePreTm pf t closePreTm pf u closePreTm pf t closePreTm suc pf t closePreTm pf Let t u Let closePreTm pf t closePreTm suc pf u STARTING FROM HERE THIS IS THE EXACT SAME CODE AS WITH NomPa Examples LN openTm Atom AbsTm Tm openTm openSubstTm V mapAbsTm Atom Tm Tm AbsTm AbsTm mapAbsTm s f closeTm s f openTm s app Tm List Tm Tm app foldl Atom Tm Tm x t closeTm x t let Atom Tm Tm Tm let x t u Let t closeTm x u id Tm id x V x where x 0 false Tm false x x V x where x 0 true Tm true x y V x where x 0 y 1 ap Tm ap x y V x V y where x 0 y 1 Ω Tm Ω let δ x V x V x V δ V δ where δ 0 x 1 module Size where size Tm size V 1 size fct arg 1 size fct size arg size abs 1 size openTm 0 abs size Let t abs 1 size t size openTm 0 abs size V x Nameø elim x fuel extended to pass the termination checker size fuel Tm size suc n V 1 size suc n fct arg 1 size n fct size n arg size suc n

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LL.html (2015-10-11)
    Open archived version from archive