Gradual Type Theory
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Gradual Typing with Inference Jeremy Siek University of Colorado at Boulder
Gradual Typing with Inference Jeremy Siek University of Colorado at Boulder joint work with Manish Vachharajani Overview • Motivation • Background • Gradual Typing • Unification-based inference • Exploring the Solution Space • Type system (specification) • Inference algorithm (implementation) Why Gradual Typing? • Static and dynamic type systems have complimentary strengths. • Static typing provides full-coverage error checking, efficient execution, and machine-checked documentation. • Dynamic typing enables rapid development and fast adaption to changing requirements. • Why not have both in the same language? Java Python Goals for gradual typing Treat programs without type annotations as • dynamically typed. Programmers may incrementally add type • annotations to gradually increase static checking. Annotate all parameters and the type system • catches all type errors. 4 Goals for gradual typing Treat programs without type annotations as • dynamically typed. Programmers may incrementally add type • annotations to gradually increase static checking. Annotate all parameters and the type system • catches all type errors. dynamic static 4 Goals for gradual typing Treat programs without type annotations as • dynamically typed. Programmers may incrementally add type • annotations to gradually increase static checking. Annotate all parameters and the type system • catches all type errors. dynamic gradual static 4 The Gradual Type System • Classify dynamically typed expressions with the type ‘?’ • Allow implicit coercions to ? and from ? with any other type • Extend coercions to compound types using a new consistency relation 5 Coercions to and from ‘?’ (λa:int. (λx. x + 1) a) 1 Parameters with no type annotation are given the dynamic type ‘?’. 6 Coercions to and from ‘?’ ? (λa:int. (λx. x + 1) a) 1 Parameters with no type annotation are given the dynamic type ‘?’. -
Principal Type Schemes for Gradual Programs with Updates and Corrections Since Publication (Latest: May 16, 2017)
Principal Type Schemes for Gradual Programs With updates and corrections since publication (Latest: May 16, 2017) Ronald Garcia ∗ Matteo Cimini y Software Practices Lab Indiana University Department of Computer Science [email protected] University of British Columbia [email protected] Abstract to Siek and Taha (2006) has been used to integrate dynamic checks Gradual typing is a discipline for integrating dynamic checking into into a variety of type structures, including object-oriented (Siek a static type system. Since its introduction in functional languages, and Taha 2007), substructural (Wolff et al. 2011), and ownership it has been adapted to a variety of type systems, including object- types (Sergey and Clarke 2012). The key technical pillars of grad- oriented, security, and substructural. This work studies its applica- ual typing are the unknown type, ?, the consistency relation among tion to implicitly typed languages based on type inference. Siek gradual types, and support for the entire spectrum between purely and Vachharajani designed a gradual type inference system and dynamic and purely static checking. A gradual type checker rejects algorithm that infers gradual types but still rejects ill-typed static type inconsistencies in programs, accepts statically safe code, and programs. However, the type system requires local reasoning about instruments code that could plausibly be safe with runtime checks. type substitutions, an imperative inference algorithm, and a subtle This paper applies the gradual typing approach to implicitly correctness statement. typed languages, like Standard ML, OCaml, and Haskell, where This paper introduces a new approach to gradual type inference, a type inference (a.k.a. type reconstruction) procedure is integral to type checking. -
(1) Western Culture Has Roots in Ancient and ___
5 16. (50) If a 14th-century composer wrote a mass. what would be the names of the movement? TQ: Why? Chapter 3 Kyrie, Gloria, Credo, Sanctus, Agnus Dei. The text remains Roman Liturgy and Chant the same for each day throughout the year. 1. (47) Define church calendar. 17. (51) What is the collective title of the eight church Cycle of events, saints for the entire year services different than the Mass? Offices [Hours or Canonical Hours or Divine Offices] 2. TQ: What is the beginning of the church year? Advent (four Sundays before Christmas) 18. Name them in order and their approximate time. (See [Lent begins on Ash Wednesday, 46 days before Easter] Figure 3.3) Matins, before sunrise; Lauds, sunrise; Prime, 6 am; Terce, 9 3. Most important in the Roman church is the ______. am; Sext, noon; Nones, 3 pm; Vespers, sunset; Mass Compline, after Vespers 4. TQ: What does Roman church mean? 19. TQ: What do you suppose the function of an antiphon is? Catholic Church To frame the psalm 5. How often is it performed? 20. What is the proper term for a biblical reading? What is a Daily responsory? Lesson; musical response to a Biblical reading 6. (48) Music in Context. When would a Gloria be omitted? Advent, Lent, [Requiem] 21. What is a canticle? Poetic passage from Bible other than the Psalms 7. Latin is the language of the Church. The Kyrie is _____. Greek 22. How long does it take to cycle through the 150 Psalms in the Offices? 8. When would a Tract be performed? Less than a week Lent 23. -
Introitus: the Entrance Chant of the Mass in the Roman Rite
Introitus: The Entrance Chant of the mass in the Roman Rite The Introit (introitus in Latin) is the proper chant which begins the Roman rite Mass. There is a unique introit with its own proper text for each Sunday and feast day of the Roman liturgy. The introit is essentially an antiphon or refrain sung by a choir, with psalm verses sung by one or more cantors or by the entire choir. Like all Gregorian chant, the introit is in Latin, sung in unison, and with texts from the Bible, predominantly from the Psalter. The introits are found in the chant book with all the Mass propers, the Graduale Romanum, which was published in 1974 for the liturgy as reformed by the Second Vatican Council. (Nearly all the introit chants are in the same place as before the reform.) Some other chant genres (e.g. the gradual) are formulaic, but the introits are not. Rather, each introit antiphon is a very unique composition with its own character. Tradition has claimed that Pope St. Gregory the Great (d.604) ordered and arranged all the chant propers, and Gregorian chant takes its very name from the great pope. But it seems likely that the proper antiphons including the introit were selected and set a bit later in the seventh century under one of Gregory’s successors. They were sung for papal liturgies by the pope’s choir, which consisted of deacons and choirboys. The melodies then spread from Rome northward throughout Europe by musical missionaries who knew all the melodies for the entire church year by heart. -
A Comparison of the Two Forms of the Roman Rite
A Comparison of the Two Forms of the Roman Rite Mass Structures Orientation Language The purpose of this presentation is to prepare you for what will very likely be your first Traditional Latin Mass (TLM). This is officially named “The Extraordinary Form of the Roman Rite.” We will try to do that by comparing it to what you already know - the Novus Ordo Missae (NOM). This is officially named “The Ordinary Form of the Roman Rite.” In “Mass Structures” we will look at differences in form. While the TLM really has only one structure, the NOM has many options. As we shall see, it has so many in fact, that it is virtually impossible for the person in the pew to determine whether the priest actually performs one of the many variations according to the rubrics (rules) for celebrating the NOM. Then, we will briefly examine the two most obvious differences in the performance of the Mass - the orientation of the priest (and people) and the language used. The orientation of the priest in the TLM is towards the altar. In this position, he is facing the same direction as the people, liturgical “east” and, in a traditional church, they are both looking at the tabernacle and/or crucifix in the center of the altar. The language of the TLM is, of course, Latin. It has been Latin since before the year 400. The NOM was written in Latin but is usually performed in the language of the immediate location - the vernacular. [email protected] 1 Mass Structure: Novus Ordo Missae Eucharistic Prayer Baptism I: A,B,C,D Renewal Eucharistic Prayer II: A,B,C,D Liturgy of Greeting: Penitential Concluding Dismissal: the Word: A,B,C Rite: A,B,C Eucharistic Prayer Rite: A,B,C A,B,C Year 1,2,3 III: A,B,C,D Eucharistic Prayer IV: A,B,C,D 3 x 4 x 3 x 16 x 3 x 3 = 5184 variations (not counting omissions) Or ~ 100 Years of Sundays This is the Mass that most of you attend. -
PARTS of the TRIDENTINE MASS INTRODUCTORY RITES Priest And
PARTS OF THE TRIDENTINE MASS INTRODUCTORY RITES PRAYERS AT THE FOOT OF THE ALTAR Priest and ministers pray that God forgive his, and the people=s sins. KYRIE All ask the Lord to have mercy. GLORIA All praise the Glory of God. COLLECT Priest=s prayer about the theme of Today=s Mass. MASS OF CATECHUMENS EPISTLE New Testament reading by one of the Ministers. GRADUAL All praise God=s Word. GOSPEL Priest reads from one of the 4 Gospels SERMON The Priest now tells the people, in their language, what the Church wants them to understand from today=s readings, or explains a particular Church teaching/rule. CREED All profess their faith in the Trinity, the Catholic Church, baptism and resurrection of the dead. LITURGY OF THE EUCHARIST THE OFFERTORY The bread and wine are brought to the Altar and prepared for consecration. THE RITE OF CONSECRATION The Preface Today=s solemn intro to the Canon, followed by the Sanctus. The Canon The fixed prayers/actions for the consecration of the bread/wine. Before the Consecration The Church, gathered around the pope and in union with the saints, presents the offerings to God and prays that they are accepted to become the Body/Blood of Christ. The Consecration ΑThis is not a prayer: it is the recital of what took place at the Last Supper: the priest does again what the Lord did, speaks the Lord=s own words.≅ After the Consecration The Church offers Christ=s own sacrifice anew to God, to bring the Church together in peace, save those in Purgatory and Αus sinners≅ , so that Christ may give honor to the Father. -
Gradual Typing for a More Pure Javascript
! Gradual Typing for a More Pure JavaScript Bachelor’s Thesis in Computer Science and Engineering JAKOB ERLANDSSON ERIK NYGREN OSKAR VIGREN ANTON WESTBERG Department of Computer Science and Engineering CHALMERS TEKNISKA HÖGSKOLA GÖTEBORGS UNIVERSITET Göteborg, Sverige 2019 Abstract Dynamically typed languages have surged in popularity in recent years, owing to their flexibility and ease of use. However, for projects of a certain size dynamic typing can cause problems of maintainability as refactoring becomes increas- ingly difficult. One proposed solution is the use of gradual type systems, where static type annotations are optional. This results in providing the best of both worlds. The purpose of this project is to create a gradual type system on top of JavaScript. Another goal is to explore the possibility of making guarantees about function purity and immutability using the type system. The types and their relations are defined and a basic type checker is implemented to confirm the ideas. Extending type systems to be aware of side effects makes it easier to write safer software. It is concluded that all of this is possible and reasonable to do in JavaScript. Sammanfattning Dynamiskt typade programmeringsspråk har ökat kraftigt i popularitet de se- naste åren tack vare deras flexibilitet och användbarhet. För projekt av en viss storlek kan dock dynamisk typning skapa underhållsproblem då omstrukture- ring av kod blir allt svårare. En föreslagen lösning är användande av så kallad gradvis typning där statiskt typad annotering är frivillig, vilket i teorin fångar det bästa av två världar. Syftet med det här projektet är att skapa ett gradvist typsystem ovanpå Javascript. -
Reconciling Noninterference and Gradual Typing
Reconciling noninterference and gradual typing Arthur Azevedo de Amorim Matt Fredrikson Limin Jia Carnegie Mellon University Carnegie Mellon University Carnegie Mellon University Abstract let f x = One of the standard correctness criteria for gradual typing is let b (* : Bool<S> *) = true in the dynamic gradual guarantee, which ensures that loosening let y = ref b in type annotations in a program does not affect its behavior in let z = ref b in arbitrary ways. Though natural, prior work has pointed out if x then y := false else (); that the guarantee does not hold of any gradual type system if !y then z := false else (); !z for information-flow control. Toro et al.’s GSLRef language, for example, had to abandon it to validate noninterference. We show that we can solve this conflict by avoiding a fea- f (<S>true) ture of prior proposals: type-guided classification, or the use of type ascription to classify data. Gradual languages require Figure 1. Prototypical failure of the DGG due to NSU checks. run-time secrecy labels to enforce security dynamically; if The program throws an error when run, but successfully type ascription merely checks these labels without modifying terminates if we uncomment the type annotation Bool<S>. them (that is, without classifying data), it cannot violate the dynamic gradual guarantee. We demonstrate this idea with GLIO, a gradual type system based on the LIO library that Sadly, the guarantee does not hold in any existing gradual enforces both the gradual guarantee and noninterference, language for information-flow control (IFC) [33]. featuring higher-order functions, general references, coarse- The goal of this paper is to remedy the situation for IFC lan- grained information-flow control, security subtyping and guages without giving up on noninterference. -
Assisting at the Parish Eucharist
The Parish of Handsworth: The Church of St Mary: Assisting at the Parish Eucharist 1st Lesson Sunday 6th June Celebrant: The Rector Gen 3:8-15 N Gogna Entrance Hymn: Let us build a house (all are welcome) Reader: 2nd Lesson 2 Cor 4: 1st After Trinity Liturgical Deacon: A Treasure D Arnold Gradual Hymn: Jesus, where’er thy people meet Reader: 13-5:1 Preacher: The Rector Intercessor: S Taylor Offertory Hymn: There’s a wideness in God’s mercy Colour: Green MC (Server): G Walters Offertory Procession: N/A Communion Hymn: Amazing grace Thurifer: N/A N/A Final Hymn: He who would valiant be Mass Setting: Acolytes: N/A Chalice: N/A St Thomas (Thorne) Sidespersons: 8.00am D Burns 11.00am R & C Paton-Devine Live-Stream: A Lubin & C Perry 1st Lesson Ezek 17: Sunday 13th June Celebrant: The Rector M Bradley Entrance Hymn: The Church’s one foundation Reader: 22-end 2nd Lesson 2nd After Trinity Liturgical Deacon: P Stephen 2 Cor 5:6-17 A Cash Gradual Hymn: Sweet is the work my God and king Reader: Preacher: P Stephen Intercessor: R Cooper Offertory Hymn: God is working his purpose out Colour: Green MC (Server): G Walters Offertory Procession: N/A Communion Hymn: The king of love my shepherd is Thurifer: N/A N/A Final Hymn: The Kingdom of God is justice… Mass Setting: Acolytes: N/A Chalice: N/A St Thomas (Thorne) Sidespersons: 8.00am E Simkin 11.00am L Colwill & R Hollins Live-Stream: W & N Senteza Churchwarden: Keith Hemmings & Doreen Hemmings Rector: Fr Bob Stephen Organist: James Jarvis The Parish of Handsworth: The Church of St Mary: Assisting at -
Safe & Efficient Gradual Typing for Typescript
Safe & Efficient Gradual Typing for TypeScript (MSR-TR-2014-99) Aseem Rastogi ∗ Nikhil Swamy Cedric´ Fournet Gavin Bierman ∗ Panagiotis Vekris University of Maryland, College Park MSR Oracle Labs UC San Diego [email protected] fnswamy, [email protected] [email protected] [email protected] Abstract without either rejecting most programs or requiring extensive an- Current proposals for adding gradual typing to JavaScript, such notations (perhaps using a PhD-level type system). as Closure, TypeScript and Dart, forgo soundness to deal with Gradual type systems set out to fix this problem in a principled issues of scale, code reuse, and popular programming patterns. manner, and have led to popular proposals for JavaScript, notably We show how to address these issues in practice while retain- Closure, TypeScript and Dart (although the latter is strictly speak- ing soundness. We design and implement a new gradual type sys- ing not JavaScript but a variant with some features of JavaScript re- tem, prototyped for expediency as a ‘Safe’ compilation mode for moved). These proposals bring substantial benefits to the working TypeScript.1Our compiler achieves soundness by enforcing stricter programmer, usually taken for granted in typed languages, such as static checks and embedding residual runtime checks in compiled a convenient notation for documenting code; API exploration; code code. It emits plain JavaScript that runs on stock virtual machines. completion; refactoring; and diagnostics of basic type errors. Inter- Our main theorem is a simulation that ensures that the checks in- estingly, to be usable at scale, all these proposals are intentionally troduced by Safe TypeScript (1) catch any dynamic type error, and unsound: typeful programs may be easier to write and maintain, but (2) do not alter the semantics of type-safe TypeScript code. -
Traditional Latin Mass (TLM), Otherwise Known As the Extraordinary Form, Can Seem Confusing, Uncomfortable, and Even Off-Putting to Some
For many who have grown up in the years following the liturgical changes that followed the Second Vatican Council, the Traditional Latin Mass (TLM), otherwise known as the Extraordinary Form, can seem confusing, uncomfortable, and even off-putting to some. What I hope to do in a series of short columns in the bulletin is to explain the mass, step by step, so that if nothing else, our knowledge of the other half of the Roman Rite of which we are all a part, will increase. Also, it must be stated clearly that I, in no way, place the Extraordinary Form above the Ordinary or vice versa. Both forms of the Roman Rite are valid, beautiful celebrations of the liturgy and as such deserve the support and understanding of all who practice the Roman Rite of the Catholic Church. Before I begin with the actual parts of the mass, there are a few overarching details to cover. The reason the priest faces the same direction as the people when offering the mass is because he is offering the sacrifice on behalf of the congregation. He, as the shepherd, standing in persona Christi (in the person of Christ) leads the congregation towards God and towards heaven. Also, it’s important to note that a vast majority of what is said by the priest is directed towards God, not towards us. When the priest does address us, he turns around to face us. Another thing to point out is that the responses are always done by the server. If there is no server, the priest will say the responses himself. -
Gradual (Franciscan Use) in Latin with Some Portuguese, Illuminated Manuscript on Parchment Portugal, C
Gradual (Franciscan Use) In Latin with some Portuguese, illuminated manuscript on parchment Portugal, c. 1575-1600 209 pages, on parchment, preceded by a paper flyleaf, missing a leaf at the end and perhaps another in the core of the manuscript, mostly in quires of 8 (collation: i4, ii8, iii8, iv8, v8, vi8, vii7 (missing 8; likely a cancelled blank as text and liturgical sequence seems uninterrupted [see pp.102-103]), viii8, ix8, x4, xi8, xii8, xiii8, xiv7 (missing 7, with 8 a blank leaf)), written in a rounded gothic liturgical bookhand on up to 16 lines per page in brown to darker brown ink, ruled in plummet (justification 430 x 285 mm), no catchwords, a few quire signatures, rubrics in bright red, pitches marked in red over words, some corrections and contemporary annotations in the margin; later annotations in the margins (in Portuguese), elaborate calligraphic pen flourishing swirling in the margins in purple, dark blue and red ink, larger cadels in black ink with elaborate calligraphic penwork (e.g. ff. 197-198), a number of initials traced in blue or red (2- to 5-lines high) enhanced with calligraphic penwork and sometimes with floral motifs, fruits, faces, putti or satyrs (e.g. pp. 82-83; p. 151), a few initials pasted in on small paper strips (cadels on decorated grounds, see f. 171), numerous decorated initials in colors (and some liquid gold) and acanthus leaves of varying size (1-line high, larger 3- line high) (e.g. ff. 9-10 et passim), 13 historiated initials with elaborate calligraphic penwork, often with a variety of birds, putti, insects, bestiary, fruit etc., large illuminated bracket border of strewn illusionistic flowers on a yellow ground (inspired from the Flemish illusionistic borders) with a purple decorated initial with similar illusionistic floral motifs (f.