From martin.stone.davis at gmail.com Wed Jan 4 21:58:07 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Wed, 4 Jan 2017 12:58:07 -0800 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY Message-ID: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> It's possible to define a kind of EQUALITY sorted in any universe we want. For example, Set?: data _?_ {a} {A : Set a} (x : A) : A ? Set? where refl : x ? x However, to be declarable as BUILTIN, the sort needs to be Set a. Why is it that way? It seems, to my naive eye, that it would be somehow simpler or more conservative to have it at the lowest level possible. What bad things would happen if it were required to be Set?? From andreas.abel at ifi.lmu.de Thu Jan 5 16:31:20 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Thu, 5 Jan 2017 16:31:20 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> Message-ID: <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> Previously, this was the official definition, but in the meantime, we came to think of it as hazardous. For instance, it has no predicative justification. On 04.01.2017 21:58, Martin Stone Davis wrote: > It's possible to define a kind of EQUALITY sorted in any universe we > want. For example, Set?: > > data _?_ {a} {A : Set a} (x : A) : A ? Set? > where refl : x ? x > > However, to be declarable as BUILTIN, the sort needs to be Set a. Why is > it that way? It seems, to my naive eye, that it would be somehow simpler > or more conservative to have it at the lowest level possible. What bad > things would happen if it were required to be Set?? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From effectfully at gmail.com Thu Jan 5 20:19:31 2017 From: effectfully at gmail.com (Roman) Date: Thu, 5 Jan 2017 22:19:31 +0300 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> Message-ID: Andreas, does it mean that the whole forcing business is hazardous? As "the lowest level equality" is just an instance of it. From andreas.abel at ifi.lmu.de Fri Jan 6 00:01:49 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 6 Jan 2017 00:01:49 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> Message-ID: On 05.01.2017 20:19, Roman wrote: > Andreas, does it mean that the whole forcing business is hazardous? As > "the lowest level equality" is just an instance of it. Can you give an example please? -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From effectfully at gmail.com Fri Jan 6 00:38:12 2017 From: effectfully at gmail.com (Roman) Date: Fri, 6 Jan 2017 02:38:12 +0300 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> Message-ID: Andreas, it wasn't previously possible to define data _?_ {a} {A : Set a} : A ? A ? Set where refl : ? x ? x ? x because this requires forcing of `x` to type check. IIRC, it wasn't possible to define data _?_ {a} {A : Set a} (x : A) : A ? Set where refl : x ? x either (or was it?). Hence I assumed that both the definitons require forcing (which is a poorly documented feature, so I don't really know). But anyway, both the definitions type check currently, so does Agda approve something hazardous that should be rejected instead? But if Agda justifies this, then how many other hazardous definitions pass the type checker as well? Or did I just misunderstand you completely? From andreas.abel at ifi.lmu.de Fri Jan 6 11:25:58 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 6 Jan 2017 11:25:58 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> Message-ID: <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> Thanks, Roman, for the example. Indeed, big parameters in small data types are believed to be consistent, but I do not know of a worked-out theoretical justification. (Maybe someone else has pointers for me?!) This is the same for some aspects of induction-recursion, or even very-dependent types. So, far, Agda gives the benefit of the doubt. Best, Andreas On 06.01.2017 00:38, Roman wrote: > Andreas, it wasn't previously possible to define > > data _?_ {a} {A : Set a} : A ? A ? Set where > refl : ? x ? x ? x > > because this requires forcing of `x` to type check. IIRC, it wasn't > possible to define > > data _?_ {a} {A : Set a} (x : A) : A ? Set where > refl : x ? x > > either (or was it?). Hence I assumed that both the definitons require > forcing (which is a poorly documented feature, so I don't really > know). > > But anyway, both the definitions type check currently, so does Agda > approve something hazardous that should be rejected instead? But if > Agda justifies this, then how many other hazardous definitions pass > the type checker as well? Or did I just misunderstand you completely? -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From andreas.abel at ifi.lmu.de Fri Jan 6 11:37:36 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 6 Jan 2017 11:37:36 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> Message-ID: I think the BUILTIN EQUALITY should be relaxed to allow your definition, and also a non-universe-polymorphic one (which some years ago was possible). Can you file an issue? Thanks, Andreas On 04.01.2017 21:58, Martin Stone Davis wrote: > It's possible to define a kind of EQUALITY sorted in any universe we > want. For example, Set?: > > data _?_ {a} {A : Set a} (x : A) : A ? Set? > where refl : x ? x > > However, to be declarable as BUILTIN, the sort needs to be Set a. Why is > it that way? It seems, to my naive eye, that it would be somehow simpler > or more conservative to have it at the lowest level possible. What bad > things would happen if it were required to be Set?? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From asai at is.ocha.ac.jp Fri Jan 6 11:55:29 2017 From: asai at is.ocha.ac.jp (Kenichi Asai) Date: Fri, 6 Jan 2017 19:55:29 +0900 Subject: [Agda] [ANNOUNCE] Agda 2.5.2 In-Reply-To: References: Message-ID: <20170106105529.GA31744@pllab.is.ocha.ac.jp> Dear all, On clean MacOS Sierra, I installed Haskell Platform Full (64bit) and then did: cabal update cabal install cabal-install cabal install Agda but it produced the following three errors: > setup: The program 'alex' version >=3.1.0 && <3.2.0 || >=3.2.1 && <3.3 is > required but it could not be found. > setup: The program 'happy' version >=1.19.4 && <2 is required but it > could not be found. > setup: The program 'cpphs' version >=1.20.2 is required but it could not > be found. Thus, I had to execute: cabal install alex cabal install happy cabal install cpphs before I could install Agda. The same thing appears to be reported in May last year. You might want to write Agda's dependency on these three packages, so that the simple "cabal install Agda" would succeed. Sincerely, -- Kenichi Asai On Thu, Dec 22, 2016 at 09:20:39AM -0500, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the release of Agda 2.5.2. > > > GHC supported versions > =============== > > Agda 2.5.2 has been tested with GHC 7.6.3, 7.8.4, 7.10.3 and 8.0.1. > > > Installation > ======= > > cabal update && cabal install Agda > > > Standard library > ========== > > The version of the standard library compatible with Agda 2.5.2 is available at > > https://github.com/agda/agda-stdlib/releases/tag/v0.13 > > (The release of the standard library 0.13 will be announced later). > > > What is new, fixed issues and incompatibilities > ============================ > > http://hackage.haskell.org/package/Agda-2.5.2/changelog > > > Enjoy Agda 2.5.2. > > -- > Andr?s, on behalf of the Agda Team > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From asr at eafit.edu.co Fri Jan 6 14:10:53 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 6 Jan 2017 08:10:53 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.2 In-Reply-To: <20170106105529.GA31744@pllab.is.ocha.ac.jp> References: <20170106105529.GA31744@pllab.is.ocha.ac.jp> Message-ID: On 6 January 2017 at 05:55, Kenichi Asai wrote: > Thus, I had to execute: > > cabal install alex > cabal install happy > cabal install cpphs > > before I could install Agda. The same thing appears to be reported in > May last year. You might want to write Agda's dependency on these three > packages, so that the simple "cabal install Agda" would succeed. The dependency in these programs is pointed out in Agda.cabal in the `build-tools` field but cabal doesn't install the programs in this field. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From Thorsten.Altenkirch at nottingham.ac.uk Fri Jan 6 14:14:25 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 6 Jan 2017 13:14:25 +0000 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> Message-ID: At least in the case of equality this can be justified by the HoTT definition of equality between types at level n to be equivalent to equivalence (i.e. there exists a function which is an equivalence) which is at the same level. Thorsten On 06/01/2017, 10:25, "Agda on behalf of Andreas Abel" wrote: >Thanks, Roman, for the example. > >Indeed, big parameters in small data types are believed to be >consistent, but I do not know of a worked-out theoretical justification. >(Maybe someone else has pointers for me?!) This is the same for some >aspects of induction-recursion, or even very-dependent types. > >So, far, Agda gives the benefit of the doubt. > >Best, >Andreas > >On 06.01.2017 00:38, Roman wrote: >> Andreas, it wasn't previously possible to define >> >> data _?_ {a} {A : Set a} : A ? A ? Set where >> refl : ? x ? x ? x >> >> because this requires forcing of `x` to type check. IIRC, it wasn't >> possible to define >> >> data _?_ {a} {A : Set a} (x : A) : A ? Set where >> refl : x ? x >> >> either (or was it?). Hence I assumed that both the definitons require >> forcing (which is a poorly documented feature, so I don't really >> know). >> >> But anyway, both the definitions type check currently, so does Agda >> approve something hazardous that should be rejected instead? But if >> Agda justifies this, then how many other hazardous definitions pass >> the type checker as well? Or did I just misunderstand you completely? > > >-- >Andreas Abel <>< Du bist der geliebte Mensch. > >Department of Computer Science and Engineering >Chalmers and Gothenburg University, Sweden > >andreas.abel at gu.se >http://www2.tcs.ifi.lmu.de/~abel/ >_______________________________________________ >Agda mailing list >Agda at lists.chalmers.se >https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From tmoldere at vub.ac.be Fri Jan 6 16:09:16 2017 From: tmoldere at vub.ac.be (Tim Molderez) Date: Fri, 6 Jan 2017 16:09:16 +0100 Subject: [Agda] 2017: Call for workshop, symposium & poster submissions Message-ID: <2e975553-7987-46fa-a8b6-fbd17c7823ef@vub.ac.be> ----------------------------------------------------------------------- 2017 : The Art, Science, and Engineering of Programming April 3-6, 2017, Brussels, Belgium http://2017.programming-conference.org ----------------------------------------------------------------------- We are excited to announce there will be 10 co-located events at the 2017 conference (and more to come!): - ELS 2017 - 10th European Lisp Symposium - Modularity 2017 Invited talks - International Symposium on Modularity - ACM Student Research Competition / 2017 Posters - LASSY 2017 - 2nd Workshop on Live Adaptation of Software SYstems - MOMO 2017 - 2nd Workshop on Modularity in Modelling - MoreVMs 2017 - 1st Workshop on Modern Language Runtimes, Ecosystems, and VMs - PASS 2017 - 1st Workshop on Programming Across the System Stack - PX 2017 - 2nd Workshop on Programming Experience - ProWeb 2017 - 1st Workshop on Programming Technology for the Future Web - Salon des Refus?s 2017 - 1st edition of the Salon des Refus?s workshop All co-located events will take place during April 3-4 2017. CFPs for each of these events are listed below. (apart from Modularity 2017, which is invitation-based) **************************************************************** ELS 2017 - 10th European Lisp Symposium Submissions: Mon 30 Jan 2017 Notifications: Mon 27 Feb 2017 http://2017.programming-conference.org/track/els-2017 **************************************************************** The purpose of the European Lisp Symposium is to provide a forum for the discussion and dissemination of all aspects of design, implementation and application of any of the Lisp and Lisp-inspired dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, Hop and so on. We encourage everyone interested in Lisp to participate. The 10th European Lisp Symposium invites high quality papers about novel research results, insights and lessons learned from practical applications and educational perspectives. We also encourage submissions about known ideas as long as they are presented in a new setting and/or in a highly elegant way. Topics include but are not limited to: * Context-, aspect-, domain-oriented and generative programming * Macro-, reflective-, meta- and/or rule-based development approaches * Language design and implementation * Language integration, inter-operation and deployment * Development methodologies, support and environments * Educational approaches and perspectives * Experience reports and case studies ******************************************************************** ACM Student Research Competition / 2017 Posters Submissions: Mon 16 Jan 2017 http://2017.programming-conference.org/track/programming-posters ******************************************************************** The ACM Student Research Competition (SRC), sponsored by Microsoft Research, offers a unique forum for ACM student members at the undergraduate and graduate levels to present their original research before a panel of judges and conference attendees. The SRC gives visibility to up-and-coming young researchers, and offers them an opportunity to discuss their research with experts in their field, get feedback, and to help sharpen communication and networking skills. ACM?s SRC program covers expenses up to $500 for all students invited to an SRC. Please see our website for requirements and further details. ****************************************************************** LASSY 2017 - 2nd Workshop on Live Adaptation of Software SYstems Submissions: Fri 3 Feb 2017 Notifications: Fri 3 Mar 2017 http://2017.programming-conference.org/track/LASSY-2017-papers ****************************************************************** When developing current-day software systems, their deployment and usage environments should be considered carefully, in order to understand the adaptations those systems might need to undergo to interact with other systems and with their environment. Moreover, due to the portability, mobility and increasingly evolutionary nature of software systems, such adaptations should be enacted even while the system is running. Developing such software systems can prove challenging, and many seemingly different techniques to address this concern have been proposed over the last couple of years. The intention of the LASSY workshop is to congregate all topics relevant to dynamic adaptation and run-time evolution of software systems, ranging from a computer science perspective covering the domains of programming languages, model-driven software development, software and service composition, context-aware databases, software variability, requirements engineering, UI adaptation and other domains, to a human perspective covering sociological or ethical implications of dynamic software systems. The workshop provides a space for discussion and collaboration between researchers working on the problem of enabling live adaptations to software systems, across the development stack. Topics of Interest: * Design and Implementation of Live Adaptive Software Systems * Context-, aspect-, feature-, role- and agent-oriented programming * Context representation and discovery * Context-aware model-driven software development * Context-aware data management * Software variability and dynamic product lines * Self-adaptive, self-explanatory systems * Inconsistency management, verification, and validation * Middleware and Runtime of Live Adaptive Software Systems * Dynamic software evolution, upgrades and configuration * Dynamic software and service composition mechanisms * Dynamic software architecture and middleware approaches * Dynamic user interface adaptation and multimodal user interfaces * Impact and Assessment of Live Adaptive Software Systems * User acceptance and usability issues * Human, sociological, ethical and legal aspects * Privacy and security aspects of dynamic adaptability * Live adaptation in smart environments (e.g. smart rooms, smart robot cells, smart factories, smart cities) * Self-adaptation and emergence in SoS and CPSoS **************************************************************** MOMO 2017 - 2nd Workshop on Modularity in Modelling Abstract submissions (optional): Sun Jan 29 2017 Paper submissions: Sun Feb 5 2017 Notifications: Wed Feb 22 2017 http://www.momo2017.ece.mcgill.ca/cfp.htm **************************************************************** Extending the time-honored practice of separation of concerns, Model-Driven Engineering (MDE) promotes the use of separate models to address the various concerns in the development of complex software-intensive systems. The main objective is to choose the right level of abstraction to modularize a concern, specify its properties and reason about the system under development depending on stakeholder and development needs. While some of these models can be defined with a single modelling language, a variety of heterogeneous models and languages are typically used in the various phases of software development. Furthermore, Domain-Specific Modelling Languages designed to address particular concerns are also increasingly used. Despite the power of abstraction of modelling, models of real-world problems and systems quickly grow to such an extent that managing the complexity by using proper modularization techniques becomes necessary. As a result, many (standard) modelling notations have been extended with aspect-oriented mechanisms and advanced composition operators to support advanced separation of concerns, to combine (possibly heterogeneous) models modularizing different concerns, to execute an application based on modularized models, and to reason over global properties of modularized models. The Second International Modularity in Modelling Workshop brings together researchers and practitioners interested in the theoretical and practical challenges resulting from applying modularity, advanced separation of concerns, and advanced composition at the modelling level. It is intended to provide a forum for presenting new ideas and discussing the impact of the use of modularization in the context of MDE at different levels of abstraction. We are interested in submissions on all topics related to modularity and modelling including but not limited to: * Modularization Support in Modelling Languages and Tools * Model Interfaces * Homogeneous Model Composition Operators * Heterogeneous Model Composition Operators * Visualization of Modularized and Composed Models * Effects of Using Modularization and Composition in Modelling * On Verification and Validation * On Reuse * On the Model-Driven Software Development Process (Requirements Engineering, Software Architecture, Software Design, Implementation) * On Maintenance * Experience Reports / Empirical Evaluations of Applying Modularization and Composition in Modelling * Feature-Oriented, Aspect-Oriented and Concern-Oriented Modelling * Modularization support and composition operators for specific modelling notations * Modelling essential characteristics of specific (crosscutting) concerns * Multi-View Modelling: avoiding inconsistencies, avoiding Redundancies * Support for Detecting and/or Resolution of Feature Interactions * Domain-Specific Modelling * Modularization for Domain-Specific Languages * Composition for Domain-Specific Languages * Domain-specific Aspect Models ****************************************************************************** MoreVMs 2017 - 1st Workshop on Modern Language Runtimes, Ecosystems, and VMs Submissions: Wed 15 Feb 2017 Notifications: Wed 1 Mar 2017 http://2017.programming-conference.org/track/MoreVMs-2017-papers ****************************************************************************** The main goal of the workshop is to bring together both researchers and practitioners and facilitate effective sharing of their respective experiences and ideas on how languages and runtimes are utilized and where they need to improve further. We welcome presentation proposals in the form of extended abstracts discussing experiences, work-in-progress, as well as future visions from the academic as well as industrial perspective. Relevant topics include, but are definitely not limited to, the following: * Extensible VM design (compiler- or interpreter-based VMs) * Reusable runtime components (e.g. interpreters, garbage collectors, intermediate representations) * Static and dynamic compiler techniques * Techniques for compilation to high-level languages such as JavaScript * Runtimes and mechanisms for interoperability between languages * Tooling support (e.g. debugging, profiling, etc.) * Programming language development environments and virtual machines * Case studies of existing language implementations, virtual machines, and runtime components (e.g. design choices, tradeoffs, etc.) * Language implementation challenges and trade-offs (e.g. performance, completeness, etc.) * Surveys and applications usage reports to understand runtime usage in the wild * Surveys on frameworks and their impact on runtime usage * New research ideas on how we want to build languages in the future ************************************************************************** PASS 2017 - 1st Workshop on Programming Across the System Stack Submissions: Mon 13 Feb 2017 Notifications: Mon 27 Feb 2017 http://2017.programming-conference.org/track/PASS-2017#Call-for-Papers ************************************************************************** The landscape of computation platforms has changed dramatically in recent years. Emerging systems - such as wearable devices, smartphones, unmanned aerial vehicles, Internet of things, cloud computing servers, heterogeneous clusters, and data centers - pose a distinct set of system-oriented challenges ranging from data throughput, energy efficiency, security, real-time guarantees, to high performance. In the meantime, code quality, such as modularity or extensibility, remains a cornerstone in modern software engineering, bringing in crucial benefits such as modular reasoning, program understanding, and collaborative software development. Current methodologies and software development technologies should be revised in order to produce software to meet system-oriented goals, while preserving high internal code quality. The role of the Software Engineer is essential, having to be aware of the implications that each design, architecture and implementation decision has on the application system ecosystem. This workshop is driven by one fundamental question: How does internal code quality interact with system-oriented goals? We welcome both positive and negative responses to this question. An example of the former would be modular reasoning systems specifically designed to promote system-oriented goals, whereas an example of the latter would be anti-patterns against system-oriented goals during software development. Areas of interest include but are not limited to: * Energy-aware software engineering (e.g. energy efficiency models, energy efficiency as a quality attribute) * Modularity support (e.g., programming language design, development tools or verification) for applications in resource-constrained or real-time systems * Emerging platforms (e.g., Internet of Things and wearable devices) * Security support (e.g., compositional information flow, compositional program analysis) * Software architecture for reusability and adaptability in systems and their interactions with applications * Empirical studies (patterns and anti-patterns) on the relationship between internal code quality and system-oriented goals * Software engineering techniques to balance the trade-off between internal code quality and efficiency * Memory bloats and long-tail performance problems across modular boundaries * Program optimization across modular boundaries * Internal code quality in systems software * Reasoning across applications, compilers, and virtual machines **************************************************************** PX 2017 - 2nd Programming Experience Workshop Submissions: Sat 4 Feb 2017 Notifications: Mon 27 Feb 2017 http://programming-experience.org/px17 **************************************************************** Imagine a software development task: some sort of requirements and specification including performance goals and perhaps a platform and programming language. A group of developers head into a vast workroom. In that room they discover they need to explore the domain and the nature of potential solutions?they need exploratory programming. The Programming Experience Workshop is about what happens in that room when one or a couple of programmers sit down in front of computers and produce code, especially when it?s exploratory programming. Do they create text that is transformed into running behavior (the old way), or do they operate on behavior directly (?liveness?); are they exploring the live domain to understand the true nature of the requirements; are they like authors creating new worlds; does visualization matter; is the experience immediate, immersive, vivid and continuous; do fluency, literacy, and learning matter; do they build tools, meta-tools; are they creating languages to express new concepts quickly and easily; and curiously, is joy relevant to the experience? Correctness, performance, standard tools, foundations, and text-as-program are important traditional research areas, but the experience of programming and how to improve and evolve it are the focus of this workshop, and in this edition we would like to focus on exploratory programming. The technical topics include: * Exploratory programming * Live programming * Authoring * Representation of active content * Visualization * Navigation * Modularity mechanisms * Immediacy * Literacy * Fluency * Learning * Tool building * Language engineering ************************************************************************* ProWeb 2017 - 1st Workshop on Programming Technology for the Future Web Submissions: Wed 15 Feb 2017 Notifications: Wed 1 Mar 2017 http://2017.programming-conference.org/track/proweb-2017-papers ************************************************************************* Full-fledged web applications have become ubiquitous on desktop and mobile devices alike. Whereas ?responsive? web applications already offered a more desktop-like experience, there is an increasing demand for ?rich? web applications (RIAs) that offer collaborative and even off-line functionality ?Google docs being the prototypical example. Long gone are the days that web servers merely had to answer incoming HTTP request with a block of static HTML. Today?s servers react to a continuous stream of events coming from JavaScript applications that have been pushed to clients. As a result, application logic and data is increasingly distributed. Traditional dichotomies such as ?client vs. server? and ?offline vs. online? are fading. The 1st International Workshop on Programming Technology for the Future Web, or ProWeb17, is a forum for researchers and practitioners to share and discuss new technology for programming these and future evolutions of the web. We welcome submissions introducing programming technology (i.e., frameworks, libraries, programming languages, program analyses and development tools) for implementing web applications and for maintaining their quality over time, as well as experience reports about the use of state-of-the-art programming technology. Relevant topics include, but are not limited to: * Quality on the new web: static and dynamic program analyses; code, design test and process metrics; development and migration tools; automated testing and test generation; contract systems, type systems, and web service API conformance checking; ? * Hosting languages on the web: new runtimes; transpilation or compilation to JavaScript, WebAssembly, asm.js, ? * Designing languages for the web: multi-tier (or tierless) programming; reactive programming; frameworks for multi-tier or reactive programming on the web; ? * Distributed data sharing, replication and consistency: cloud types, CRDTs, eventual consistency, offline storage, peer-to-peer communication, ? * Security on the web: client-side and server-side security policies; policy enforcement; proxies and membranes; vulnerability detection; dynamic patching, ? * Surveys and case studies using state-of-the-art web technology (e.g., WebAssembly, WebSocket, LocalStorage, AppCache, ServiceWorkers, Meteor, deepstream.io, Angular.js, React and React Native, Swarm.js, Caja, TypeScript, Proxies, ClojureScript, Amber Smalltalk, Scala.js, ?) * Ideas on and experience reports about: how to reconcile the need for quality with the need for agility on the web; how to master and combine the myriad of tier-specific technologies required to develop a web application, ? * Position statements on what the future of the web will look like **************************************************************** Salon des Refus?s 2017 Submissions: Wed 1 Feb 2017 Notifications: Fri 17 Feb 2017 https://refuses.github.io **************************************************************** Salon des Refus?s (?exhibition of rejects?) was an 1863 exhibition of artworks rejected from the official Paris Salon. The jury of Paris Salon required near-photographic realism and classified works according to a strict genre hierarchy. Paintings by many, later famous, modernists such as ?douard Manet were rejected and appeared in what became known as the Salon des Refus?s. This workshop aims to be the programming language research equivalent of Salon des Refus?s. We provide a venue for exploring new ideas and new ways of doing computer science. Many interesting ideas about programming might struggle to find space in the modern programming language research community, often because they are difficult to evaluate using established evaluation methods (be it proofs, measurements or controlled user studies). As a result, new ideas are often seen as ?unscientific?. This workshop provides a venue where such interesting and thought-provoking ideas can be exposed to critical evaluation. Submissions that provoke interesting discussion among the program committee members will be published together with an attributed review that presents an alternative position, develops additional context or summarizes discussion from the workshop. This means of engaging with papers not just enables explorations of novel programming ideas, but also encourages new ways of doing computer science. Topics of interest The scope of the workshop is determined more by the format of submissions than by the specific area of programming language or computer science research that we are interested in. We welcome submissions in a format that makes it possible to think about programming in a new way, including, but not limited to: * Thought experiments ? we believe that thought experiments, analogies and illustrative metaphors can provide novel insights and inspire fruitful programming language ideas. * Experimentation ? we find prejudices in favour of theory, as far back as there is institutionalized science, but programming can often be seen more as experimentation than as theorizing. We welcome interesting experiments even if there is yet no overarching theory that explains why they happened. * Paradigms ? all scientific work is rooted in a scientific paradigm that frame what questions can be asked. We encourage submissions that reflect on existing paradigms or explore alternative scientific paradigms. * Metaphors, myths and analogies ? any description of formal, mathematical, quantitative or even poetical nature still represents just an analogy. We believe that fruitful ideas can be learned from less common forms of analogies as well as from the predominant, formal and mathematical ones. * From jokes to science fiction ? a story or an artistic performance may explore ideas and spark conversations that provide crucial inspiration for development of new computer science thinking. From kahl at cas.mcmaster.ca Fri Jan 6 16:12:06 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Fri, 6 Jan 2017 10:12:06 -0500 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> Message-ID: <20170106151205.GE9747@ritchie.cas.mcmaster.ca> On Fri, Jan 06, 2017 at 01:14:25PM +0000, Thorsten Altenkirch wrote: > At least in the case of equality this can be justified by the HoTT > definition of equality between types at level n to be equivalent to > equivalence (i.e. there exists a function which is an equivalence) which > is at the same level. I am used to ``_ is an equivalence'' being a predicate on relations. (The only function that, considered as a relation, is an equivalence in that sense is the identity function.) What does ``_ is an equivalence'' mean here? Wolfram From drl at cs.cmu.edu Fri Jan 6 16:23:28 2017 From: drl at cs.cmu.edu (Dan Licata) Date: Fri, 6 Jan 2017 10:23:28 -0500 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <20170106151205.GE9747@ritchie.cas.mcmaster.ca> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> <20170106151205.GE9747@ritchie.cas.mcmaster.ca> Message-ID: <696ABC8C-7FB9-4499-97F1-20A069170332@cs.cmu.edu> To a first approximation, think of it as ?is an isomorphism?: f : A -> B is an equivalence if there is a g : B -> A with (x : B) -> f(g(x)) = x and (y : A) -> g(f(y)) = y. The full story is a little more complicated, but the difference only matters in a higher-dimensional setting. -Dan > On Jan 6, 2017, at 10:12 AM, Wolfram Kahl wrote: > > On Fri, Jan 06, 2017 at 01:14:25PM +0000, Thorsten Altenkirch wrote: >> At least in the case of equality this can be justified by the HoTT >> definition of equality between types at level n to be equivalent to >> equivalence (i.e. there exists a function which is an equivalence) which >> is at the same level. > > I am used to ``_ is an equivalence'' being a predicate on relations. > (The only function that, considered as a relation, is an equivalence > in that sense is the identity function.) > > What does ``_ is an equivalence'' mean here? > > > Wolfram > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From monnier at iro.umontreal.ca Fri Jan 6 22:29:59 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Fri, 06 Jan 2017 16:29:59 -0500 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> Message-ID: Andreas Abel writes: > I think the BUILTIN EQUALITY should be relaxed to allow your definition, and > also a non-universe-polymorphic one (which some years ago was possible). If by "your definition" you mean data _?_ {a} {A : Set a} (x : A) : A ? Set? where refl : x ? x then it seems to be incompatible with univalence, at least IIUC what https://github.com/vladimirias/Foundations/blob/master/Coq_patches/README says. Not sure what you mean by "a non-universe-polymorphic one". Thorsten Altenkirch writes: > At least in the case of equality this can be justified by the HoTT > definition of equality between types at level n to be equivalent to > equivalence (i.e. there exists a function which is an equivalence) which > is at the same level. But, IIUC this justifies an equality such as: data _?_ {a} (x : Set a) : Set a ? Set a where refl : x ? x i.e. when the equality is between *types*, but not a more general one like data _?_ {a} {A : Set a} (x : A) : A ? Set? where refl : x ? x This said, I'm really not knowledgeable about this, I'm just trying to figure out which rules are valid (and when). So I'm pointing these things out to try and get you to tell me what is right ;-) Stefan From andreas.abel at ifi.lmu.de Sat Jan 7 01:41:19 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 7 Jan 2017 01:41:19 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> Message-ID: <28c02eb7-2a12-53dd-d91b-1bb40796d7eb@ifi.lmu.de> On 06.01.2017 22:29, Stefan Monnier wrote: > Andreas Abel writes: >> I think the BUILTIN EQUALITY should be relaxed to allow your definition, and >> also a non-universe-polymorphic one (which some years ago was possible). > > If by "your definition" you mean > > data _?_ {a} {A : Set a} (x : A) : A ? Set? > where refl : x ? x > > then it seems to be incompatible with univalence, at least IIUC what > https://github.com/vladimirias/Foundations/blob/master/Coq_patches/README says. Ok, but this is independent of whether it can be a BUILTIN or not. > Not sure what you mean by "a non-universe-polymorphic one". Of type {A : Set} (x y : A) -> Set See also issue #2386: https://github.com/agda/agda/issues/2386 > Thorsten Altenkirch writes: >> At least in the case of equality this can be justified by the HoTT >> definition of equality between types at level n to be equivalent to >> equivalence (i.e. there exists a function which is an equivalence) which >> is at the same level. At the same level means "at level n"? > > But, IIUC this justifies an equality such as: > > data _?_ {a} (x : Set a) : Set a ? Set a > where refl : x ? x > > i.e. when the equality is between *types*, but not a more general one like > > data _?_ {a} {A : Set a} (x : A) : A ? Set? > where refl : x ? x > > This said, I'm really not knowledgeable about this, I'm just trying to > figure out which rules are valid (and when). So I'm pointing these > things out to try and get you to tell me what is right ;-) > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From oleg.grenrus at iki.fi Sat Jan 7 17:37:58 2017 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Sat, 7 Jan 2017 18:37:58 +0200 Subject: [Agda] [ANNOUNCE] Agda 2.5.2 In-Reply-To: References: <20170106105529.GA31744@pllab.is.ocha.ac.jp> Message-ID: <23225cce-cde3-6e88-144a-e04c456f5f57@iki.fi> FYI: https://github.com/haskell/cabal/issues/3708 > New `tool-depend` goals to complement `build-tools` > When you write |build-tools: alex|, Cabal checks that an executable of this name is installed. It is jointly the responsibility of the package manager, e.g., |cabal-install|, to arrange for an executable named |alex| to be installed. > In a recent commit (c0a4860 ) we added a special case in cabal-install to handle "well known" build-tools like alex and happy, building and installing them automatically when they are requested in |build-tools|. So the next major `cabal-install` release will fix this issue. - Oleg On 06.01.2017 15:10, Andr?s Sicard-Ram?rez wrote: > On 6 January 2017 at 05:55, Kenichi Asai wrote: >> Thus, I had to execute: >> >> cabal install alex >> cabal install happy >> cabal install cpphs >> >> before I could install Agda. The same thing appears to be reported in >> May last year. You might want to write Agda's dependency on these three >> packages, so that the simple "cabal install Agda" would succeed. > The dependency in these programs is pointed out in Agda.cabal in the > `build-tools` field but cabal doesn't install the programs in this > field. > > > -- > Andr?s > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From asr at eafit.edu.co Sat Jan 7 18:52:42 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 7 Jan 2017 12:52:42 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.2 In-Reply-To: <23225cce-cde3-6e88-144a-e04c456f5f57@iki.fi> References: <20170106105529.GA31744@pllab.is.ocha.ac.jp> <23225cce-cde3-6e88-144a-e04c456f5f57@iki.fi> Message-ID: On 7 January 2017 at 11:37, Oleg Grenrus wrote: > FYI: https://github.com/haskell/cabal/issues/3708 > >> New `tool-depend` goals to complement `build-tools` > >> When you write |build-tools: alex|, Cabal checks that an executable of > this name is installed. It is jointly the responsibility of the package > manager, e.g., |cabal-install|, to arrange for an executable > named |alex| to be installed. > >> In a recent commit (c0a4860 > ) > we added a special case in cabal-install to handle "well known" > build-tools like alex and happy, building and installing them > automatically when they are requested in |build-tools|. > > So the next major `cabal-install` release will fix this issue. Great! Thanks for sharing! -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From monnier at iro.umontreal.ca Sat Jan 7 16:36:50 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Sat, 07 Jan 2017 10:36:50 -0500 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <28c02eb7-2a12-53dd-d91b-1bb40796d7eb@ifi.lmu.de> (Andreas Abel's message of "Sat, 7 Jan 2017 01:41:19 +0100") References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <28c02eb7-2a12-53dd-d91b-1bb40796d7eb@ifi.lmu.de> Message-ID: >> Not sure what you mean by "a non-universe-polymorphic one". > Of type > {A : Set} (x y : A) -> Set > See also issue #2386: https://github.com/agda/agda/issues/2386 Isn't this just the case where you instantiate the level `a` to 0 ? What'd be the benefit of having this special case when you have the more general case already? Stefan From Thorsten.Altenkirch at nottingham.ac.uk Sun Jan 8 10:37:16 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 8 Jan 2017 09:37:16 +0000 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: <20170106151205.GE9747@ritchie.cas.mcmaster.ca> References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <8b7ad586-d384-08ca-819d-5072838d74d5@ifi.lmu.de> <1d0cbf7d-cecd-d722-0870-2a1140240b8a@ifi.lmu.de> <20170106151205.GE9747@ritchie.cas.mcmaster.ca> Message-ID: Sorry this was HoTT-speak. Dan already gave a good hint. Another possible answer is that f : A -> B is an equivalence if for any b:B there exists a unique pair of a : A and p : f a = b. As you see an equivalence is an isomorphism / bijection with an extra coherence condition about the equality. Cheers, Thorsten On 06/01/2017, 15:12, "Wolfram Kahl" wrote: >On Fri, Jan 06, 2017 at 01:14:25PM +0000, Thorsten Altenkirch wrote: >> At least in the case of equality this can be justified by the HoTT >> definition of equality between types at level n to be equivalent to >> equivalence (i.e. there exists a function which is an equivalence) which >> is at the same level. > >I am used to ``_ is an equivalence'' being a predicate on relations. >(The only function that, considered as a relation, is an equivalence > in that sense is the identity function.) > >What does ``_ is an equivalence'' mean here? > > >Wolfram This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From andreas.abel at ifi.lmu.de Sun Jan 8 15:11:51 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sun, 8 Jan 2017 15:11:51 +0100 Subject: [Agda] [newbie] universe levels and BUILTIN EQUALITY In-Reply-To: References: <0c66d970-d716-53ec-06a3-b3a4641ba67b@gmail.com> <28c02eb7-2a12-53dd-d91b-1bb40796d7eb@ifi.lmu.de> Message-ID: On 07.01.2017 16:36, Stefan Monnier wrote: >>> Not sure what you mean by "a non-universe-polymorphic one". >> Of type >> {A : Set} (x y : A) -> Set >> See also issue #2386: https://github.com/agda/agda/issues/2386 > > Isn't this just the case where you instantiate the level `a` to 0 ? > What'd be the benefit of having this special case when you have the more > general case already? The point is only a didactic one. If I write a paper with Agda that uses equality but no universes other than Set, I'd like to define propositional equality just for Sets. Anyway, BUILTIN EQUALITY just means you can use the `rewrite` keyword with it. -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From mechvel at botik.ru Sun Jan 8 20:20:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 08 Jan 2017 22:20:29 +0300 Subject: [Agda] type check performance Message-ID: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I have the following question about the type check performance. Last summer I talked to a person who is experienced in programming proofs in Coq. I asked him about the type check performance. He said that the only source of an unnatural type check cost with Coq can be not of the language/compiler/interpreter itself, but due to unlucky usage of proof _tactics_ in the user program. Of course, one can apply a proof tactic in a terrible way. With Agda, I currently use (sometimes) only one tactic, it is of the Standard library: bringing to normal form by SemiringSolver. And this cannot involve any inefficiency. So, the question is: what is this that makes Agda type check performance cost much more than Coq's ? Regards, ------ Sergei From andreas.abel at ifi.lmu.de Mon Jan 9 12:26:29 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Mon, 9 Jan 2017 12:26:29 +0100 Subject: [Agda] type check performance In-Reply-To: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: <9fbd7a03-3f98-6628-a9bc-36c4ce4e9e23@ifi.lmu.de> > what is this that makes Agda type check performance cost much more > than Coq's ? Sounds like a research question to me. Maybe you can get some research funding to investigate this. Best, Andreas On 08.01.2017 20:20, Sergei Meshveliani wrote: > Dear Agda developers, > I have the following question about the type check performance. > > Last summer I talked to a person who is experienced in programming > proofs in Coq. I asked him about the type check performance. > He said that the only source of an unnatural type check cost with Coq > can be not of the language/compiler/interpreter itself, but due to > unlucky usage of proof _tactics_ in the user program. > Of course, one can apply a proof tactic in a terrible way. > > With Agda, I currently use (sometimes) only one tactic, it is of the > Standard library: bringing to normal form by SemiringSolver. > And this cannot involve any inefficiency. > So, the question is: > what is this that makes Agda type check performance cost much more than > Coq's ? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From Thorsten.Altenkirch at nottingham.ac.uk Mon Jan 9 12:51:40 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 9 Jan 2017 11:51:40 +0000 Subject: [Agda] type check performance In-Reply-To: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: Just a general remark: when we talk about type checking we really mean type inference, which involves solving equations due to implicit syntax. My impression is that some of the stuff done in Coq tactics is done as type inference in the case of Agda. Another issue is that a lot of Coq practice doesn?t use dependent types but uses simply typed programs and then uses predicate logic to reason about completely bypassing some of the issues Agda has. Thorsten On 08/01/2017, 19:20, "Agda on behalf of Sergei Meshveliani" wrote: >Dear Agda developers, >I have the following question about the type check performance. > >Last summer I talked to a person who is experienced in programming >proofs in Coq. I asked him about the type check performance. >He said that the only source of an unnatural type check cost with Coq >can be not of the language/compiler/interpreter itself, but due to >unlucky usage of proof _tactics_ in the user program. >Of course, one can apply a proof tactic in a terrible way. > >With Agda, I currently use (sometimes) only one tactic, it is of the >Standard library: bringing to normal form by SemiringSolver. >And this cannot involve any inefficiency. >So, the question is: >what is this that makes Agda type check performance cost much more than >Coq's ? > >Regards, > >------ >Sergei > >_______________________________________________ >Agda mailing list >Agda at lists.chalmers.se >https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From nad at cse.gu.se Tue Jan 10 11:42:15 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 10 Jan 2017 11:42:15 +0100 Subject: [Agda] type check performance In-Reply-To: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: <84f4271e-a2d9-80f5-7520-9b8bf498cb83@cse.gu.se> On 2017-01-08 20:20, Sergei Meshveliani wrote: > He said that the only source of an unnatural type check cost with Coq > can be not of the language/compiler/interpreter itself, but due to > unlucky usage of proof _tactics_ in the user program. Consider the following Coq code (which is based on an example in "Implementing Typed Intermediate Languages" by Shao, League and Monnier): Definition id {A : Set} (x : A) : A := x. Definition slow {A : Set} : A -> A := id id id id id id id id id id id id id id id id id id. The time required to check this code using Coq 8.4pl4 seems to be roughly exponential in the number of occurrences of "id" on the last line [*], and as far as I can tell the code does not use a single tactic. [*] With enough occurrences of "id" Coq complains about stack overflows, so I guess that the code isn't actually checked. -- /NAD From mechvel at botik.ru Tue Jan 10 12:43:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 10 Jan 2017 14:43:26 +0300 Subject: [Agda] type check performance In-Reply-To: <84f4271e-a2d9-80f5-7520-9b8bf498cb83@cse.gu.se> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <84f4271e-a2d9-80f5-7520-9b8bf498cb83@cse.gu.se> Message-ID: <1484048606.4944.4.camel@scico.botik.ru> On Tue, 2017-01-10 at 11:42 +0100, Nils Anders Danielsson wrote: > On 2017-01-08 20:20, Sergei Meshveliani wrote: > > He said that the only source of an unnatural type check cost with Coq > > can be not of the language/compiler/interpreter itself, but due to > > unlucky usage of proof _tactics_ in the user program. > > Consider the following Coq code (which is based on an example in > "Implementing Typed Intermediate Languages" by Shao, League and > Monnier): > > Definition id {A : Set} (x : A) : A := x. > > Definition slow {A : Set} : A -> A := > id id id id id id id id id id id id id id id id id id. > > The time required to check this code using Coq 8.4pl4 seems to be > roughly exponential in the number of occurrences of "id" on the last > line [*], and as far as I can tell the code does not use a single > tactic. > > [*] With enough occurrences of "id" Coq complains about stack overflows, > so I guess that the code isn't actually checked. > Nice example. Thank you. I tried Agda-2.5.2 on f : {A : Set} ? A ? A f = id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id It type-checks it in a moment. ------ Sergei From Jesper at sikanda.be Tue Jan 10 13:35:30 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 10 Jan 2017 13:35:30 +0100 Subject: [Agda] type check performance In-Reply-To: <1484048606.4944.4.camel@scico.botik.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <84f4271e-a2d9-80f5-7520-9b8bf498cb83@cse.gu.se> <1484048606.4944.4.camel@scico.botik.ru> Message-ID: On the other hand, f = id id id id id id id id id id id id id id id id id id id id id id id id also takes a lot of time (and memory) to typecheck in Agda. Jesper On Tue, Jan 10, 2017 at 12:43 PM, Sergei Meshveliani wrote: > On Tue, 2017-01-10 at 11:42 +0100, Nils Anders Danielsson wrote: > > On 2017-01-08 20:20, Sergei Meshveliani wrote: > > > He said that the only source of an unnatural type check cost with Coq > > > can be not of the language/compiler/interpreter itself, but due to > > > unlucky usage of proof _tactics_ in the user program. > > > > Consider the following Coq code (which is based on an example in > > "Implementing Typed Intermediate Languages" by Shao, League and > > Monnier): > > > > Definition id {A : Set} (x : A) : A := x. > > > > Definition slow {A : Set} : A -> A := > > id id id id id id id id id id id id id id id id id id. > > > > The time required to check this code using Coq 8.4pl4 seems to be > > roughly exponential in the number of occurrences of "id" on the last > > line [*], and as far as I can tell the code does not use a single > > tactic. > > > > [*] With enough occurrences of "id" Coq complains about stack overflows, > > so I guess that the code isn't actually checked. > > > > > Nice example. Thank you. > I tried Agda-2.5.2 on > f : {A : Set} ? A ? A > f = id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? > id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id > > It type-checks it in a moment. > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Jan 10 13:47:10 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 10 Jan 2017 15:47:10 +0300 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <84f4271e-a2d9-80f5-7520-9b8bf498cb83@cse.gu.se> <1484048606.4944.4.camel@scico.botik.ru> Message-ID: <1484052430.4578.5.camel@scico.botik.ru> On Tue, 2017-01-10 at 13:35 +0100, Jesper Cockx wrote: > On the other hand, f = id id id id id id id id id id id id id id id id > id id id id id id id id also takes a lot of time (and memory) to > typecheck in Agda. > Indeed. I am sorry, I have missed the fact that (id id) also has the needed type there in RHS, as well as (id ? id). ------ Sergei > > On Tue, Jan 10, 2017 at 12:43 PM, Sergei Meshveliani > wrote: > On Tue, 2017-01-10 at 11:42 +0100, Nils Anders Danielsson > wrote: > > On 2017-01-08 20:20, Sergei Meshveliani wrote: > > > He said that the only source of an unnatural type check > cost with Coq > > > can be not of the language/compiler/interpreter itself, > but due to > > > unlucky usage of proof _tactics_ in the user program. > > > > Consider the following Coq code (which is based on an > example in > > "Implementing Typed Intermediate Languages" by Shao, League > and > > Monnier): > > > > Definition id {A : Set} (x : A) : A := x. > > > > Definition slow {A : Set} : A -> A := > > id id id id id id id id id id id id id id id id id id. > > > > The time required to check this code using Coq 8.4pl4 seems > to be > > roughly exponential in the number of occurrences of "id" on > the last > > line [*], and as far as I can tell the code does not use a > single > > tactic. > > > > [*] With enough occurrences of "id" Coq complains about > stack overflows, > > so I guess that the code isn't actually checked. > > > > > Nice example. Thank you. > I tried Agda-2.5.2 on > f : {A : Set} ? A ? A > f = id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? > id ? > id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? id ? > id > > It type-checks it in a moment. > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > From nad at cse.gu.se Tue Jan 10 16:20:41 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 10 Jan 2017 16:20:41 +0100 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: References: Message-ID: On 2016-12-30 16:02, Jacques Carette wrote: > I have used > B : Pred A o > finite : ? ? (? n ? (? A B ? Fin n)) > > to define a "finitely supported subset of A" which 'works', but is > extremely awkward to work with. Is A an h-set, and is B h-propositional? -- /NAD From carette at mcmaster.ca Tue Jan 10 18:13:28 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Tue, 10 Jan 2017 12:13:28 -0500 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: References: Message-ID: <64a66ec0-9220-a852-d1c3-ff6efdb515e8@mcmaster.ca> On 2017-01-10 10:20 AM, Nils Anders Danielsson wrote: > On 2016-12-30 16:02, Jacques Carette wrote: >> I have used >> B : Pred A o >> finite : ? ? (? n ? (? A B ? Fin n)) >> >> to define a "finitely supported subset of A" which 'works', but is >> extremely awkward to work with. > > Is A an h-set, and is B h-propositional? I am doing this in MLTT rather than HoTT, so I don't have an explicit h-level for A. One question is whether I need to restrict A somehow -- such as being an h-set. B is just my way of trying to encode 'finitely supported' and is not essential to my actual situation. The context is that I am to build, in Agda, various free objects. For example, one can show (using the categories package) that List, as a Functor, is left adjoint to the forgetful functor from Monoid to Sets. No additional assumptions are needed. On the other hand, the left adjoint to the forgetful functor from *Commutative* Monoid to Sets is *finitely supported* Multisets (rather than just Multisets). My real aim is to find a good representation to this left adjoint functor. As far as I can tell, unlike for Monoid, this does not work for an arbitrary type A. Basically because one can induce an equivalence relation on A from the Multiset structure. Also, the required 'singleton' constructor (part of the adjunction data) is challenging (impossible?) to build without some additional structure on A. Jacques From twanvl at gmail.com Tue Jan 10 19:21:28 2017 From: twanvl at gmail.com (Twan van Laarhoven) Date: Tue, 10 Jan 2017 19:21:28 +0100 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: References: Message-ID: <58752628.2000407@gmail.com> You could consider using a `List A` as a finite subset of A, so things like record FiniteSupport {A : Set} (f : A ? ?) where field support : List A field unsupported : ? {x} ? x ? support ? f x ? 0 And finite sets would be: record Finite (A : Set) where field enum : List A field member : ? x ? x ? enum -- optional: field unique : ? {x} ? (x?enum : x ? enum) ? x?enum ? member x This is slightly stronger than just knowing that a type is finite, since you also get an ordering of the elements, but you also get this from a bijection with Fin. Twan On 2016-12-30 16:02, Jacques Carette wrote: > Given an arbitrary Set (type) A, is it possible to express that a type such as > "A ? ?" is finitely supported? The context is that of defining a free abelian > group, so I need to define a concept of Direct Sum. I would prefer, if at all > possible, to make no assumptions on A. > > I have used > B : Pred A o > finite : ? ? (? n ? (? A B ? Fin n)) > > to define a "finitely supported subset of A" which 'works', but is extremely > awkward to work with. In other places, I have seen people use the existence of > an induction principle as a proxy for finiteness [but they also assumed a > decidable equivalence on A]. > > Jacques > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Thorsten.Altenkirch at nottingham.ac.uk Tue Jan 10 19:42:40 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 10 Jan 2017 18:42:40 +0000 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: <58752628.2000407@gmail.com> References: <58752628.2000407@gmail.com> Message-ID: I think this is also equivalent to the definition I gave. data IsFin : Set ? Set where empty : IsFin ? suc : ? {A} (a : A) ? IsFin (A - a) ? IsFin A If you want to avoid giving an ordering there is the following alternative: data Noeth : Set ? Set where noeth : ? {A} ? ((a : A) ? Noeth (A - a)) ? Noeth A Thorsten P.S. Agda file attached. On 10/01/2017, 18:21, "Agda on behalf of Twan van Laarhoven" wrote: >You could consider using a `List A` as a finite subset of A, so things >like > > record FiniteSupport {A : Set} (f : A ? ?) where > field support : List A > field unsupported : ? {x} ? x ? support ? f x ? 0 > >And finite sets would be: > > record Finite (A : Set) where > field enum : List A > field member : ? x ? x ? enum > -- optional: > field unique : ? {x} ? (x?enum : x ? enum) ? x?enum ? member x > >This is slightly stronger than just knowing that a type is finite, since >you >also get an ordering of the elements, but you also get this from a >bijection >with Fin. > >Twan > >On 2016-12-30 16:02, Jacques Carette wrote: >> Given an arbitrary Set (type) A, is it possible to express that a type >>such as >> "A ? ?" is finitely supported? The context is that of defining a free >>abelian >> group, so I need to define a concept of Direct Sum. I would prefer, if >>at all >> possible, to make no assumptions on A. >> >> I have used >> B : Pred A o >> finite : ? ? (? n ? (? A B ? Fin n)) >> >> to define a "finitely supported subset of A" which 'works', but is >>extremely >> awkward to work with. In other places, I have seen people use the >>existence of >> an induction principle as a proxy for finiteness [but they also assumed >>a >> decidable equivalence on A]. >> >> Jacques >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >_______________________________________________ >Agda mailing list >Agda at lists.chalmers.se >https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- A non-text attachment was scrubbed... Name: finteShort.agda Type: application/octet-stream Size: 381 bytes Desc: finteShort.agda URL: From fredrik.nordvall-forsberg at strath.ac.uk Tue Jan 10 20:47:32 2017 From: fredrik.nordvall-forsberg at strath.ac.uk (Fredrik Nordvall Forsberg) Date: Tue, 10 Jan 2017 19:47:32 +0000 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: References: <58752628.2000407@gmail.com> Message-ID: <31dd156e-147a-08e7-d632-d6349440b609@strath.ac.uk> Dear Jacques, See also the work by Denis Firsov, Tarmo Uustalu, and Niccolo Veltri for comparisons between different encodings of finiteness in Agda, including Twan's and Thorsten's suggestions. (For instance, Twan's Finite A implies that A has decidable equality.) Denis Firsov and Tarmo Uustalu Dependently Typed Programming with Finite Sets WGP 2015 http://dl.acm.org/authorize?N07761 Denis Firsov, Tarmo Uustalu, and Niccolo Veltri Variations on Noetherianness MSFP 2016 http://cs.ioc.ee/~tarmo/papers/msfp16b.pdf @inproceedings{firsov2015finiteSets, author = {Firsov, Denis and Uustalu, Tarmo}, title = {Dependently Typed Programming with Finite Sets}, booktitle = {Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming}, pages = {33--44}, year = {2015}, publisher = {ACM}, } @article{firsov2016variationsNoetherianness, title={Variations on Noetherianness}, author={Firsov, Denis and Uustalu, Tarmo and Veltri, Niccolo}, journal={EPTCS}, volume={207}, pages={76--88}, year={2016}, publisher={Open Publishing Association} } Best wishes, Fred On 10/01/17 18:42, Thorsten Altenkirch wrote: > I think this is also equivalent to the definition I gave. > > data IsFin : Set ? Set where > empty : IsFin ? > suc : ? {A} (a : A) ? IsFin (A - a) ? IsFin A > > If you want to avoid giving an ordering there is the following alternative: > > > data Noeth : Set ? Set where > noeth : ? {A} ? ((a : A) ? Noeth (A - a)) ? Noeth A > > Thorsten > > > P.S. Agda file attached. > > > On 10/01/2017, 18:21, twanvl at gmail.com wrote: > >> You could consider using a `List A` as a finite subset of A, so things >> like >> >> record FiniteSupport {A : Set} (f : A ? ?) where >> field support : List A >> field unsupported : ? {x} ? x ? support ? f x ? 0 >> >> And finite sets would be: >> >> record Finite (A : Set) where >> field enum : List A >> field member : ? x ? x ? enum >> -- optional: >> field unique : ? {x} ? (x?enum : x ? enum) ? x?enum ? member x >> >> This is slightly stronger than just knowing that a type is finite, since >> you also get an ordering of the elements, but you also get this from a >> bijection with Fin. >> >> Twan >> >> On 2016-12-30 16:02, Jacques Carette wrote: >>> Given an arbitrary Set (type) A, is it possible to express that a type >>> such as "A ? ?" is finitely supported? The context is that of defining a free >>> abelian group, so I need to define a concept of Direct Sum. I would prefer, if >>> at all possible, to make no assumptions on A. >>> >>> I have used >>> B : Pred A o >>> finite : ? ? (? n ? (? A B ? Fin n)) >>> >>> to define a "finitely supported subset of A" which 'works', but is >>> extremely awkward to work with. In other places, I have seen people use the >>> existence of an induction principle as a proxy for finiteness [but they also assumed >>> a decidable equivalence on A]. >>> >>> Jacques -- Fredrik Nordvall Forsberg, Department of Computer and Information Sciences, University of Strathclyde. The University of Strathclyde is a charitable body, registered in Scotland, with registration number SC015263. From carette at mcmaster.ca Tue Jan 10 21:15:46 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Tue, 10 Jan 2017 15:15:46 -0500 Subject: [Agda] 'finitely supported' constructively and without decidable equality In-Reply-To: <31dd156e-147a-08e7-d632-d6349440b609@strath.ac.uk> References: <58752628.2000407@gmail.com> <31dd156e-147a-08e7-d632-d6349440b609@strath.ac.uk> Message-ID: <7e5aa89e-eecf-cca4-df87-57f4718b1488@mcmaster.ca> I am actually aware of these works [and have discussed them in person with Tarmo], along with The Coquand-Spiwak paper "Constructively Finite?". The problem here is that 'finitely supported' turns out to be somewhat different in flavour than 'finite'. In other words 'being finite' and describing a finite subset of something which isn't itself finite is quite different, constructively. In particular, trying to describe a finite subset of a type A which does not have a decidable equivalence relation seems tricky. Twan's suggestion for FiniteSupport appears workable. It looks like it gives enough information to let me sum f over all A (and obtain a finite result). Which really is the crux of the matter. Note that that definition of FiniteSupport has a good feature (shared with my use of Surjectivity): the 'support' only tells you where things are potentially not zero, and guarantees finiteness of that. The uniqueness is nice to have, otherwise the proofs that the functor is actually adjoint gets really hard (one of the commutativity requirements and one of zig/zag, I don't remember which right now). Jacques PS: I should remark that Thorsten had privately sent me his suggestion (below) ~10 days ago (thanks!). It did allow me to make some progress, but was still insufficient, because of the difference between 'finite' and 'finitely supported'. On 2017-01-10 02:47 PM, Fredrik Nordvall Forsberg wrote: > Dear Jacques, > > See also the work by Denis Firsov, Tarmo Uustalu, and Niccolo Veltri > for comparisons between different encodings of finiteness in Agda, > including Twan's and Thorsten's suggestions. (For instance, Twan's > Finite A implies that A has decidable equality.) > > Denis Firsov and Tarmo Uustalu > Dependently Typed Programming with Finite Sets > WGP 2015 > http://dl.acm.org/authorize?N07761 > > Denis Firsov, Tarmo Uustalu, and Niccolo Veltri > Variations on Noetherianness > MSFP 2016 > http://cs.ioc.ee/~tarmo/papers/msfp16b.pdf > > @inproceedings{firsov2015finiteSets, > author = {Firsov, Denis and Uustalu, Tarmo}, > title = {Dependently Typed Programming with Finite Sets}, > booktitle = {Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming}, > pages = {33--44}, > year = {2015}, > publisher = {ACM}, > } > > @article{firsov2016variationsNoetherianness, > title={Variations on Noetherianness}, > author={Firsov, Denis and Uustalu, Tarmo and Veltri, Niccolo}, > journal={EPTCS}, > volume={207}, > pages={76--88}, > year={2016}, > publisher={Open Publishing Association} > } > > Best wishes, > Fred > > On 10/01/17 18:42, Thorsten Altenkirch wrote: >> I think this is also equivalent to the definition I gave. >> >> data IsFin : Set ? Set where >> empty : IsFin ? >> suc : ? {A} (a : A) ? IsFin (A - a) ? IsFin A >> >> If you want to avoid giving an ordering there is the following alternative: >> >> >> data Noeth : Set ? Set where >> noeth : ? {A} ? ((a : A) ? Noeth (A - a)) ? Noeth A >> >> Thorsten >> >> >> P.S. Agda file attached. >> >> >> On 10/01/2017, 18:21, twanvl at gmail.com wrote: >> >>> You could consider using a `List A` as a finite subset of A, so things >>> like >>> >>> record FiniteSupport {A : Set} (f : A ? ?) where >>> field support : List A >>> field unsupported : ? {x} ? x ? support ? f x ? 0 >>> >>> And finite sets would be: >>> >>> record Finite (A : Set) where >>> field enum : List A >>> field member : ? x ? x ? enum >>> -- optional: >>> field unique : ? {x} ? (x?enum : x ? enum) ? x?enum ? member x >>> >>> This is slightly stronger than just knowing that a type is finite, since >>> you also get an ordering of the elements, but you also get this from a >>> bijection with Fin. >>> >>> Twan >>> >>> On 2016-12-30 16:02, Jacques Carette wrote: >>>> Given an arbitrary Set (type) A, is it possible to express that a type >>>> such as "A ? ?" is finitely supported? The context is that of defining a free >>>> abelian group, so I need to define a concept of Direct Sum. I would prefer, if >>>> at all possible, to make no assumptions on A. >>>> >>>> I have used >>>> B : Pred A o >>>> finite : ? ? (? n ? (? A B ? Fin n)) >>>> >>>> to define a "finitely supported subset of A" which 'works', but is >>>> extremely awkward to work with. In other places, I have seen people use the >>>> existence of an induction principle as a proxy for finiteness [but they also assumed >>>> a decidable equivalence on A]. >>>> >>>> Jacques > From nk480 at cl.cam.ac.uk Mon Jan 9 18:28:39 2017 From: nk480 at cl.cam.ac.uk (Neel Krishnaswami) Date: Mon, 9 Jan 2017 17:28:39 +0000 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: Hi, In terms of design, Coq's type inference algorithm in roughly the same ballpark as Agda's. Namely, they are both built on a foundation of pattern unification, with some extensions. Eg, on the one hand my understanding is that Agda is a bit smarter about resolving patterns outside of the pattern fragment lazily, but that Coq uses the "first-order approximation" to solve some problems outside the pattern fragment. So it shouldn't be the case that type *inference* is hugely more expensive for either system. (Though typeclass resolution in Coq can be slow, since it is willing to backtrack in that case.) However, my understanding is that Agda still has a fairly simple implementation of judgmental equality, whereas Coq has optimized it very heavily. So reflective decision procedures are more likely to be efficient in Coq than in Agda. (I haven't dug deeply into the implementations of either system, so take all this with a grain of salt, though.) Best, Neel On 09/01/17 11:51, Thorsten Altenkirch wrote: > Just a general remark: when we talk about type checking we really mean > type inference, which involves solving equations due to implicit syntax. > My impression is that some of the stuff done in Coq tactics is done as > type inference in the case of Agda. Another issue is that a lot of Coq > practice doesn?t use dependent types but uses simply typed programs and > then uses predicate logic to reason about completely bypassing some of the > issues Agda has. > > Thorsten > > On 08/01/2017, 19:20, "Agda on behalf of Sergei Meshveliani" > wrote: > >> Dear Agda developers, >> I have the following question about the type check performance. >> >> Last summer I talked to a person who is experienced in programming >> proofs in Coq. I asked him about the type check performance. >> He said that the only source of an unnatural type check cost with Coq >> can be not of the language/compiler/interpreter itself, but due to >> unlucky usage of proof _tactics_ in the user program. >> Of course, one can apply a proof tactic in a terrible way. >> >> With Agda, I currently use (sometimes) only one tactic, it is of the >> Standard library: bringing to normal form by SemiringSolver. >> And this cannot involve any inefficiency. >> So, the question is: >> what is this that makes Agda type check performance cost much more than >> Coq's ? >> >> Regards, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From larrytheliquid at gmail.com Wed Jan 11 01:15:27 2017 From: larrytheliquid at gmail.com (Larrytheliquid) Date: Tue, 10 Jan 2017 16:15:27 -0800 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: Expanding a little on what Neel said, and assuming that the papers I've read in the past are still relevant: A key part of why first-order approximation can lead to faster unification/judgmental equality checking is the following. In Coq, great care is taken to not expand definitions (deltas in the delta-equality sense). This is because Coq will allow unification problems to be solved with applications of definitions resembling constructor applications when finding first-order approximate solutions. This is why Coq does not generate most general unifiers, whereas Agda does. In contrast, when unifying/checking judgmental equality for the problem x = y, Agda will first convert x and y to weak-head normal form. This constant conversion to whnf (in every recursive call of equality checking that fails alpha-conversion) can of course be expensive, as the reduction process can be computationally intensive and result in large weak-head normal terms. Again, Coq will do the same thing if first-order approximation fails, but many times Coq unification can find solutions before getting to that point. So I would say a caveat to comparing Coq and Agda is that they are not solving the same problem. Agda cares about most-general unifiers whereas Coq does not. On Mon, Jan 9, 2017 at 9:28 AM, Neel Krishnaswami wrote: > Hi, > > In terms of design, Coq's type inference algorithm in roughly the same > ballpark as Agda's. Namely, they are both built on a foundation of > pattern unification, with some extensions. > > Eg, on the one hand my understanding is that Agda is a bit smarter > about resolving patterns outside of the pattern fragment lazily, but > that Coq uses the "first-order approximation" to solve some problems > outside the pattern fragment. So it shouldn't be the case that type > *inference* is hugely more expensive for either system. (Though > typeclass resolution in Coq can be slow, since it is willing to > backtrack in that case.) > > However, my understanding is that Agda still has a fairly simple > implementation of judgmental equality, whereas Coq has optimized it > very heavily. So reflective decision procedures are more likely to > be efficient in Coq than in Agda. > > (I haven't dug deeply into the implementations of either system, so > take all this with a grain of salt, though.) > > Best, > Neel > > > On 09/01/17 11:51, Thorsten Altenkirch wrote: > >> Just a general remark: when we talk about type checking we really mean >> type inference, which involves solving equations due to implicit syntax. >> My impression is that some of the stuff done in Coq tactics is done as >> type inference in the case of Agda. Another issue is that a lot of Coq >> practice doesn?t use dependent types but uses simply typed programs and >> then uses predicate logic to reason about completely bypassing some of the >> issues Agda has. >> >> Thorsten >> >> On 08/01/2017, 19:20, "Agda on behalf of Sergei Meshveliani" >> wrote: >> >> Dear Agda developers, >>> I have the following question about the type check performance. >>> >>> Last summer I talked to a person who is experienced in programming >>> proofs in Coq. I asked him about the type check performance. >>> He said that the only source of an unnatural type check cost with Coq >>> can be not of the language/compiler/interpreter itself, but due to >>> unlucky usage of proof _tactics_ in the user program. >>> Of course, one can apply a proof tactic in a terrible way. >>> >>> With Agda, I currently use (sometimes) only one tactic, it is of the >>> Standard library: bringing to normal form by SemiringSolver. >>> And this cannot involve any inefficiency. >>> So, the question is: >>> what is this that makes Agda type check performance cost much more than >>> Coq's ? >>> >>> Regards, >>> >>> ------ >>> Sergei >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please send it back to me, and immediately delete it. >> >> Please do not use, copy or disclose the information contained in this >> message or in any attachment. Any views or opinions expressed by the >> author of this email do not necessarily reflect the views of the >> University of Nottingham. >> >> This message has been checked for viruses but the contents of an >> attachment may still contain software viruses which could damage your >> computer system, you are advised to perform your own checks. Email >> communications with the University of Nottingham may be monitored as >> permitted by UK legislation. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Respectfully, Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Jan 11 14:01:15 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 11 Jan 2017 16:01:15 +0300 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> Can anybody, please, explain in short, what is happening with type inference in the example of slow : {A : Set} ? A ? A slow = id id id id id id id id id id id id id id id id id id id id id id id id ? Why is it so expensive in Agda and in Coq ? What terms are being unified, normalized (by which rules?) ? (I expect that these terms internally represent type expressions). Is this pattern matching of a term against a ground term, or it is finding a most general unifier for two terms having variables? As I recall, a naive unification method costs exponentially for the worst case, and there is known the method by Martelli & Montanari, which improves this ... Thanks, ------ Sergei On Tue, 2017-01-10 at 16:15 -0800, Larrytheliquid wrote: > Expanding a little on what Neel said, and assuming that the papers > I've read in the past are still relevant: > > > A key part of why first-order approximation can lead to faster > unification/judgmental equality checking > is the following. In Coq, great care is taken to not expand > definitions (deltas in the delta-equality sense). > This is because Coq will allow unification problems to be solved with > applications of definitions resembling > constructor applications when finding first-order approximate > solutions. This is why Coq > does not generate most general unifiers, whereas Agda does. > > > In contrast, when unifying/checking judgmental equality for the > problem x = y, Agda will first > convert x and y to weak-head normal form. This constant conversion to > whnf (in every recursive call of equality > checking that fails alpha-conversion) can of course be expensive, as > the reduction process can be computationally > intensive and result in large weak-head normal terms. > Again, Coq will do the same thing if first-order approximation fails, > but many times Coq unification can find solutions > before getting to that point. > > > So I would say a caveat to comparing Coq and Agda is that they are not > solving the same problem. Agda cares > about most-general unifiers whereas Coq does not. > > On Mon, Jan 9, 2017 at 9:28 AM, Neel Krishnaswami > wrote: > Hi, > > In terms of design, Coq's type inference algorithm in roughly > the same > ballpark as Agda's. Namely, they are both built on a > foundation of > pattern unification, with some extensions. > > Eg, on the one hand my understanding is that Agda is a bit > smarter > about resolving patterns outside of the pattern fragment > lazily, but > that Coq uses the "first-order approximation" to solve some > problems > outside the pattern fragment. So it shouldn't be the case that > type > *inference* is hugely more expensive for either system. > (Though > typeclass resolution in Coq can be slow, since it is willing > to > backtrack in that case.) > > However, my understanding is that Agda still has a fairly > simple > implementation of judgmental equality, whereas Coq has > optimized it > very heavily. So reflective decision procedures are more > likely to > be efficient in Coq than in Agda. > > (I haven't dug deeply into the implementations of either > system, so > take all this with a grain of salt, though.) > > Best, > Neel > > > On 09/01/17 11:51, Thorsten Altenkirch wrote: > Just a general remark: when we talk about type > checking we really mean > type inference, which involves solving equations due > to implicit syntax. > My impression is that some of the stuff done in Coq > tactics is done as > type inference in the case of Agda. Another issue is > that a lot of Coq > practice doesn?t use dependent types but uses simply > typed programs and > then uses predicate logic to reason about completely > bypassing some of the > issues Agda has. > > Thorsten > > On 08/01/2017, 19:20, "Agda on behalf of Sergei > Meshveliani" > mechvel at botik.ru> wrote: > > Dear Agda developers, > I have the following question about the type > check performance. > > Last summer I talked to a person who is > experienced in programming > proofs in Coq. I asked him about the type > check performance. > He said that the only source of an unnatural > type check cost with Coq > can be not of the > language/compiler/interpreter itself, but due > to > unlucky usage of proof _tactics_ in the user > program. > Of course, one can apply a proof tactic in a > terrible way. > > With Agda, I currently use (sometimes) only > one tactic, it is of the > Standard library: bringing to normal form by > SemiringSolver. > And this cannot involve any inefficiency. > So, the question is: > what is this that makes Agda type check > performance cost much more than > Coq's ? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely > for the addressee > and may contain confidential information. If you have > received this > message in error, please send it back to me, and > immediately delete it. > > Please do not use, copy or disclose the information > contained in this > message or in any attachment. Any views or opinions > expressed by the > author of this email do not necessarily reflect the > views of the > University of Nottingham. > > This message has been checked for viruses but the > contents of an > attachment may still contain software viruses which > could damage your > computer system, you are advised to perform your own > checks. Email > communications with the University of Nottingham may > be monitored as > permitted by UK legislation. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > -- > Respectfully, > Larry Diehl > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.allais at ens-lyon.org Wed Jan 11 14:07:20 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Wed, 11 Jan 2017 14:07:20 +0100 Subject: [Agda] type check performance In-Reply-To: <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> Message-ID: If you use an alternative definition of `id` that takes its type argument explicitly, you can see where the problem comes from: ============================================================== module Slow-id where id : (A : Set) ? A ? A id _ x = x slow : (A : Set) ? A ? A slow A = (id {!!}) (id {!!}) (id {!!}) (id {!!}) (id {!!}) (id {!!}) (id {!!}) (id {!!}) {- `C-c C-s` solves the type holes to: slow : (A : Set) ? A ? A slow A = (id (((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) (id ((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) (id (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) (id ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) (id (((A ? A) ? A ? A) ? (A ? A) ? A ? A)) (id ((A ? A) ? A ? A)) (id (A ? A)) (id A) -} ============================================================== On 11/01/17 14:01, Sergei Meshveliani wrote: > Can anybody, please, explain in short, what is happening with type > inference in the example of > > slow : {A : Set} ? A ? A > slow = id id id id id id id id id id id id id id id id > id id id id id id id id > ? > Why is it so expensive in Agda and in Coq ? > > What terms are being unified, normalized (by which rules?) ? > (I expect that these terms internally represent type expressions). > Is this pattern matching of a term against a ground term, or it is > finding a most general unifier for two terms having variables? > > As I recall, a naive unification method costs exponentially for the > worst case, and there is known the method by Martelli & Montanari, > which improves this ... > > Thanks, > > ------ > Sergei > > > > On Tue, 2017-01-10 at 16:15 -0800, Larrytheliquid wrote: >> Expanding a little on what Neel said, and assuming that the papers >> I've read in the past are still relevant: >> >> >> A key part of why first-order approximation can lead to faster >> unification/judgmental equality checking >> is the following. In Coq, great care is taken to not expand >> definitions (deltas in the delta-equality sense). >> This is because Coq will allow unification problems to be solved with >> applications of definitions resembling >> constructor applications when finding first-order approximate >> solutions. This is why Coq >> does not generate most general unifiers, whereas Agda does. >> >> >> In contrast, when unifying/checking judgmental equality for the >> problem x = y, Agda will first >> convert x and y to weak-head normal form. This constant conversion to >> whnf (in every recursive call of equality >> checking that fails alpha-conversion) can of course be expensive, as >> the reduction process can be computationally >> intensive and result in large weak-head normal terms. >> Again, Coq will do the same thing if first-order approximation fails, >> but many times Coq unification can find solutions >> before getting to that point. >> >> >> So I would say a caveat to comparing Coq and Agda is that they are not >> solving the same problem. Agda cares >> about most-general unifiers whereas Coq does not. >> >> On Mon, Jan 9, 2017 at 9:28 AM, Neel Krishnaswami >> wrote: >> Hi, >> >> In terms of design, Coq's type inference algorithm in roughly >> the same >> ballpark as Agda's. Namely, they are both built on a >> foundation of >> pattern unification, with some extensions. >> >> Eg, on the one hand my understanding is that Agda is a bit >> smarter >> about resolving patterns outside of the pattern fragment >> lazily, but >> that Coq uses the "first-order approximation" to solve some >> problems >> outside the pattern fragment. So it shouldn't be the case that >> type >> *inference* is hugely more expensive for either system. >> (Though >> typeclass resolution in Coq can be slow, since it is willing >> to >> backtrack in that case.) >> >> However, my understanding is that Agda still has a fairly >> simple >> implementation of judgmental equality, whereas Coq has >> optimized it >> very heavily. So reflective decision procedures are more >> likely to >> be efficient in Coq than in Agda. >> >> (I haven't dug deeply into the implementations of either >> system, so >> take all this with a grain of salt, though.) >> >> Best, >> Neel >> >> >> On 09/01/17 11:51, Thorsten Altenkirch wrote: >> Just a general remark: when we talk about type >> checking we really mean >> type inference, which involves solving equations due >> to implicit syntax. >> My impression is that some of the stuff done in Coq >> tactics is done as >> type inference in the case of Agda. Another issue is >> that a lot of Coq >> practice doesn?t use dependent types but uses simply >> typed programs and >> then uses predicate logic to reason about completely >> bypassing some of the >> issues Agda has. >> >> Thorsten >> >> On 08/01/2017, 19:20, "Agda on behalf of Sergei >> Meshveliani" >> > mechvel at botik.ru> wrote: >> >> Dear Agda developers, >> I have the following question about the type >> check performance. >> >> Last summer I talked to a person who is >> experienced in programming >> proofs in Coq. I asked him about the type >> check performance. >> He said that the only source of an unnatural >> type check cost with Coq >> can be not of the >> language/compiler/interpreter itself, but due >> to >> unlucky usage of proof _tactics_ in the user >> program. >> Of course, one can apply a proof tactic in a >> terrible way. >> >> With Agda, I currently use (sometimes) only >> one tactic, it is of the >> Standard library: bringing to normal form by >> SemiringSolver. >> And this cannot involve any inefficiency. >> So, the question is: >> what is this that makes Agda type check >> performance cost much more than >> Coq's ? >> >> Regards, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> >> >> This message and any attachment are intended solely >> for the addressee >> and may contain confidential information. If you have >> received this >> message in error, please send it back to me, and >> immediately delete it. >> >> Please do not use, copy or disclose the information >> contained in this >> message or in any attachment. Any views or opinions >> expressed by the >> author of this email do not necessarily reflect the >> views of the >> University of Nottingham. >> >> This message has been checked for viruses but the >> contents of an >> attachment may still contain software viruses which >> could damage your >> computer system, you are advised to perform your own >> checks. Email >> communications with the University of Nottingham may >> be monitored as >> permitted by UK legislation. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> >> >> -- >> Respectfully, >> Larry Diehl >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From hancock at fastmail.fm Wed Jan 11 14:16:42 2017 From: hancock at fastmail.fm (Peter Hancock) Date: Wed, 11 Jan 2017 13:16:42 +0000 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> Message-ID: It may be worth pointing out that even in haskell (at least, ghci), type-checking such a definition is an excellent way to crucify one's computer. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Wed Jan 11 19:46:00 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 11 Jan 2017 21:46:00 +0300 Subject: [Agda] type check performance In-Reply-To: References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> Message-ID: <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> I see, thank you. Here the size of the type expression grows 2 times with each adding of `id'. Probably this expense in unavoidable. Because if we write a textbook and need to explain what is the type of the leftmost `id' map there in id id id id id id id id, then we need to place to the text the below large expression. And my case is different. I define standard classical algebraic structures: Semigroup, Group, Ring, EuclideanRing, and such, and prove in Agda certain well-known properties of their operations. There cannot appear such type expressions like above for id id ... id. And still its type check needs 7Gb RAM and 60 minutes of time (on a 3 GHz computer). If we write all this as a textbook, together with rigorous constructive proofs, this will probably make it a book of 500 pages. It will contain many lemmata that refer to each other, and one structure definition referring to another structure definition. 500 pages makes it about 500 * 5000 = 2500 K byte of volume -- this is very small. GHC and Agda read and understand these proofs much faster than an human. So Agda needs to type-check this book, probably, in 10 seconds. There is something strange in these 60 minutes and 7 Gb minimum. For example, EuclideanRing is far enough in the hierarchy. And I ask to print the type (C-c C-d) of the function (lemma) remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# in the module parameterized by an instance of EuclideanRing. It shows (a b : UpIntegralRing.Carrier upIR) ? (UpIntegralRing.*upMonoid upIR UpMonoid.? b) a ? (upIR UpIntegralRing.? EuclideanRing.eucRem upIR?? E a b) (UpIntegralRing.0# upIR) This does not look like a large expression (though it contains several parts that may need to be replaced with their expanded definitions, depending on situation). If a human can (?) check by hand in 10 days all the proofs in this 500 page book (this can be done by reading the source Agda program), then why Agda cannot do the same in 10 seconds? I do not know, may be a human avoids some unneeded expression expansion when substituting things. The effect is not clear to me. Regards, ------ Sergei On Wed, 2017-01-11 at 14:07 +0100, G. Allais wrote: > If you use an alternative definition of `id` that takes its type > argument explicitly, you can see where the problem comes from: > > ============================================================== > module Slow-id where > > id : (A : Set) ? A ? A > id _ x = x > > slow : (A : Set) ? A ? A > slow A = > (id {!!}) > (id {!!}) > (id {!!}) > (id {!!}) > (id {!!}) > (id {!!}) > (id {!!}) > (id {!!}) > > {- `C-c C-s` solves the type holes to: > slow : (A : Set) ? A ? A > slow A = > (id (((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > (id ((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > (id (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > (id ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > (id (((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > (id ((A ? A) ? A ? A)) > (id (A ? A)) > (id A) > -} > ============================================================== > > On 11/01/17 14:01, Sergei Meshveliani wrote: > > Can anybody, please, explain in short, what is happening with type > > inference in the example of > > > > slow : {A : Set} ? A ? A > > slow = id id id id id id id id id id id id id id id id > > id id id id id id id id > > ? > > Why is it so expensive in Agda and in Coq ? > > > > What terms are being unified, normalized (by which rules?) ? > > (I expect that these terms internally represent type expressions). > > Is this pattern matching of a term against a ground term, or it is > > finding a most general unifier for two terms having variables? > > > > As I recall, a naive unification method costs exponentially for the > > worst case, and there is known the method by Martelli & Montanari, > > which improves this ... > > > > Thanks, > > > > ------ > > Sergei > > > > > > > > On Tue, 2017-01-10 at 16:15 -0800, Larrytheliquid wrote: > >> Expanding a little on what Neel said, and assuming that the papers > >> I've read in the past are still relevant: > >> > >> > >> A key part of why first-order approximation can lead to faster > >> unification/judgmental equality checking > >> is the following. In Coq, great care is taken to not expand > >> definitions (deltas in the delta-equality sense). > >> This is because Coq will allow unification problems to be solved with > >> applications of definitions resembling > >> constructor applications when finding first-order approximate > >> solutions. This is why Coq > >> does not generate most general unifiers, whereas Agda does. > >> > >> > >> In contrast, when unifying/checking judgmental equality for the > >> problem x = y, Agda will first > >> convert x and y to weak-head normal form. This constant conversion to > >> whnf (in every recursive call of equality > >> checking that fails alpha-conversion) can of course be expensive, as > >> the reduction process can be computationally > >> intensive and result in large weak-head normal terms. > >> Again, Coq will do the same thing if first-order approximation fails, > >> but many times Coq unification can find solutions > >> before getting to that point. > >> > >> > >> So I would say a caveat to comparing Coq and Agda is that they are not > >> solving the same problem. Agda cares > >> about most-general unifiers whereas Coq does not. > >> > >> On Mon, Jan 9, 2017 at 9:28 AM, Neel Krishnaswami > >> wrote: > >> Hi, > >> > >> In terms of design, Coq's type inference algorithm in roughly > >> the same > >> ballpark as Agda's. Namely, they are both built on a > >> foundation of > >> pattern unification, with some extensions. > >> > >> Eg, on the one hand my understanding is that Agda is a bit > >> smarter > >> about resolving patterns outside of the pattern fragment > >> lazily, but > >> that Coq uses the "first-order approximation" to solve some > >> problems > >> outside the pattern fragment. So it shouldn't be the case that > >> type > >> *inference* is hugely more expensive for either system. > >> (Though > >> typeclass resolution in Coq can be slow, since it is willing > >> to > >> backtrack in that case.) > >> > >> However, my understanding is that Agda still has a fairly > >> simple > >> implementation of judgmental equality, whereas Coq has > >> optimized it > >> very heavily. So reflective decision procedures are more > >> likely to > >> be efficient in Coq than in Agda. > >> > >> (I haven't dug deeply into the implementations of either > >> system, so > >> take all this with a grain of salt, though.) > >> > >> Best, > >> Neel > >> > >> > >> On 09/01/17 11:51, Thorsten Altenkirch wrote: > >> Just a general remark: when we talk about type > >> checking we really mean > >> type inference, which involves solving equations due > >> to implicit syntax. > >> My impression is that some of the stuff done in Coq > >> tactics is done as > >> type inference in the case of Agda. Another issue is > >> that a lot of Coq > >> practice doesn?t use dependent types but uses simply > >> typed programs and > >> then uses predicate logic to reason about completely > >> bypassing some of the > >> issues Agda has. > >> > >> Thorsten > >> > >> On 08/01/2017, 19:20, "Agda on behalf of Sergei > >> Meshveliani" > >> >> mechvel at botik.ru> wrote: > >> > >> Dear Agda developers, > >> I have the following question about the type > >> check performance. > >> > >> Last summer I talked to a person who is > >> experienced in programming > >> proofs in Coq. I asked him about the type > >> check performance. > >> He said that the only source of an unnatural > >> type check cost with Coq > >> can be not of the > >> language/compiler/interpreter itself, but due > >> to > >> unlucky usage of proof _tactics_ in the user > >> program. > >> Of course, one can apply a proof tactic in a > >> terrible way. > >> > >> With Agda, I currently use (sometimes) only > >> one tactic, it is of the > >> Standard library: bringing to normal form by > >> SemiringSolver. > >> And this cannot involve any inefficiency. > >> So, the question is: > >> what is this that makes Agda type check > >> performance cost much more than > >> Coq's ? > >> > >> Regards, > >> > >> ------ > >> Sergei > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > >> > >> > >> > >> > >> This message and any attachment are intended solely > >> for the addressee > >> and may contain confidential information. If you have > >> received this > >> message in error, please send it back to me, and > >> immediately delete it. > >> > >> Please do not use, copy or disclose the information > >> contained in this > >> message or in any attachment. Any views or opinions > >> expressed by the > >> author of this email do not necessarily reflect the > >> views of the > >> University of Nottingham. > >> > >> This message has been checked for viruses but the > >> contents of an > >> attachment may still contain software viruses which > >> could damage your > >> computer system, you are advised to perform your own > >> checks. Email > >> communications with the University of Nottingham may > >> be monitored as > >> permitted by UK legislation. > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > >> > >> > >> > >> > >> -- > >> Respectfully, > >> Larry Diehl > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From kahl at cas.mcmaster.ca Wed Jan 11 20:21:38 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Wed, 11 Jan 2017 14:21:38 -0500 Subject: [Agda] type check performance In-Reply-To: <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> Message-ID: <20170111192138.GM5222@ritchie.cas.mcmaster.ca> On Wed, Jan 11, 2017 at 09:46:00PM +0300, Sergei Meshveliani wrote: > And my case is different. I define standard classical algebraic > structures: Semigroup, Group, Ring, EuclideanRing, and such, and prove > in Agda certain well-known properties of their operations. There cannot > appear such type expressions like above for id id ... id. > > And still its type check needs 7Gb RAM and 60 minutes of time (on a 3 > GHz computer). > > [...] > > There is something strange in these 60 minutes and 7 Gb minimum. > For example, EuclideanRing is far enough in the hierarchy. > And I ask to print the type (C-c C-d) of the function (lemma) > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > > in the module parameterized by an instance of EuclideanRing. > It shows > > (a b : UpIntegralRing.Carrier upIR) ? > (UpIntegralRing.*upMonoid upIR UpMonoid.? b) a ? > (upIR UpIntegralRing.? EuclideanRing.eucRem upIR?? E a b) > (UpIntegralRing.0# upIR) > > This does not look like a large expression > (though it contains several parts that may need to be replaced with > their expanded definitions, depending on situation). Can you go to the top-level of the file module in which this is defined, and ask for the type (C-c C-d) of the qualified name of remByDivisor, qualified as necessary to be able to refer to it from the top-level of the file module? And also do that for each of ? , eucRem , ? , and 0# ? If my understanding is correct, then at least in some circumstances and to a certain degree, these are the types that Agda is really dealing with. Wolfram From Jesper at sikanda.be Wed Jan 11 20:23:19 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 11 Jan 2017 20:23:19 +0100 Subject: [Agda] type check performance In-Reply-To: <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> Message-ID: On the matter of Agda vs human, there is also the question which one, when used as a proof checker, has more bugs impacting soundness. Probably the human brain includes lots of heuristics (similar to the first-order approximation used in Coq) that may or may not be sound in general. It may even skip some boring parts of a proof entirely. The simple fact that we understand Agda much better than the human brain (in a relative sense) is a huge plus for Agda in my eyes, and makes me much more likely to trust it. But the fact that it is simpler also means that it will be slower in certain cases (by which I do not mean that Agda couldn't work faster on your particular development). Cheers, Jesper On Wed, Jan 11, 2017 at 7:46 PM, Sergei Meshveliani wrote: > I see, thank you. > Here the size of the type expression grows 2 times with each adding of > `id'. > > Probably this expense in unavoidable. Because if we write a textbook and > need to explain what is the type of the leftmost `id' map there in > id id id id id id id id, > then we need to place to the text the below large expression. > > And my case is different. I define standard classical algebraic > structures: Semigroup, Group, Ring, EuclideanRing, and such, and prove > in Agda certain well-known properties of their operations. There cannot > appear such type expressions like above for id id ... id. > > And still its type check needs 7Gb RAM and 60 minutes of time (on a 3 > GHz computer). > > If we write all this as a textbook, together with rigorous constructive > proofs, this will probably make it a book of 500 pages. It will contain > many lemmata that refer to each other, and one structure definition > referring to another structure definition. 500 pages makes it about > 500 * 5000 = 2500 K byte of volume -- this is very small. > > GHC and Agda read and understand these proofs much faster than an human. > So Agda needs to type-check this book, probably, in 10 seconds. > > There is something strange in these 60 minutes and 7 Gb minimum. > For example, EuclideanRing is far enough in the hierarchy. > And I ask to print the type (C-c C-d) of the function (lemma) > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > > in the module parameterized by an instance of EuclideanRing. > It shows > > (a b : UpIntegralRing.Carrier upIR) ? > (UpIntegralRing.*upMonoid upIR UpMonoid.? b) a ? > (upIR UpIntegralRing.? EuclideanRing.eucRem upIR?? E a b) > (UpIntegralRing.0# upIR) > > This does not look like a large expression > (though it contains several parts that may need to be replaced with > their expanded definitions, depending on situation). > > If a human can (?) check by hand in 10 days all the proofs in this 500 > page book (this can be done by reading the source Agda program), > then why Agda cannot do the same in 10 seconds? > > I do not know, may be a human avoids some unneeded expression expansion > when substituting things. The effect is not clear to me. > > Regards, > > ------ > Sergei > > > > On Wed, 2017-01-11 at 14:07 +0100, G. Allais wrote: > > If you use an alternative definition of `id` that takes its type > > argument explicitly, you can see where the problem comes from: > > > > ============================================================== > > module Slow-id where > > > > id : (A : Set) ? A ? A > > id _ x = x > > > > slow : (A : Set) ? A ? A > > slow A = > > (id {!!}) > > (id {!!}) > > (id {!!}) > > (id {!!}) > > (id {!!}) > > (id {!!}) > > (id {!!}) > > (id {!!}) > > > > {- `C-c C-s` solves the type holes to: > > slow : (A : Set) ? A ? A > > slow A = > > (id (((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > > (id ((((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > > (id (((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > (((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > > (id ((((A ? A) ? A ? A) ? (A ? A) ? A ? A) ? > > ((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > > (id (((A ? A) ? A ? A) ? (A ? A) ? A ? A)) > > (id ((A ? A) ? A ? A)) > > (id (A ? A)) > > (id A) > > -} > > ============================================================== > > > > On 11/01/17 14:01, Sergei Meshveliani wrote: > > > Can anybody, please, explain in short, what is happening with type > > > inference in the example of > > > > > > slow : {A : Set} ? A ? A > > > slow = id id id id id id id id id id id id id id id id > > > id id id id id id id id > > > ? > > > Why is it so expensive in Agda and in Coq ? > > > > > > What terms are being unified, normalized (by which rules?) ? > > > (I expect that these terms internally represent type expressions). > > > Is this pattern matching of a term against a ground term, or it is > > > finding a most general unifier for two terms having variables? > > > > > > As I recall, a naive unification method costs exponentially for the > > > worst case, and there is known the method by Martelli & Montanari, > > > which improves this ... > > > > > > Thanks, > > > > > > ------ > > > Sergei > > > > > > > > > > > > On Tue, 2017-01-10 at 16:15 -0800, Larrytheliquid wrote: > > >> Expanding a little on what Neel said, and assuming that the papers > > >> I've read in the past are still relevant: > > >> > > >> > > >> A key part of why first-order approximation can lead to faster > > >> unification/judgmental equality checking > > >> is the following. In Coq, great care is taken to not expand > > >> definitions (deltas in the delta-equality sense). > > >> This is because Coq will allow unification problems to be solved with > > >> applications of definitions resembling > > >> constructor applications when finding first-order approximate > > >> solutions. This is why Coq > > >> does not generate most general unifiers, whereas Agda does. > > >> > > >> > > >> In contrast, when unifying/checking judgmental equality for the > > >> problem x = y, Agda will first > > >> convert x and y to weak-head normal form. This constant conversion to > > >> whnf (in every recursive call of equality > > >> checking that fails alpha-conversion) can of course be expensive, as > > >> the reduction process can be computationally > > >> intensive and result in large weak-head normal terms. > > >> Again, Coq will do the same thing if first-order approximation fails, > > >> but many times Coq unification can find solutions > > >> before getting to that point. > > >> > > >> > > >> So I would say a caveat to comparing Coq and Agda is that they are not > > >> solving the same problem. Agda cares > > >> about most-general unifiers whereas Coq does not. > > >> > > >> On Mon, Jan 9, 2017 at 9:28 AM, Neel Krishnaswami > > > >> wrote: > > >> Hi, > > >> > > >> In terms of design, Coq's type inference algorithm in roughly > > >> the same > > >> ballpark as Agda's. Namely, they are both built on a > > >> foundation of > > >> pattern unification, with some extensions. > > >> > > >> Eg, on the one hand my understanding is that Agda is a bit > > >> smarter > > >> about resolving patterns outside of the pattern fragment > > >> lazily, but > > >> that Coq uses the "first-order approximation" to solve some > > >> problems > > >> outside the pattern fragment. So it shouldn't be the case that > > >> type > > >> *inference* is hugely more expensive for either system. > > >> (Though > > >> typeclass resolution in Coq can be slow, since it is willing > > >> to > > >> backtrack in that case.) > > >> > > >> However, my understanding is that Agda still has a fairly > > >> simple > > >> implementation of judgmental equality, whereas Coq has > > >> optimized it > > >> very heavily. So reflective decision procedures are more > > >> likely to > > >> be efficient in Coq than in Agda. > > >> > > >> (I haven't dug deeply into the implementations of either > > >> system, so > > >> take all this with a grain of salt, though.) > > >> > > >> Best, > > >> Neel > > >> > > >> > > >> On 09/01/17 11:51, Thorsten Altenkirch wrote: > > >> Just a general remark: when we talk about type > > >> checking we really mean > > >> type inference, which involves solving equations due > > >> to implicit syntax. > > >> My impression is that some of the stuff done in Coq > > >> tactics is done as > > >> type inference in the case of Agda. Another issue is > > >> that a lot of Coq > > >> practice doesn?t use dependent types but uses simply > > >> typed programs and > > >> then uses predicate logic to reason about completely > > >> bypassing some of the > > >> issues Agda has. > > >> > > >> Thorsten > > >> > > >> On 08/01/2017, 19:20, "Agda on behalf of Sergei > > >> Meshveliani" > > >> > >> mechvel at botik.ru> wrote: > > >> > > >> Dear Agda developers, > > >> I have the following question about the type > > >> check performance. > > >> > > >> Last summer I talked to a person who is > > >> experienced in programming > > >> proofs in Coq. I asked him about the type > > >> check performance. > > >> He said that the only source of an unnatural > > >> type check cost with Coq > > >> can be not of the > > >> language/compiler/interpreter itself, but due > > >> to > > >> unlucky usage of proof _tactics_ in the user > > >> program. > > >> Of course, one can apply a proof tactic in a > > >> terrible way. > > >> > > >> With Agda, I currently use (sometimes) only > > >> one tactic, it is of the > > >> Standard library: bringing to normal form by > > >> SemiringSolver. > > >> And this cannot involve any inefficiency. > > >> So, the question is: > > >> what is this that makes Agda type check > > >> performance cost much more than > > >> Coq's ? > > >> > > >> Regards, > > >> > > >> ------ > > >> Sergei > > >> > > >> _____________________________ > __________________ > > >> Agda mailing list > > >> Agda at lists.chalmers.se > > >> https://lists.chalmers.se/mai > lman/listinfo/agda > > >> > > >> > > >> > > >> > > >> > > >> This message and any attachment are intended solely > > >> for the addressee > > >> and may contain confidential information. If you have > > >> received this > > >> message in error, please send it back to me, and > > >> immediately delete it. > > >> > > >> Please do not use, copy or disclose the information > > >> contained in this > > >> message or in any attachment. Any views or opinions > > >> expressed by the > > >> author of this email do not necessarily reflect the > > >> views of the > > >> University of Nottingham. > > >> > > >> This message has been checked for viruses but the > > >> contents of an > > >> attachment may still contain software viruses which > > >> could damage your > > >> computer system, you are advised to perform your own > > >> checks. Email > > >> communications with the University of Nottingham may > > >> be monitored as > > >> permitted by UK legislation. > > >> > > >> _______________________________________________ > > >> Agda mailing list > > >> Agda at lists.chalmers.se > > >> https://lists.chalmers.se/mailman/listinfo/agda > > >> > > >> _______________________________________________ > > >> Agda mailing list > > >> Agda at lists.chalmers.se > > >> https://lists.chalmers.se/mailman/listinfo/agda > > >> > > >> > > >> > > >> > > >> > > >> -- > > >> Respectfully, > > >> Larry Diehl > > >> > > >> _______________________________________________ > > >> Agda mailing list > > >> Agda at lists.chalmers.se > > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Jan 11 21:27:56 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 11 Jan 2017 21:27:56 +0100 Subject: [Agda] type check performance In-Reply-To: <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> Message-ID: <1e442cb3-07dc-c1bb-432e-2bc296630cbc@cse.gu.se> On 2017-01-11 19:46, Sergei Meshveliani wrote: > Here the size of the type expression grows 2 times with each adding of > `id'. > > Probably this expense in unavoidable. No, it can be avoided. See the first page of the paper from which I took the example: "Implementing Typed Intermediate Languages" by Shao, League and Monnier (https://doi.org/10.1145/289423.289460). The basic idea is to store the terms more compactly. -- /NAD From apostolis.xekoukoulotakis at gmail.com Thu Jan 12 09:16:15 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 12 Jan 2017 10:16:15 +0200 Subject: [Agda] I am failing at Sized types 2. Message-ID: I was wondering if Andreas or someone else could write down the rules that determine the typechecking behavior of Sized types. It would be nice if it pointed to their limitations as well, with simple examples. I only found some rules at slide 9 of a 2008 presentation. http://www2.tcs.ifi.lmu.de/~abel/talkAIM2008Sendai.pdf (Should size be a parameter or an index?) At 2011 coinduction subtyping wasn't supported. https://lists.chalmers.se/pipermail/agda/2011/003127.html I believe/hope that it does now. In 2015, Conor was failing at Sized types, an interesting email title for a professor :) https://lists.chalmers.se/pipermail/agda/2015/007603.html in which it is pointed that there are two Sized types' syntaxes, that could lead into problems. It would help if someone pointed to possible pitfalls with using Sized types. I am having problems with Sized types as well. Most probably, because I do not understand how they work. (I have a data type that depends on Sized types that change size from one constructor to the other of that particular data type. The Sized types have parts which are coinductive, similarly to the Delay monad from Abel's paper.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From monnier at iro.umontreal.ca Thu Jan 12 14:31:45 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Thu, 12 Jan 2017 08:31:45 -0500 Subject: [Agda] type check performance References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <1e442cb3-07dc-c1bb-432e-2bc296630cbc@cse.gu.se> Message-ID: > No, it can be avoided. See the first page of the paper from which I took > the example: "Implementing Typed Intermediate Languages" by Shao, League > and Monnier (https://doi.org/10.1145/289423.289460). The basic idea is > to store the terms more compactly. I think Agda's inference algorithm is sufficiently close to Hindley-Milner that it suffers from the same DEXPTIME complexity, so while the above example can be implemented more efficiently, there re other cases where you can't avoid it. But these HM pathological cases involve no reductions and are extremely rare in real-life: you can show that the complexity of HM is not DEXPTIME but O(N) if the size of types manipulated is bounded by a constant; IOW you need exponential-sized types to get an exponential slowdown. I suspect the slow type-checking in cases such as Sergei's is due to something else, linked to all the evaluation that happens at the type-level. Stefan From mechvel at botik.ru Thu Jan 12 19:35:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 12 Jan 2017 21:35:26 +0300 Subject: [Agda] type check performance In-Reply-To: <20170111192138.GM5222@ritchie.cas.mcmaster.ca> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> Message-ID: <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> On Wed, 2017-01-11 at 14:21 -0500, Wolfram Kahl wrote: > On Wed, Jan 11, 2017 at 09:46:00PM +0300, Sergei Meshveliani wrote: > > And my case is different. I define standard classical algebraic > > structures: Semigroup, Group, Ring, EuclideanRing, and such, and prove > > in Agda certain well-known properties of their operations. There cannot > > appear such type expressions like above for id id ... id. > > > > And still its type check needs 7Gb RAM and 60 minutes of time (on a 3 > > GHz computer). > > > > [...] > > > > There is something strange in these 60 minutes and 7 Gb minimum. > > For example, EuclideanRing is far enough in the hierarchy. > > And I ask to print the type (C-c C-d) of the function (lemma) > > > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > > > > in the module parameterized by an instance of EuclideanRing. > > It shows > > > > (a b : UpIntegralRing.Carrier upIR) ? > > (UpIntegralRing.*upMonoid upIR UpMonoid.? b) a ? > > (upIR UpIntegralRing.? EuclideanRing.eucRem upIR?? E a b) > > (UpIntegralRing.0# upIR) > > > > This does not look like a large expression > > (though it contains several parts that may need to be replaced with > > their expanded definitions, depending on situation). > > Can you go to the top-level of the file module in which this is defined, > and ask for the type (C-c C-d) of the qualified name of remByDivisor, > qualified as necessary to be able to refer to it from the top-level > of the file module? > > And also do that for each of ? , eucRem , ? , and 0# ? > > If my understanding is correct, then at least in some circumstances > and to a certain degree, these are the types that Agda is really dealing with. > I have there -------------------------------------------- open import Level using (_?_) ... ... module OfEuclideanRing {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) (open OverIntegralRing-0 upIR?? using (EuclideanRing)) E : EuclideanRing) where upIR = proj? upIR?? _??_ = proj? upIR?? open UpIntegralRing upIR using (setoid; ... _?_; ... 0#; ... *upMonoid) renaming (Carrier to C) open UpMonoid *upMonoid using (_?_; _?_; ?cong; ... ?trans) renaming (?? to ?*; _~asd_ to _~_) ... open EuclideanRing E using (eucRem; ...) ... remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# ... -------------------------------------------- I go to the beginning of this file and command C-c C-d remByDivisor And it prints its type. Now, try with the _?_. This _?_ instance is opened from open UpMonoid *upMonoid, and *upMonoid is opened from open UpIntegralRing upIR. What expression need I to put to the C-c C-d input window? I try let *UM = UpIntegralRing.*upMonoid upIR in UpMonoid._?_ *UM It reports --------------- Structures0.DSet.Carrier (.Structures0.Magma.dS (Structures0.UpMagma.magma (.Structures0a.UpSemigroup.upMagma (UpMonoid.upSemigroup (UpIntegralRing.*upMonoid upIR))))) ? Structures0.DSet.Carrier (.Structures0.Magma.dS (Structures0.UpMagma.magma (.Structures0a.UpSemigroup.upMagma (UpMonoid.upSemigroup (UpIntegralRing.*upMonoid upIR))))) ? Set (?= ? ?) ------------------ It searches down: UpIntegralRing --> UpMonoid --> UpSemigroup --> UpMagma --> DSet --> Carrier for each argument in the signature of _?_ -- as it was intended. Further: C-c C-d EuclideanRing.eucRem E leads to an error: ------------------ (OverIntegralRing-0.EuclideanRing upIR??) !=< (Data.Product.? (UpIntegralRing (_?_0 upIR?? E) (_?=_1 upIR?? E)) (? upR ? Decidable? (Magma._?_ (UpIntegralRing.*magma upR)))) of type (Set (?= ? ?)) when checking that the expression E has type UpIntegralRing-with?? (_?_0 upIR?? E) (_?=_1 upIR?? E) ------------------ E is a parameter in the head module, and eucRem is opened in open EuclideanRing E ... as shown above. I wonder, why does this C-c C-d fail. Thanks, ------ Sergei From ulf.norell at gmail.com Thu Jan 12 20:05:32 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Thu, 12 Jan 2017 20:05:32 +0100 Subject: [Agda] type check performance In-Reply-To: <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> Message-ID: You should also try to print the types with implicit arguments shown. Types may look simple to a human but Agda has to worry about all the things that you would leave out of your text book. You can turns this on with C-c C-x C-h or put {-# OPTIONS --show-implicit #-} at the top of the file. / Ulf On Thu, Jan 12, 2017 at 7:35 PM, Sergei Meshveliani wrote: > On Wed, 2017-01-11 at 14:21 -0500, Wolfram Kahl wrote: > > On Wed, Jan 11, 2017 at 09:46:00PM +0300, Sergei Meshveliani wrote: > > > And my case is different. I define standard classical algebraic > > > structures: Semigroup, Group, Ring, EuclideanRing, and such, and prove > > > in Agda certain well-known properties of their operations. There cannot > > > appear such type expressions like above for id id ... id. > > > > > > And still its type check needs 7Gb RAM and 60 minutes of time (on a 3 > > > GHz computer). > > > > > > [...] > > > > > > There is something strange in these 60 minutes and 7 Gb minimum. > > > For example, EuclideanRing is far enough in the hierarchy. > > > And I ask to print the type (C-c C-d) of the function (lemma) > > > > > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > > > > > > in the module parameterized by an instance of EuclideanRing. > > > It shows > > > > > > (a b : UpIntegralRing.Carrier upIR) ? > > > (UpIntegralRing.*upMonoid upIR UpMonoid.? b) a ? > > > (upIR UpIntegralRing.? EuclideanRing.eucRem upIR?? E a b) > > > (UpIntegralRing.0# upIR) > > > > > > This does not look like a large expression > > > (though it contains several parts that may need to be replaced with > > > their expanded definitions, depending on situation). > > > > Can you go to the top-level of the file module in which this is defined, > > and ask for the type (C-c C-d) of the qualified name of remByDivisor, > > qualified as necessary to be able to refer to it from the top-level > > of the file module? > > > > And also do that for each of ? , eucRem , ? , and 0# ? > > > > If my understanding is correct, then at least in some circumstances > > and to a certain degree, these are the types that Agda is really dealing > with. > > > > I have there > > -------------------------------------------- > open import Level using (_?_) > ... > ... > module OfEuclideanRing {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) > (open OverIntegralRing-0 upIR?? using (EuclideanRing)) > E : EuclideanRing) > where > upIR = proj? upIR?? > _??_ = proj? upIR?? > > open UpIntegralRing upIR using > (setoid; ... _?_; ... 0#; ... *upMonoid) > renaming (Carrier to C) > > open UpMonoid *upMonoid using (_?_; _?_; ?cong; ... ?trans) > renaming (?? to ?*; _~asd_ to _~_) > ... > open EuclideanRing E using (eucRem; ...) > ... > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > ... > -------------------------------------------- > > I go to the beginning of this file and command > > C-c C-d > remByDivisor > > And it prints its type. > Now, try with the _?_. > > This _?_ instance is opened from open UpMonoid *upMonoid, > > and *upMonoid is opened from open UpIntegralRing upIR. > > What expression need I to put to the C-c C-d input window? > I try > let *UM = UpIntegralRing.*upMonoid upIR in UpMonoid._?_ *UM > > It reports > > --------------- > Structures0.DSet.Carrier > (.Structures0.Magma.dS (Structures0.UpMagma.magma > (.Structures0a.UpSemigroup.upMagma > (UpMonoid.upSemigroup (UpIntegralRing.*upMonoid upIR))))) ? > Structures0.DSet.Carrier > (.Structures0.Magma.dS (Structures0.UpMagma.magma > (.Structures0a.UpSemigroup.upMagma > (UpMonoid.upSemigroup (UpIntegralRing.*upMonoid upIR))))) ? > Set (?= ? ?) > ------------------ > > It searches down: > UpIntegralRing --> UpMonoid --> UpSemigroup --> UpMagma --> DSet --> > Carrier > > for each argument in the signature of _?_ -- as it was intended. > > Further: > C-c C-d > EuclideanRing.eucRem E > > leads to an error: > ------------------ > (OverIntegralRing-0.EuclideanRing upIR??) !=< > (Data.Product.? (UpIntegralRing (_?_0 upIR?? E) (_?=_1 upIR?? E)) > (? upR ? Decidable? (Magma._?_ (UpIntegralRing.*magma upR)))) > of type (Set (?= ? ?)) > when checking that the expression E has type > UpIntegralRing-with?? (_?_0 upIR?? E) (_?=_1 upIR?? E) > ------------------ > > E is a parameter in the head module, and eucRem is opened in > open EuclideanRing E ... > as shown above. > I wonder, why does this C-c C-d fail. > > Thanks, > > ------ > Sergei > > > > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kahl at cas.mcmaster.ca Thu Jan 12 20:55:58 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Thu, 12 Jan 2017 14:55:58 -0500 Subject: [Agda] type check performance In-Reply-To: <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> Message-ID: <20170112195558.GA5222@ritchie.cas.mcmaster.ca> On Thu, Jan 12, 2017 at 09:35:26PM +0300, Sergei Meshveliani wrote: > On Wed, 2017-01-11 at 14:21 -0500, Wolfram Kahl wrote: > > Can you go to the top-level of the file module in which this is defined, > > and ask for the type (C-c C-d) of the qualified name of remByDivisor, > > qualified as necessary to be able to refer to it from the top-level > > of the file module? > > > > And also do that for each of ? , eucRem , ? , and 0# ? > > > > If my understanding is correct, then at least in some circumstances > > and to a certain degree, these are the types that Agda is really dealing with. > > > > I have there > > -------------------------------------------- > open import Level using (_?_) > ... > ... > module OfEuclideanRing {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) > (open OverIntegralRing-0 upIR?? using (EuclideanRing)) > E : EuclideanRing) > where > > [...] > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > ... > -------------------------------------------- > > I go to the beginning of this file and command > > C-c C-d > remByDivisor > > And it prints its type. I just tried something like that myself, and apparently my instructions were no good --- sorry! Better create a test file: Test1.agda: | module Test1 where | | import OfEuclideanRing and then do C-c C-d OfEuclideanRing.remByDivisor there. Wolfram From mechvel at botik.ru Fri Jan 13 13:20:34 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 13 Jan 2017 15:20:34 +0300 Subject: [Agda] type check performance In-Reply-To: <1e442cb3-07dc-c1bb-432e-2bc296630cbc@cse.gu.se> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <1e442cb3-07dc-c1bb-432e-2bc296630cbc@cse.gu.se> Message-ID: <1484310034.3073.50.camel@one.mechvel.pereslavl.ru> On Wed, 2017-01-11 at 21:27 +0100, Nils Anders Danielsson wrote: > On 2017-01-11 19:46, Sergei Meshveliani wrote: > > Here the size of the type expression grows 2 times with each adding of > > `id'. > > > > Probably this expense in unavoidable. > > No, it can be avoided. See the first page of the paper from which I took > the example: "Implementing Typed Intermediate Languages" by Shao, League > and Monnier (https://doi.org/10.1145/289423.289460). The basic idea is > to store the terms more compactly. > Well, of course, the type checker can process a type expression as (T (f x y) -> T (f x y)) -> (T (f x y) -> T (f x y)) with keeping it as let U = T (f x y); V = U -> U in V -> V Is this the idea? I am sorry if I am missing the point. In many examples this will prevent the data explosion. In others it may lead to wasting time ..., also I do not know, what difficulties will this bring to modifying the unification method, modifying normalization procedure etc. I have an impression that GHC compiler or interpreter deal with this kind of evaluation strategy, when concerning operating with _values_ (?). I have the following question to Agda developers. Suppose a programmer needs to find out whether his Agda program involves enormous internal type expression growth when type-checking, which can be canceled by bringing to the the above `let' form. Suppose that a certain debug-type-check version 1) performs type checking as usual, 2) notes each particularly large type expression E (its internal form), and brings it to the `let' form and compares the two sizes, 3) returns the statistics in the end. Will this statistics really show the inefficiency caused by unlucky internal representation of a type? Is such a `profiling' easy to implement? (can this be tested by somehow modifying the application source program?). This does not require any essential change in the type checker. This is only to test whether this particular effect takes place when type-checking any chosen application. Suppose that all reasonable applications on practice do not reveal such an effect. Then the problem can be delayed, and one will search for other source of inefficiency. What people think of this? Thanks, ------ Sergei From mechvel at botik.ru Fri Jan 13 17:47:09 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 13 Jan 2017 19:47:09 +0300 Subject: [Agda] type check performance In-Reply-To: <20170112195558.GA5222@ritchie.cas.mcmaster.ca> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> <20170112195558.GA5222@ritchie.cas.mcmaster.ca> Message-ID: <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> On Thu, 2017-01-12 at 14:55 -0500, Wolfram Kahl wrote: > On Thu, Jan 12, 2017 at 09:35:26PM +0300, Sergei Meshveliani wrote: > > On Wed, 2017-01-11 at 14:21 -0500, Wolfram Kahl wrote: > > > Can you go to the top-level of the file module in which this is defined, > > > and ask for the type (C-c C-d) of the qualified name of remByDivisor, > > > qualified as necessary to be able to refer to it from the top-level > > > of the file module? > > > > > > And also do that for each of ? , eucRem , ? , and 0# ? > > > > > > If my understanding is correct, then at least in some circumstances > > > and to a certain degree, these are the types that Agda is really dealing with. > > > > > > > I have there > > > > -------------------------------------------- > > open import Level using (_?_) > > ... > > ... > > module OfEuclideanRing {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) > > (open OverIntegralRing-0 upIR?? using (EuclideanRing)) > > E : EuclideanRing) > > where > > > > [...] > > > > remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# > > ... > > -------------------------------------------- > > > > I go to the beginning of this file and command > > > > C-c C-d > > remByDivisor > > > > And it prints its type. > > I just tried something like that myself, and apparently my instructions > were no good --- sorry! Better create a test file: > > Test1.agda: > > | module Test1 where > | import OfEuclideanRing > > and then do > > C-c C-d OfEuclideanRing.remByDivisor > > there. Thank you for help. I program: --****************************************************** module Test where open import Structures3 using (UpCommutativeRing) f : ? {? ?=} ? (upR : UpCommutativeRing ? ?=) ? UpCommutativeRing.Carrier upR ? UpCommutativeRing.Carrier upR f upR a = let open UpCommutativeRing upR in a + (a * a + 1#) ------------------------------------------------------ module Test1 where open import Test --**************************************************** (this does not use the Standard library algebraic hierarchy). Then, load Test1 and command C-c C-d f It prints {? ?= : .Agda.Primitive.Level} (upR : .Structures3.UpCommutativeRing ? ?=) ? .Relation.Binary.DecSetoid.Carrier (.Structures0.UpDSet.decSetoid (.Structures0.UpMagma.upDSet (.Structures0a.UpSemigroup.upMagma (.Structures1.UpMonoid.upSemigroup (.Structures1.UpGroup.upMonoid (.Structures1.UpCommutativeGroup.upGroup (.Structures2.UpRingoid.+upCommGroup (.Structures2.UpRing.upRingoid (.Structures3.UpRingWithOne.upRing (.Structures3.UpCommutativeRing.upRingWithOne upR)))))))))) ? .Relation.Binary.DecSetoid.Carrier (.Structures0.UpDSet.decSetoid (.Structures0.UpMagma.upDSet (.Structures0a.UpSemigroup.upMagma (.Structures1.UpMonoid.upSemigroup (.Structures1.UpGroup.upMonoid (.Structures1.UpCommutativeGroup.upGroup (.Structures2.UpRingoid.+upCommGroup (.Structures2.UpRing.upRingoid (.Structures3.UpRingWithOne.upRing (.Structures3.UpCommutativeRing.upRingWithOne upR)))))))))) Naturally, It mentions the levels from UpcommutativeRing down to DecSetoid -- somewhat 11 levels, as it is set in the user program. How does the type checker keep this in memory? With what expressions this expression is being unified (by which variables -- upR, a ?) in the process of type checking the whole project? What is happening with the generic code (for proofs, for additional `ordinary' functions) contained in some records inside this expression? (may be some substitutions are made in this code along the process of unification) ? Does this print-out explain that the cost of 7 Gb * 60 minutes is natural for this project? -- I wonder about all this, only may have suspicions. Now, let us compare this to using CommutativeRing of Standard library. There CommutativeRing has level 7 in the hierarchy. --***************************************************** module Test where open import Algebra using (CommutativeRing) f : ? {? ?=} ? (rR : CommutativeRing ? ?=) ? CommutativeRing.Carrier rR ? CommutativeRing.Carrier rR f rR a = let open CommutativeRing rR in a + (a * a + 1#) ----------------------------- module Test1 where open import Test --***************************************************** Load Test1 and command C-c C-d f It prints {? ?= : .Agda.Primitive.Level} (rR : .Algebra.CommutativeRing ? ?=) ? .Algebra.CommutativeRing.Carrier rR ? .Algebra.CommutativeRing.Carrier rR Am I missing something? Why does not it mention the intermediate structure names, like Semigroup, Group, AbelianGroup ... ? I know that Standard library builds the hierarchy in a different way. Really, does this imply that this way has somewhat 10-20 smaller type expressions for domains than mine when type-checking? Regards, ------ Sergei From carette at mcmaster.ca Fri Jan 13 18:00:05 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Fri, 13 Jan 2017 12:00:05 -0500 Subject: [Agda] type check performance In-Reply-To: <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> <20170112195558.GA5222@ritchie.cas.mcmaster.ca> <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> Message-ID: <57d6bfd8-9295-f156-efcd-19e196db5448@mcmaster.ca> Investigate what "open ... public" does. This is useful to 'flatten' hierarchies. Jacques On 2017-01-13 11:47 AM, Sergei Meshveliani wrote: > Am I missing something? > Why does not it mention the intermediate structure names, like > Semigroup, Group, AbelianGroup ... ? > > From mailinglists at robbertkrebbers.nl Fri Jan 13 19:55:34 2017 From: mailinglists at robbertkrebbers.nl (Robbert Krebbers) Date: Fri, 13 Jan 2017 19:55:34 +0100 Subject: [Agda] type check performance In-Reply-To: <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> <20170112195558.GA5222@ritchie.cas.mcmaster.ca> <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> Message-ID: <731610ed-fcf4-9b58-aee9-45a3b2931510@robbertkrebbers.nl> This may be related: having large chains of coercions is also problematic in Coq, see [1]: There is also a severe efficiency issue: the complexity of Coq's term comparison algorithm is exponential in the length of the coercion chain. While this is clearly a problem specific to the current Coq implementation, it is hard and unlikely to be resolved soon, so it seems prudent to seek a design that does not run into it. The paper [1] describes another way of organizing algebraic hierarchies in Coq so that these long chains of coercions can be avoided. It quite crucially relies on Coq's canonical structures mechanism, so I have no clue whether you can practically do something similar in Agda. [1] Fran?ois Garillot, Georges Gonthier, Assia Mahboubi, Laurence Rideau. Packaging Mathematical Structures. TPHOLs'09. https://hal.inria.fr/inria-00368403v2 On 01/13/2017 05:47 PM, Sergei Meshveliani wrote: > On Thu, 2017-01-12 at 14:55 -0500, Wolfram Kahl wrote: >> On Thu, Jan 12, 2017 at 09:35:26PM +0300, Sergei Meshveliani wrote: >>> On Wed, 2017-01-11 at 14:21 -0500, Wolfram Kahl wrote: >>>> Can you go to the top-level of the file module in which this is defined, >>>> and ask for the type (C-c C-d) of the qualified name of remByDivisor, >>>> qualified as necessary to be able to refer to it from the top-level >>>> of the file module? >>>> >>>> And also do that for each of ? , eucRem , ? , and 0# ? >>>> >>>> If my understanding is correct, then at least in some circumstances >>>> and to a certain degree, these are the types that Agda is really dealing with. >>>> >>> >>> I have there >>> >>> -------------------------------------------- >>> open import Level using (_?_) >>> ... >>> ... >>> module OfEuclideanRing {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) >>> (open OverIntegralRing-0 upIR?? using (EuclideanRing)) >>> E : EuclideanRing) >>> where >>> >>> [...] >>> >>> remByDivisor : (a b : C) ? b ? a ? eucRem a b ? 0# >>> ... >>> -------------------------------------------- >>> >>> I go to the beginning of this file and command >>> >>> C-c C-d >>> remByDivisor >>> >>> And it prints its type. >> >> I just tried something like that myself, and apparently my instructions >> were no good --- sorry! Better create a test file: >> >> Test1.agda: >> >> | module Test1 where >> | import OfEuclideanRing >> >> and then do >> >> C-c C-d OfEuclideanRing.remByDivisor >> >> there. > > > Thank you for help. > I program: > > --****************************************************** > module Test where > open import Structures3 using (UpCommutativeRing) > > f : ? {? ?=} ? (upR : UpCommutativeRing ? ?=) ? > UpCommutativeRing.Carrier upR ? > UpCommutativeRing.Carrier upR > > f upR a = let open UpCommutativeRing upR > in a + (a * a + 1#) > > ------------------------------------------------------ > module Test1 where > open import Test > > --**************************************************** > > (this does not use the Standard library algebraic hierarchy). > > Then, load Test1 and command > > C-c C-d > f > > It prints > > {? ?= : .Agda.Primitive.Level} > (upR : .Structures3.UpCommutativeRing ? ?=) ? > .Relation.Binary.DecSetoid.Carrier > (.Structures0.UpDSet.decSetoid > (.Structures0.UpMagma.upDSet > (.Structures0a.UpSemigroup.upMagma > (.Structures1.UpMonoid.upSemigroup > (.Structures1.UpGroup.upMonoid > (.Structures1.UpCommutativeGroup.upGroup > (.Structures2.UpRingoid.+upCommGroup > (.Structures2.UpRing.upRingoid > (.Structures3.UpRingWithOne.upRing > (.Structures3.UpCommutativeRing.upRingWithOne upR)))))))))) ? > .Relation.Binary.DecSetoid.Carrier > (.Structures0.UpDSet.decSetoid > (.Structures0.UpMagma.upDSet > (.Structures0a.UpSemigroup.upMagma > (.Structures1.UpMonoid.upSemigroup > (.Structures1.UpGroup.upMonoid > (.Structures1.UpCommutativeGroup.upGroup > (.Structures2.UpRingoid.+upCommGroup > (.Structures2.UpRing.upRingoid > (.Structures3.UpRingWithOne.upRing > (.Structures3.UpCommutativeRing.upRingWithOne upR)))))))))) > > > Naturally, It mentions the levels from UpcommutativeRing down to > DecSetoid -- somewhat 11 levels, as it is set in the user program. > > How does the type checker keep this in memory? > With what expressions this expression is being unified > (by which variables -- upR, a ?) > in the process of type checking the whole project? > What is happening with the generic code (for proofs, for additional > `ordinary' functions) contained in some records inside this > expression? > (may be some substitutions are made in this code along the process of > unification) ? > Does this print-out explain that the cost of 7 Gb * 60 minutes > is natural for this project? > > -- I wonder about all this, only may have suspicions. > > > Now, let us compare this to using CommutativeRing of Standard library. > There CommutativeRing has level 7 in the hierarchy. > > --***************************************************** > module Test where > open import Algebra using (CommutativeRing) > > f : ? {? ?=} ? (rR : CommutativeRing ? ?=) ? > CommutativeRing.Carrier rR ? CommutativeRing.Carrier rR > > f rR a = let open CommutativeRing rR in a + (a * a + 1#) > > ----------------------------- > module Test1 where > open import Test > > --***************************************************** > > > Load Test1 and command > C-c C-d > f > It prints > > {? ?= : .Agda.Primitive.Level} > (rR : .Algebra.CommutativeRing ? ?=) ? > .Algebra.CommutativeRing.Carrier rR ? > .Algebra.CommutativeRing.Carrier rR > > Am I missing something? > Why does not it mention the intermediate structure names, like > Semigroup, Group, AbelianGroup ... ? > > I know that Standard library builds the hierarchy in a different way. > Really, does this imply that this way has somewhat 10-20 smaller type > expressions for domains than mine when type-checking? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at botik.ru Fri Jan 13 20:13:41 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 13 Jan 2017 22:13:41 +0300 Subject: [Agda] type check performance In-Reply-To: <57d6bfd8-9295-f156-efcd-19e196db5448@mcmaster.ca> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> <20170112195558.GA5222@ritchie.cas.mcmaster.ca> <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> <57d6bfd8-9295-f156-efcd-19e196db5448@mcmaster.ca> Message-ID: <1484334821.3064.68.camel@one.mechvel.pereslavl.ru> On Fri, 2017-01-13 at 12:00 -0500, Jacques Carette wrote: > Investigate what "open ... public" does. This is useful to 'flatten' > hierarchies. The code in my last letter does make use of open-public. Thus in the function f : ? {? ?=} ? (upR : UpCommutativeRing ? ?=) ? UpCommutativeRing.Carrier upR ? UpCommutativeRing.Carrier upR f upR a = let open UpCommutativeRing upR in a + (a * a + 1#) Carrier, +, *, 1# are not operations in UpCommutativeRing. This structure definition is record UpCommutativeRing (? ?= : Level) : Set _ where constructor upCommRing? field upRingWithOne : UpRingWithOne ? ?= commutativeRing : CommutativeRing upRingWithOne open CommutativeRing commutativeRing public hiding (upRingWithOne) CommutativeRing also does not have them, instead it (besides having operations of its own) declares open-public for certain lower level structures, and so on. So that 1# appears only at the level of RingWithOne, and comes as (Monoid._?_ *monoid). _+_ appears only from Ringoid, and is substituted as (Magma._?_ +magma). and Carrier appears only at the lowest level of (Dec)Setoid. Each of these operations is declared only once in one place in the hierarchy. So, I have an impression that open-public does not help to have a type expression printing size comparable to the one of Standard library. One of the differences to Standard library is that Standard library re-declares some operations. For example, Setoid declares Carrier and _?_. And DecSetoid re-declares these two, and also adds isDecEquivalence. And Semigroup re-declares these two, and also adds _?_ and isSemigroup. And Monoid re-declares Carrier, _?_, _?_, and adds ? and isMonoid. And so on. This re-declaring looks strange to me. I suspected that this was set according some subtle considerations about type expressions size. I always thought that I need another approach. Because DoCon-A has more levels and more operations at each level, and such a re-declaring will probably lead to exponentially grown code, the program will hardly be possible to read even to myself. Now, the type sizes, and the type check cost are this way ... I do not know of whether it is due to different architecture or due to other features (there are a lot of proofs, some additional operations). I also do not understand of whether this can, in principle, be essentially improved by fixing the type checker. Or may be, a machine checking of some full formal constructive proof of a small size may require exponentially large cost as minimum. I just suspect that this particular DoCon-A-0.04.1 can be type-checked in 500 Mb * 10 minutes on a 3 GHz computer, if only Agda is somehow optimized. The current simplest question is: why the above type(f) related to CommutativeRing is printed about 10 times shorter for Standard library, and whether this size difference has a real relation to the type check cost. Regards, ------ Sergei > > > On 2017-01-13 11:47 AM, Sergei Meshveliani wrote: > > Am I missing something? > > Why does not it mention the intermediate structure names, like > > Semigroup, Group, AbelianGroup ... ? > > > > > > From mechvel at botik.ru Mon Jan 16 14:37:50 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 16 Jan 2017 16:37:50 +0300 Subject: [Agda] type check performance In-Reply-To: <731610ed-fcf4-9b58-aee9-45a3b2931510@robbertkrebbers.nl> References: <1483903229.4060.26.camel@one.mechvel.pereslavl.ru> <1484139675.3285.18.camel@one.mechvel.pereslavl.ru> <1484160360.2728.61.camel@one.mechvel.pereslavl.ru> <20170111192138.GM5222@ritchie.cas.mcmaster.ca> <1484246126.3285.42.camel@one.mechvel.pereslavl.ru> <20170112195558.GA5222@ritchie.cas.mcmaster.ca> <1484326029.2448.83.camel@one.mechvel.pereslavl.ru> <731610ed-fcf4-9b58-aee9-45a3b2931510@robbertkrebbers.nl> Message-ID: <1484573870.31637.53.camel@scico.botik.ru> On Fri, 2017-01-13 at 19:55 +0100, Robbert Krebbers wrote: > This may be related: having large chains of coercions is also > problematic in Coq, see [1]: > > There is also a severe efficiency issue: the complexity of Coq's > term comparison algorithm is exponential in the length of the > coercion chain. While this is clearly a problem specific to the > current Coq implementation, it is hard and unlikely to be > resolved soon, so it seems prudent to seek a design that does > not run into it. > > The paper [1] describes another way of organizing algebraic hierarchies > in Coq so that these long chains of coercions can be avoided. It quite > crucially relies on Coq's canonical structures mechanism, so I have no > clue whether you can practically do something similar in Agda. > > [1] Fran?ois Garillot, Georges Gonthier, Assia Mahboubi, Laurence > Rideau. Packaging Mathematical Structures. TPHOLs'09. > https://hal.inria.fr/inria-00368403v2 > I looked there. It is difficult for me to understand. It is written in introduction ---------------------------------------------------------------------- "While this unbundling allows for maximal flexibility, it also induces a prolif-eration of arguments that is rapidly overwhelming. A typical algebraic structure, such as a ring, involves half a dozen constants and even more axioms. Moreover such structures are often nested, e.g., for the Cayley-Hamilton theorem one needs to consider the ring of polynomials over the ring of matrices over a general commutative ring. The size of the terms involved grows as C^n , where C is the number of separate components of a structure, and n is the structure nesting depth. For Cayley-Hamilton we would have C = 15 and n = 3, and thus terms large enough to make theorem proving impractical, given that algorithms in user-level tactics are more often than not nonlinear. Thus, at the very least, related operations and axioms should be packed using Coq?s dependent records (?-types); we call such records mixins. ..." -------------------------------------------------------------------- I am implementing a similar hierarchy for similar algorithms for algebra. (But the goal is not any particular difficult theorem, but to express classical algebraic structures + proofs for simple classical statements for them, as they are given in simple textbooks). The authors write about C^n where n is the depth of the structure nesting depth. They write that for Polynomials over Matrices over a generic CommutativeRing, this makes it C = 15, and n = 3, and the cost of 15^3. So far I did in Agda only n = 2 (Polynomial over a generic CommutativeRing). But in Haskell, I programmed computations in much more complex domains, such as Fraction -- Polynomial -- ResidueRing -- Polynomial -- Matrix ..., (1) with each of these domain constructors being supplied with appropriate _instances_ of various classical categories (classes): Semigroup, Group, Ring ... And this is compiled fast in GHC, and it runs fast. But type expressions in Agda and in Coq type checker are represented more fully than in the GH compiler. I doubt: what difficulty will appear with Agda when we program operations with the data belonging to domains built by n constructors, like n = 5 in the example of (1). But we already have another, more close problem: representing nested generic structures having depth 15 -- 20. Thus DoCon-0.04.1 defines DSet (DecSetoid + possible listing) | *<- Magma (a DSet with a congruent binary operation _?_) | | -<- | - Semigroup --> CommutativeSemigroup | | | | | Monoid --> CommutativeMonoid | | | | | | | CCMonoid (with cancellation) | | | | | | Group FactorizationMonoid | | | | | CommutativeGroup | | | | -> Ringoid | | *-----> Ring | RingWithOne | CommutativeRing | IntegralRing | \ \ | \ ----- EuclideanRing | \ | ------- GCDRing (with gcd) | FactorizationRing | Field If I skip lemma proofs there, and various instance implementation (so that there remain only vocabularies, signatures), then this will take, may be, 1 Gb to type-check (which looks large). Then, adding simple instance implementation and proofs relating to this hierarchy makes type checking more eager, a minimum of 7 Gb needed. What precisely is here the mechanism for the internal type expression explosion -- I do not know. Probably, we need a tool for measuring intermediate type expression sizes in the type checker. (?) Regards, ------ Sergei Another question > > Regards, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Fri Jan 20 11:35:31 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 20 Jan 2017 13:35:31 +0300 Subject: [Agda] strictness switch Message-ID: <1484908531.2737.13.camel@one.mechvel.pereslavl.ru> Dear Agda developers, Is it possible to switch on strictness for the Agda type checker? How much of strictness can be switched on? It is interesting to see how does strictness effect on the type check cost for a particular example. Thanks, ------ Sergei From tmoldere at vub.ac.be Fri Jan 20 14:40:33 2017 From: tmoldere at vub.ac.be (Tim Molderez) Date: Fri, 20 Jan 2017 14:40:33 +0100 Subject: [Agda] 2017: Final call for workshop, symposium, demo & poster submissions Message-ID: <01942c77-dac3-7541-0f85-595c15ecc179@vub.ac.be> ----------------------------------------------------------------------- 2017 : The Art, Science, and Engineering of Programming April 3-6, 2017, Brussels, Belgium http://2017.programming-conference.org ----------------------------------------------------------------------- Final call for submissions to all co-located events at the 2017 conference: - ELS 2017 - 10th European Lisp Symposium - Modularity 2017 Invited talks - International Symposium on Modularity - **Updated** ACM Student Research Competition / 2017 Posters - **NEW** 2017 Demos - **NEW** CoCoDo 2017 - Raincode Labs Compiler Coding Dojo - LASSY 2017 - 2nd Workshop on Live Adaptation of Software SYstems - **NEW** MiniPLoP 2017 - Mini Pattern Languages of Programs writers' workshop - **Updated** MOMO 2017 - 2nd Workshop on Modularity in Modelling - MoreVMs 2017 - 1st Workshop on Modern Language Runtimes, Ecosystems, and VMs - PASS 2017 - 1st Workshop on Programming Across the System Stack - PX 2017 - 2nd Workshop on Programming Experience - ProWeb 2017 - 1st Workshop on Programming Technology for the Future Web - Salon des Refus?s 2017 - 1st edition of the Salon des Refus?s workshop All co-located events will take place during April 3-4 2017. CFPs for each of these events are listed below. (apart from Modularity 2017, which is invitation-based) **************************************************************** ELS 2017 - 10th European Lisp Symposium Submissions: Mon 30 Jan 2017 Notifications: Mon 27 Feb 2017 Symposium date: Mon Apr 3 - Tue Apr 4 2017 http://2017.programming-conference.org/track/els-2017 **************************************************************** The purpose of the European Lisp Symposium is to provide a forum for the discussion and dissemination of all aspects of design, implementation and application of any of the Lisp and Lisp-inspired dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, Hop and so on. We encourage everyone interested in Lisp to participate. The 10th European Lisp Symposium invites high quality papers about novel research results, insights and lessons learned from practical applications and educational perspectives. We also encourage submissions about known ideas as long as they are presented in a new setting and/or in a highly elegant way. Topics include but are not limited to: * Context-, aspect-, domain-oriented and generative programming * Macro-, reflective-, meta- and/or rule-based development approaches * Language design and implementation * Language integration, inter-operation and deployment * Development methodologies, support and environments * Educational approaches and perspectives * Experience reports and case studies ******************************************************************** ACM Student Research Competition / 2017 Posters Submissions **extended** : Mon 30 Jan 2017 http://2017.programming-conference.org/track/programming-posters ******************************************************************** The ACM Student Research Competition (SRC), sponsored by Microsoft Research, offers a unique forum for ACM student members at the undergraduate and graduate levels to present their original research before a panel of judges and conference attendees. The SRC gives visibility to up-and-coming young researchers, and offers them an opportunity to discuss their research with experts in their field, get feedback, and to help sharpen communication and networking skills. ACM?s SRC program covers expenses up to $500 for all students invited to an SRC. See our website for requirements and further details. Please note that, while the SRC involves a poster session, there also is a regular poster session that isn't part of a competition. Submissions for this regular session are due March 3rd. *********************************************************************** ?Programming? 2017 Demos Submissions: Fri 3 Mar 2017 http://2017.programming-conference.org/track/programming-2017-Demos *********************************************************************** Demonstrations will be selected on the basis of technical merit, relevance, and novelty of presentation at . They can include work in progress, commercial or in-house applications, proofs of concept, results of academic or industrial research, or any other innovative programming tools or systems. We encourage authors of accepted papers to co-located workshops and main conferences also submit a demo proposal. We hope that this will give them the opportunity to show their work in action, and increase the visibility of their results. We suggest to cite the paper in the demo abstract. **************************************************************** CoCoDo 2017 - Raincode Labs Compiler Coding Dojo Coding dojo date: Tue 4 Apr 2017 https://cocodo.github.io **************************************************************** CoCoDo is a coding dojo where you can enjoy an entire day of compiler programming under gentle guidance of field experts. Compiler construction comprises, but is not limited to, lexical analysis, syntactic analysis, preprocessing, context handling, code generation, code optimisation, virtual machines, interpreters, smell detection, clone management, portability, migration, refactoring, domain-specific language design, linking and loading, assembling and disassembling, generics and reflection, numerous paradigms and so much more. If you are interested in participating, please contact Vadim Zaytsev: vadim at raincodelabs.com ****************************************************************** LASSY 2017 - 2nd Workshop on Live Adaptation of Software SYstems Submissions: Fri 3 Feb 2017 Notifications: Fri 3 Mar 2017 Workshop date: Mon 3 Apr 2017 http://2017.programming-conference.org/track/LASSY-2017-papers ****************************************************************** When developing current-day software systems, their deployment and usage environments should be considered carefully, in order to understand the adaptations those systems might need to undergo to interact with other systems and with their environment. Moreover, due to the portability, mobility and increasingly evolutionary nature of software systems, such adaptations should be enacted even while the system is running. Developing such software systems can prove challenging, and many seemingly different techniques to address this concern have been proposed over the last couple of years. The intention of the LASSY workshop is to congregate all topics relevant to dynamic adaptation and run-time evolution of software systems, ranging from a computer science perspective covering the domains of programming languages, model-driven software development, software and service composition, context-aware databases, software variability, requirements engineering, UI adaptation and other domains, to a human perspective covering sociological or ethical implications of dynamic software systems. The workshop provides a space for discussion and collaboration between researchers working on the problem of enabling live adaptations to software systems, across the development stack. Topics of Interest: * Design and Implementation of Live Adaptive Software Systems * Context-, aspect-, feature-, role- and agent-oriented programming * Context representation and discovery * Context-aware model-driven software development * Context-aware data management * Software variability and dynamic product lines * Self-adaptive, self-explanatory systems * Inconsistency management, verification, and validation * Middleware and Runtime of Live Adaptive Software Systems * Dynamic software evolution, upgrades and configuration * Dynamic software and service composition mechanisms * Dynamic software architecture and middleware approaches * Dynamic user interface adaptation and multimodal user interfaces * Impact and Assessment of Live Adaptive Software Systems * User acceptance and usability issues * Human, sociological, ethical and legal aspects * Privacy and security aspects of dynamic adaptability * Live adaptation in smart environments (e.g. smart rooms, smart robot cells, smart factories, smart cities) * Self-adaptation and emergence in SoS and CPSoS ********************************************************************** MiniPLoP 2017 - Mini Pattern Languages of Programs writers' workshop Workshop date: Mon 3 Apr 2017 http://2017.programming-conference.org/track/MiniPLoP-2017-papers ********************************************************************** Software developers and those involved with programming have long observed that certain patterns recur and endure across different applications and systems. The growing interest in Design Patterns, Architectural Patterns, Analysis Patterns, Pedagogical Patterns, Agile Patterns, and so on, represents an effort to catalog and better communicate knowledge, providing handbooks of proven solutions to common problems. The MiniPLoP writers' workshop brings together researchers, educators, and practitioners whose interests span a remarkably broad range of topics and who share an interest in exploring the power of the pattern form. MiniPLoP invites you to add your expertise to the growing corpus of patterns. MiniPLoP focuses on improving the expression of patterns. You will have the opportunity to refine and extend your patterns or pattern ideas with the help from knowledgeable and sympathetic fellow pattern enthusiasts. You will also be able to discuss applications of patterns in industry and academia. Techniques for Pattern Mining will also be presented. Highlights include group discussions on patterns, an introduction to pattern writing, an international keynote, and the writers? workshop. This MiniPLoP at 2017 has the goal to help beginners learn more about the pattern community. If you have some patterns or pattern ideas you would like to have brainstormed or workshopped, please contact the organizers at: miniplop2017 at hillside.net **************************************************************** MOMO 2017 - 2nd Workshop on Modularity in Modelling Abstract submissions (optional) **extended** : Sun Feb 5 2017 Paper submissions **extended** : Sun Feb 12 2017 Notifications: Wed Feb 22 2017 Workshop date: Mon 3 Apr 2017 http://www.momo2017.ece.mcgill.ca/cfp.htm **************************************************************** Extending the time-honored practice of separation of concerns, Model-Driven Engineering (MDE) promotes the use of separate models to address the various concerns in the development of complex software-intensive systems. The main objective is to choose the right level of abstraction to modularize a concern, specify its properties and reason about the system under development depending on stakeholder and development needs. While some of these models can be defined with a single modelling language, a variety of heterogeneous models and languages are typically used in the various phases of software development. Furthermore, Domain-Specific Modelling Languages designed to address particular concerns are also increasingly used. Despite the power of abstraction of modelling, models of real-world problems and systems quickly grow to such an extent that managing the complexity by using proper modularization techniques becomes necessary. As a result, many (standard) modelling notations have been extended with aspect-oriented mechanisms and advanced composition operators to support advanced separation of concerns, to combine (possibly heterogeneous) models modularizing different concerns, to execute an application based on modularized models, and to reason over global properties of modularized models. The Second International Modularity in Modelling Workshop brings together researchers and practitioners interested in the theoretical and practical challenges resulting from applying modularity, advanced separation of concerns, and advanced composition at the modelling level. It is intended to provide a forum for presenting new ideas and discussing the impact of the use of modularization in the context of MDE at different levels of abstraction. We are interested in submissions on all topics related to modularity and modelling including but not limited to: * Modularization Support in Modelling Languages and Tools * Model Interfaces * Homogeneous Model Composition Operators * Heterogeneous Model Composition Operators * Visualization of Modularized and Composed Models * Effects of Using Modularization and Composition in Modelling * On Verification and Validation * On Reuse * On the Model-Driven Software Development Process (Requirements Engineering, Software Architecture, Software Design, Implementation) * On Maintenance * Experience Reports / Empirical Evaluations of Applying Modularization and Composition in Modelling * Feature-Oriented, Aspect-Oriented and Concern-Oriented Modelling * Modularization support and composition operators for specific modelling notations * Modelling essential characteristics of specific (crosscutting) concerns * Multi-View Modelling: avoiding inconsistencies, avoiding Redundancies * Support for Detecting and/or Resolution of Feature Interactions * Domain-Specific Modelling * Modularization for Domain-Specific Languages * Composition for Domain-Specific Languages * Domain-specific Aspect Models ****************************************************************************** MoreVMs 2017 - 1st Workshop on Modern Language Runtimes, Ecosystems, and VMs Submissions: Wed 15 Feb 2017 Notifications: Wed 1 Mar 2017 Workshop date: Mon 3 Apr 2017 http://2017.programming-conference.org/track/MoreVMs-2017-papers ****************************************************************************** The main goal of the workshop is to bring together both researchers and practitioners and facilitate effective sharing of their respective experiences and ideas on how languages and runtimes are utilized and where they need to improve further. We welcome presentation proposals in the form of extended abstracts discussing experiences, work-in-progress, as well as future visions from the academic as well as industrial perspective. Relevant topics include, but are definitely not limited to, the following: * Extensible VM design (compiler- or interpreter-based VMs) * Reusable runtime components (e.g. interpreters, garbage collectors, intermediate representations) * Static and dynamic compiler techniques * Techniques for compilation to high-level languages such as JavaScript * Runtimes and mechanisms for interoperability between languages * Tooling support (e.g. debugging, profiling, etc.) * Programming language development environments and virtual machines * Case studies of existing language implementations, virtual machines, and runtime components (e.g. design choices, tradeoffs, etc.) * Language implementation challenges and trade-offs (e.g. performance, completeness, etc.) * Surveys and applications usage reports to understand runtime usage in the wild * Surveys on frameworks and their impact on runtime usage * New research ideas on how we want to build languages in the future ************************************************************************** PASS 2017 - 1st Workshop on Programming Across the System Stack Submissions: Mon 13 Feb 2017 Notifications: Mon 27 Feb 2017 Workshop date: Tue 4 Apr 2017 http://2017.programming-conference.org/track/PASS-2017#Call-for-Papers ************************************************************************** The landscape of computation platforms has changed dramatically in recent years. Emerging systems - such as wearable devices, smartphones, unmanned aerial vehicles, Internet of things, cloud computing servers, heterogeneous clusters, and data centers - pose a distinct set of system-oriented challenges ranging from data throughput, energy efficiency, security, real-time guarantees, to high performance. In the meantime, code quality, such as modularity or extensibility, remains a cornerstone in modern software engineering, bringing in crucial benefits such as modular reasoning, program understanding, and collaborative software development. Current methodologies and software development technologies should be revised in order to produce software to meet system-oriented goals, while preserving high internal code quality. The role of the Software Engineer is essential, having to be aware of the implications that each design, architecture and implementation decision has on the application system ecosystem. This workshop is driven by one fundamental question: How does internal code quality interact with system-oriented goals? We welcome both positive and negative responses to this question. An example of the former would be modular reasoning systems specifically designed to promote system-oriented goals, whereas an example of the latter would be anti-patterns against system-oriented goals during software development. Areas of interest include but are not limited to: * Energy-aware software engineering (e.g. energy efficiency models, energy efficiency as a quality attribute) * Modularity support (e.g., programming language design, development tools or verification) for applications in resource-constrained or real-time systems * Emerging platforms (e.g., Internet of Things and wearable devices) * Security support (e.g., compositional information flow, compositional program analysis) * Software architecture for reusability and adaptability in systems and their interactions with applications * Empirical studies (patterns and anti-patterns) on the relationship between internal code quality and system-oriented goals * Software engineering techniques to balance the trade-off between internal code quality and efficiency * Memory bloats and long-tail performance problems across modular boundaries * Program optimization across modular boundaries * Internal code quality in systems software * Reasoning across applications, compilers, and virtual machines **************************************************************** PX 2017 - 2nd Programming Experience Workshop Submissions: Sat 4 Feb 2017 Notifications: Mon 27 Feb 2017 Workshop date: Mon 3 Apr 2017 http://programming-experience.org/px17 **************************************************************** Imagine a software development task: some sort of requirements and specification including performance goals and perhaps a platform and programming language. A group of developers head into a vast workroom. In that room they discover they need to explore the domain and the nature of potential solutions?they need exploratory programming. The Programming Experience Workshop is about what happens in that room when one or a couple of programmers sit down in front of computers and produce code, especially when it?s exploratory programming. Do they create text that is transformed into running behavior (the old way), or do they operate on behavior directly (?liveness?); are they exploring the live domain to understand the true nature of the requirements; are they like authors creating new worlds; does visualization matter; is the experience immediate, immersive, vivid and continuous; do fluency, literacy, and learning matter; do they build tools, meta-tools; are they creating languages to express new concepts quickly and easily; and curiously, is joy relevant to the experience? Correctness, performance, standard tools, foundations, and text-as-program are important traditional research areas, but the experience of programming and how to improve and evolve it are the focus of this workshop, and in this edition we would like to focus on exploratory programming. The technical topics include: * Exploratory programming * Live programming * Authoring * Representation of active content * Visualization * Navigation * Modularity mechanisms * Immediacy * Literacy * Fluency * Learning * Tool building * Language engineering ************************************************************************* ProWeb 2017 - 1st Workshop on Programming Technology for the Future Web Submissions: Wed 15 Feb 2017 Notifications: Wed 1 Mar 2017 Workshop date: Tue 4 Apr 2017 http://2017.programming-conference.org/track/proweb-2017-papers ************************************************************************* Full-fledged web applications have become ubiquitous on desktop and mobile devices alike. Whereas ?responsive? web applications already offered a more desktop-like experience, there is an increasing demand for ?rich? web applications (RIAs) that offer collaborative and even off-line functionality ?Google docs being the prototypical example. Long gone are the days that web servers merely had to answer incoming HTTP request with a block of static HTML. Today?s servers react to a continuous stream of events coming from JavaScript applications that have been pushed to clients. As a result, application logic and data is increasingly distributed. Traditional dichotomies such as ?client vs. server? and ?offline vs. online? are fading. The 1st International Workshop on Programming Technology for the Future Web, or ProWeb17, is a forum for researchers and practitioners to share and discuss new technology for programming these and future evolutions of the web. We welcome submissions introducing programming technology (i.e., frameworks, libraries, programming languages, program analyses and development tools) for implementing web applications and for maintaining their quality over time, as well as experience reports about the use of state-of-the-art programming technology. Relevant topics include, but are not limited to: * Quality on the new web: static and dynamic program analyses; code, design test and process metrics; development and migration tools; automated testing and test generation; contract systems, type systems, and web service API conformance checking; ? * Hosting languages on the web: new runtimes; transpilation or compilation to JavaScript, WebAssembly, asm.js, ? * Designing languages for the web: multi-tier (or tierless) programming; reactive programming; frameworks for multi-tier or reactive programming on the web; ? * Distributed data sharing, replication and consistency: cloud types, CRDTs, eventual consistency, offline storage, peer-to-peer communication, ? * Security on the web: client-side and server-side security policies; policy enforcement; proxies and membranes; vulnerability detection; dynamic patching, ? * Surveys and case studies using state-of-the-art web technology (e.g., WebAssembly, WebSocket, LocalStorage, AppCache, ServiceWorkers, Meteor, deepstream.io, Angular.js, React and React Native, Swarm.js, Caja, TypeScript, Proxies, ClojureScript, Amber Smalltalk, Scala.js, ?) * Ideas on and experience reports about: how to reconcile the need for quality with the need for agility on the web; how to master and combine the myriad of tier-specific technologies required to develop a web application, ? * Position statements on what the future of the web will look like **************************************************************** Salon des Refus?s 2017 Submissions: Wed 1 Feb 2017 Notifications: Fri 17 Feb 2017 Workshop date: Tue 4 Apr 2017 https://refuses.github.io **************************************************************** Salon des Refus?s (?exhibition of rejects?) was an 1863 exhibition of artworks rejected from the official Paris Salon. The jury of Paris Salon required near-photographic realism and classified works according to a strict genre hierarchy. Paintings by many, later famous, modernists such as ?douard Manet were rejected and appeared in what became known as the Salon des Refus?s. This workshop aims to be the programming language research equivalent of Salon des Refus?s. We provide a venue for exploring new ideas and new ways of doing computer science. Many interesting ideas about programming might struggle to find space in the modern programming language research community, often because they are difficult to evaluate using established evaluation methods (be it proofs, measurements or controlled user studies). As a result, new ideas are often seen as ?unscientific?. This workshop provides a venue where such interesting and thought-provoking ideas can be exposed to critical evaluation. Submissions that provoke interesting discussion among the program committee members will be published together with an attributed review that presents an alternative position, develops additional context or summarizes discussion from the workshop. This means of engaging with papers not just enables explorations of novel programming ideas, but also encourages new ways of doing computer science. Topics of interest The scope of the workshop is determined more by the format of submissions than by the specific area of programming language or computer science research that we are interested in. We welcome submissions in a format that makes it possible to think about programming in a new way, including, but not limited to: * Thought experiments ? we believe that thought experiments, analogies and illustrative metaphors can provide novel insights and inspire fruitful programming language ideas. * Experimentation ? we find prejudices in favour of theory, as far back as there is institutionalized science, but programming can often be seen more as experimentation than as theorizing. We welcome interesting experiments even if there is yet no overarching theory that explains why they happened. * Paradigms ? all scientific work is rooted in a scientific paradigm that frame what questions can be asked. We encourage submissions that reflect on existing paradigms or explore alternative scientific paradigms. * Metaphors, myths and analogies ? any description of formal, mathematical, quantitative or even poetical nature still represents just an analogy. We believe that fruitful ideas can be learned from less common forms of analogies as well as from the predominant, formal and mathematical ones. * From jokes to science fiction ? a story or an artistic performance may explore ideas and spark conversations that provide crucial inspiration for development of new computer science thinking. From kaposi.ambrus at gmail.com Fri Jan 20 16:43:25 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Fri, 20 Jan 2017 16:43:25 +0100 Subject: [Agda] TYPES 2017 call for contributions Message-ID: CALL FOR CONTRIBUTIONS 23rd International Conference on Types for Proofs and Programs, TYPES 2017 and EUTYPES Cost Action CA15123 meeting Budapest, Hungary, 29 May - 1 June 2017 http://types2017.elte.hu BACKGROUND The TYPES meetings are a forum to present new and on-going work in all aspects of type theory and its applications, especially in formalised and computer assisted reasoning and computer programming. The TYPES areas of interest include, but are not limited to: * foundations of type theory and constructive mathematics; * applications of type theory; * dependently typed programming; * industrial uses of type theory technology; * meta-theoretic studies of type systems; * proof assistants and proof technology; * automation in computer-assisted reasoning; * links between type theory and functional programming; * formalizing mathematics using type theory. We encourage talks proposing new ways of applying type theory. In the spirit of workshops, talks may be based on newly published papers, work submitted for publication, but also work in progress. The EUTypes Cost Action CA15123 (eutypes.cs.ru.nl) focuses on the same research topics as TYPES and partially sponsors the TYPES Conference: May 31 - June 1 are supported by and organised under the auspices of EUTypes. INVITED SPEAKERS * Edwin Brady (University of St Andrews) * Sara Negri (University of Helsinki) * Jakob Rehof (TU Dortmund) CONTRIBUTED TALKS We solicit contributed talks. Selection of those will be based on extended abstracts/short papers of 2 pp formatted with easychair.cls. The submission site is https://easychair.org/conferences/?conf=types2017. Important dates: * submission of 2 pp abstract: 13 March 2017 * notified of acceptance/rejection: 10 April 2017 * camera-ready version of abstract: 2 May 2017 Camera-ready versions of the accepted contributions will be published in an informal book of abstracts for distribution at the workshop. POST-PROCEEDINGS Similarly to TYPES 2011 and TYPES 2013-2016, we intend to publish a post-proceedings volume in the Leibniz International Proceedings in Informatics (LIPIcs) series (subject to successful negotiation with Dagstuhl Publishing). Submission to that volume would be open for everyone. Tentative submission deadline: September 2017. PROGRAMME COMMITTEE * Andreas Abel (Chalmers University Gothenburg) * Thorsten Altenkirch (University of Nottingham) * Jose Espirito Santo (University of Minho) * Fredrik Forsberg (University of Strathclyde) * Silvia Ghilezan (University of Novi Sad) * Hugo Herbelin (INRIA Paris-Rocquencourt) * Martin Hofmann (Ludwig Maximilian University of Munich) * Ambrus Kaposi (E?tv?s Lor?nd University) (co-chair) * Tam?s Kozsik (E?tv?s Lor?nd University) (co-chair) * Assia Mahboubi (INRIA Paris) * Alexandre Miquel (University of the Republic, Urugay) * Leonardo de Moura (Microsoft Research, Redmond, USA) * Keiko Nakata (FireEye, Dresden) * Andrew Polonsky (University Paris Diderot) * Simona Ronchi Della Rocca (Universit? di Torino) * Aleksy Schubert (University of Warsaw) * Wouter Swierstra (Utrecht University) * Tarmo Uustalu (Tallinn University of Technology) TYPES STEERING COMMITTEE Marc Bezem, Herman Geuvers (chair), Hugo Herbelin, Zhaohui Luo, Ralph Matthes, Bengt Nordstr?m, Andrew Polonsky, Aleksy Schubert, Tarmo Uustalu. ABOUT TYPES The TYPES meetings from 1990 to 2008 were annual workshops of a sequence of five EU funded networking projects. From 2009 to 2015, TYPES has been run as an independent conference series. From 2016, TYPES is partially supported by COST Action EUTypes CA15123. Previous TYPES meetings were held in Antibes (1990), Edinburgh (1991), B?stad (1992), Nijmegen (1993), B?stad (1994), Torino (1995), Aussois (1996), Kloster Irsee (1998), L?keberg (1999), Durham (2000), Berg en Dal near Nijmegen (2002), Torino (2003), Jouy-en-Josas near Paris (2004), Nottingham (2006), Cividale del Friuli (2007), Torino (2008), Aussois (2009), Warsaw (2010), Bergen (2011), Toulouse (2013), Paris (2014), Tallinn (2015), Novi Sad (2016). CONTACT Email: info at types2017.elte.hu Organisers: Ambrus Kaposi, Tam?s Kozsik, Andr?s Kov?cs and the Department of Programming Languages and Compilers at the Faculty of Informatics, E?tv?s Lor?nd University, Budapest. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.stone.davis at gmail.com Fri Jan 20 22:24:10 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Fri, 20 Jan 2017 13:24:10 -0800 Subject: [Agda] hidden agda options / getting more info about unsolved metas Message-ID: postulate yellow-highlighting-but-no-error-message : Set _ Command-line agda reports "unsolved metas" and gives a source-code location, but no information about the nature of the unsolved metas. Emacs agda gives only yellow-highlighting. I would think that Agda could report the type of the unsolved meta (in this case, `.Agda.Primitive.Level`). Is there a verbosity option to make that happen? I've seen some options (iirc, "--tc:100", e.g.) that are not listed by "agda --help". Where might I find these "developer" options listed? From martin.stone.davis at gmail.com Fri Jan 20 22:31:11 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Fri, 20 Jan 2017 13:31:11 -0800 Subject: [Agda] hidden agda options / getting more info about unsolved metas In-Reply-To: References: Message-ID: <991ff9f8-8351-9e43-d47e-45d71fcf6346@gmail.com> duh... "-v 100" is listed by 'agda --help'. On 01/20/2017 01:24 PM, Martin Stone Davis wrote: > postulate > yellow-highlighting-but-no-error-message : Set _ > > Command-line agda reports "unsolved metas" and gives a source-code > location, but no information about the nature of the unsolved metas. > Emacs agda gives only yellow-highlighting. I would think that Agda > could report the type of the unsolved meta (in this case, > `.Agda.Primitive.Level`). Is there a verbosity option to make that > happen? > > I've seen some options (iirc, "--tc:100", e.g.) that are not listed by > "agda --help". Where might I find these "developer" options listed? > From andreas.abel at ifi.lmu.de Fri Jan 20 22:32:42 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 20 Jan 2017 22:32:42 +0100 Subject: [Agda] hidden agda options / getting more info about unsolved metas In-Reply-To: References: Message-ID: <040354cd-c200-7973-7ef0-c2e67c018cac@ifi.lmu.de> My emacs agda gives me _0 : .Agda.Primitive.Level [ at /home/abel/tmp/agda-issue-2327/test/bugs/HighlightU.agda:2,50-51 ] in the *All Goals* buffer. On 20.01.2017 22:24, Martin Stone Davis wrote: > postulate > yellow-highlighting-but-no-error-message : Set _ > > Command-line agda reports "unsolved metas" and gives a source-code > location, but no information about the nature of the unsolved metas. > Emacs agda gives only yellow-highlighting. I would think that Agda could > report the type of the unsolved meta (in this case, > `.Agda.Primitive.Level`). Is there a verbosity option to make that happen? > > I've seen some options (iirc, "--tc:100", e.g.) that are not listed by > "agda --help". Where might I find these "developer" options listed? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sun Jan 22 19:36:32 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 22 Jan 2017 21:36:32 +0300 Subject: [Agda] pattern for All is not matched Message-ID: <1485110192.2401.26.camel@one.mechvel.pereslavl.ru> Please, why matching against (x?m ?a xs?m) is not type-checked below? For the program ----------------------------------------------- open import Data.Nat using (?; _?_) open import Data.List using (List; _?_) open import Data.List.All as AllM using (All) renaming (_?_ to _?a_) f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m f x m xs xxs?m = let (x?m ?a xs?m) = xxs?m in x?m -------------------------------------------------- Agda 2.5.2 reports Expected record pattern when checking the let binding x?m ?a xs?m = xxs?m In what place does it expect a record? Is this a bug in Agda ? The variant of f x m xs (x?m ?a xs?m) = x?m is type-checked. In reality, I need to use the pattern like let (maximum? m _ (x?m ?a xs?m)) = maximum x xs in foo m x?m xs?m, where maximum? is the constructor for the result record for the `maximum' function. Matching against (maximum? m _ _) is type-checked under this `let', while matching against (maximum? m _ (x?m ?a xs?m)) is not (again, "Expected record pattern"). Thanks, ------ Sergei From martin.stone.davis at gmail.com Sun Jan 22 19:54:14 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sun, 22 Jan 2017 10:54:14 -0800 Subject: [Agda] pattern for All is not matched In-Reply-To: <1485110192.2401.26.camel@one.mechvel.pereslavl.ru> References: <1485110192.2401.26.camel@one.mechvel.pereslavl.ru> Message-ID: <937f20cf-2a07-1c49-56fc-c78d86df3b29@gmail.com> Let bindings don't let you match against "datatype patterns", only record patterns. _?a_ is a datatype pattern in this sense (List being a datatype, after all). For datatypes, you can use case_of_: open import Function f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m f x m xs xxs?m = case xxs?m of ? {(x?m ?a xs?m) ? x?m} On 01/22/2017 10:36 AM, Sergei Meshveliani wrote: > Please, why matching against (x?m ?a xs?m) > is not type-checked below? > > For the program > > ----------------------------------------------- > open import Data.Nat using (?; _?_) > open import Data.List using (List; _?_) > open import Data.List.All as AllM using (All) > renaming (_?_ to _?a_) > > f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m > f x m xs xxs?m = > let (x?m ?a xs?m) = xxs?m in x?m > -------------------------------------------------- > > Agda 2.5.2 reports > > Expected record pattern > when checking the let binding x?m ?a xs?m = xxs?m > > In what place does it expect a record? > Is this a bug in Agda ? > > The variant of > > f x m xs (x?m ?a xs?m) = x?m > > is type-checked. > > > In reality, I need to use the pattern like > > let (maximum? m _ (x?m ?a xs?m)) = maximum x xs > in > foo m x?m xs?m, > > where maximum? is the constructor for the result record for the > `maximum' function. > Matching against > (maximum? m _ _) > > is type-checked under this `let', while matching against > (maximum? m _ (x?m ?a xs?m)) > is not > (again, "Expected record pattern"). > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Sun Jan 22 20:09:35 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 22 Jan 2017 22:09:35 +0300 Subject: [Agda] pattern for All is not matched In-Reply-To: References: <1485110192.2401.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1485112175.2628.14.camel@one.mechvel.pereslavl.ru> On Sun, 2017-01-22 at 10:52 -0800, Martin Stone Davis wrote: > Let bindings don't let you match against "datatype patterns", only > record patterns. _?a_ is a datatype pattern, in this sense (List being a > datatype, after all). For datatypes, you can use case_of_: > > open import Function > > f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m > f x m xs xxs?m = > case xxs?m of ? {(x?m ?a xs?m) ? x?m} Thank you for explanation. Yes, I have written the thing as let es = ... in case maximum e es of \ { (maximum? m _ (x?m ?a xs?m)) ? let a = f m xs?m in foo a } But the corresponding code with one `let' and no `case' looks much more clear: let es = ... (maximum? m _ (x?m ?a xs?m)) = maximum e es a = f m xs?m in foo a It is a pity that it is not valid. ------ Sergei > > > On 01/22/2017 10:36 AM, Sergei Meshveliani wrote: > > Please, why matching against (x?m ?a xs?m) > > is not type-checked below? > > > > For the program > > > > ----------------------------------------------- > > open import Data.Nat using (?; _?_) > > open import Data.List using (List; _?_) > > open import Data.List.All as AllM using (All) > > renaming (_?_ to _?a_) > > > > f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m > > f x m xs xxs?m = > > let (x?m ?a xs?m) = xxs?m in x?m > > -------------------------------------------------- > > > > Agda 2.5.2 reports > > > > Expected record pattern > > when checking the let binding x?m ?a xs?m = xxs?m > > > > In what place does it expect a record? > > Is this a bug in Agda ? > > > > The variant of > > > > f x m xs (x?m ?a xs?m) = x?m > > > > is type-checked. > > > > > > In reality, I need to use the pattern like > > > > let (maximum? m _ (x?m ?a xs?m)) = maximum x xs > > in > > foo m x?m xs?m, > > > > where maximum? is the constructor for the result record for the > > `maximum' function. > > Matching against > > (maximum? m _ _) > > > > is type-checked under this `let', while matching against > > (maximum? m _ (x?m ?a xs?m)) > > is not > > (again, "Expected record pattern"). > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > From martin.stone.davis at gmail.com Sun Jan 22 20:37:22 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sun, 22 Jan 2017 11:37:22 -0800 Subject: [Agda] pattern for All is not matched In-Reply-To: <1485112175.2628.14.camel@one.mechvel.pereslavl.ru> References: <1485110192.2401.26.camel@one.mechvel.pereslavl.ru> <1485112175.2628.14.camel@one.mechvel.pereslavl.ru> Message-ID: <7b1e2fdd-cfaf-c6b3-6711-2180e7178401@gmail.com> Yeah, it can be somewhat annoying. I proposed an enhancement for that here . On 01/22/2017 11:09 AM, Sergei Meshveliani wrote: > On Sun, 2017-01-22 at 10:52 -0800, Martin Stone Davis wrote: >> Let bindings don't let you match against "datatype patterns", only >> record patterns. _?a_ is a datatype pattern, in this sense (List being a >> datatype, after all). For datatypes, you can use case_of_: >> >> open import Function >> >> f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m >> f x m xs xxs?m = >> case xxs?m of ? {(x?m ?a xs?m) ? x?m} > Thank you for explanation. > Yes, I have written the thing as > > let es = ... > in > case maximum e es > of \ > { (maximum? m _ (x?m ?a xs?m)) ? let a = f m xs?m > in foo a > } > > But the corresponding code with one `let' and no `case' looks much more > clear: > let es = ... > (maximum? m _ (x?m ?a xs?m)) = maximum e es > a = f m xs?m > in foo a > > It is a pity that it is not valid. > > ------ > Sergei > > >> >> On 01/22/2017 10:36 AM, Sergei Meshveliani wrote: >>> Please, why matching against (x?m ?a xs?m) >>> is not type-checked below? >>> >>> For the program >>> >>> ----------------------------------------------- >>> open import Data.Nat using (?; _?_) >>> open import Data.List using (List; _?_) >>> open import Data.List.All as AllM using (All) >>> renaming (_?_ to _?a_) >>> >>> f : (x m : ?) ? (xs : List ?) ? All (_? m) (x ? xs) ? x ? m >>> f x m xs xxs?m = >>> let (x?m ?a xs?m) = xxs?m in x?m >>> -------------------------------------------------- >>> >>> Agda 2.5.2 reports >>> >>> Expected record pattern >>> when checking the let binding x?m ?a xs?m = xxs?m >>> >>> In what place does it expect a record? >>> Is this a bug in Agda ? >>> >>> The variant of >>> >>> f x m xs (x?m ?a xs?m) = x?m >>> >>> is type-checked. >>> >>> >>> In reality, I need to use the pattern like >>> >>> let (maximum? m _ (x?m ?a xs?m)) = maximum x xs >>> in >>> foo m x?m xs?m, >>> >>> where maximum? is the constructor for the result record for the >>> `maximum' function. >>> Matching against >>> (maximum? m _ _) >>> >>> is type-checked under this `let', while matching against >>> (maximum? m _ (x?m ?a xs?m)) >>> is not >>> (again, "Expected record pattern"). >>> >>> Thanks, >>> >>> ------ >>> Sergei >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Jan 23 12:35:27 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 23 Jan 2017 14:35:27 +0300 Subject: [Agda] strange let-in-case-let Message-ID: <1485171327.14224.30.camel@scico.botik.ru> People, I have further problems with matching in let+case+let. Consider the following two fragments. open OfMax natDTO using (Maximum; maximum?; maximum ...) open Maximum using (max; all?max) -- Maximum is a record with constructor maximum? ... --------------------------------------------------------- (I) --- ; (tri? _ e?e' _) ? let es = map proj? mons maxStruc = maximum e (e' ? es) -- : Maximum (e ? e' ? es) m = max maxStruc ee'es?m = all?max maxStruc e'es?ees = PE.sym $ PE.cong (_? es) e?e' ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es ees?m : All (_? m) (e ? es) ees?m = DPrelude.anything in ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) ------------------------------------------------------------------ ----------------------------------------------------------- (II) --- ... ; (tri? _ e?e' _) ? let es = map proj? mons in case maximum e (e' ? es) of \ { (maximum? m _ ee'es?m) ? let e'es?ees = PE.sym $ PE.cong (_? es) e?e' ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es ees?m : All (_? m) (e ? es) ees?m = DPrelude.anything debug : All (_? m) (e ? e' ? es) -- for more testing debug = ee'es?m in ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) } ---------------------------------------------------------------------- The difference is that in (I) the fields of the result of `maximum' are extracted explicitly, by applying their labels. And in (II) their values are found by matching against the record of the result. (I) is type-checked. And (II) leads to the report ------------------------ Cannot instantiate the metavariable _295 to solution All (? section ? section ? m) (e ? map proj? mons) since it contains the variable m which is not in scope of the metavariable or irrelevant in the metavariable but relevant in the solution when checking that the expression ees?m has type _B_295 upComR a e b e' mons ord-e'es .?a e?e' .?c (pol? ((a + b , e) ? mons) (PE.subst DecrOrderedList (PE.sym $ PE.cong (? section ? section ? map proj? mons) e?e') ord-e'es)) ------------------------ in Agda 2.5.2. This report refers to the line after last "in". I also add the two "debug" lines to make sure that the value of m is valid in the body of "in". Does this effect show a bug in Agda? (Generally, matching against a record makes many programs nicer). Thank you in advance for explanation, ------ Sergei From martin.stone.davis at gmail.com Mon Jan 23 22:19:24 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Mon, 23 Jan 2017 13:19:24 -0800 Subject: [Agda] strange let-in-case-let In-Reply-To: <1485171327.14224.30.camel@scico.botik.ru> References: <1485171327.14224.30.camel@scico.botik.ru> Message-ID: That does look like strange behavior yet I'm guessing this is not a bug. Would you revise the problem example to be as small as possible and only relying on the Agda.Builtin.*? On 01/23/2017 03:35 AM, Sergei Meshveliani wrote: > People, > I have further problems with matching in let+case+let. > Consider the following two fragments. > > open OfMax natDTO using (Maximum; maximum?; maximum ...) > open Maximum using (max; all?max) > -- Maximum is a record with constructor maximum? > ... > --------------------------------------------------------- (I) --- > ; (tri? _ e?e' _) ? > let > es = map proj? mons > maxStruc = maximum e (e' ? es) -- : Maximum (e ? e' ? es) > m = max maxStruc > ee'es?m = all?max maxStruc > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > ees?m : All (_? m) (e ? es) > ees?m = DPrelude.anything > in > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > ------------------------------------------------------------------ > > ----------------------------------------------------------- (II) --- > ... > ; (tri? _ e?e' _) ? > let > es = map proj? mons > in > case maximum e (e' ? es) > of \ > { (maximum? m _ ee'es?m) ? > let > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > ees?m : All (_? m) (e ? es) > ees?m = DPrelude.anything > > debug : All (_? m) (e ? e' ? es) -- for more testing > debug = ee'es?m > in > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > } > ---------------------------------------------------------------------- > > The difference is that in (I) the fields of the result of `maximum' are > extracted explicitly, by applying their labels. And in (II) their values > are found by matching against the record of the result. > > (I) is type-checked. > And (II) leads to the report > > ------------------------ > Cannot instantiate the metavariable _295 to solution All (? section > ? section ? m) (e ? map proj? mons) since it contains the variable > m which is not in scope of the metavariable or irrelevant in the > metavariable but relevant in the solution > when checking that the expression ees?m has type > _B_295 upComR a e b e' mons ord-e'es .?a e?e' .?c > (pol? ((a + b , e) ? mons) > (PE.subst DecrOrderedList > (PE.sym $ PE.cong (? section ? section ? map proj? mons) e?e') > ord-e'es)) > ------------------------ > > in Agda 2.5.2. > > This report refers to the line after last "in". > I also add the two "debug" lines to make sure that the value of m > is valid in the body of "in". > > Does this effect show a bug in Agda? > > (Generally, matching against a record makes many programs nicer). > > Thank you in advance for explanation, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Tue Jan 24 14:46:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 24 Jan 2017 16:46:30 +0300 Subject: [Agda] strange let-in-case-let In-Reply-To: References: <1485171327.14224.30.camel@scico.botik.ru> Message-ID: <1485265590.3436.2.camel@one.mechvel.pereslavl.ru> On Mon, 2017-01-23 at 13:19 -0800, Martin Stone Davis wrote: > That does look like strange behavior yet I'm guessing this is not a bug. > Would you revise the problem example to be as small as possible and only > relying on the Agda.Builtin.*? > See the .agda file attached. ------ Sergei > On 01/23/2017 03:35 AM, Sergei Meshveliani wrote: > > People, > > I have further problems with matching in let+case+let. > > Consider the following two fragments. > > > > open OfMax natDTO using (Maximum; maximum?; maximum ...) > > open Maximum using (max; all?max) > > -- Maximum is a record with constructor maximum? > > ... > > --------------------------------------------------------- (I) --- > > ; (tri? _ e?e' _) ? > > let > > es = map proj? mons > > maxStruc = maximum e (e' ? es) -- : Maximum (e ? e' ? es) > > m = max maxStruc > > ee'es?m = all?max maxStruc > > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > > > ees?m : All (_? m) (e ? es) > > ees?m = DPrelude.anything > > in > > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > > ------------------------------------------------------------------ > > > > ----------------------------------------------------------- (II) --- > > ... > > ; (tri? _ e?e' _) ? > > let > > es = map proj? mons > > in > > case maximum e (e' ? es) > > of \ > > { (maximum? m _ ee'es?m) ? > > let > > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > > > ees?m : All (_? m) (e ? es) > > ees?m = DPrelude.anything > > > > debug : All (_? m) (e ? e' ? es) -- for more testing > > debug = ee'es?m > > in > > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > > } > > ---------------------------------------------------------------------- > > > > The difference is that in (I) the fields of the result of `maximum' are > > extracted explicitly, by applying their labels. And in (II) their values > > are found by matching against the record of the result. > > > > (I) is type-checked. > > And (II) leads to the report > > > > ------------------------ > > Cannot instantiate the metavariable _295 to solution All (? section > > ? section ? m) (e ? map proj? mons) since it contains the variable > > m which is not in scope of the metavariable or irrelevant in the > > metavariable but relevant in the solution > > when checking that the expression ees?m has type > > _B_295 upComR a e b e' mons ord-e'es .?a e?e' .?c > > (pol? ((a + b , e) ? mons) > > (PE.subst DecrOrderedList > > (PE.sym $ PE.cong (? section ? section ? map proj? mons) e?e') > > ord-e'es)) > > ------------------------ > > > > in Agda 2.5.2. > > > > This report refers to the line after last "in". > > I also add the two "debug" lines to make sure that the value of m > > is valid in the body of "in". > > > > Does this effect show a bug in Agda? > > > > (Generally, matching against a record makes many programs nicer). > > > > Thank you in advance for explanation, > > > > ------ > > Sergei > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- open import Level using (Level; _?_) open import Function using (flip; _$_; _?_; case_of_) open import Algebra.FunctionProperties using (Op?) open import Relation.Binary using (DecSetoid; DecTotalOrder; Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Product using (_?_; _,_; proj?; proj?; ?) open import Data.List using (List; []; _?_; map) open import Data.List.All as AllM using (All) renaming ([] to []a; _?_ to _?a_) open import Data.List.Any using (Any; module Membership) open import Data.Nat as Nat using (?; _?_; _>_) open import Data.Nat.Properties as NatProp using () --**************************************************************************** postulate anything : ? {a} {A : Set a} ? A natDTO = Nat.decTotalOrder natSTO = NatProp.strictTotalOrder natDecSetoid = DecTotalOrder.Eq.decSetoid natDTO natSetoid = DecSetoid.setoid natDecSetoid open StrictTotalOrder natSTO using (_<_; compare) renaming (trans to <-trans) open DecTotalOrder natDTO using () renaming (refl to ?refl; trans to ?trans) open Any open Tri open Membership natSetoid using (_?_) record Maximum (xs : List ?) : Set where constructor maximum? field max : ? max? : max ? xs all?max : All (_? max) xs maximum : (x : ?) ? (xs : List ?) ? Maximum (x ? xs) maximum x [] = record{ max = x; max? = here PE.refl; all?max = all? } where all? : All (_? x) (x ? []) all? = x?x ?a []a where x?x = ?refl maximum x (y ? xs) = anything ------------------------------------------------------------------------------ data DecrOrderedList : List ? ? Set where nil : DecrOrderedList [] single : (x : ?) ? DecrOrderedList (x ? []) prep2 : (x y : ?) ? (xs : List ?) ? x > y ? DecrOrderedList (y ? xs) ? DecrOrderedList (x ? y ? xs) tailDecrOrdered : ? {x xs} ? DecrOrderedList (x ? xs) ? DecrOrderedList xs tailDecrOrdered (single _) = nil tailDecrOrdered (prep2 x y xs _ ord-y:xs) = ord-y:xs >tail-inDecrOrdered : ? {x xs} ? DecrOrderedList (x ? xs) ? All (x >_) xs >tail-inDecrOrdered (single _) = []a >tail-inDecrOrdered (prep2 x y zs x>y ord-yzs) = anything decrOrdered-cons : ? {x xs} ? DecrOrderedList xs ? All (x >_) xs ? DecrOrderedList (x ? xs) decrOrdered-cons {x} {[]} _ _ = single x decrOrdered-cons {x} {y ? xs} ord-yxs (x>y ?a x>xs) = prep2 x y xs x>y ord-yxs ------------------------------------------------------------------------------- module _ {?} (C : Set ?) where Pair = C ? ? Monomial : Set _ Monomial = Pair record Pol : Set ? where constructor pol? field mons : List Monomial ----- coefs : List C coefs = map proj? mons exps : List ? exps = map proj? mons field expsAreOrdered : DecrOrderedList exps ----- monPol : Monomial ? Pol monPol (c , e) = pol? ((c , e) ? []) (DecrOrderedList.single e) open Maximum ---------------------------------------------------------------------------- addMon : (mon : Monomial) ? (f : Pol) ? let e = proj? mon m = max $ maximum e (Pol.exps f) in (? \ (s : Pol) ? All (_? m) (Pol.exps s)) addMon (a , e) (pol? [] _) = (monPol (a , e) , (?refl ?a []a)) addMon (a , e) (pol? ((_ , e') ? mons) ord-e'es) = case compare e e' of \ { (tri? _ e?e' _) ? {- let es = map proj? mons -- (I) in case maximum e (e' ? es) of \ { (maximum? m _ ee'es?m) ? let e'es?ees = PE.sym $ PE.cong (_? es) e?e' ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es ees?m : All (_? m) (e ? es) ees?m = anything debug : All (_? m) (e ? e' ? es) debug = ee'es?m in ((pol? ((a , e) ? mons) ord-ees) , ees?m) } -} let es = map proj? mons -- (II) maxStruc = maximum e (e' ? es) m = max maxStruc ee'es?m = all?max maxStruc e'es?ees = PE.sym $ PE.cong (_? es) e?e' ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es ees?m : All (_? m) (e ? es) ees?m = anything in ((pol? ((a , e) ? mons) ord-ees) , ees?m) ; _ ? anything } From mechvel at botik.ru Tue Jan 24 14:52:48 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 24 Jan 2017 16:52:48 +0300 Subject: [Agda] strange let-in-case-let In-Reply-To: <1485265590.3436.2.camel@one.mechvel.pereslavl.ru> References: <1485171327.14224.30.camel@scico.botik.ru> <1485265590.3436.2.camel@one.mechvel.pereslavl.ru> Message-ID: <1485265968.3562.2.camel@one.mechvel.pereslavl.ru> On Tue, 2017-01-24 at 16:46 +0300, Sergei Meshveliani wrote: > On Mon, 2017-01-23 at 13:19 -0800, Martin Stone Davis wrote: > > That does look like strange behavior yet I'm guessing this is not a bug. > > Would you revise the problem example to be as small as possible and only > > relying on the Agda.Builtin.*? > > > > See the .agda file attached. Sorry, I need to comment: the version (II) there is type-checked, and the commented version (I) is not. ------ Sergei > > > On 01/23/2017 03:35 AM, Sergei Meshveliani wrote: > > > People, > > > I have further problems with matching in let+case+let. > > > Consider the following two fragments. > > > > > > open OfMax natDTO using (Maximum; maximum?; maximum ...) > > > open Maximum using (max; all?max) > > > -- Maximum is a record with constructor maximum? > > > ... > > > --------------------------------------------------------- (I) --- > > > ; (tri? _ e?e' _) ? > > > let > > > es = map proj? mons > > > maxStruc = maximum e (e' ? es) -- : Maximum (e ? e' ? es) > > > m = max maxStruc > > > ee'es?m = all?max maxStruc > > > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > > > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > > > > > ees?m : All (_? m) (e ? es) > > > ees?m = DPrelude.anything > > > in > > > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > > > ------------------------------------------------------------------ > > > > > > ----------------------------------------------------------- (II) --- > > > ... > > > ; (tri? _ e?e' _) ? > > > let > > > es = map proj? mons > > > in > > > case maximum e (e' ? es) > > > of \ > > > { (maximum? m _ ee'es?m) ? > > > let > > > e'es?ees = PE.sym $ PE.cong (_? es) e?e' > > > ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es > > > > > > ees?m : All (_? m) (e ? es) > > > ees?m = DPrelude.anything > > > > > > debug : All (_? m) (e ? e' ? es) -- for more testing > > > debug = ee'es?m > > > in > > > ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) > > > } > > > ---------------------------------------------------------------------- > > > > > > The difference is that in (I) the fields of the result of `maximum' are > > > extracted explicitly, by applying their labels. And in (II) their values > > > are found by matching against the record of the result. > > > > > > (I) is type-checked. > > > And (II) leads to the report > > > > > > ------------------------ > > > Cannot instantiate the metavariable _295 to solution All (? section > > > ? section ? m) (e ? map proj? mons) since it contains the variable > > > m which is not in scope of the metavariable or irrelevant in the > > > metavariable but relevant in the solution > > > when checking that the expression ees?m has type > > > _B_295 upComR a e b e' mons ord-e'es .?a e?e' .?c > > > (pol? ((a + b , e) ? mons) > > > (PE.subst DecrOrderedList > > > (PE.sym $ PE.cong (? section ? section ? map proj? mons) e?e') > > > ord-e'es)) > > > ------------------------ > > > > > > in Agda 2.5.2. > > > > > > This report refers to the line after last "in". > > > I also add the two "debug" lines to make sure that the value of m > > > is valid in the body of "in". > > > > > > Does this effect show a bug in Agda? > > > > > > (Generally, matching against a record makes many programs nicer). > > > > > > Thank you in advance for explanation, > > > > > > ------ > > > Sergei > > > > > > > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From martin.stone.davis at gmail.com Wed Jan 25 03:50:44 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Tue, 24 Jan 2017 18:50:44 -0800 Subject: [Agda] strange let-in-case-let In-Reply-To: <1485265968.3562.2.camel@one.mechvel.pereslavl.ru> References: <1485171327.14224.30.camel@scico.botik.ru> <1485265590.3436.2.camel@one.mechvel.pereslavl.ru> <1485265968.3562.2.camel@one.mechvel.pereslavl.ru> Message-ID: If you replace the offending ees?m (which Agda highlighted in red) with {!ees?m!}, you'll notice that "Have" and "Goal" are different. See especially the results for full normalization, "C-u C-u C-c C-." When the Goal and Have don't match, that means Agda won't be able to unify (unless the difference involves metavariables AND Agda is able to satisfy constraints). Here's a smaller version of your problem, not relying on standard library imports: case_of_ : ? {a b} {A : Set a} {B : Set b} ? A ? (A ? B) ? B case x of f = f x postulate anything : ? {a} {A : Set a} ? A X : Set F : X ? Set record R : Set where constructor c field r : X postulate s : R foo : (r : R) ? F (R.r r) foo _ = anything bar1 : F (R.r s) bar1 = let c x = s in let letted : F x letted = anything in {!letted!} -- works. notice that "Have" and "Goal" match bar2 : F (R.r s) bar2 = case s of ? {(c x) ? let letted : F x letted = anything in {!letted!}} -- does not work because Have: F x, but Goal: F (R.r s) One way to get around your problem borrows from an idea I posted here . We encourage Agda to "remember" that s = c x: open import Agda.Builtin.Equality record Memoized {A : Set} (x : A) : Set where constructor _,_ field value : A sound : value ? x remember : {A : Set} ? (x : A) ? Memoized x remember x = x , refl bar2a : F (R.r s) bar2a = case remember s of ? {(c x , refl) ? let letted : F x letted = anything in {!letted!}} -- works There are possibly other ways to work around your problem. The "inspect" idiom comes to mind, as well as the use of "with". Sorry that's not much of an explanation of what's going on here. I don't have much theoretical knowledge and only know how to deal with this sort of thing from trial and error. Mostly error. Hopefully that gives you some tools to proceed. On 01/24/2017 05:52 AM, Sergei Meshveliani wrote: > On Tue, 2017-01-24 at 16:46 +0300, Sergei Meshveliani wrote: >> On Mon, 2017-01-23 at 13:19 -0800, Martin Stone Davis wrote: >>> That does look like strange behavior yet I'm guessing this is not a bug. >>> Would you revise the problem example to be as small as possible and only >>> relying on the Agda.Builtin.*? >>> >> See the .agda file attached. > > Sorry, I need to comment: > > the version (II) there is type-checked, > and the commented version (I) is not. > > ------ > Sergei > > > >>> On 01/23/2017 03:35 AM, Sergei Meshveliani wrote: >>>> People, >>>> I have further problems with matching in let+case+let. >>>> Consider the following two fragments. >>>> >>>> open OfMax natDTO using (Maximum; maximum?; maximum ...) >>>> open Maximum using (max; all?max) >>>> -- Maximum is a record with constructor maximum? >>>> ... >>>> --------------------------------------------------------- (I) --- >>>> ; (tri? _ e?e' _) ? >>>> let >>>> es = map proj? mons >>>> maxStruc = maximum e (e' ? es) -- : Maximum (e ? e' ? es) >>>> m = max maxStruc >>>> ee'es?m = all?max maxStruc >>>> e'es?ees = PE.sym $ PE.cong (_? es) e?e' >>>> ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es >>>> >>>> ees?m : All (_? m) (e ? es) >>>> ees?m = DPrelude.anything >>>> in >>>> ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) >>>> ------------------------------------------------------------------ >>>> >>>> ----------------------------------------------------------- (II) --- >>>> ... >>>> ; (tri? _ e?e' _) ? >>>> let >>>> es = map proj? mons >>>> in >>>> case maximum e (e' ? es) >>>> of \ >>>> { (maximum? m _ ee'es?m) ? >>>> let >>>> e'es?ees = PE.sym $ PE.cong (_? es) e?e' >>>> ord-ees = PE.subst DecrOrderedList e'es?ees ord-e'es >>>> >>>> ees?m : All (_? m) (e ? es) >>>> ees?m = DPrelude.anything >>>> >>>> debug : All (_? m) (e ? e' ? es) -- for more testing >>>> debug = ee'es?m >>>> in >>>> ((pol? ((a + b , e) ? mons) ord-ees) , ees?m) >>>> } >>>> ---------------------------------------------------------------------- >>>> >>>> The difference is that in (I) the fields of the result of `maximum' are >>>> extracted explicitly, by applying their labels. And in (II) their values >>>> are found by matching against the record of the result. >>>> >>>> (I) is type-checked. >>>> And (II) leads to the report >>>> >>>> ------------------------ >>>> Cannot instantiate the metavariable _295 to solution All (? section >>>> ? section ? m) (e ? map proj? mons) since it contains the variable >>>> m which is not in scope of the metavariable or irrelevant in the >>>> metavariable but relevant in the solution >>>> when checking that the expression ees?m has type >>>> _B_295 upComR a e b e' mons ord-e'es .?a e?e' .?c >>>> (pol? ((a + b , e) ? mons) >>>> (PE.subst DecrOrderedList >>>> (PE.sym $ PE.cong (? section ? section ? map proj? mons) e?e') >>>> ord-e'es)) >>>> ------------------------ >>>> >>>> in Agda 2.5.2. >>>> >>>> This report refers to the line after last "in". >>>> I also add the two "debug" lines to make sure that the value of m >>>> is valid in the body of "in". >>>> >>>> Does this effect show a bug in Agda? >>>> >>>> (Generally, matching against a record makes many programs nicer). >>>> >>>> Thank you in advance for explanation, >>>> >>>> ------ >>>> Sergei >>>> >>>> >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From bch29 at cam.ac.uk Fri Jan 27 13:42:23 2017 From: bch29 at cam.ac.uk (Bradley Hardy) Date: Fri, 27 Jan 2017 12:42:23 +0000 Subject: [Agda] Holes 0.1.0 References: Message-ID: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Dear All, Some of you may have seen my talk at S-REPLS earlier this month, entitled ?Improving Agda?s equational reasoning with reflection?. This is a public release of the development that the talk was based on. -------------------------------- https://github.com/bch29/agda-holes Holes is an Agda library that uses reflection to make writing and reading equational reasoning proofs easier. It can turn proofs like this: *-distrib-+? : ? a b c ? a * (b + c) ? a * b + a * c *-distrib-+? zero b c = refl *-distrib-+? (suc a) b c = b + c + a * (b + c) ?? cong (? h ? b + c + h) (*-distrib-+? a b c) ? (b + c) + (a * b + a * c) ?? sym (+-assoc (b + c) (a * b) (a * c)) ? ((b + c) + a * b) + a * c ?? cong (? h ? h + a * c) (+-assoc b c (a * b)) ? (b + (c + a * b)) + a * c ?? cong (? h ? (b + h) + a * c) (+-comm c (a * b)) ? (b + (a * b + c)) + a * c ?? cong (? h ? h + a * c) (sym (+-assoc b (a * b) c)) ? ((b + a * b) + c) + a * c ?? +-assoc (b + a * b) c (a * c) ? (b + a * b) + (c + a * c) ? ... into proofs like this: *-distrib-+ : ? a b c ? a * (b + c) ? a * b + a * c *-distrib-+ zero b c = refl *-distrib-+ (suc a) b c = b + c + ? a * (b + c) ? ?? cong! (*-distrib-+ a b c) ? ? (b + c) + (a * b + a * c) ? ?? cong! (+-assoc (b + c) (a * b) (a * c)) ? ? (b + c) + a * b ? + a * c ?? cong! (+-assoc b c (a * b)) ? (b + ? c + a * b ?) + a * c ?? cong! (+-comm c (a * b)) ? ? b + (a * b + c) ? + a * c ?? cong! (+-assoc b (a * b) c) ? ? ((b + a * b) + c) + a * c ? ?? cong! (+-assoc (b + a * b) c (a * c)) ? (b + a * b) + (c + a * c) ? This works by using reflection to inspect the left hand side of an 'equality' type. The 'holes', i.e. expressions within the `?_?` (identity) function are found, and a path to the holes is found. This path is then combined with the user's proof to prove the goal. The `cong!` macro works to prove any goal that expects an equality, not just those within equational reasoning. It is easiest to use with propositional equality, because there is a general congruence function available. The path can be converted to a simple lambda that is used as the argument to `cong`. There is also work in progress support for relations that do not have general congruence, by providing a database of congruences for the macro to use. Please see the README in the linked git repository for more information and examples. -------------------------------- Bradley Hardy -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.cacciarimiraldo at gmail.com Fri Jan 27 14:42:34 2017 From: v.cacciarimiraldo at gmail.com (Victor Miraldo) Date: Fri, 27 Jan 2017 14:42:34 +0100 Subject: [Agda] Holes 0.1.0 In-Reply-To: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> References: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Message-ID: Hello Bradley, Interesting library, thanks! It is nice to see people are still working on better equational reasoning! :) I did some related work in the past (https://github.com/VictorCMiraldo/agda-rw) but soon after that Agda changed its reflection API. This rendered our library unusable for newer versions of Agda. Since we had to do our unification from scratch, we could get away without having to explicitly mark where we wanted the rewrite or even the parameters to be passed to the lemma used to rewrite. How hard would it be to extend your approach for one or both of these features? Cheers, Victor On Fri, Jan 27, 2017 at 1:42 PM, Bradley Hardy wrote: > Dear All, > > Some of you may have seen my talk at S-REPLS earlier this month, entitled > ?Improving Agda?s equational reasoning with reflection?. This is a public > release of the development that the talk was based on. > > -------------------------------- > > https://github.com/bch29/agda-holes > > Holes is an Agda library that uses reflection to make writing and reading > equational reasoning proofs easier. > > It can turn proofs like this: > > *-distrib-+? : ? a b c ? a * (b + c) ? a * b + a * c > *-distrib-+? zero b c = refl > *-distrib-+? (suc a) b c = > b + c + a * (b + c) > ?? cong (? h ? b + c + h) (*-distrib-+? a b c) ? > (b + c) + (a * b + a * c) > ?? sym (+-assoc (b + c) (a * b) (a * c)) ? > ((b + c) + a * b) + a * c > ?? cong (? h ? h + a * c) (+-assoc b c (a * b)) ? > (b + (c + a * b)) + a * c > ?? cong (? h ? (b + h) + a * c) (+-comm c (a * b)) ? > (b + (a * b + c)) + a * c > ?? cong (? h ? h + a * c) (sym (+-assoc b (a * b) c)) ? > ((b + a * b) + c) + a * c > ?? +-assoc (b + a * b) c (a * c) ? > (b + a * b) + (c + a * c) > ? > > ... into proofs like this: > > *-distrib-+ : ? a b c ? a * (b + c) ? a * b + a * c > *-distrib-+ zero b c = refl > *-distrib-+ (suc a) b c = > b + c + ? a * (b + c) ? > ?? cong! (*-distrib-+ a b c) ? > ? (b + c) + (a * b + a * c) ? > ?? cong! (+-assoc (b + c) (a * b) (a * c)) ? > ? (b + c) + a * b ? + a * c > ?? cong! (+-assoc b c (a * b)) ? > (b + ? c + a * b ?) + a * c > ?? cong! (+-comm c (a * b)) ? > ? b + (a * b + c) ? + a * c > ?? cong! (+-assoc b (a * b) c) ? > ? ((b + a * b) + c) + a * c ? > ?? cong! (+-assoc (b + a * b) c (a * c)) ? > (b + a * b) + (c + a * c) > ? > > This works by using reflection to inspect the left hand side of an > 'equality' > type. The 'holes', i.e. expressions within the `?_?` (identity) function are > found, and a path to the holes is found. This path is then combined with the > user's proof to prove the goal. The `cong!` macro works to prove any goal > that > expects an equality, not just those within equational reasoning. > > It is easiest to use with propositional equality, because there is a general > congruence function available. The path can be converted to a simple lambda > that > is used as the argument to `cong`. There is also work in progress support > for relations that do not have general congruence, by providing a database > of > congruences for the macro to use. > > Please see the README in the linked git repository for more information and > examples. > > -------------------------------- > > Bradley Hardy > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From bch29 at cam.ac.uk Fri Jan 27 15:00:36 2017 From: bch29 at cam.ac.uk (Bradley Hardy) Date: Fri, 27 Jan 2017 14:00:36 +0000 Subject: [Agda] Holes 0.1.0 In-Reply-To: References: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Message-ID: Hi Victor, I?ve seen your library before ? it is indeed unfortunate that the new reflection API broke it so thoroughly! First, I?ll mention that explicitly marking where we want to rewrite was a design choice for this library. The idea is that it potentially makes things clearer to the reader while not actually being much of a burden to the writer (at least compared to writing out `cong (\h -> ?)` everywhere?). And it saves having to do any kind of proof search, so type-checking is quick! But you?re right, it would be nice to be able to do things more automatically, too, and it should definitely be doable. I could imagine building a list of ?possible holes? in the LHS. Then I would try to apply my macro as it stands to each of those until one type checks. Inferring the parameters passed to the lemma for rewriting could be done as well, but might be more difficult in the general case. I think that, since the lemma might use its parameters to generate the proof in an arbitrary way, this might not even always be possible. I?m sure the general strategy that you used in `agda-rw` would still work though! Bradley > On 27 Jan 2017, at 13:42, Victor Miraldo wrote: > > Hello Bradley, > > Interesting library, thanks! It is nice to see people are still working > on better equational reasoning! :) > > I did some related work in the past > (https://github.com/VictorCMiraldo/agda-rw) but > soon after that Agda changed its reflection API. This rendered our > library unusable for > newer versions of Agda. > > Since we had to do our unification from scratch, we could get away > without having to explicitly > mark where we wanted the rewrite or even the parameters to be passed > to the lemma used > to rewrite. How hard would it be to extend your approach for one or > both of these features? > > Cheers, > Victor From german.delbianco at imdea.org Fri Jan 27 15:01:22 2017 From: german.delbianco at imdea.org (=?UTF-8?Q?Germ=C3=A1n_Andr=C3=A9s_Delbianco?=) Date: Fri, 27 Jan 2017 15:01:22 +0100 Subject: [Agda] Multiple Research Positions, ERC MATHADOR Project, IMDEA Software Institute, Madrid, Spain Message-ID: Applications are invited for multiple positions (PhD/Postdoc/Scientific Programmer) at the IMDEA Software Institute, Madrid, Spain. The positions are available from April 2017. The successful candidate will work under the supervision of Aleks Nanevski (http://software.imdea.org/~aleks/). The topic of the research, to be determined based on the common interests of the candidate and the supervisor, will be in the areas of software verification, logics for concurrent programs, and language-based security. The research will be funded by Aleks' ERC Consolidator award "MATHADOR: Type and Proof Structures for Concurrent Software Verification", which aims to investigate the type-theoretic foundations for verification of concurrent software. PhD candidates should have an excellent MSc or BSc degree in computer science or a related subject, with an interest in the above areas, and a strong commitment to research. An MSc or a BSc thesis is a plus. PhD positions are for four years. Postdoc candidates should have, or expect shortly to obtain, a PhD in computer science. The ideal candidate will have expertise in program semantics and program logics, concurrent or distributed computing, type theory or interactive theorem proving, as they apply to the above areas. Postdoc positions are initially for one year, with possible extension up to three years. Scientific programmer candidates should hold a BSc or MSc degree in computer science, with experience in and passion for functional programming, and strong interest and willingness to learn interactive theorem proving (eg., Coq). The scientific programmer position is initially for one year, with possible extension up to five years. All positions require good teamwork and communication skills, including excellent spoken and written English. Salaries at IMDEA Software Institute are internationally competitive. Interested applicants are encouraged to contact Aleks directly (aleks dot nanevski at imdea dot org). Formal applications should be submitted online at https://careers.imdea.org/software/ and mention this announcement in the submitted materials. (For the scientific programmer position, please select the "Research Engineer" option). Review of applications will begin immediately. From v.cacciarimiraldo at gmail.com Fri Jan 27 20:01:19 2017 From: v.cacciarimiraldo at gmail.com (Victor Miraldo) Date: Fri, 27 Jan 2017 20:01:19 +0100 Subject: [Agda] Holes 0.1.0 In-Reply-To: References: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Message-ID: Hello Bradley, > But you?re right, it would be nice to be able to do things more automatically, too, and it should definitely be doable. I could imagine building a list of ?possible holes? in the LHS. Then I would try to apply my macro as it stands to each of those until one type checks. This is all easier if you have a simpler intermediate language than full blown agda. We managed to get away with one possible hole only, but we could only handle a subset of agda. Infering the parameters is also simple if you control unification, but we always had the cumbersome overhead of having an intermediate term language to deal with. (which is fairly significant!) Nervetheless, great work! I still find myself writing boring congs and substs on my equational proofs. I'll keep an eye in your library! Best, Victor From ellbur at gmail.com Fri Jan 27 20:17:40 2017 From: ellbur at gmail.com (Owen) Date: Fri, 27 Jan 2017 14:17:40 -0500 Subject: [Agda] Holes 0.1.0 In-Reply-To: References: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Message-ID: Hello Bradley, This is really a neat-looking library! I think the idea of holes is very clever and probably has other interesting uses as well. For example, it turns any expression into a (function, point) pair. E.g., ? 1 ? + 2 becomes (? x ? x + 2, 1). This could be used for example to apply a functor. Best, Owen On Fri, Jan 27, 2017 at 2:01 PM, Victor Miraldo wrote: > Hello Bradley, > > > But you?re right, it would be nice to be able to do things more > automatically, too, and it should definitely be doable. I could imagine > building a list of ?possible holes? in the LHS. Then I would try to apply > my macro as it stands to each of those until one type checks. > > This is all easier if you have a simpler intermediate language than > full blown agda. We managed > to get away with one possible hole only, but we could only handle a > subset of agda. > Infering the parameters is also simple if you control unification, but > we always had the > cumbersome overhead of having an intermediate term language to deal with. > (which is fairly significant!) > > Nervetheless, great work! I still find myself writing boring congs and > substs on > my equational proofs. I'll keep an eye in your library! > > Best, > Victor > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Fri Jan 27 20:50:41 2017 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Fri, 27 Jan 2017 20:50:41 +0100 Subject: [Agda] Levels and Containers Message-ID: Dear Agda people, especially stdlib people, In the definition of Data.Container, is there a reason why the level of the container is the same as the level of the functor argument? The definition is: -- stdlib code record Container (? : Level) : Set (suc ?) where constructor _?_ field Shape : Set ? Position : Shape ? Set ? open Container public -- The semantics ("extension") of a container. ?_? : ? {?} ? Container ? ? Set ? ? Set ? ? C ? X = ?[ s ? Shape C ] (Position C s ? X) -- stlib code ends It's possible to generalise the last two lines to: ?_? : ? {?? ??} ? Container ?? ? Set ?? ? Set (?? ? ??) ? C ? X = ?[ s ? Shape C ] (Position C s ? X) For my project, this would be great. (I've done that change in my local copy.) You have to make some type signatures slightly more verbose, otherwise there are unsolved metas, but it's not a big deal. Is there any deeper reason why the stdlib type signature is so special? Manuel From abela at chalmers.se Fri Jan 27 21:15:04 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 27 Jan 2017 21:15:04 +0100 Subject: [Agda] Levels and Containers In-Reply-To: References: Message-ID: <07ef8502-14ff-3b4e-00c0-4524de023d2d@chalmers.se> Don't know (but I am not a user of Container). Let's see if there is strong arguments for the current situation, and if not, please submit a pull request. On 27.01.2017 20:50, Manuel B?renz wrote: > Dear Agda people, especially stdlib people, > > In the definition of Data.Container, is there a reason why the level of > the container is the same as the level of the functor argument? > > The definition is: > > -- stdlib code > > record Container (? : Level) : Set (suc ?) where > constructor _?_ > field > Shape : Set ? > Position : Shape ? Set ? > > open Container public > > -- The semantics ("extension") of a container. > > ?_? : ? {?} ? Container ? ? Set ? ? Set ? > ? C ? X = ?[ s ? Shape C ] (Position C s ? X) > > -- stlib code ends > > It's possible to generalise the last two lines to: > > ?_? : ? {?? ??} ? Container ?? ? Set ?? ? Set (?? ? ??) > ? C ? X = ?[ s ? Shape C ] (Position C s ? X) > > For my project, this would be great. (I've done that change in my local > copy.) You have to make some type signatures slightly more verbose, > otherwise there are unsolved metas, but it's not a big deal. > > Is there any deeper reason why the stdlib type signature is so special? > > Manuel > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Sat Jan 28 18:46:55 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sat, 28 Jan 2017 19:46:55 +0200 Subject: [Agda] Removing a deducible Size constrain leads to error. Message-ID: If anyone wants to typecheck the code, it is in the 54th commit of https://github.com/xekoukou/sparrow , in the agda folder. This is the piece of code that I am trying to change and that creates the error: " _?_ : {i : Size} ? {j : Size< ? i} ? {k : Size< ? j} ? ?{pll ll ell rll} ? {ind : IndexLL {i} pll ll} ? (elf : LFun {_} {i} {j} {ell} {pll}) ? {{prf : usesInput elf}} ? LFun {_} {j} {k} {rll} {(replLL ll ind ell)} ? LFun {_} {i} {k} {rll} {ll} " Removing "i" from "elf" results into error into a piece of code that uses the constructor. " _?_ : {i : Size} ? {j : Size< ? i} ? {k : Size< ? j} ? ?{pll ll ell rll} ? {ind : IndexLL {i} pll ll} ? (elf : LFun {_} {_} {j} {ell} {pll}) ? {{prf : usesInput elf}} ? LFun {_} {j} {k} {rll} {(replLL ll ind ell)} ? LFun {_} {i} {k} {rll} {ll} " It seems to me though that the size of pll is deducible from "ind". ind is annotated to have size i which means that both "pll" and "ll" have size "i". The error that I see is that it considers the size of "pll" to be "j" and not "i". -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Sun Jan 29 00:51:14 2017 From: abela at chalmers.se (Andreas Abel) Date: Sun, 29 Jan 2017 00:51:14 +0100 Subject: [Agda] Removing a deducible Size constrain leads to error. In-Reply-To: References: Message-ID: <9afe35a3-720f-96b4-1447-b7d1e0b3ed1a@chalmers.se> Indeed, this is a bug. --Andreas On 28.01.2017 18:46, Apostolis Xekoukoulotakis wrote: > If anyone wants to typecheck the code, it is in the 54th commit of > https://github.com/xekoukou/sparrow > , in the agda folder. > > > This is the piece of code that I am trying to change and that creates > the error: > > " > _?_ : {i : Size} ? {j : Size< ? i} ? {k : Size< ? j} ? ?{pll ll ell rll} > ? {ind : IndexLL {i} pll ll} ? (elf : LFun {_} {i} {j} {ell} {pll}) > ? {{prf : usesInput elf}} ? LFun {_} {j} {k} {rll} {(replLL ll ind ell)} > > ? LFun {_} {i} {k} {rll} {ll} > " > > Removing "i" from "elf" results into error into a piece of code that > uses the constructor. > > " > _?_ : {i : Size} ? {j : Size< ? i} ? {k : Size< ? j} ? ?{pll ll ell rll} > ? {ind : IndexLL {i} pll ll} ? (elf : LFun {_} {_} {j} {ell} {pll}) > ? {{prf : usesInput elf}} ? LFun {_} {j} {k} {rll} {(replLL ll ind ell)} > > ? LFun {_} {i} {k} {rll} {ll} > " > > It seems to me though that the size of pll is deducible from "ind". ind > is annotated to have size i which means that both "pll" and "ll" have > size "i". > > The error that I see is that it considers the size of "pll" to be "j" > and not "i". > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sun Jan 29 16:57:09 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 29 Jan 2017 18:57:09 +0300 Subject: [Agda] `case' vs `with' Message-ID: <1485705429.2370.15.camel@one.mechvel.pereslavl.ru> Dear Agda developers, The below `case' version for `lemma' is not type-checked in Agda 2.5.2, while the `with' version is type-checked. I do not know of whether such `case' treating is intended in Agda, I report this for any occasion (because this difference looks strange). Regards, ------ Sergei ------------------------------------------------------------------- open import Function using (case_of_) open import Relation.Binary using (DecSetoid) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Relation.Nullary using (?_; yes; no) open import Data.Empty using (?-elim) open import Data.Product using (_?_; _,_) open import Data.List using (List; []; _?_) module _ {? ?=} (dS : DecSetoid ? ?=) (z : DecSetoid.Carrier dS) where open DecSetoid dS using (Carrier; _?_; _?_) toList : Carrier ? List Carrier toList x = case x ? z of \ { (yes _) ? [] ; (no _) ? (x ? []) } lemma : ? x ? ? x ? z ? (toList x) ? (x ? []) lemma x x?z = case x ? z of \ { (yes x?z) ? ?-elim (x?z x?z) ; (no _) ? PE.refl } {- with x ? z ... | yes x?z = ?-elim (x?z x?z) ... | no _ = PE.refl -} ------------------------------------------------------------------ From nad at cse.gu.se Mon Jan 30 13:24:57 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 30 Jan 2017 13:24:57 +0100 Subject: [Agda] Holes 0.1.0 In-Reply-To: References: <4A22B212-0794-461A-9DCA-3935AD2E7D64@cam.ac.uk> Message-ID: <1caaf759-d507-7505-bc53-0bdd332f458d@cse.gu.se> On 2017-01-27 15:00, Bradley Hardy wrote: > First, I?ll mention that explicitly marking where we want to rewrite > was a design choice for this library. The idea is that it potentially > makes things clearer to the reader while not actually being much of a > burden to the writer (at least compared to writing out `cong (\h -> > ?)` everywhere?). And it saves having to do any kind of proof search, > so type-checking is quick! I have a similar tactic: http://www.cse.chalmers.se/~nad/listings/equality/Tactic.By.html However, this tactic does not allow the user to mark where the argument lemma should be applied, and can be rather slow: it tries to use reflexivity or the argument (applied to metas, possibly with symmetry applied), and if this fails, then it checks if the heads of the two expressions are equal, and in this case it continues recursively (roughly speaking). An advantage of this approach is that you can sometimes get away with writing "by lemma", even though this lemma is used multiple times, with different arguments, to prove an equality. However, as I wrote above, it can be rather slow. Furthermore it can fail if the two sides do not have syntactically equal "contexts". -- /NAD From icfp.publicity at googlemail.com Wed Feb 1 01:16:15 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Tue, 31 Jan 2017 16:16:15 -0800 Subject: [Agda] Second Call for Papers: ICFP 2017 Message-ID: <589128cf29107_f913fec02463bf039a8@landin.mail> ICFP 2017 The 22nd ACM SIGPLAN International Conference on Functional Programming Oxford, United Kingdom http://icfp17.sigplan.org/ Second Call for Papers ### Important dates Submissions due: Monday, February 27, Anywhere on Earth https://icfp17.hotcrp.com Author response: Monday, April 17, 2017, 15:00 (UTC) - Thursday, April 20, 2017, 15:00 (UTC) Notification: Monday, 1 May, 2017 Final copy due: Monday, 5 June 2017 Early registration: TBA Conference: Monday, 4 September - Wednesday, 6 September, 2017 ### Updates for Second Call for Papers This revision, published January 31, 2017, includes the following updates: * A link to the list of frequently asked questions about the double-blind review process. * A new requirement for citations in author-year format. This follows a decision for PACMPL that was made after the original version of this call was distributed. As such, author-year format will be required for final (accepted) versions of papers in ICFP 2017, but not for submissions. * Additional guidance for authors using LaTeX. * A clarification about the expectations for author attendance in the event of visa-related problems. ### New this year Those familiar with previous ICFP conferences should be aware of two significant changes that are being introduced in 2017: 1. Papers selected for ICFP 2017 will be published as the ICFP 2017 issue of a new journal, Proceedings of the ACM on Programming Languages (PACMPL), which replaces the previous ICFP conference proceedings. The move to PACMPL will have two noticeable impacts on authors: * A new, two-phase selection and reviewing process that conforms to ACM?s journal reviewing guidelines. * A new, single-column format for submissions. 2. Authors of papers that are conditionally accepted in the first phase of the reviewing process will have the option to submit materials for Artifact Evaluation. Further details on each of these changes are included in the following text. ### Scope ICFP 2017 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * *Language Design*: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; type systems; interoperability; domain-specific languages; and relations to imperative, object-oriented, or logic programming. * *Implementation*: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * *Software-Development Techniques*: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling. * *Foundations*: formal semantics; lambda calculus; rewriting; type theory; monads; continuations; control; state; effects; program verification; dependent types. * *Analysis and Transformation*: control-flow; data-flow; abstract interpretation; partial evaluation; program calculation. * *Applications*: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed-systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; multimedia and 3D graphics programming; scripting; system administration; security. * *Education*: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. ICFP 2017 also welcomes submissions in two separate categories --- Functional Pearls and Experience Reports --- that must be marked as such at the time of submission and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the program chair if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions ICFP 2017 will employ a lightweight double-blind reviewing process, as described below. **Deadline**: The deadline for submissions is Monday, February 27, 2017, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: (NOTE: NEW FORMAT REQUIREMENTS FOR ICFP 2017) Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Large" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from ; the appropriate template for ICFP 2017 authors is in the file `acmart-pacmpl-template.tex`. As documented in the template, submissions should be prepared using the `acmlarge` and `anonymous` options. The use of the `review` option is also strongly encouraged but not required. (The `review` option will add line numbers, which will make it easier for reviewers to reference specific parts of your paper in their comments, but should have absolutely no other effect on the typesetting.) Details of available technical support for LaTeX-specific questions is available at . There is a limit of 24 pages for a full paper or 12 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. **Citations**: As part of PACMPL, ICFP 2017 papers are expected to use author-year citations for references to other work. Author-year citations may be used as either a noun phrase, such as "The lambda calculus was originally conceived by Church (1932)", or a parenthetic phase, such as "The lambda calculus (Church 1932) was intended as a foundation for mathematics". A useful test for correct usage it to make sure that the text still reads correctly when the parenthesized portions of any references are omitted. Take care with prepositions; in the first example above, "by" is more appropriate than "in" because it allows the text to be read correctly as a reference to the author. Sometimes, readability may be improved by putting parenthetic citations at the end of a clause or a sentence, such as "A foundation for mathematics was provided by the lambda calculus (Church 1932)". In LaTeX, use `\citet{Church-1932}` for citations as a noun phrase, "Church (1932)", and `\citep{Church-1932}` for citations as a parenthetic phrase, "(Church 1932)"; for details, see Sections 2.3--2.5 of the natbib documentation (). **Submission**: Submissions will be accepted at (in preparation at the time of writing). Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 15:00 UTC on Monday, April 17, 2017, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the program chair will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for presentation at ICFP 2017. A [list of frequently asked questions and answers](http://icfp17.sigplan.org/track/icfp-2017-papers#Submission-and-Reviewing-FAQ) that address common concerns is available on the conference website and will be updated as necessary to clarify and expand on this process. **ICFP 2017 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the PC meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on May 1, 2017. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 5, 2017), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. This process is intended as a refinement of the review process that has been used in previous ICFP conferences. By incorporating a second stage, the process will conform to ACM?s journal reviewing guidelines for PACMPL. **ICFP 2017 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the PC and external reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Large format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: copyright transfer to ACM; retaining copyright but granting ACM exclusive publication rights; or open access on payment of a fee. Further information about ACM author rights is available from . * At least one author of each accepted submission will be expected to attend and present their paper at the conference. (ICFP welcomes all authors, regardless of nationality. If any author of an accepted submission has visa-related difficulties in travelling to the conference, we will make arrangements to enable remote participation, and not require them to attend the conference in order to present their talk.) The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. * We intend that the proceedings will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * **AUTHORS TAKE NOTE: The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work.** ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by a committee, separate from the program committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the proceedings, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works --- or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the proceedings and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The program committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results --- the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The program chair will be happy to advise on any concerns about which category to submit to. ### Organizers General Chair: Jeremy Gibbons (University of Oxford, UK) Program Chair: Mark Jones (Portland State University, USA) Artifact Evaluation Chair: Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Ryan Trinkle (Obsidian Systems LLC, USA) Programming Contest Organiser: Sam Lindley (University of Edinburgh, UK) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Chair: Jose Calderon (Galois, Inc., USA) Workshops Co-Chair: Andres L?h (Well-Typed LLP) Workshops Co-Chair: David Christiansen (Indiana University, USA) Program Committee: Bob Atkey (University of Strathclyde, Scotland) Adam Chlipala (MIT, USA) Dominique Devriese (KU Leuven, Belgium) Martin Erwig (Oregon State, USA) Matthew Flatt (University of Utah, USA) Ronald Garcia (University of British Columbia, Canada) Kathryn Gray (University of Cambridge, England) John Hughes (Chalmers University and Quvik, Sweden) Chung-Kil Hur (Seoul National University, Korea) Graham Hutton (University of Nottingham, England) Alan Jeffrey (Mozilla Research, USA) Ranjit Jhala (University of California, San Diego, USA) Shin-ya Katsumata (Kyoto University, Japan) Lindsey Kuper (Intel Labs, USA) Dan Licata (Wesleyan University, USA) Ben Lippmeier (Digital Asset, Australia) Gabriel Scherer (Northeastern University, USA) Alexandra Silva (University College London, England) Nikhil Swamy (Microsoft Research, USA) Sam Tobin-Hochstadt (Indiana University, USA) Nicolas Wu (University of Bristol, England) Beta Ziliani (CONICET and FAMAF, Universidad Nacional de C?rdoba, Argentina) From nad at cse.gu.se Wed Feb 1 15:08:36 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 1 Feb 2017 15:08:36 +0100 Subject: [Agda] Levels and Containers In-Reply-To: <07ef8502-14ff-3b4e-00c0-4524de023d2d@chalmers.se> References: <07ef8502-14ff-3b4e-00c0-4524de023d2d@chalmers.se> Message-ID: On 2017-01-27 21:15, Andreas Abel wrote: > Don't know (but I am not a user of Container). Let's see if there is > strong arguments for the current situation, and if not, please submit > a pull request. I think I wrote that code. I don't have a strong opinion about this. -- /NAD From nad at cse.gu.se Wed Feb 1 15:12:23 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 1 Feb 2017 15:12:23 +0100 Subject: [Agda] `case' vs `with' In-Reply-To: <1485705429.2370.15.camel@one.mechvel.pereslavl.ru> References: <1485705429.2370.15.camel@one.mechvel.pereslavl.ru> Message-ID: <8588a31c-cde6-4c86-7af9-d660884a2a83@cse.gu.se> On 2017-01-29 16:57, Sergei Meshveliani wrote: > The below `case' version for `lemma' is not type-checked in Agda 2.5.2, > while the `with' version is type-checked. > > I do not know of whether such `case' treating is intended in Agda, > I report this for any occasion (because this difference looks strange). The case_of_ function has a non-dependent type: case_of_ : ? {a b} {A : Set a} {B : Set b} ? A ? (A ? B) ? B case x of f = case x return _ of f You could use case_return_of_ instead: case_return_of_ : ? {a b} {A : Set a} (x : A) (B : A ? Set b) ? ((x : A) ? B x) ? B x case x return B of f = f x However, I suggest that you use with. -- /NAD From nad at cse.gu.se Wed Feb 1 15:32:43 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 1 Feb 2017 15:32:43 +0100 Subject: [Agda] strictness switch In-Reply-To: <1484908531.2737.13.camel@one.mechvel.pereslavl.ru> References: <1484908531.2737.13.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-01-20 11:35, Sergei Meshveliani wrote: > Is it possible to switch on strictness for the Agda type checker? > How much of strictness can be switched on? > It is interesting to see how does strictness effect on the type check > cost for a particular example. Just for fun I tried to compile Agda using -XStrict, but unfortunately GHC panicked. Even if the compilation had succeeded I expect that Agda wouldn't have become faster: it might have looped, or forced thunks that do not need to be forced. -- /NAD From mechvel at botik.ru Tue Feb 7 13:20:08 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 07 Feb 2017 15:20:08 +0300 Subject: [Agda] example with insertion to list Message-ID: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> Please, can anybody fix the proof for lemma2 in the attached code (about 140 lines) ? It is about a certain insertion of a natural into a decreasingly ordered list of naturals. Such a list is called Pol. Insertion of e into es is according to _>_, and it is without copying, that is when es contains any e' ? e, the result is es. Insertion is called mon+. lemma1 and lemma2 are certain two very simple statements about insertion of e into (e' ? es) for e < e'. lemma1 is for the case of es = []. And it is proved trivially. And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). Moreover, I do not find any proof to satisfy Agda. Maybe, this is a bug in Agda? Thanks, ------ Sergei -------------- next part -------------- {- Can anybody, please, fix the proof for lemma2 in the attached code (about 140 lines) ? It is about a certain insertion of a natural into a decreasingly ordered list of naturals. Such a list is called Pol. Insertion of e into es is according to _>_, and it is without copying, that is when es contains any e' ? e, the result is es. Insertion is called mon+. lemma1 and lemma2 are certain two very simple statements about insertion of e into (e' ? es) for e < e'. lemma1 is for the case of es = []. And it is proved trivially. But a similar proof for lemma2 is not type-checked (in Agda 2.5.2). Moreover, I do not find any proof to satisfy Agda. Maybe, this is a bug in Agda? Thanks, ------ Sergei -} open import Function using (_?_; case_of_) open import Algebra.FunctionProperties using (Op?) open import Relation.Binary using (Rel; Tri; DecTotalOrder; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Empty using (?-elim) open import Data.Sum using (_?_) open import Data.Product using (_?_; _,_; proj?; proj?; ?) open import Data.List using (List; []; _?_) open import Data.List.All as AllM using (All) open import Data.Nat as Nat using (?; suc; _?_; _<_; _>_) open import Data.Nat.Properties as NatProp using () --**************************************************************************** postulate anything : ? {a} {A : Set a} ? A -- for debug natSTO = NatProp.strictTotalOrder open StrictTotalOrder natSTO using (compare) record Max (x y : ?) : Set where constructor max? field it : ? x-or-y : it ? x ? it ? y both?it : x ? it ? y ? it postulate extMax : (x y : ?) ? Max x y _?_ : Op? ? _?_ x = Max.it ? extMax x both?? : ? x y ? x ? x ? y ? y ? x ? y both?? x = Max.both?it ? extMax x ------------------------------------------------------------------------------ data DecrOrdered : List ? ? Set where nil : DecrOrdered [] single : (x : ?) ? DecrOrdered (x ? []) prep2 : (x y : ?) ? (xs : List ?) ? x > y ? DecrOrdered (y ? xs) ? DecrOrdered (x ? y ? xs) tailDecrOrdered : ? {x xs} ? DecrOrdered (x ? xs) ? DecrOrdered xs tailDecrOrdered (single _) = nil tailDecrOrdered (prep2 x y xs _ ord-y:xs) = ord-y:xs ------------------------------------------------------------------------------ E : Set E = ? record Pol : Set where constructor pol? field exps : List E ordered : DecrOrdered exps -- e1 > ... > en monPol : E ? Pol monPol e = pol? (e ? []) (DecrOrdered.single e) hdExp' : List E ? ? hdExp' [] = 0 hdExp' (e ? _) = suc e deg' : Pol ? ? deg' = hdExp' ? Pol.exps ------------------------------------------------------------------------------ open Tri ------------------------------------------------------------------------------ extMon+ : (e : E) ? (f : Pol) ? (? \h ? deg' h ? (suc e) ? (deg' f)) extMon+ e (pol? es ord) = aux es ord where se = suc e aux : (es0 : List E) ? DecrOrdered es0 ? (? \h ? deg' h ? se ? (hdExp' es0)) aux [] _ = (monPol e , leq) where leq : se ? se ? 0 leq = proj? (both?? se 0) aux (e' ? es) ord-e'es with compare e e' ... | tri> _ _ e>e' = (pol? (e ? e' ? es) ord-ee'se , leq) where leq : se ? se ? (suc e') leq = proj? (both?? se (suc e')) postulate ord-ee'se : DecrOrdered (e ? e' ? es) ... | tri< e e?e' _ _ = ?-elim (e?e' e References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: > Please, > > can anybody fix the proof for lemma2 in the attached code > (about 140 lines) ? > > It is about a certain insertion of a natural into a decreasingly ordered > list of naturals. Such a list is called Pol. > Insertion of e into es is according to _>_, and it is without > copying, that is when es contains any e' ? e, the result is es. > > Insertion is called mon+. > lemma1 and lemma2 are certain two very simple statements about > insertion of e into (e' ? es) for e < e'. > > lemma1 is for the case of es = []. And it is proved trivially. > > And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). > Moreover, I do not find any proof to satisfy Agda. > > Maybe, this is a bug in Agda? In this code, the Max structure and inequality are brought there to mon+ and extMon+ in order to prove termination. This complicates mon+, and proof search for its properties. mon+ can be greatly simplified by introducing `insert' for insertion of e into es without providing a proof in recursion, and then, by adding a proof for DecrOrdered es -> DecrOrdered (insert e es). I hope, there lemma2 will be easier to prove. Still: what can be a proof for Agda for the original implementation of mon+ ? Regards, ------ Sergei From guillaume.allais at ens-lyon.org Tue Feb 7 14:35:35 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Tue, 7 Feb 2017 14:35:35 +0100 Subject: [Agda] example with insertion to list In-Reply-To: <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> Message-ID: Hi Sergei, For your proof to be accepted you need `aux` to reduce. You can achieve that by pattern-matching on `es` like so: ======================================== lemma2 e e' es ord-e'es e On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: >> Please, >> >> can anybody fix the proof for lemma2 in the attached code >> (about 140 lines) ? >> >> It is about a certain insertion of a natural into a decreasingly ordered >> list of naturals. Such a list is called Pol. >> Insertion of e into es is according to _>_, and it is without >> copying, that is when es contains any e' ? e, the result is es. >> >> Insertion is called mon+. >> lemma1 and lemma2 are certain two very simple statements about >> insertion of e into (e' ? es) for e < e'. >> >> lemma1 is for the case of es = []. And it is proved trivially. >> >> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). >> Moreover, I do not find any proof to satisfy Agda. >> >> Maybe, this is a bug in Agda? > > > In this code, the Max structure and inequality are brought there to > mon+ and extMon+ in order to prove termination. > This complicates mon+, and proof search for its properties. > > mon+ can be greatly simplified by introducing `insert' for insertion of > e into es without providing a proof in recursion, > and then, by adding a proof for > DecrOrdered es -> DecrOrdered (insert e es). > > I hope, there lemma2 will be easier to prove. > > Still: what can be a proof for Agda for the original implementation of > mon+ ? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From traytel at inf.ethz.ch Tue Feb 7 19:57:04 2017 From: traytel at inf.ethz.ch (Dmitriy Traytel) Date: Tue, 7 Feb 2017 19:57:04 +0100 Subject: [Agda] ARCADE Call for Papers Message-ID: <1B72335A-40BA-448A-AC1C-999DB298E94F@inf.ethz.ch> (Apologies for multiple copies. Please redistribute) **************************************************************** *** CALL FOR PAPERS *** ARCADE http://www.cs.man.ac.uk/~regerg/arcade/ Automated Reasoning: Challenges, Applications, Directions, Exemplary achievements 6 August 2017, Gothenburg, Sweden (co-located with CADE-26) DESCRIPTION: The main goal of this workshop is to bring together key people from various subcommunities of automated reasoning---such as SAT/SMT, resolution, tableaux, theory-specific calculi (e.g. for description logic, arithmetic, set theory), interactive theorem proving---to discuss the present, past, and future of the field. The intention is to provide an opportunity to discuss broad issues facing the community. The structure of the workshop will be informal. We invite extended abstracts (2-4 pages, using the EasyChair class style http://www.easychair.org/publications/for_authors) in the form of non-technical position statements aimed at prompting lively discussion. The title of the workshop is indicative of the kind of discussions we would like to encourage: Challenges: What are the next grand challenges for research on automated reasoning? Thereby, we refer to problems, solving which would imply a significant impact (e.g., shift of focus) on the CADE community and beyond. Roughly ten years ago SMT was one such challenge. Applications: Is automated reasoning applicable in real-world (industrial) scenarios? Should reports on such applications be encouraged at a venue like CADE, perhaps by means of a special case study paper category? Directions: Based on the grand challenges and requirements from real-world applications, what are the research directions the community should promote? What bridges between the different subcommunities of automated reasoning need to be strengthened? What new communities should be included (if at all)? For example, following Reiner H?hnle's question in the AAR Newsletter, is there a place at CADE for research on usable automated reasoning (in resemblance to the flourishing topic of usable security)? Exemplary achievements: What are the landmark achievements of automated reasoning whose influence reached far beyond the CADE community itself? What can we learn from those successes when shaping our future research? Contributions will be grouped into similar themes and authors will be invited to make their case within discussion panels. Authors will then be invited to extend their abstracts (e.g., by transcripts of the discussion and a summary of the discussion's outcomes) for inclusion in an EPiC post-proceedings. IMPORTANT DATES (Anywhere on Earth): Submission deadline: 12 May 2017 Notification: 23 June 2017 Workshop: 6 August 2017 Post-proceedings deadline: 29 September 2017 PROGRAM COMMITTEE: Franz Baader, TU Dresden Christoph Benzm?ller, Freie Universit?t Berlin Armin Biere, Johannes Kepler University Linz Nikolaj Bj?rner, Microsoft Research Jasmin Christian Blanchette, Inria Nancy & Loria Maria Paola Bonacina, Universit? degli Studi di Verona Pascal Fontaine, Loria, Inria, University of Lorraine Silvio Ghilardi, Universit? degli Studi di Milano Martin Giese, University of Oslo J?rgen Giesl, RWTH Aachen Alberto Griggio, FBK-IRST Reiner H?hnle, TU Darmstadt Marijn Heule, The University of Texas at Austin Laura Kov?cs, Vienna University of Technology Aart Middeldorp, University of Innsbruck Neil Murray, SUNY at Albany David Plaisted, University of North Carolina at Chapel Hill Andrei Popescu, Middlesex University London Giles Reger, University of Manchester (co-chair) Renate Schmidt, The University of Manchester Stephan Schulz, DHBW Stuttgart Geoff Sutcliffe, University of Miami Cesare Tinelli, The University of Iowa Dmitriy Traytel, ETH Z?rich (co-chair) Andrei Voronkov, The University of Manchester Christoph Weidenbach, Max Planck Institute for Informatics From mechvel at botik.ru Tue Feb 7 20:12:45 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 07 Feb 2017 22:12:45 +0300 Subject: [Agda] example with insertion to list In-Reply-To: References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> Message-ID: <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-07 at 14:35 +0100, G. Allais wrote: > Hi Sergei, > > For your proof to be accepted you need `aux` to reduce. You can > achieve that by pattern-matching on `es` like so: > > ======================================== > lemma2 e e' es ord-e'es e lemma2 e e' [] ord-e'es e lemma2 e e' (e'' ? es) ord-e'es e ... | _ = anything > ======================================== Guillaume, thank you very much for the fix. Indeed, aux has [] among its patterns. Further, the goal of lemma2 is about (mon+ e f), which calls for (aux (e' ? es) ...), so that the argument for aux is given as non-empty. And I have an impression that the goal lhs Pol.exps (mon+ e f) is converted by normalization to Pol.exps (mon+ e (pol? (e' ? es) ord-e'es)), I thought that, hence, the pattern of [] is not needed in lemma2. And further normalization must give the goal rhs e' ? (Pol.exps (mon+ e f')). Your program is type-checked. And I do not understand, so far, why the initial program is not type-checked. With such intuition, I shall probably have further difficulties in composing proofs. Either I need to fix intuition, or Agda needs to fix normalization. Regards, ------ Sergei > > On 07/02/17 14:21, Sergei Meshveliani wrote: > > On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: > >> Please, > >> > >> can anybody fix the proof for lemma2 in the attached code > >> (about 140 lines) ? > >> > >> It is about a certain insertion of a natural into a decreasingly ordered > >> list of naturals. Such a list is called Pol. > >> Insertion of e into es is according to _>_, and it is without > >> copying, that is when es contains any e' ? e, the result is es. > >> > >> Insertion is called mon+. > >> lemma1 and lemma2 are certain two very simple statements about > >> insertion of e into (e' ? es) for e < e'. > >> > >> lemma1 is for the case of es = []. And it is proved trivially. > >> > >> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). > >> Moreover, I do not find any proof to satisfy Agda. > >> > >> Maybe, this is a bug in Agda? > > > > > > In this code, the Max structure and inequality are brought there to > > mon+ and extMon+ in order to prove termination. > > This complicates mon+, and proof search for its properties. > > > > mon+ can be greatly simplified by introducing `insert' for insertion of > > e into es without providing a proof in recursion, > > and then, by adding a proof for > > DecrOrdered es -> DecrOrdered (insert e es). > > > > I hope, there lemma2 will be easier to prove. > > > > Still: what can be a proof for Agda for the original implementation of > > mon+ ? > > > > Regards, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.allais at ens-lyon.org Wed Feb 8 14:56:27 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Wed, 8 Feb 2017 14:56:27 +0100 Subject: [Agda] example with insertion to list In-Reply-To: <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> Message-ID: <77f9851d-021c-167b-3805-3b76b84e158b@ens-lyon.org> You're right! If we hoist the definition of `aux` out of the where clause then the PE.refl proof without pattern-matching goes through. It's very strange. ================================================================ aux : (e : E) (es0 : List E) ? DecrOrdered es0 ? (? \h ? deg' h ? suc e ? (hdExp' es0)) aux e [] _ = (monPol e , leq) where leq : suc e ? suc e ? 0 leq = proj? (both?? (suc e) 0) aux e (e' ? es) ord-e'es with compare e e' ... | tri> _ _ e>e' = (pol? (e ? e' ? es) ord-ee'se , leq) where leq : suc e ? suc e ? (suc e') leq = proj? (both?? (suc e) (suc e')) postulate ord-ee'se : DecrOrdered (e ? e' ? es) ... | tri< e On Tue, 2017-02-07 at 14:35 +0100, G. Allais wrote: >> Hi Sergei, >> >> For your proof to be accepted you need `aux` to reduce. You can >> achieve that by pattern-matching on `es` like so: >> >> ======================================== >> lemma2 e e' es ord-e'es e> lemma2 e e' [] ord-e'es e> lemma2 e e' (e'' ? es) ord-e'es e> ... | _ = anything >> ======================================== > > > Guillaume, thank you very much for the fix. > > Indeed, aux has [] among its patterns. > Further, the goal of lemma2 is about (mon+ e f), which calls for > (aux (e' ? es) ...), > so that the argument for aux is given as non-empty. > And I have an impression that the goal lhs > > Pol.exps (mon+ e f) > > is converted by normalization to > > Pol.exps (mon+ e (pol? (e' ? es) ord-e'es)), > > I thought that, hence, the pattern of [] is not needed in lemma2. > And further normalization must give the goal rhs > > e' ? (Pol.exps (mon+ e f')). > > Your program is type-checked. > And I do not understand, so far, why the initial program is not > type-checked. > With such intuition, I shall probably have further difficulties in > composing proofs. > Either I need to fix intuition, or Agda needs to fix normalization. > > Regards, > > ------ > Sergei > >> >> On 07/02/17 14:21, Sergei Meshveliani wrote: >>> On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: >>>> Please, >>>> >>>> can anybody fix the proof for lemma2 in the attached code >>>> (about 140 lines) ? >>>> >>>> It is about a certain insertion of a natural into a decreasingly ordered >>>> list of naturals. Such a list is called Pol. >>>> Insertion of e into es is according to _>_, and it is without >>>> copying, that is when es contains any e' ? e, the result is es. >>>> >>>> Insertion is called mon+. >>>> lemma1 and lemma2 are certain two very simple statements about >>>> insertion of e into (e' ? es) for e < e'. >>>> >>>> lemma1 is for the case of es = []. And it is proved trivially. >>>> >>>> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). >>>> Moreover, I do not find any proof to satisfy Agda. >>>> >>>> Maybe, this is a bug in Agda? >>> >>> >>> In this code, the Max structure and inequality are brought there to >>> mon+ and extMon+ in order to prove termination. >>> This complicates mon+, and proof search for its properties. >>> >>> mon+ can be greatly simplified by introducing `insert' for insertion of >>> e into es without providing a proof in recursion, >>> and then, by adding a proof for >>> DecrOrdered es -> DecrOrdered (insert e es). >>> >>> I hope, there lemma2 will be easier to prove. >>> >>> Still: what can be a proof for Agda for the original implementation of >>> mon+ ? >>> >>> Regards, >>> >>> ------ >>> Sergei >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From drl at cs.cmu.edu Wed Feb 8 17:12:41 2017 From: drl at cs.cmu.edu (Dan Licata) Date: Wed, 8 Feb 2017 11:12:41 -0500 Subject: [Agda] Math Research Communities on Homotopy Type Theory, June 4-10, 2017, Snowbird UT References: <6D1AEA61-BB84-4119-89A6-5576467D8717@cs.cmu.edu> Message-ID: <5F2BF682-8CF0-4FFC-9C2D-AEC0DF2FCF44@cs.cmu.edu> Dear all, This is a reminder that from June 4-10, 2017, there will be a workshop on Homotopy Type Theory, organized as part of the AMS Mathematics Research Communities program and held in the Snowbird Resort in Utah. The goal of the workshop is to bring together advanced graduate students and postdocs having some background in one (or more) areas such as algebraic topology, category theory, mathematical logic, or computer science, with the goal of learning how these areas come together in homotopy type theory, and working together to prove new results. Basic knowledge of just one of these areas will be sufficient to be a successful participant. The organizers are particularly interested in using this workshop as an opportunity to improve the diversity in the HoTT community in all aspects. For more information about the workshop, including the list of sample topics that participants may be working on and the registration information, please see the website: http://www.ams.org/programs/research-communities/2017MRC-1 All accepted into the program will receive financial support (room and board at the Snowbird Resort and up to $650 towards airfare). The application deadline is *March 1st, 2017.* The majority of the positions are allocated to U.S. citizens and people who are affiliated with U.S. institutions, but a smaller number are also open to international participants. If you have any questions, please feel free to contact any of the organizers. Dan Christensen, Chris Kapulkin, Dan Licata, Emily Riehl, Mike Shulman -- You received this message because you are subscribed to the Google Groups "Homotopy Type Theory" group. To unsubscribe from this group and stop receiving emails from it, send an email to HomotopyTypeTheory+unsubscribe at googlegroups.com. For more options, visit https://groups.google.com/d/optout. From andreas.abel at ifi.lmu.de Wed Feb 8 19:57:05 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 8 Feb 2017 19:57:05 +0100 Subject: [Agda] [Coq-Club] ESSLLI student session CFP: Deadline extended until Feb 14 Message-ID: <2efa7da0-0668-077b-717c-2f81eeba177d@ifi.lmu.de> *Deadline Extension to February 14* *ESSLLI 2017 STUDENT SESSION* Held during the 29th European Summer School in Logic, Language and Information Toulouse, France, July 17-28, 2017 *NEW* *Deadline for submissions: February 14, 2017* https://easychair.org/conferences/?conf=stus2017 *ABOUT:* The Student Session of the 29th European Summer School in Logic, Language, and Information (ESSLLI) will take place in Toulouse, France, July 17th to 28th, 2017 (https://www.irit.fr/esslli2017/). We invite submissions of original, unpublished work from students in any area at the intersection of Logic & Language, Language & Computation, or Logic & Computation. Submissions will be reviewed by several experts in the field, and accepted papers will be presented orally or as posters and selected papers will appear in the Student Session proceedings by Springer. This is an excellent opportunity to receive valuable feedback from expert readers and to present your work to a diverse audience. *ORAL/POSTER PRESENTATIONS:* Note that there are two separate kinds of submissions, one for oral presentations and one for posters. This means that papers are directly submitted either as oral presentations or as poster presentations. Reviewing and ranking will be done separately. We particularly encourage submissions for posters, as they offer an excellent opportunity to present smaller research projects and research in progress. *SUBMISSION GUIDELINES:* Authors must be students, and submissions may be singly or jointly authored. Each author may submit at most one single and one jointly authored contribution. Submissions should not be longer than 8 pages for an oral presentation or 4 pages for a poster presentation (including examples and references). Submissions must be anonymous, without any identifying information. More detailed guidelines regarding submission can be found on the Student Session website: http://www2.sfs.uni-tuebingen.de/esslli-stus-2017/. *SPONSORSHIP AND PRIZES* As in previous years, Springer has kindly agreed to sponsor the ESSLLI student session. The best poster and best talk will be awarded Springer book vouchers of 500? each. *FURTHER INFORMATION:* Please direct inquiries about submission procedures or other matters relating to the Student Session to johannes.wahle at uni-tuebingen.de and karoliina.lohiniva at unige.ch. ESSLLI 2017 will feature a wide range of foundational and advanced courses and workshops in all areas of Logic, Language, and Computation. For further information, including registration information and course listings, and for general inquiries about ESSLLI 2017, please consult the main ESSLLI 2017 page: https://www.irit.fr/esslli2017/. Kind regards, The ESSLLI 2017 Student Session Organization Committee Chairs: Johannes Wahle (Universit?t T?bingen) Karoliina Lohiniva (Universit? de Gen?ve) LoCo co-chairs: Marie Farrell (National University of Ireland Maynooth) Herbert Lange (University of Gothenburg) LoLa co-chairs: Milica Denic (?cole normale sup?rieure de Paris) Mora Maldonado (?cole normale sup?rieure de Paris) LaCo co-chairs: Emmanuele Chersoni (Universit? d'Aix-Marseille) Jennifer Sikos (Universit?t Heidelberg) -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Wed Feb 8 22:12:56 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 09 Feb 2017 00:12:56 +0300 Subject: [Agda] example with insertion to list In-Reply-To: <77f9851d-021c-167b-3805-3b76b84e158b@ens-lyon.org> References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> <77f9851d-021c-167b-3805-3b76b84e158b@ens-lyon.org> Message-ID: <1486588376.2745.27.camel@one.mechvel.pereslavl.ru> On Wed, 2017-02-08 at 14:56 +0100, G. Allais wrote: > You're right! If we hoist the definition of `aux` out of the where > clause then the PE.refl proof without pattern-matching goes through. > It's very strange. > [..] Please, see a simplified version Debug-feb8-2017.agda attached. It avoids adding the inequality proof. And there Agda type-checks the proof for lemma2 that does not match against the list: -------------------------------------------------------------------- lemma2 : ? e e' es ? (ord-e'es : DecrOrdered (e' ? es)) ? e < e' ? let f = pol? (e' ? es) ord-e'es ord-es : DecrOrdered es ord-es = tailOrdered ord-e'es f' = pol? es ord-es in Pol.exps (mon+ e f) ? e' ? (Pol.exps (mon+ e f')) lemma2 e e' es ord-e'es e e?e' _ _ = ?-elim (e?e' e > Guillaume, thank you very much for the fix. > > > > Indeed, aux has [] among its patterns. > > Further, the goal of lemma2 is about (mon+ e f), which calls for > > (aux (e' ? es) ...), > > so that the argument for aux is given as non-empty. > > And I have an impression that the goal lhs > > > > Pol.exps (mon+ e f) > > > > is converted by normalization to > > > > Pol.exps (mon+ e (pol? (e' ? es) ord-e'es)), > > > > I thought that, hence, the pattern of [] is not needed in lemma2. > > And further normalization must give the goal rhs > > > > e' ? (Pol.exps (mon+ e f')). > > > > Your program is type-checked. > > And I do not understand, so far, why the initial program is not > > type-checked. > > With such intuition, I shall probably have further difficulties in > > composing proofs. > > Either I need to fix intuition, or Agda needs to fix normalization. > > > > Regards, > > > > ------ > > Sergei > > > >> > >> On 07/02/17 14:21, Sergei Meshveliani wrote: > >>> On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: > >>>> Please, > >>>> > >>>> can anybody fix the proof for lemma2 in the attached code > >>>> (about 140 lines) ? > >>>> > >>>> It is about a certain insertion of a natural into a decreasingly ordered > >>>> list of naturals. Such a list is called Pol. > >>>> Insertion of e into es is according to _>_, and it is without > >>>> copying, that is when es contains any e' ? e, the result is es. > >>>> > >>>> Insertion is called mon+. > >>>> lemma1 and lemma2 are certain two very simple statements about > >>>> insertion of e into (e' ? es) for e < e'. > >>>> > >>>> lemma1 is for the case of es = []. And it is proved trivially. > >>>> > >>>> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). > >>>> Moreover, I do not find any proof to satisfy Agda. > >>>> > >>>> Maybe, this is a bug in Agda? > >>> > >>> > >>> In this code, the Max structure and inequality are brought there to > >>> mon+ and extMon+ in order to prove termination. > >>> This complicates mon+, and proof search for its properties. > >>> > >>> mon+ can be greatly simplified by introducing `insert' for insertion of > >>> e into es without providing a proof in recursion, > >>> and then, by adding a proof for > >>> DecrOrdered es -> DecrOrdered (insert e es). > >>> > >>> I hope, there lemma2 will be easier to prove. > >>> > >>> Still: what can be a proof for Agda for the original implementation of > >>> mon+ ? > >>> > >>> Regards, > >>> > >>> ------ > >>> Sergei > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > -------------- next part -------------- open import Function using (_?_; case_of_) open import Algebra.FunctionProperties using (Op?) open import Relation.Binary using (Rel; Tri; DecTotalOrder; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Empty using (?-elim) open import Data.Sum using (_?_) open import Data.Product using (_?_; _,_; proj?; proj?; ?) open import Data.List using (List; []; _?_; map) open import Data.List.All using (All) renaming ([] to []a; _?_ to _?a_) open import Data.Nat as Nat using (?; suc; _?_; _<_; _>_) open import Data.Nat.Properties as NatProp using () --**************************************************************************** natSTO = NatProp.strictTotalOrder open StrictTotalOrder natSTO using (compare) data DecrOrdered : List ? ? Set where nil : DecrOrdered [] single : (x : ?) ? DecrOrdered (x ? []) prep2 : (x y : ?) ? (xs : List ?) ? x > y ? DecrOrdered (y ? xs) ? DecrOrdered (x ? y ? xs) tailOrdered : ? {x xs} ? DecrOrdered (x ? xs) ? DecrOrdered xs tailOrdered (single _) = nil tailOrdered (prep2 x y xs _ ord-y:xs) = ord-y:xs consOrdered : ? {x xs} ? DecrOrdered xs ? All (x >_) xs ? DecrOrdered (x ? xs) consOrdered {x} {[]} _ _ = single x consOrdered {x} {y ? xs} ord-yxs (x>y ?a x>xs) = prep2 x y xs x>y ord-yxs ------------------------------------------------------------------------------ record Pol : Set where constructor pol? field exps : List ? ordered : DecrOrdered exps -- e1 > ... > en monPol : ? ? Pol monPol e = pol? (e ? []) (DecrOrdered.single e) open Tri ------------------------------------------------------------------------------ mon+ : ? ? Pol ? Pol mon+ e (pol? es ord) = aux es ord where aux : (es : List ?) ? DecrOrdered es ? Pol aux [] _ = monPol e aux (e' ? es) ord-e'es with compare e e' ... | tri> _ _ e>e' = pol? (e ? e' ? es) ord-ee'se where postulate ord-ee'se : DecrOrdered (e ? e' ? es) --------- ... | tri< e e?e' _ _ = ?-elim (e?e' e I want to install Agda to the computers in my department so that all students can program in Agda without any setup. To do so, I will do (after installing Haskell platform): cabal update cabal install cabal-install cabal install alex cabal install happy cabal install cpphs sudo cabal install --global Agda (If this is not correct, please let me know.) Then, I want to install the standard library. After I place the standard library to an appropriate place, for my personal installation, I create .agda directory in my home directory, and put the following two files there: libraries: path to standard-library.agda-lib defaults: standard-library Do all the students have to do this? Is there any default place to put these files so that students do not have to create these files? -- Kenichi Asai From asr at eafit.edu.co Thu Feb 9 15:51:26 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 9 Feb 2017 09:51:26 -0500 Subject: [Agda] Agda installation for all users In-Reply-To: <20170209134325.GA6558@pllab.is.ocha.ac.jp> References: <20170209134325.GA6558@pllab.is.ocha.ac.jp> Message-ID: On 9 February 2017 at 08:43, Kenichi Asai wrote: > After I place the standard library to an > appropriate place, for my personal installation, I create .agda > directory in my home directory, and put the following two files there: > > libraries: > path to standard-library.agda-lib > > defaults: > standard-library > > Do all the students have to do this? Is there any default place to > put these files so that students do not have to create these files? >From http://agda.readthedocs.io/en/latest/tools/package-system.html: The AGDA_DIR defaults to ~/.agda on unix-like systems and C:\Users\USERNAME\AppData\Roaming\agda or similar on Windows, and can be overridden by setting the AGDA_DIR environment variable. you can use the AGDA_DIR environment variable for setting a default place for those files (I didn't test). -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From andrei at inf.unibe.ch Fri Feb 10 09:44:58 2017 From: andrei at inf.unibe.ch (Andrei Chis) Date: Fri, 10 Feb 2017 09:44:58 +0100 Subject: [Agda] 1st CfP: SLE 2017 (10th ACM SIGPLAN International Conference on Software Language Engineering) Message-ID: ======================================================================== **Call for Papers** 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017) 23-24 October 2017, Vancouver, Canada (Co-located with SPLASH 2017) General chair: Benoit Combemale, University of Rennes 1, France Program co-chairs: Marjan Mernik, University of Maribor, Slovenia Bernhard Rumpe, RWTH Aachen University, Germany Artifact evaluation chairs Tanja Mayerhofer, TU Wien, Austria Laurence Tratt, King's College London, UK http://conf.researchr.org/track/sle-2017/sle-2017-papers http://www.sleconf.org/2017 Follow us on twitter: https://twitter.com/sleconf ======================================================================== Software Language Engineering (SLE) is the application of systematic, disciplined, and measurable approaches to the development, use, deployment, and maintenance of software languages. The term "software language" is used broadly, and includes: general-purpose programming languages; domain-specific languages (e.g. BPMN, Simulink, Modelica); modeling and metamodeling languages (e.g. SysML and UML); data models and ontologies (e.g. XML-based and OWL-based languages and vocabularies). ### Important Dates Fri 2 Jun 2017 - Abstract Submission Fri 9 Jun 2017 - Paper Submission Fri 4 Aug 2017 - Author Notification Thu 10 Aug 2017 - Artifact Submission Fri 1 Sep 2017 - Artifact Notification Fri 8 Sep 2017 - Camera Ready Deadline Sun 22 Oct - SLE workshops Mon 23 Oct - Tue 24 Oct 2017 - SLE Conference ### Topics of Interest SLE aims to be broad-minded and inclusive about relevance and scope. We solicit high-quality contributions in areas ranging from theoretical and conceptual contributions to tools, techniques, and frameworks in the domain of language engineering. Topics relevant to SLE cover generic aspects of software languages development rather than aspects of engineering a specific language. In particular, SLE is interested in principled engineering approaches and techniques in the following areas: * Language Design and Implementation * Approaches and methodologies for language design * Static semantics (e.g., design rules, well-formedness constraints) * Techniques for behavioral / executable semantics * Generative approaches (incl. code synthesis, compilation) * Meta-languages, meta-tools, language workbenches * Language Validation * Verification and formal methods for languages * Testing techniques for languages * Simulation techniques for languages * Language Integration and Composition * Coordination of heterogeneous languages and tools * Mappings between languages (incl. transformation languages) * Traceability between languages * Deployment of languages to different platforms * Language Maintenance * Software language reuse * Language evolution * Language families and variability * Domain-specific approaches for any aspects of SLE (design, implementation, validation, maintenance) * Empirical evaluation and experience reports of language engineering tools * User studies evaluating usability * Performance benchmarks * Industrial applications ### Types of Submissions * **Research papers**: These should report a substantial research contribution to SLE or successful application of SLE techniques or both. Full paper submissions must not exceed 12 pages including bibliography in ACM SIGPLAN conference style (http://www.sigplan.org/Resources/Author/). * **Tool papers**: Because of SLE's interest in tools, we seek papers that present software tools related to the field of SLE. Selection criteria include originality of the tool, its innovative aspects, and relevance to SLE. Any of the SLE topics of interest are appropriate areas for tool demonstrations. Submissions must provide a tool description of 4 pages including bibliography in ACM SIGPLAN conference style (http://www.sigplan.org/Resources/Author/), and a demonstration outline including screenshots of up to 6 pages. Tool demonstrations must have the keywords ?Tool Demo? or ?Tool Demonstration? in the title. The 4-page tool description will, if the demonstration is accepted, be published in the proceedings. The 6-page demonstration outline will be used by the program committee only for evaluating the submission. * **Industrial papers**: These should describe real-world application scenarios of SLE in industry, explained in their context with an analysis of the challenges that were overcome and the lessons which the audience can learn from this experience. Industry paper submissions must not exceed 6 pages including bibliography in ACM SIGPLAN conference style (http://www.sigplan.org/Resources/Author/). * **New ideas / vision papers**: New ideas papers should describe new, non-conventional SLE research approaches that depart from standard practice. They are intended to describe well-defined research ideas that are at an early stage of investigation. Vision papers are intended to present new unifying theories about existing SLE research that can lead to the development of new technologies or approaches. New ideas / vision papers must not exceed 4 pages including bibliography in ACM SIGPLAN conference style (http://www.sigplan.org/Resources/Author/). ### Artifact evaluation Authors of accepted papers at SLE 2017 are encouraged to submit their experiment results used for underpinning research statements to an artifact evaluation process. This submission is voluntary and will not influence the final decision regarding the papers. Papers that go through the Artifact Evaluation process successfully receive a seal of approval printed on the first page of the paper in the proceedings. Authors of papers with accepted artifacts are encouraged to make these materials publicly available upon publication of the proceedings, by including them as "source materials" in the ACM Digital Library. ### Publications All submitted papers will be reviewed by at least three members of the program committee. All accepted papers, including tool papers, industrial papers and new ideas / vision papers will be published in ACM Digital Library. Selected accepted papers will be invited to a special issue of the Computer Languages, Systems and Structures (COMLAN) journal. ### Awards * **Distinguished paper**: Award for most notable paper, as determined by the PC chairs based on the recommendations of the program committee. * **Distinguished reviewer**: Award for distinguished reviewer, as determined by the PC chairs using feedback from the authors. * **Distinguished artifact**: Award for the artifact most significantly exceeding expectations, as determined by the AEC chairs based on the recommendations of the artifact evaluation committee. ### Program Committee Marjan Mernik (co-chair), University of Maribor, Slovenia Bernhard Rumpe (co-chair), RWTH Aachen University, Germany Christian Berger, Chalmers, Sweden Mark van den Brand, TU Eindhoven, The Netherlands Ruth Breu, University of Innsbruck, Austria Jordi Cabot, ICREA, Spain Walter Cazzola, University of Milan, Italy Marsha Chechik, University of Toronto, Canada Tony Clark, Middlesex University, UK Tom Dinkelaker, Ericsson, Germany Bernd Fischer, Stellenbosch University, South Africa Sebastian Gerard, CEA, France Jeff Gray, University of Alabama, USA Esther Guerra, Autonomous University of Madrid, Spain Michael Homer, Victoria University of Wellington, New Zealand Ralf L?mmel, University of Koblenz-Landau, Germany Tihamer Levendovszky, Microsoft, USA Gunter Mussbacher, McGill University, Canada Terence Parr, University of San Francisco, USA Jaroslav Porub?n, University of Ko?ice, Slovakia Jan Ringert, Tel Aviv University, Israel Julia Rubin, University of British Columbia, Canada Tony Sloane, Macquarie University, Australia Eugene Syriani, University of Montreal, Canada Emma S?derberg, Google, Denmark Eric Van Wyk, University of Minnesota, USA Jurgen Vinju, CWI, Netherlands Eric Walkingshaw, Oregon State University, USA Andreas Wortmann, RWTH Aachen University, Germany Tian Zhang, Nanjing University, China ### Contact For any question, please contact the organizers via email: sle2017 at inria.fr From sanzhiyan at gmail.com Fri Feb 10 18:37:20 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Fri, 10 Feb 2017 18:37:20 +0100 Subject: [Agda] example with insertion to list In-Reply-To: <1486588376.2745.27.camel@one.mechvel.pereslavl.ru> References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> <77f9851d-021c-167b-3805-3b76b84e158b@ens-lyon.org> <1486588376.2745.27.camel@one.mechvel.pereslavl.ru> Message-ID: You can get the version with the inequality proof to accept the PE.refl proof by not using "se" in the type of aux. There's an analysis that tries to figure out whether aux depends on the extra arguments it gets by being defined inside extMon+, and the use of "se" is fooling the analysis here. This should be reported as a bug, but I will try to shrink the test case first. Best, Andrea On Wed, Feb 8, 2017 at 10:12 PM, Sergei Meshveliani wrote: > On Wed, 2017-02-08 at 14:56 +0100, G. Allais wrote: >> You're right! If we hoist the definition of `aux` out of the where >> clause then the PE.refl proof without pattern-matching goes through. >> It's very strange. >> [..] > > > Please, see a simplified version Debug-feb8-2017.agda attached. > It avoids adding the inequality proof. > And there Agda type-checks the proof for lemma2 that does not match > against the list: > > -------------------------------------------------------------------- > lemma2 : ? e e' es ? (ord-e'es : DecrOrdered (e' ? es)) ? e < e' ? > let > f = pol? (e' ? es) ord-e'es > > ord-es : DecrOrdered es > ord-es = tailOrdered ord-e'es > > f' = pol? es ord-es > in > Pol.exps (mon+ e f) ? e' ? (Pol.exps (mon+ e f')) > > lemma2 e e' es ord-e'es e ... > | tri< _ _ _ = PE.refl > ... | tri? e?e' _ _ = ?-elim (e?e' e ... | tri> e?e' _ _ = ?-elim (e?e' e -------------------------------------------------------------------- > > I do not understand why does not it type-check > Debug-feb4-2017.agda similarly. > > > >> > Guillaume, thank you very much for the fix. >> > >> > Indeed, aux has [] among its patterns. >> > Further, the goal of lemma2 is about (mon+ e f), which calls for >> > (aux (e' ? es) ...), >> > so that the argument for aux is given as non-empty. >> > And I have an impression that the goal lhs >> > >> > Pol.exps (mon+ e f) >> > >> > is converted by normalization to >> > >> > Pol.exps (mon+ e (pol? (e' ? es) ord-e'es)), >> > >> > I thought that, hence, the pattern of [] is not needed in lemma2. >> > And further normalization must give the goal rhs >> > >> > e' ? (Pol.exps (mon+ e f')). >> > >> > Your program is type-checked. >> > And I do not understand, so far, why the initial program is not >> > type-checked. >> > With such intuition, I shall probably have further difficulties in >> > composing proofs. >> > Either I need to fix intuition, or Agda needs to fix normalization. >> > >> > Regards, >> > >> > ------ >> > Sergei >> > >> >> >> >> On 07/02/17 14:21, Sergei Meshveliani wrote: >> >>> On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: >> >>>> Please, >> >>>> >> >>>> can anybody fix the proof for lemma2 in the attached code >> >>>> (about 140 lines) ? >> >>>> >> >>>> It is about a certain insertion of a natural into a decreasingly ordered >> >>>> list of naturals. Such a list is called Pol. >> >>>> Insertion of e into es is according to _>_, and it is without >> >>>> copying, that is when es contains any e' ? e, the result is es. >> >>>> >> >>>> Insertion is called mon+. >> >>>> lemma1 and lemma2 are certain two very simple statements about >> >>>> insertion of e into (e' ? es) for e < e'. >> >>>> >> >>>> lemma1 is for the case of es = []. And it is proved trivially. >> >>>> >> >>>> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). >> >>>> Moreover, I do not find any proof to satisfy Agda. >> >>>> >> >>>> Maybe, this is a bug in Agda? >> >>> >> >>> >> >>> In this code, the Max structure and inequality are brought there to >> >>> mon+ and extMon+ in order to prove termination. >> >>> This complicates mon+, and proof search for its properties. >> >>> >> >>> mon+ can be greatly simplified by introducing `insert' for insertion of >> >>> e into es without providing a proof in recursion, >> >>> and then, by adding a proof for >> >>> DecrOrdered es -> DecrOrdered (insert e es). >> >>> >> >>> I hope, there lemma2 will be easier to prove. >> >>> >> >>> Still: what can be a proof for Agda for the original implementation of >> >>> mon+ ? >> >>> >> >>> Regards, >> >>> >> >>> ------ >> >>> Sergei >> >>> >> >>> _______________________________________________ >> >>> Agda mailing list >> >>> Agda at lists.chalmers.se >> >>> https://lists.chalmers.se/mailman/listinfo/agda >> >>> >> >> >> >> _______________________________________________ >> >> Agda mailing list >> >> Agda at lists.chalmers.se >> >> https://lists.chalmers.se/mailman/listinfo/agda >> > >> > >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From apostolis.xekoukoulotakis at gmail.com Sat Feb 11 00:28:12 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sat, 11 Feb 2017 01:28:12 +0200 Subject: [Agda] Sized types unification error. Message-ID: ``` module test where open import Size open import Data.Nat data test : ? ? Set where One : test (suc zero) Two : test (suc (suc zero)) fun : test (suc zero) ? ? fun x = {!!} data test2 : (i : Size) ? (j : Size< ? i) ? Set where same : ?{i} ? test2 i i notSame : {i : Size} ? {j : Size< i} ? test2 i j fun2 : {i : Size} ? test2 i i ? ? fun2 x = {!!} ` ``` Case splitting on fun2 results in error : ``` I'm not sure if there should be a case for the constructor notSame, because I get stuck when trying to solve the following unification problems (inferred index ? expected index): i? ? i j ? i when checking that the expression ? has type ? ``` Is there a reason for this to happen? What can one do to remove this error? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Sat Feb 11 13:44:48 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Sat, 11 Feb 2017 13:44:48 +0100 Subject: [Agda] example with insertion to list In-Reply-To: References: <1486470008.2698.9.camel@one.mechvel.pereslavl.ru> <1486473667.2965.14.camel@one.mechvel.pereslavl.ru> <1486494765.3469.30.camel@one.mechvel.pereslavl.ru> <77f9851d-021c-167b-3805-3b76b84e158b@ens-lyon.org> <1486588376.2745.27.camel@one.mechvel.pereslavl.ru> Message-ID: Here's the issue https://github.com/agda/agda/issues/2455 On Fri, Feb 10, 2017 at 6:37 PM, Andrea Vezzosi wrote: > You can get the version with the inequality proof to accept the > PE.refl proof by not using "se" in the type of aux. > > There's an analysis that tries to figure out whether aux depends on > the extra arguments it gets by being defined inside extMon+, and the > use of "se" is fooling the analysis here. > > This should be reported as a bug, but I will try to shrink the test case first. > > Best, > Andrea > > On Wed, Feb 8, 2017 at 10:12 PM, Sergei Meshveliani wrote: >> On Wed, 2017-02-08 at 14:56 +0100, G. Allais wrote: >>> You're right! If we hoist the definition of `aux` out of the where >>> clause then the PE.refl proof without pattern-matching goes through. >>> It's very strange. >>> [..] >> >> >> Please, see a simplified version Debug-feb8-2017.agda attached. >> It avoids adding the inequality proof. >> And there Agda type-checks the proof for lemma2 that does not match >> against the list: >> >> -------------------------------------------------------------------- >> lemma2 : ? e e' es ? (ord-e'es : DecrOrdered (e' ? es)) ? e < e' ? >> let >> f = pol? (e' ? es) ord-e'es >> >> ord-es : DecrOrdered es >> ord-es = tailOrdered ord-e'es >> >> f' = pol? es ord-es >> in >> Pol.exps (mon+ e f) ? e' ? (Pol.exps (mon+ e f')) >> >> lemma2 e e' es ord-e'es e> ... >> | tri< _ _ _ = PE.refl >> ... | tri? e?e' _ _ = ?-elim (e?e' e> ... | tri> e?e' _ _ = ?-elim (e?e' e> -------------------------------------------------------------------- >> >> I do not understand why does not it type-check >> Debug-feb4-2017.agda similarly. >> >> >> >>> > Guillaume, thank you very much for the fix. >>> > >>> > Indeed, aux has [] among its patterns. >>> > Further, the goal of lemma2 is about (mon+ e f), which calls for >>> > (aux (e' ? es) ...), >>> > so that the argument for aux is given as non-empty. >>> > And I have an impression that the goal lhs >>> > >>> > Pol.exps (mon+ e f) >>> > >>> > is converted by normalization to >>> > >>> > Pol.exps (mon+ e (pol? (e' ? es) ord-e'es)), >>> > >>> > I thought that, hence, the pattern of [] is not needed in lemma2. >>> > And further normalization must give the goal rhs >>> > >>> > e' ? (Pol.exps (mon+ e f')). >>> > >>> > Your program is type-checked. >>> > And I do not understand, so far, why the initial program is not >>> > type-checked. >>> > With such intuition, I shall probably have further difficulties in >>> > composing proofs. >>> > Either I need to fix intuition, or Agda needs to fix normalization. >>> > >>> > Regards, >>> > >>> > ------ >>> > Sergei >>> > >>> >> >>> >> On 07/02/17 14:21, Sergei Meshveliani wrote: >>> >>> On Tue, 2017-02-07 at 15:20 +0300, Sergei Meshveliani wrote: >>> >>>> Please, >>> >>>> >>> >>>> can anybody fix the proof for lemma2 in the attached code >>> >>>> (about 140 lines) ? >>> >>>> >>> >>>> It is about a certain insertion of a natural into a decreasingly ordered >>> >>>> list of naturals. Such a list is called Pol. >>> >>>> Insertion of e into es is according to _>_, and it is without >>> >>>> copying, that is when es contains any e' ? e, the result is es. >>> >>>> >>> >>>> Insertion is called mon+. >>> >>>> lemma1 and lemma2 are certain two very simple statements about >>> >>>> insertion of e into (e' ? es) for e < e'. >>> >>>> >>> >>>> lemma1 is for the case of es = []. And it is proved trivially. >>> >>>> >>> >>>> And a similar proof for lemma2 is not type-checked (in Agda 2.5.2). >>> >>>> Moreover, I do not find any proof to satisfy Agda. >>> >>>> >>> >>>> Maybe, this is a bug in Agda? >>> >>> >>> >>> >>> >>> In this code, the Max structure and inequality are brought there to >>> >>> mon+ and extMon+ in order to prove termination. >>> >>> This complicates mon+, and proof search for its properties. >>> >>> >>> >>> mon+ can be greatly simplified by introducing `insert' for insertion of >>> >>> e into es without providing a proof in recursion, >>> >>> and then, by adding a proof for >>> >>> DecrOrdered es -> DecrOrdered (insert e es). >>> >>> >>> >>> I hope, there lemma2 will be easier to prove. >>> >>> >>> >>> Still: what can be a proof for Agda for the original implementation of >>> >>> mon+ ? >>> >>> >>> >>> Regards, >>> >>> >>> >>> ------ >>> >>> Sergei >>> >>> >>> >>> _______________________________________________ >>> >>> Agda mailing list >>> >>> Agda at lists.chalmers.se >>> >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >> >>> >> _______________________________________________ >>> >> Agda mailing list >>> >> Agda at lists.chalmers.se >>> >> https://lists.chalmers.se/mailman/listinfo/agda >>> > >>> > >>> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> From Jesper at sikanda.be Sun Feb 12 11:47:42 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Sun, 12 Feb 2017 11:47:42 +0100 Subject: [Agda] Sized types unification error. In-Reply-To: References: Message-ID: This still worked on 2.5.2, but it stopped working because of my fix of #2407 (https://github.com/agda/agda/issues/2407). The behaviour of agda-2.5.2 was to generate two cases `fun2 {i} (same {i = .i}) = ?` and `fun2 {i} (notSame {i = .i} {j = .i}) = ?` (with --show-implicit option), but the second case here is actually not even type-correct! Indeed, it throws the following error: ``` ? i !=< i of type Size when checking that the expression i has type Size< i ``` Replacing the .i by _ allowed the example to work, but this was clearly wrong and is now also prohibited by my fix. To fix the problem in your code, you could replace the type of j in the notSame constructor by `Size< (? i)`, but this is perhaps not what you'd want. OTOH, perhaps it could be reasonable to expect Agda to see that the case for `notSame` is impossible instead of giving up as it currently does. But I don't know enough about sized types to be sure that this would be sound. Perhaps Andreas can tell what the right behaviour should be here? -- Jesper On Sat, Feb 11, 2017 at 12:28 AM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > ``` > module test where > > open import Size > open import Data.Nat > > data test : ? ? Set where > One : test (suc zero) > Two : test (suc (suc zero)) > > > fun : test (suc zero) ? ? > fun x = {!!} > > data test2 : (i : Size) ? (j : Size< ? i) ? Set where > same : ?{i} ? test2 i i > notSame : {i : Size} ? {j : Size< i} ? test2 i j > > > fun2 : {i : Size} ? test2 i i ? ? > fun2 x = {!!} > ` > ``` > > Case splitting on fun2 results in error : > > ``` > I'm not sure if there should be a case for the constructor notSame, > because I get stuck when trying to solve the following unification > problems (inferred index ? expected index): > i? ? i > j ? i > when checking that the expression ? has type ? > ``` > > Is there a reason for this to happen? What can one do to remove this error? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Feb 13 14:49:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 13 Feb 2017 16:49:30 +0300 Subject: [Agda] Failed to find source of module Message-ID: <1486993770.2466.13.camel@one.mechvel.pereslavl.ru> Dear Agda developers, when I set to the directory ~/mySource/Foo/ the file TT.agda, with the heading module TT where (instead of the correct module Foo.TT where), Agda 2.5.2 reports (*) Failed to find source of module ... And it lists the directory names where it searched, and the directory ~/mySource is not listed. If I improve the name to Foo.TT, then it searches where it is needed. And the error report (*) looks as misleading. Regards, ------ Sergei From mechvel at botik.ru Mon Feb 13 14:53:28 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 13 Feb 2017 16:53:28 +0300 Subject: [Agda] Failed to find source of module In-Reply-To: <1486993770.2466.13.camel@one.mechvel.pereslavl.ru> References: <1486993770.2466.13.camel@one.mechvel.pereslavl.ru> Message-ID: <1486994008.2466.16.camel@one.mechvel.pereslavl.ru> On Mon, 2017-02-13 at 16:49 +0300, Sergei Meshveliani wrote: > Dear Agda developers, > > when I set to the directory ~/mySource/Foo/ the file TT.agda, with > the heading > > module TT where > > (instead of the correct module Foo.TT where), > Agda 2.5.2 reports > > (*) Failed to find source of module ... > > And it lists the directory names where it searched, and the directory > ~/mySource is not listed. I need to add: this report concerns the modules imported by TT. > If I improve the name to Foo.TT, then it searches where it is needed. > > And the error report (*) looks as misleading. > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From apostolis.xekoukoulotakis at gmail.com Mon Feb 13 15:33:37 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Mon, 13 Feb 2017 16:33:37 +0200 Subject: [Agda] Sized types unification error. In-Reply-To: References: Message-ID: I am avoiding this issue at the moment, so no hurry. But I am interested in the answer. On Sun, Feb 12, 2017 at 12:47 PM, Jesper Cockx wrote: > This still worked on 2.5.2, but it stopped working because of my fix of > #2407 (https://github.com/agda/agda/issues/2407). The behaviour of > agda-2.5.2 was to generate two cases `fun2 {i} (same {i = .i}) = ?` and > `fun2 {i} (notSame {i = .i} {j = .i}) = ?` (with --show-implicit option), > but the second case here is actually not even type-correct! Indeed, it > throws the following error: > ``` > ? i !=< i of type Size > when checking that the expression i has type Size< i > ``` > Replacing the .i by _ allowed the example to work, but this was clearly > wrong and is now also prohibited by my fix. > > To fix the problem in your code, you could replace the type of j in the > notSame constructor by `Size< (? i)`, but this is perhaps not what you'd > want. > > OTOH, perhaps it could be reasonable to expect Agda to see that the case > for `notSame` is impossible instead of giving up as it currently does. But > I don't know enough about sized types to be sure that this would be sound. > Perhaps Andreas can tell what the right behaviour should be here? > > -- Jesper > > On Sat, Feb 11, 2017 at 12:28 AM, Apostolis Xekoukoulotakis < > apostolis.xekoukoulotakis at gmail.com> wrote: > >> ``` >> module test where >> >> open import Size >> open import Data.Nat >> >> data test : ? ? Set where >> One : test (suc zero) >> Two : test (suc (suc zero)) >> >> >> fun : test (suc zero) ? ? >> fun x = {!!} >> >> data test2 : (i : Size) ? (j : Size< ? i) ? Set where >> same : ?{i} ? test2 i i >> notSame : {i : Size} ? {j : Size< i} ? test2 i j >> >> >> fun2 : {i : Size} ? test2 i i ? ? >> fun2 x = {!!} >> ` >> ``` >> >> Case splitting on fun2 results in error : >> >> ``` >> I'm not sure if there should be a case for the constructor notSame, >> because I get stuck when trying to solve the following unification >> problems (inferred index ? expected index): >> i? ? i >> j ? i >> when checking that the expression ? has type ? >> ``` >> >> Is there a reason for this to happen? What can one do to remove this >> error? >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Feb 13 18:21:09 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 13 Feb 2017 20:21:09 +0300 Subject: [Agda] proof for insertion to a list Message-ID: <1487006469.2912.20.camel@one.mechvel.pereslavl.ru> Who can tell, please: why the following proof for add-comm is rejected by Agda 2.5.2 ? (see the attached .agda file, it is about 30 nonempty lines). It is about certain insertion add of a pair to a pair list, with add-comm meaning add (a , e) ? add (b , e') ? add (b , e') ? add (a , e). And it is only for the case of e > e' > e?, with other cases postulated in the code by `anything'. I expect that for the last PE.refl, normalization of LHS and RHS yields the same term (a , e) ? (b , e') ? (c , e?) ? mons. But Agda reports e != e' of type ? when checking that the expression PE.refl has type add (a , e) (add (b , e') ((c , e?) ? mons) | tri> .?a? .?b? e'>e?) ? add (b , e') (add (a , e) ((c , e?) ? mons) | tri> .?a .?b e>e?) Thanks, ------ Sergei -------------- next part -------------- {- Can anybody, please, fix the proof for lemma2 in the attached code (about 140 lines) ? It is about a certain insertion of a natural into a decreasingly ordered list of naturals. Such a list is called Pol. Insertion of e into es is according to _>_, and it is without copying, that is when es contains any e' ? e, the result is es. Insertion is called mon+. lemma1 and lemma2 are certain two very simple statements about insertion of e into (e' ? es) for e < e'. lemma1 is for the case of es = []. And it is proved trivially. But a similar proof for lemma2 is not type-checked (in Agda 2.5.2). Moreover, I do not find any proof to satisfy Agda. Maybe, this is a bug in Agda? Thanks, ------ Sergei -} open import Function using (_?_; case_of_) open import Algebra.FunctionProperties using (Op?) open import Relation.Binary using (Rel; Tri; DecTotalOrder; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Empty using (?-elim) open import Data.Sum using (_?_) open import Data.Product using (_?_; _,_; proj?; proj?; ?) open import Data.List using (List; []; _?_) open import Data.List.All as AllM using (All) open import Data.Nat as Nat using (?; suc; _?_; _<_; _>_) open import Data.Nat.Properties as NatProp using () --**************************************************************************** postulate anything : ? {a} {A : Set a} ? A -- for debug natSTO = NatProp.strictTotalOrder open StrictTotalOrder natSTO using (compare) ------------------------------------------------------------------------------ data DecrOrdered : List ? ? Set where nil : DecrOrdered [] single : (x : ?) ? DecrOrdered (x ? []) prep2 : (x y : ?) ? (xs : List ?) ? x > y ? DecrOrdered (y ? xs) ? DecrOrdered (x ? y ? xs) tailDecrOrdered : ? {x xs} ? DecrOrdered (x ? xs) ? DecrOrdered xs tailDecrOrdered (single _) = nil tailDecrOrdered (prep2 x y xs _ ord-y:xs) = ord-y:xs ------------------------------------------------------------------------------ E : Set E = ? record Pol : Set where constructor pol? field exps : List E ordered : DecrOrdered exps -- e1 > ... > en monPol : E ? Pol monPol e = pol? (e ? []) (DecrOrdered.single e) hdExp' : List E ? ? hdExp' [] = 0 hdExp' (e ? _) = suc e deg' : Pol ? ? deg' = hdExp' ? Pol.exps ------------------------------------------------------------------------------ open Tri ------------------------------------------------------------------------------ insert : E ? List E ? List E insert e [] = e ? [] insert e (e' ? es) with compare e e' ... | tri> _ _ e>e' = e ? e' ? es ... | tri? _ e?e' _ = e ? es ... | tri< e _ _ e>e' = decrOrdered-cons e>e'es ord-e'es where ... ... | tri? _ e?e' = ord-e'es with compare e e' ... | tri< _ _ = where ord-es = .. es' = insert e {- ------------------------------------------------------------------------------ mon+ : E ? Pol ? Pol mon+ e = proj? ? extMon+ e ------------------------------------------------------------------------------ lemma1 : ? e e' ? e < e' ? Pol.exps (mon+ e (monPol e')) ? e' ? e ? [] lemma1 e e' e e?e' _ _ = ?-elim (e?e' e References: <1487006469.2912.20.camel@one.mechvel.pereslavl.ru> Message-ID: <1487093585.2450.5.camel@one.mechvel.pereslavl.ru> I am sorry for confusing files. Please, see now the attached Feb14-2017.agda. ------ Sergei On Mon, 2017-02-13 at 20:21 +0300, Sergei Meshveliani wrote: > Who can tell, please: > > why the following proof for add-comm is rejected by Agda 2.5.2 ? > > (see the attached .agda file, it is about 30 nonempty lines). > > It is about certain insertion add of a pair to a pair list, > with add-comm meaning > > add (a , e) ? add (b , e') ? add (b , e') ? add (a , e). > > And it is only for the case of e > e' > e?, > > with other cases postulated in the code by `anything'. > > I expect that for the last PE.refl, normalization of LHS and RHS > yields the same term > (a , e) ? (b , e') ? (c , e?) ? mons. > > But Agda reports > > e != e' of type ? > when checking that the expression PE.refl has type > add (a , e) (add (b , e') ((c , e?) ? mons) | tri> .?a? .?b? e'>e?) > ? add (b , e') (add (a , e) ((c , e?) ? mons) | tri> .?a .?b e>e?) > > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- {- Who can tell, please: why the following proof for add-comm is rejected by Agda 2.5.2 ? (see the attached .agda file, it is about 30 nonempty lines). It is about certain insertion add of a pair to a pair list, with add-comm meaning add (a , e) ? add (b , e') ? add (b , e') ? add (a , e). And it is only for the case of e > e' > e?, with other cases are postulated by `anything'. I think that for the last PE.refl normalizataion of LHS and RHS yields the same term (a , e) ? (b , e') ? (c , e?) ? mons. But Agda reports e != e' of type ? when checking that the expression PE.refl has type add (a , e) (add (b , e') ((c , e?) ? mons) | tri> .?a? .?b? e'>e?) ? add (b , e') (add (a , e) ((c , e?) ? mons) | tri> .?a .?b e>e?) -} ----------------------------------------------------------------------------- open import Relation.Binary using (Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open import Data.Empty using (?-elim) open import Data.Product using (_?_; _,_) open import Data.List using (List; []; _?_) open import Data.Nat using (?; _>_) open import Data.Nat.Properties using (strictTotalOrder) ---------------------------------------------------------------------------- postulate anything : ? {a} {A : Set a} ? A -- for debug open StrictTotalOrder strictTotalOrder using (compare) Mon = ? ? ? open Tri add : (mon : Mon) ? List Mon ? List Mon add (a , e) [] = (a , e) ? [] add (a , e) ((b , e') ? mons) with compare e e' ... | tri> _ _ _ = (a , e ) ? (b , e') ? mons ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) ... | tri? _ _ _ = mons ---------------------------------------------------------------------------- add-comm : (mon mon' : Mon) ? (mons : List Mon) ? (add mon (add mon' mons)) ? (add mon' (add mon mons)) add-comm (a , e) (b , e') [] with compare e e' | compare e' e ... | tri< _ _ _ | tri> _ _ _ = PE.refl ... | tri> _ _ _ | tri< _ _ _ = PE.refl ... | tri< e _ _ e'>e = ?-elim (e?e' e'>e) ... | tri> _ _ e>e' | tri> e'?e _ _ = ?-elim (e'?e e>e') ... | tri> _ _ e>e' | tri? e'?e _ _ = ?-elim (e'?e e>e') ... | tri? _ e?e' _ | tri? _ _ _ = PE.refl add-comm (a , e) (b , e') ((c , e?) ? mons) with compare e e? | compare e' e? | compare e e' | compare e' e ... | tri> _ _ e>e? | tri> _ _ e'>e? | tri> _ _ e>e' | tri< _ _ _ = PE.refl ... | _ | _ | _ | _ = anything {- -------------------------------------------------- For the last PE.refl, normalize LHS and RHS of the goal: LHS = add (a , e) (add (b , e') ((c , e?) ? mons)) ?[ by e'>e? ] add (a , e) ((b , e') ? (c , e?) ? mons) ?[ by e>e' ] (a , e) ? (b , e') ? (c , e?) ? mons RHS = add (b , e') (add (a , e) ((c , e?) ? mons)) ?[ by e>e? ] add (b , e') ((a , e) ? (c , e?) ? mons) ?[ by e'e? ] (a , e) ? (b , e') ? (c , e?) ? mons Hence, PE.refl needs to be a proof. ---------------------------------------------------- -} From guillaume.allais at ens-lyon.org Tue Feb 14 19:50:45 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Tue, 14 Feb 2017 19:50:45 +0100 Subject: [Agda] proof for insertion to a list In-Reply-To: <1487093585.2450.5.camel@one.mechvel.pereslavl.ru> References: <1487006469.2912.20.camel@one.mechvel.pereslavl.ru> <1487093585.2450.5.camel@one.mechvel.pereslavl.ru> Message-ID: <75486179-84fe-a2ba-fc8f-c1a7e0b94b41@ens-lyon.org> Hi Sergei, Here's what I understand: `compare e e'` and `compare e' e` only show up in the goal's type *after* the values of `compare e e?` and `compare e' e?` have been uncovered and `add` has been able to reduce by one step. So here you can't simply compute all the comparisons in parallel: you need cascading `with` blocks. The type of each one of these block being different from the previous thanks to the computations that happened. I think that this is the sort of structure you're looking for: ========================================================== add-comm (a , e) (b , e') ((c , e?) ? mons) with compare e e? | compare e' e? ... | tri> _ _ e>e? | tri> _ _ e'>e? with compare e e' | compare e' e ... | tri> _ _ e>e' | tri< _ _ _ = {!!} add-comm _ _ _ | _ | _ = anything ========================================================== Now, in that new goal `compare e' e?` shows up again. So you probably want to use inspect [1] to remember its value. Cheers, [1] http://agda.github.io/agda-stdlib/Relation.Binary.PropositionalEquality.html#5150 On 14/02/17 18:33, Sergei Meshveliani wrote: > I am sorry for confusing files. > Please, see now the attached Feb14-2017.agda. > > ------ > Sergei > > > On Mon, 2017-02-13 at 20:21 +0300, Sergei Meshveliani wrote: >> Who can tell, please: >> >> why the following proof for add-comm is rejected by Agda 2.5.2 ? >> >> (see the attached .agda file, it is about 30 nonempty lines). >> >> It is about certain insertion add of a pair to a pair list, >> with add-comm meaning >> >> add (a , e) ? add (b , e') ? add (b , e') ? add (a , e). >> >> And it is only for the case of e > e' > e?, >> >> with other cases postulated in the code by `anything'. >> >> I expect that for the last PE.refl, normalization of LHS and RHS >> yields the same term >> (a , e) ? (b , e') ? (c , e?) ? mons. >> >> But Agda reports >> >> e != e' of type ? >> when checking that the expression PE.refl has type >> add (a , e) (add (b , e') ((c , e?) ? mons) | tri> .?a? .?b? e'>e?) >> ? add (b , e') (add (a , e) ((c , e?) ? mons) | tri> .?a .?b e>e?) >> >> >> Thanks, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Wed Feb 15 10:43:42 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 15 Feb 2017 12:43:42 +0300 Subject: [Agda] text-icu-0.7.0.1 Message-ID: <1487151822.2788.11.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I am trying to install Development Agda of February 15, 2017 on ghc-7.10.2, Debian Linux. > cabal update > cabal install reports ------------------------------------- ... Installed equivalence-0.3.2 ... Agda-2.6.0 depends on text-icu-0.7.0.1 which failed to install. text-icu-0.7.0.1 failed during the configure step. ------------------------------------- This version needs more libraries than 2.5.2. Please, what is a regular way (in my situation) to get the needed C libraries (probably, icuuc, icui18n, icudata listed in the report) ? Thanks, ------ Sergei From Jesper at sikanda.be Wed Feb 15 10:56:58 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 15 Feb 2017 10:56:58 +0100 Subject: [Agda] text-icu-0.7.0.1 In-Reply-To: <1487151822.2788.11.camel@one.mechvel.pereslavl.ru> References: <1487151822.2788.11.camel@one.mechvel.pereslavl.ru> Message-ID: Hello, I noticed the same thing a few days ago: Agda started complaining about missing C libraries. I managed to get the new libraries by installing the icu-devtools package, but I also wonder why this new dependency was added. -- Jesper On Wed, Feb 15, 2017 at 10:43 AM, Sergei Meshveliani wrote: > Dear Agda developers, > > I am trying to install Development Agda of February 15, 2017 > on ghc-7.10.2, Debian Linux. > > > cabal update > > cabal install > > reports > > ------------------------------------- > ... > Installed equivalence-0.3.2 > ... > Agda-2.6.0 depends on text-icu-0.7.0.1 which failed to install. > text-icu-0.7.0.1 failed during the configure step. > ------------------------------------- > > This version needs more libraries than 2.5.2. > > Please, what is a regular way (in my situation) to get the needed C > libraries (probably, icuuc, icui18n, icudata listed in the report) > ? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Wed Feb 15 11:04:40 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 15 Feb 2017 11:04:40 +0100 Subject: [Agda] text-icu-0.7.0.1 In-Reply-To: References: <1487151822.2788.11.camel@one.mechvel.pereslavl.ru> Message-ID: See https://github.com/agda/agda/issues/2449 for hints (collection open) how to install the missing library and for discussion of the new dependency. On 15.02.2017 10:56, Jesper Cockx wrote: > Hello, > > I noticed the same thing a few days ago: Agda started complaining about > missing C libraries. I managed to get the new libraries by installing > the icu-devtools package, but I also wonder why this new dependency was > added. > > -- Jesper > > On Wed, Feb 15, 2017 at 10:43 AM, Sergei Meshveliani > wrote: > > Dear Agda developers, > > I am trying to install Development Agda of February 15, 2017 > on ghc-7.10.2, Debian Linux. > > > cabal update > > cabal install > > reports > > ------------------------------------- > ... > Installed equivalence-0.3.2 > ... > Agda-2.6.0 depends on text-icu-0.7.0.1 which failed to install. > text-icu-0.7.0.1 failed during the configure step. > ------------------------------------- > > This version needs more libraries than 2.5.2. > > Please, what is a regular way (in my situation) to get the needed C > libraries (probably, icuuc, icui18n, icudata listed in the report) > ? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Wed Feb 15 12:00:39 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 15 Feb 2017 14:00:39 +0300 Subject: [Agda] proof for insertion to a list In-Reply-To: <75486179-84fe-a2ba-fc8f-c1a7e0b94b41@ens-lyon.org> References: <1487006469.2912.20.camel@one.mechvel.pereslavl.ru> <1487093585.2450.5.camel@one.mechvel.pereslavl.ru> <75486179-84fe-a2ba-fc8f-c1a7e0b94b41@ens-lyon.org> Message-ID: <1487156439.3128.2.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-14 at 19:50 +0100, G. Allais wrote: > Hi Sergei, > > Here's what I understand: `compare e e'` and `compare e' e` > only show up in the goal's type *after* the values of `compare e e?` > and `compare e' e?` have been uncovered and `add` has been able > to reduce by one step. > > So here you can't simply compute all the comparisons in parallel: > you need cascading `with` blocks. The type of each one of these > block being different from the previous thanks to the computations > that happened. > > I think that this is the sort of structure you're looking for: > > ========================================================== > add-comm (a , e) (b , e') ((c , e?) ? mons) > with compare e e? | compare e' e? > > ... | tri> _ _ e>e? | tri> _ _ e'>e? > with compare e e' | compare e' e > > ... | tri> _ _ e>e' | tri< _ _ _ = {!!} > > add-comm _ _ _ | _ | _ = anything > ========================================================== > > Now, in that new goal `compare e' e?` shows up again. So you > probably want to use inspect [1] to remember its value. > > [..] Guillaume, thank you for help. I shall see. ------ Sergei From mechvel at botik.ru Wed Feb 15 12:45:08 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 15 Feb 2017 14:45:08 +0300 Subject: [Agda] {} for nested `with' syntax Message-ID: <1487159108.5033.25.camel@one.mechvel.pereslavl.ru> Dear Agda developers, A nested `with' construct often requires repeating a large pattern, so that a program becomes difficult to read. For example, the fragment ----------------------------------------------------------------- f : ? a b e ? (add (a , e) ? add(b , e)) ?? (add (a + b , e)) f a b e [] with compare e e ... | tri? _ _ _ = =ms-refl ... | tri< e _ _ e>e' = ?-elim .. f a b e ((c , e?) ? mons) with compare e e? -- I ... | tri> _ _ _ with compare e e ... | tri? _ _ _ = =ms-refl ... | tri< e _ _ e>e' = .. f a b e ((c , e?) ? mons) -- II | tri? _ _ _ with compare e e ... | tri? _ _ _ = .. ... | tri< e _ _ e>e' = .. ------------------------------------------------------------------- repeats the pattern f a b e ((c , e?) ? mons) -- (P) And in practice, larger patterns are repeated. Suppose that the {} syntax is added to `with'. Then the part (I) + (II) can be written without repeating (P): f a b e ((c , e?) ? mons) with compare e e? ... | tri> _ _ _ with compare e e {... | tri? _ _ _ = =ms-refl ... | tri< e _ _ e>e' = .. } ... | tri? _ _ _ with compare e e {... | tri? _ _ _ = .. ... | tri< e _ _ e>e' = .. } What is your opinion? Regards, ------ Sergei From P.Achten at cs.ru.nl Wed Feb 15 16:13:36 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Wed, 15 Feb 2017 16:13:36 +0100 Subject: [Agda] 1st call for papers: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury Message-ID: <418e7e3b-274d-9a95-b3a7-72d08367478f@cs.ru.nl> ----------------------------- C A L L F O R P A P E R S ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == SPONSORS == TBD == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == IMPORTANT DATES == Submission of draft papers: 5 May, 2017 Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == TBD From noam.zeilberger at gmail.com Wed Feb 15 17:20:05 2017 From: noam.zeilberger at gmail.com (Noam Zeilberger) Date: Wed, 15 Feb 2017 16:20:05 +0000 Subject: [Agda] LOLA 2017: Call for Talk Proposals Message-ID: CALL FOR TALK PROPOSALS LOLA 2017: Syntax and Semantics of Low-Level Languages ====================================================== Monday, 19 June 2017, Reykjavik, Iceland A satellite workshop of LICS 2017 http://events.cs.bham.ac.uk/lola2017/ Important Dates --------------- - Abstract submission: Wednesday, 19 April 2017 - Author notification: Monday, 1 May 2017 - Workshop: Monday, 19 June 2017 Invited Speakers ---------------- - TBD Context ------- Since the late 1960s it has been known that tools and structures arising in mathematical logic and proof theory can usefully be applied to the design of high-level programming languages, and to the development of reasoning principles for such languages. Yet low-level languages, such as machine code, and the compilation of high-level languages into low-level ones have traditionally been seen as having little or no essential connection to logic. However, a fundamental discovery of this past decade has been that low-level languages are also governed by logical principles. From this key observation has emerged an active and fascinating new research area at the frontier of logic and computer science. The practically- motivated design of logics reflecting the structure of low-level languages (such as heaps, registers and code pointers) and low-level properties of programs (such as resource usage) goes hand in hand with some of the most advanced contemporary research in semantics and proof theory, including classical realizability and forcing, double orthogonality, parametricity, linear logic, game semantics, uniformity, categorical semantics, explicit substitutions, abstract machines, implicit complexity and resource bounded programming. The LOLA workshop, affiliated with LICS 2017, will bring together researchers interested in the relationships and connections between logic and low-level languages and programs. Topics of interest include, but are not limited to: - Typed assembly languages - Certified assembly programming - Certified and certifying compilation - Relaxed memory models - Proof-carrying code - Program optimization - Modal logic and realizability in machine code - Realizability and double orthogonality in assembly code - Parametricity, modules and existential types - General references, Kripke models and recursive types - Continuations and concurrency - Resource analysis and implicit complexity - Closures and explicit substitutions - Linear logic and separation logic - Game semantics, abstract machines and hardware synthesis - Monoidal and premonoidal categories, traces and effects Submission ---------- LOLA is an informal workshop aiming at a high degree of useful interaction amongst the participants, welcoming proposals for talks on work in progress, overviews of larger research programs, position presentations, and short tutorials, as well as more traditional research talks describing new results. The program committee will select the workshop presentations from submitted talk proposals, which may take the form either of a *two page abstract* or of a longer (published or unpublished) paper describing completed work. Authors are invited to submit their contribution by April 28, 2017. Abstracts must be written in English and be submitted as a single PDF file at [EasyChair](https://www.easychair.org/conferences/?conf=lola2017). Submissions will undergo a lightweight review process and will be judged on originality, relevance, interest and clarity. Submission should describe novel works or works that have already appeared elsewhere but that can stimulate the discussion between different communities at the workshop. The workshop will not have formal proceedings and is not intended to preclude later publication at another venue. Program Committee ----------------- - Beniamino Accattoli, INRIA - Michael Greenberg, Pomona College - Patricia Johann, Appalachian State University - Ohad Kammar, University of Oxford - Matija Pretnar, University of Ljubljana (co-chair) - Nikos Tzevelekos, Queen Mary University of London - Noam Zeilberger, University of Birmingham (co-chair) -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity at googlemail.com Thu Feb 16 05:42:44 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Wed, 15 Feb 2017 20:42:44 -0800 Subject: [Agda] Final Call for Papers: ICFP 2017 Message-ID: <58a52dc49fd1d_1ae73fdf45c55be8619a7@landin.local.mail> ICFP 2017 The 22nd ACM SIGPLAN International Conference on Functional Programming Oxford, United Kingdom http://icfp17.sigplan.org/ Final Call for Papers ### Important dates Submissions due: Monday, February 27, Anywhere on Earth https://icfp17.hotcrp.com Author response: Monday, April 17, 2017, 15:00 (UTC) - Thursday, April 20, 2017, 15:00 (UTC) Notification: Monday, 1 May, 2017 Final copy due: Monday, 5 June 2017 Early registration: TBA Conference: Monday, 4 September - Wednesday, 6 September, 2017 ### New this year Those familiar with previous ICFP conferences should be aware of two significant changes that are being introduced in 2017: 1. Papers selected for ICFP 2017 will be published as the ICFP 2017 issue of a new journal, Proceedings of the ACM on Programming Languages (PACMPL), which replaces the previous ICFP conference proceedings. The move to PACMPL will have two noticeable impacts on authors: * A new, two-phase selection and reviewing process that conforms to ACM?s journal reviewing guidelines. * A new, single-column format for submissions. 2. Authors of papers that are conditionally accepted in the first phase of the reviewing process will have the option to submit materials for Artifact Evaluation. Further details on each of these changes are included in the following text. ### Scope ICFP 2017 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * *Language Design*: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; type systems; interoperability; domain-specific languages; and relations to imperative, object-oriented, or logic programming. * *Implementation*: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * *Software-Development Techniques*: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling. * *Foundations*: formal semantics; lambda calculus; rewriting; type theory; monads; continuations; control; state; effects; program verification; dependent types. * *Analysis and Transformation*: control-flow; data-flow; abstract interpretation; partial evaluation; program calculation. * *Applications*: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed-systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; multimedia and 3D graphics programming; scripting; system administration; security. * *Education*: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. ICFP 2017 also welcomes submissions in two separate categories --- Functional Pearls and Experience Reports --- that must be marked as such at the time of submission and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the program chair if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions ICFP 2017 will employ a lightweight double-blind reviewing process, as described below. **Deadline**: The deadline for submissions is Monday, February 27, 2017, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: (NOTE: NEW FORMAT REQUIREMENTS FOR ICFP 2017) Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Large" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from ; the appropriate template for ICFP 2017 authors is in the file `acmart-pacmpl-template.tex`. As documented in the template, submissions should be prepared using the `acmlarge` and `anonymous` options. The use of the `review` option is also strongly encouraged but not required. (The `review` option will add line numbers, which will make it easier for reviewers to reference specific parts of your paper in their comments, but should have absolutely no other effect on the typesetting.) Details of available technical support for LaTeX-specific questions is available at . There is a limit of 24 pages for a full paper or 12 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. **Citations**: As part of PACMPL, ICFP 2017 papers are expected to use author-year citations for references to other work. Author-year citations may be used as either a noun phrase, such as "The lambda calculus was originally conceived by Church (1932)", or a parenthetic phrase, such as "The lambda calculus (Church 1932) was intended as a foundation for mathematics". A useful test for correct usage it to make sure that the text still reads correctly when the parenthesized portions of any references are omitted. Take care with prepositions; in the first example above, "by" is more appropriate than "in" because it allows the text to be read correctly as a reference to the author. Sometimes, readability may be improved by putting parenthetic citations at the end of a clause or a sentence, such as "A foundation for mathematics was provided by the lambda calculus (Church 1932)". In LaTeX, use `\citet{Church-1932}` for citations as a noun phrase, "Church (1932)", and `\citep{Church-1932}` for citations as a parenthetic phrase, "(Church 1932)"; for details, see Sections 2.3--2.5 of the natbib documentation (). **Submission**: Submissions will be accepted at . Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 15:00 UTC on Monday, April 17, 2017, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the program chair will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for presentation at ICFP 2017. A [list of frequently asked questions and answers](http://icfp17.sigplan.org/track/icfp-2017-papers#Submission-and-Reviewing-FAQ) that address common concerns is available on the conference website and will be updated as necessary to clarify and expand on this process. **ICFP 2017 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the PC meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on May 1, 2017. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 5, 2017), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. This process is intended as a refinement of the review process that has been used in previous ICFP conferences. By incorporating a second stage, the process will conform to ACM?s journal reviewing guidelines for PACMPL. **ICFP 2017 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the PC and external reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Large format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: copyright transfer to ACM; retaining copyright but granting ACM exclusive publication rights; or open access on payment of a fee. Further information about ACM author rights is available from . * At least one author of each accepted submission will be expected to attend and present their paper at the conference. (ICFP welcomes all authors, regardless of nationality. If any author of an accepted submission has visa-related difficulties in travelling to the conference, we will make arrangements to enable remote participation, and not require them to attend the conference in order to present their talk. In such a case contact us (icfp2017 at cs.ox.ac.uk) for further guidance.) The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. * We intend that the proceedings will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * **AUTHORS TAKE NOTE: The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work.** ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by a committee, separate from the program committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the proceedings, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works --- or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the proceedings and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The program committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results --- the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The program chair will be happy to advise on any concerns about which category to submit to. ### Organizers General Chair: Jeremy Gibbons (University of Oxford, UK) Program Chair: Mark Jones (Portland State University, USA) Artifact Evaluation Chair: Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Ryan Trinkle (Obsidian Systems LLC, USA) Programming Contest Organiser: Sam Lindley (University of Edinburgh, UK) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Chair: Jose Calderon (Galois, Inc., USA) Workshops Co-Chair: Andres L?h (Well-Typed LLP) Workshops Co-Chair: David Christiansen (Indiana University, USA) Program Committee: Bob Atkey (University of Strathclyde, Scotland) Adam Chlipala (MIT, USA) Dominique Devriese (KU Leuven, Belgium) Martin Erwig (Oregon State, USA) Matthew Flatt (University of Utah, USA) Ronald Garcia (University of British Columbia, Canada) Kathryn Gray (University of Cambridge, England) John Hughes (Chalmers University and Quvik, Sweden) Chung-Kil Hur (Seoul National University, Korea) Graham Hutton (University of Nottingham, England) Alan Jeffrey (Mozilla Research, USA) Ranjit Jhala (University of California, San Diego, USA) Shin-ya Katsumata (Kyoto University, Japan) Lindsey Kuper (Intel Labs, USA) Dan Licata (Wesleyan University, USA) Ben Lippmeier (Digital Asset, Australia) Gabriel Scherer (Northeastern University, USA) Alexandra Silva (University College London, England) Nikhil Swamy (Microsoft Research, USA) Sam Tobin-Hochstadt (Indiana University, USA) Nicolas Wu (University of Bristol, England) Beta Ziliani (CONICET and FAMAF, Universidad Nacional de C?rdoba, Argentina) From afelty at eecs.uottawa.ca Mon Feb 6 19:45:21 2017 From: afelty at eecs.uottawa.ca (Amy Felty) Date: Mon, 6 Feb 2017 13:45:21 -0500 Subject: [Agda] WiL 2017: Women in Logic Workshop Second Call for Papers (new dates) Message-ID: Second Call for Papers WiL 2017: Women in Logic Workshop Reykjavik, Iceland June 19, 2017 https://sites.google.com/site/firstwomeninlogicworkshop/ NEW * Submissions can be either a paper or a talk abstract. * Extended submission deadline: 31 March 2017 OVERVIEW Affiliated with the Thirty-Second Annual ACM/IEEE Symposium on Logic in Computer Science (LICS) 20-23 June 2017, Reykjavik, Iceland. We are holding the first Women in Logic (WiL) workshop as a LICS associated workshop this year. The workshop intends to follow the pattern of meetings such as Women in Machine Learning (WiML, http://wimlworkshop.org/) or Women in Engineering (WIE, (http://www.ieee-ras.org/membership/women-in-engineering) that have been taking place for quite a few years. Women are chronically underrepresented in the LICS community; consequently they sometimes feel both conspicuous and isolated, and hence there is a risk that the under-representation is self-perpetuating. The workshop will provide an opportunity for women in the field to increase awareness of one another and one another's work, to combat the feeling of isolation. It will also provide an environment where women can present to an audience comprised of mostly women, replicating the experience that most men have at most LICS meetings; we hope that this will be particularly attractive to early-career women. Topics of interest of this workshop include but are not limited to the usual Logic in Computer Science (LICS) topics. These are listed as automata theory, automated deduction, categorical models and logics, concurrency and distributed computation, constraint programming, constructive mathematics, database theory, decision procedures, description logics, domain theory, finite model theory, formal aspects of program analysis, formal methods, foundations of computability, higher-order logic, lambda and combinatory calculi, linear logic, logic in artificial intelligence, logic programming, logical aspects of bioinformatics, logical aspects of computational complexity, logical aspects of quantum computation, logical frameworks, logics of programs, modal and temporal logics, model checking, probabilistic systems, process calculi, programming language semantics, proof theory, real-time systems, reasoning about security and privacy, rewriting, type systems and type theory, and verification. SUBMISSIONS Contributions should be written in English and can be submitted in the form of full papers (with a maximum of 10 pages), short papers (with a maximum of 5 pages), or talk abstracts (1 page). Papers and abstracts should be prepared in latex using the LICS style (IEEE Proceedings 2-column 10pt). LaTeX style files are available at http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/. Please use IEEEtran.cls version V1.8b, released on 26/08/2015. The submission should be in the form of a PDF file uploaded to the WiL 2017 Easychair page (https://easychair.org/conferences/?conf=wil2017) before the submission deadline of 31 March 2017, anywhere on Earth. PROCEEDINGS We plan to publish a post conference volume at ENTCS or other equally visible outlet. IMPORTANT DATES Paper submission deadline: 31 March 2017 Author notification: 1 May 2017 Contribution for Informal Proceedings: 22 May 2017 INVITED SPEAKERS * Claudia Nalon (University of Brasilia, Brasil) * Catuscia Palamidessi (INRIA Saclay and LIX, France) SCIENTIFIC AND ORGANIZING COMMITTEE * Valeria de Paiva (Chair, Nuance Communications, USA) * Adriana Compagnoni (Stevens Institute of Technology, USA) * Amy Felty (University of Ottawa, Canada) * Anna Ingolfsdottir (Reykjavik University, Iceland) * Ursula Martin (University of Oxford, UK) * Brigitte Pientka (McGill University, Canada) * Alexandra Silva (University College London, UK) * Perdita Stevens (University of Edinburgh, UK) From komendantskaya at gmail.com Mon Feb 13 11:58:40 2017 From: komendantskaya at gmail.com (Ekaterina Komendantskaya) Date: Mon, 13 Feb 2017 10:58:40 +0000 Subject: [Agda] Fully funded PhD position in CS at Heriot-Watt University, Edinburgh, Scotland Message-ID: Dependable System group, School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh, is looking to fill in one PhD position (a PhD stipend of ?14,300 per annum, for 48 months, and a fee waiver are offered, no nationality restrictions apply). We are looking for a talented person, with 1st class degree in Mathematics or Computer Science, with keen interest in Logic and Programming languages and good programming skills. The successful candidate will be working under supervision of Dr Ekaterina Komendantskaya (http://www.macs.hw.ac.uk/~ek19/). The exact topic of the PhD dissertation will be determined in the course of discussions with the successful candidate, and will be related to both the student?s and the supervisor's research interests. To apply please contact Ekaterina directly: ek19 at hw.ac.uk Heriot-Watt University. With a history dating back to 1821, Heriot-Watt University is a research-led university located in Edinburgh, UK. Currently it is Scotland?s most international university, delivering degree programmes to 31,000 students globally and with campuses in Edinburgh, Scottish Borders, Orkney, Dubai and Malaysia. The university is consistently highly ranked, having been The Sunday Times; Scottish University of Year between 2011 and 2013. The university has a strong track record in attracting funding for research from national Research Councils, UK government departments, charities, the European Commission and industrial sponsors. In the REF 2014 survey of all UK universities, 82% of our research was found to be world-class. Dependable Systems group. The Computer Science department, hosting this PhD position, had 78% of its outputs rated `world-leading' or `internationally excellent' in REF 2014.The proposed work will be carried out within the Dependable Systems Group (DSG). With members of staff working on programming languages and compilers (Fensch, Loidl, Michaelson, Scholz), Automated Reasoning and Formal Methods (Georgieva, Grov, Ireland, Komendantskaya), Type Theory (Gabbay), this group will provide an ideal environment for the PhD research. Additionally, the DSG is an active member of the multi-site Mathematical Reasoning Group (joint with U. Edinburgh); the sites holding weekly research meetings and a joint platform grant. ******************************* Dr Ekaterina Komendantskaya Associate Professor in Computer Science School of Mathematical and Computer Sciences Earl Mountbatten Building [ building 21, office G26 ] Heriot-Watt University Edinburgh, UK, EH14 4AS +44 (0)131 451 8283 http://www.macs.hw.ac.uk/~ek19/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From prasad at chalmers.se Mon Feb 13 23:28:56 2017 From: prasad at chalmers.se (K V S Prasad) Date: Mon, 13 Feb 2017 22:28:56 +0000 Subject: [Agda] Proofs about programs explicitly represented in Agda. Message-ID: <6E15DBA7-3E98-4717-B7A0-14D892B97A0D@chalmers.se> Hello, Following Andreas? suggestion, I am forwarding my mail below. I am looking for proofs about simple programs, where the programming language is an object language explicitly represented in Agda (the metalanguage). The proof can be carried out in Agda, or better, in a logic which again is explicitly represented in Agda. Our plan is to modify such work for a student project aiming to prove facts about programs in a subset of Promela (a modelling language for concurrent programs), using LTL (linear temporal logic). We are happy to swap Promela or LTL for more tractable languages. And advertising our own 20-year old development, I should point out that http://ojs.statsbiblioteket.dk/index.php/brics/article/view/19967 not only partially fulfils the requirements above, it was also the first (as far as we know) proof of an executable concurrent program with data-dependent behavior. (That requires either that you regard an Agda program as executable or that you accept the indeed running Haskell program as ?the same? as that represented in Agda). So I am also looking for other such examples. I would be grateful for any pointers. Thanks! Kind Regards, Prasad On 13/Feb/17 18:24, "Andreas Abel" wrote: Hi Prasad, I am sure there must be case studies out there like you suggested. This is a perfect question for the Agda mailing list. https://lists.chalmers.se/mailman/listinfo/agda Usually people are quite happy to advertise their developments on request. :) Best, Andreas On 13.02.2017 17:54, K V S Prasad wrote: > Hi Andreas, > > > > Are there examples in the Agda library which represent a (small) > programming language, small programs in it, and do proofs about these? > Even better if the logic used for the proofs is itself explicitly > encoded and used (i.e. use Agda as the meta language, and both the > programming language and the logic as object languages). > > > > Mvh > > Prasad > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From amal at ccs.neu.edu Thu Feb 16 05:25:09 2017 From: amal at ccs.neu.edu (Amal Ahmed) Date: Wed, 15 Feb 2017 23:25:09 -0500 Subject: [Agda] Oregon PL Summer School 2017: call for participation Message-ID: We are pleased to announce the program for the 16th annual Oregon Programming Languages Summer School (OPLSS) to be held from June 26th to July 8th, 2017 at the University of Oregon in Eugene. The registration deadline is April 1st, 2017. Full information on registration and scholarships can be found here: http://www.cs.uoregon.edu/Activities/summerschool This year's program is titled: A Spectrum of Types. The speakers and topics include: Amal Ahmed -- Correct and Secure Compilation for Multi-Language Software Northeastern University Edwin Brady -- Dependent Types in the Idris Programming Language University of St. Andrews Ron Garcia -- Gradual Typing University of British Columbia Robert Harper -- Programming Languages Background Carnegie Mellon University Neel Krishnaswami -- Dependent Types and Linearity University of Cambridge Dan Licata -- Programming Languages Background Wesleyan University Frank Pfenning -- Substructural Type Systems and Concurrent Programming Carnegie Mellon University Sam Tobin-Hochstadt -- Contracts and Gradual Types Indiana University David Van Horn -- Redex, Abstract Machines, and Abstract Interpretation University of Maryland The school has a long and successful tradition (sponsored by the NSF, ACM SIGPLAN, and industry). It covers current research in the theory and practice of programming languages. Material is presented at a tutorial level that will help graduate students and researchers from academia or industry understand the critical issues and open problems confronting the field. Prerequisites are an elementary knowledge of logic and mathematics, as covered in undergraduate classes on discrete mathematics, and some knowledge of programming languages at the level of an undergraduate survey course. A *new feature* this year is the option for students to attend a Review session from June 23rd to 25th -- the three days before the summer school officially begins. The review will cover operational semantics, type systems, and basic proof techniques, and will help graduate and especially undergraduate students who have not had a previous course in this material prepare for the main part of the school. Please contact the organizers if you have questions about whether the review will be helpful given your background. We hope you can join us for this excellent program! Amal Ahmed Dan Licata Zena Ariola -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logo-small.png Type: image/png Size: 20102 bytes Desc: not available URL: From liamoc at cse.unsw.edu.au Thu Feb 16 19:21:46 2017 From: liamoc at cse.unsw.edu.au (Liam O'Connor) Date: Fri, 17 Feb 2017 05:21:46 +1100 Subject: [Agda] Proofs about programs explicitly represented in Agda. In-Reply-To: <6E15DBA7-3E98-4717-B7A0-14D892B97A0D@chalmers.se> References: <6E15DBA7-3E98-4717-B7A0-14D892B97A0D@chalmers.se> Message-ID: These programs may be a little too simple, but my TyDe paper last year did embed a GCL/Promela-style language in Agda and proved some properties of Peterson?s algorithm using a heavily restricted subset of CTL and a tiny model checker running in the type system. http://dl.acm.org/citation.cfm?id=2976030 I can supply a preprint if you can?t get the paper from the DL. Liam On 17 February 2017 at 12:37:42 am, K V S Prasad (prasad at chalmers.se) wrote: Hello, Following Andreas? suggestion, I am forwarding my mail below. I am looking for proofs about simple programs, where the programming language is an object language explicitly represented in Agda (the metalanguage). The proof can be carried out in Agda, or better, in a logic which again is explicitly represented in Agda. Our plan is to modify such work for a student project aiming to prove facts about programs in a subset of Promela (a modelling language for concurrent programs), using LTL (linear temporal logic). We are happy to swap Promela or LTL for more tractable languages. And advertising our own 20-year old development, I should point out that http://ojs.statsbiblioteket.dk/index.php/brics/article/view/19967 not only partially fulfils the requirements above, it was also the first (as far as we know) proof of an executable concurrent program with data-dependent behavior. (That requires either that you regard an Agda program as executable or that you accept the indeed running Haskell program as ?the same? as that represented in Agda). So I am also looking for other such examples. I would be grateful for any pointers. Thanks! Kind Regards, Prasad On 13/Feb/17 18:24, "Andreas Abel" wrote: Hi Prasad, I am sure there must be case studies out there like you suggested. This is a perfect question for the Agda mailing list. https://lists.chalmers.se/mailman/listinfo/agda Usually people are quite happy to advertise their developments on request. :) Best, Andreas On 13.02.2017 17:54, K V S Prasad wrote: > Hi Andreas, > > > > Are there examples in the Agda library which represent a (small) > programming language, small programs in it, and do proofs about these? > Even better if the logic used for the proofs is itself explicitly > encoded and used (i.e. use Agda as the meta language, and both the > programming language and the logic as object languages). > > > > Mvh > > Prasad > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrei.paskevich at lri.fr Fri Feb 17 15:56:09 2017 From: andrei.paskevich at lri.fr (Andrei Paskevich) Date: Fri, 17 Feb 2017 15:56:09 +0100 Subject: [Agda] VSTTE 2017 - First Call for Papers Message-ID: <20170217145609.t3s4df44flex66kr@tikki.lri.fr> 9th Working Conference on Verified Software: Theories, Tools, and Experiments (VSTTE) https://vstte17.lri.fr July 22-23, 2017, Heidelberg, Germany Co-located with the 29th International Conference on Computer-Aided Verification, CAV 2017 Important Dates * Abstract submission: Mon, Apr 24, 2017 * Full paper submission: Mon, May 1, 2017 * Notification: Mon, Jun 5, 2017 * VSTTE: Sat-Sun, Jul 22-23, 2017 * Camera-ready: Mon, Aug 21, 2017 Overview The goal of the VSTTE conference series is to advance the state of the art in the science and technology of software verification, through the interaction of theory development, tool evolution, and experimental validation. We welcome submissions describing significant advances in the production of verified software, i.e., software that has been proved to meet its functional specifications. Submissions of theoretical, practical, and experimental contributions are equally encouraged, including those that focus on specific problems or problem domains. We are especially interested in submissions describing large-scale verification efforts that involve collaboration, theory unification, tool integration, and formalized domain knowledge. We also welcome papers describing novel experiments and case studies evaluating verification techniques and technologies. Topics of interest for VSTTE include education, requirements modeling, specification languages, specification/verification/certification case studies, formal calculi, software design methods, automatic code generation, refinement methodologies, compositional analysis, verification tools (e.g., static analysis, dynamic analysis, model checking, theorem proving, satisfiability), tool integration, benchmarks, challenge problems, and integrated verification environments. Paper Submissions We accept both long (limited to 16 pages) and short (limited to 10 pages) paper submissions. Short submissions also cover Verification Pearls describing an elegant proof or proof technique. Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Each submission will be evaluated by at least three members of the Program Committee. We expect that one author of every accepted paper will present their work at the conference. Paper submissions must be written in English using the LNCS LaTeX format (http://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines) and must include a cogent and self-contained description of the ideas, methods, results, and comparison to existing work. Papers will be submitted via EasyChair at the VSTTE 2017 conference page (https://www.easychair.org/conferences/?conf=vstte2017). The post-conference proceedings of VSTTE 2017 will be published in the LNCS series. Authors of accepted papers will be requested to sign the copyright transfer form. A selection of best papers will be invited for publication in the Journal of Automated Reasoning. Program Committee * June Andronick (University of New South Wales, Australia) * Christel Baier (TU Dresden, Germany) * Sandrine Blazy (Universit? de Rennes 1, France) * Arthur Chargu?raud (Inria, France) * Ernie Cohen (Amazon Web Services, USA) * Rayna Dimitrova (MPI-SWS, Germany) * Carlo A. Furia (Chalmers University of Technology, Sweden) * Arie Gurfinkel (University of Waterloo, Canada) * Hossein Hojjat (Rochester Institute of Technology, USA) * Marieke Huisman (University of Twente, Netherlands) * Bart Jacobs (KU Leuven, Belgium) * Rajeev Joshi (NASA Jet Propulsion Laboratory, USA) * Zachary Kincaid (Princeton University, USA) * Akash Lal (Microsoft Research, India) * Shuvendu Lahiri (Microsoft Research, USA) * Francesco Logozzo (Facebook, USA) * Peter M?ller (ETH Z?rich, Switzerland) * Jorge A. Navas (SRI International, USA) * Scott Owens (University of Kent, UK) * Andrei Paskevich (Universit? Paris-Sud, France), co-chair * Gerhard Schellhorn (Universit?t Augsburg, Germany) * Peter Schrammel (University of Sussex, UK) * Natarajan Shankar (SRI International, USA) * Mihaela Sighireanu (Universit? Paris-Diderot, France) * Julien Signoles (CEA LIST, France) * Michael Tautschnig (Queen Mary University of London, UK) * Tachio Terauchi (JAIST, Japan) * Oksana Tkachuk (NASA Ames Research Center, USA) * Mattias Ulbrich (Karlsruhe Institute of Technology, Germany) * Thomas Wies (New York University, USA), co-chair From harley.eades at gmail.com Fri Feb 17 23:19:44 2017 From: harley.eades at gmail.com (Harley D. Eades III) Date: Fri, 17 Feb 2017 17:19:44 -0500 Subject: [Agda] CALL FOR PAPERS - GraMSec 2017 Message-ID: <618641D9-039A-4E42-8DF3-0DC42EBBA7F8@gmail.com> Note that one of the topics of this workshop is: Formal semantics and verification of graphical security models CALL FOR PAPERS - GraMSec 2017 The Fourth International Workshop on Graphical Models for Security Santa Barbara, CA, USA - August 21, 2017 http://gramsec.uni.lu Co-located with CSF 2017 SCOPE Graphical security models provide an intuitive but systematic approach to analyze security weaknesses of systems and to evaluate potential protection measures. Cyber security researchers, as well as security professionals from industry and government, have proposed various graphical security modeling schemes. Such models are used to capture different security facets (digital, physical, and social) and address a range of challenges including vulnerability assessment, risk analysis, defense analysis, automated defensing, secure services composition, policy validation and verification. The objective of the GraMSec workshop is to contribute to the development of well-founded graphical security models, efficient algorithms for their analysis, as well as methodologies for their practical usage. TOPICS The workshop seeks submissions from academia, industry, and government presenting novel research on all theoretical and practical aspects of graphical models for security. The topics of the workshop include, but are not limited to: ? Graphical models for threat modeling and analysis ? Graphical models for risk analysis and management ? Graphical models for requirements analysis and management ? Textual and graphical representation for system, organizational, and business security ? Visual security modeling and analysis of socio-technical and cyber-physical systems ? Graphical security modeling for cyber situational awareness ? Graphical models supporting the security by design paradigm ? Methods for quantitative and qualitative analysis of graphical security models ? Formal semantics and verification of graphical security models ? Methods for (semi-)automatic generation of graphical security models ? Enhancement and/or optimization of existing graphical security models ? Scalable evaluation of graphical security models ? Evaluation algorithms for graphical security models ? Dynamic update of graphical security models ? Game theoretical approaches to graphical security modeling ? Attack trees, attack graphs and their variants ? Stochastic Petri nets, Markov chains, and Bayesian networks for security ? UML-based models and other graphical modeling approaches for security ? Software tools for graphical security modeling and analysis ? Case studies and experience reports on the use of graphical security modeling paradigm INVITED SPEAKER To be decided. PAPER SUBMISSION We solicit two types of submissions: ? Regular papers (up to 15 pages, excluding the bibliography and well-marked appendices) describing original and unpublished work within the scope of the workshop. ? Short papers (up to 7 pages, excluding the bibliography and well-marked appendices) describing original and unpublished work in progress. The reviewers are not required to read the appendices, so the papers should be intelligible without them. All submissions must be prepared using the LNCS style: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 Each paper will undergo a thorough review process. All accepted (regular and short) papers will be included in the workshop's post-proceedings. As the previous two years, the GraMSec 2017 post-proceedings are planned to be published in the Lecture Notes in Computer Science (LNCS) series of Springer (confirmation pending). Submissions should be made using the GraMSec 2017 EasyChair web site: https://www.easychair.org/conferences/?conf=gramsec17 IMPORTANT DATES ? Submission deadline: Sunday, May 21, 2017 ? Acceptance notification: Friday, July 7, 2017 ? Workshop: Monday, August 21, 201 7GENERAL CHAIR ? Sjouke Mauw, University of Luxembourg, Luxembourg PROGRAM CHAIRS ? Peng Liu, Pennsylvania State University, USA ? Ketil St?len, SINTEF Digital and University of Oslo, Norway PC MEMBERS Mathieu Acher, University Rennes 1, Inria, France Massimiliano Albanese, George Mason University, USA Ludovic Apvrille, T?l?com ParisTech, France Thomas Bauereiss, DFKI, Germany Kristian Beckers, Technical University of Munich, Germany Giampaolo Bella, University of Catania, Italy Stefano Bistarelli, Universit? di Perugia, Italy Marc Bouissou, EDF RD, France Fr?d?ric Cuppens, T?l?com Bretagne, France Nora Cuppens-Boulahia, T?l?com Bretagne, France Binbin Chen, Advanced Digital Sciences Center, Singapore Herv? Debar, T?l?com SudParis, France Harley Eades, Augusta University, USA Mathias Ekstedt, KTH - Royal Institute of Technology, Sweden Ulrik Franke, Swedish Institute of Computer Science - SICS, Sweden Frank Fransen, TNO, The Netherlands Olga Gadyatskaya, University of Luxembourg, Luxembourg Paolo Giorgini, University of Trento, Italy Dieter Gollmann, Hamburg University of Technology, Germany Joshua Guttman, WPI, USA Ren? Rydhof Hansen, Aalborg University, Denmark Maritta Heisel, Universit?t Duisburg-Essen, Germany Hannes Holm, Swedish Defence Research Agency, Sweden Siv Hilde Houmb, Secure-NOK AS, Norway Sushil Jajodia, George Mason University, USA Ravi Jhawar, University of Luxembourg, Luxembourg Henk Jonkers, BiZZdesign, The Netherlands Cristian Johansen, University of Oslo, Norway Florian Kammueller, Middlesex University London, UK Nima Khakzad, TU Delft, The Netherlands Dong Seong Kim, University of Canterbury, New Zealand Barbara Kordy, INSA Rennes, IRISA, France Pascal Lafourcade, Universit? Clermont Auvergne, LIMOS, France Jean-Louis Lanet, Inria, France Per H?kon Meland, SINTEF Digital, Norway Jogesh Muppala, HKUST, Hong Kong, SAR China Simin Nadjm-Tehrani, Link?ping University, Sweden Andreas L. Opdahl, University of Bergen, Norway Xinming Ou, University of South Florida, USA St?phane Paul, Thales Research and Technology, France Wolter Pieters, TU Delft, The Netherlands Ludovic Pi?tre-Cambac?d?s, EDF, FR Sophie Pinchinat, University Rennes 1, IRISA, France Vincenzo Piuri, University of Milan, Italy Marc Pouly, Lucerne University of Applied Sciences and Arts, Switzerland Nicolas Prigent, Sup?lec, France Christian W. Probst, Technical University of Denmark, Denmark David Pym, UCL, UK Sa?a Radomirovic, University of Dundee, UK Indrajit Ray, Colorado State University, USA Arend Rensink, University of Twente, The Netherlands Yves Roudier, Universit? C?te d'Azur, CNRS, I3S, UNS, France Guttorm Sindre, NUST, Norway Mari?lle Stoelinga, University of Twente, The Netherlands Xiaoyan Sun, California State University, USA Axel Tanner, IBM Research - Zurich, Switzerland Alexandre Vernotte, KTH - Royal Institute of Technology, Sweden Luca Vigan?, King's College London, UK Lingyu Wang, Concordia University, Canada Jan Willemson, Cybernetica, Estonia CONTACT For inquiries please send an e-mail to gramsec17 at easychair.org From mechvel at botik.ru Sat Feb 18 19:21:21 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 18 Feb 2017 21:21:21 +0300 Subject: [Agda] more about insertion to a list Message-ID: <1487442081.2459.12.camel@one.mechvel.pereslavl.ru> Who can tell, please, why the attached code (about 30 nonempty lines) is not type-checked in Agda 2.6.0-e384ae7 ? Namely, PE.refl is reported in the end as having a wrong type. The code is about the lemma comm below: ---------------------------- Mon = ? ? ? add : Mon ? List Mon ? List Mon add (a , e) [] = (a , e) ? [] add (a , e) ((b , e') ? mons) with compare e e' ... | tri> _ _ _ = (a , e ) ? (b , e') ? mons ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) ... | tri? _ _ _ = (a + b , e) ? mons comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? add (b , e') (add (a , e ) mons) ---------------------------- The question is about comm a e b e' ((c , e?) ? mons), and only for the branch of e > e'; e > e?; e' > e?; e' < e. The branches are represented by cascading with the construct of with compare x y | PE.inspect (compare x) y and by using `rewrite'. In the considered brach, LHS and and RHS must normalize to the same term: LHS = add (a , e) (add (b , e') ((c , e?) ? mons)) ?[ e'>e? ] add (a , e) ((b , e') ? (c , e?) ? mons) ?[ e>e' ] (a , e) ? (b , e') ? (c , e?) ? mons RHS = add (b , e') (add (a , e) ((c , e?) ? mons)) ?[ e>e? ] add (b , e') ((a , e) ? (c , e?) ? mons) ?[ e'e? ] (a , e) ? (b , e') ? (c , e?) ? mons But Agda does not agree with this. Am I missing something? May be I misuse `inspect' and `rewrite' ? Can anybody fix the proof? Thanks, ------ Sergei -------------- next part -------------- open import Relation.Binary using (Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open PE.?-Reasoning renaming (_??_?_ to _?[_]_; begin_ to ?begin_; _? to _?end) open import Data.Empty using (?-elim) open import Data.Product using (_?_; _,_) open import Data.List using (List; []; _?_) open import Data.Nat using (?; _+_; _<_) open import Data.Nat.Properties using (strictTotalOrder) ------------------------------------------------------------------------------ postulate anything : ? {a} {A : Set a} ? A -- for debug open StrictTotalOrder strictTotalOrder using (compare) Mon : Set Mon = ? ? ? open Tri add : Mon ? List Mon ? List Mon add (a , e) [] = (a , e) ? [] add (a , e) ((b , e') ? mons) with compare e e' ... | tri> _ _ _ = (a , e ) ? (b , e') ? mons ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) ... | tri? _ _ _ = (a + b , e) ? mons ------------------------------------------------------------------------------ comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? add (b , e') (add (a , e ) mons) comm _ _ _ _ [] = anything comm a e b e' ((c , e?) ? mons) with compare e e' | PE.inspect (compare e) e' comm a e b e' ((c , e?) ? mons) | tri> e>e' _ _ | PE.[ eq-e>e' ] rewrite eq-e>e' with compare e e? | PE.inspect (compare e) e? comm a e b e' ((c , e?) ? mons) | tri> e>e' _ _ | _ | tri> _ _ e>e? | PE.[ eq-e>e? ] rewrite eq-e>e? with compare e' e? | PE.inspect (compare e') e? comm a e b e' ((c , e?) ? mons) | tri> e>e' _ _ | _ | tri> _ _ e>e? | _ | tri> _ _ e'>e? | PE.[ eq-e'>e? ] rewrite eq-e'>e? with compare e' e | PE.inspect (compare e') e comm a e b e' ((c , e?) ? mons) | tri> e>e' _ _ | _ | tri> _ _ e>e? | _ | tri> _ _ e'>e? | _ | tri< e'e? ] add (a , e) ((b , e') ? (c , e?) ? mons) ?[ e>e' ] (a , e) ? (b , e') ? (c , e?) ? mons RHS = add (b , e') (add (a , e) ((c , e?) ? mons)) ?[ e>e? ] add (b , e') ((a , e) ? (c , e?) ? mons) ?[ e'e? ] (a , e) ? (b , e') ? (c , e?) ? mons ----------------- -} From mechvel at botik.ru Sat Feb 18 20:45:35 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 18 Feb 2017 22:45:35 +0300 Subject: [Agda] more about insertion to a list In-Reply-To: <1487442081.2459.12.camel@one.mechvel.pereslavl.ru> References: <1487442081.2459.12.camel@one.mechvel.pereslavl.ru> Message-ID: <1487447135.2392.5.camel@one.mechvel.pereslavl.ru> On Sat, 2017-02-18 at 21:21 +0300, Sergei Meshveliani wrote: > Who can tell, please, > why the attached code (about 30 nonempty lines) is not type-checked > in Agda 2.6.0-e384ae7 > ? > > Namely, PE.refl is reported in the end as having a wrong type. > > The code is about the lemma comm below: > > ---------------------------- > Mon = ? ? ? > > add : Mon ? List Mon ? List Mon > add (a , e) [] = (a , e) ? [] > add (a , e) ((b , e') ? mons) with compare e e' > ... > | tri> _ _ _ = (a , e ) ? (b , e') ? mons > ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) > ... | tri? _ _ _ = (a + b , e) ? mons > > comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? > add (b , e') (add (a , e ) mons) > ---------------------------- > > [..] In the attached code, a typo tri> e>e' _ _ needs to be replaced with tri> _ _ e>e' But this does not make difference because the identifier e>e' is used only as a comment. From carette at mcmaster.ca Sun Feb 19 20:31:25 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Sun, 19 Feb 2017 14:31:25 -0500 Subject: [Agda] AMMCS-2017 call for submissions Message-ID: Applied Mathematics, Modeling and Computational Science (AMMCS-2017) Waterloo, Ontario, Canada August 20-25, 2017 Minisymposium: Symbolic Methods in Code Generation and Programming Languages (ID: SS-SMCGPL; http://www.ammcs2017.wlu.ca/special-sessions/smcgpl/) Symbolic Methods in Code Generation and Programming Languages Symbolic methods are increasingly finding a wide variety of applications in and around programming languages. Starting from their immensely successful use in generation of numerical codes, their applicability is widening to both code analysis (often through abstract interpretation) and even in certain phases of compilers themselves, as exemplified in recent probabilistic programming languages. This session will bring together experts in symbolic computation along with programming languages experts to exchange ideas on the state of the art in this domain. Abstracts are being accepted for special sessions, contributed sessions, and poster presentations. All participants should submit their abstracts online via the AMMCS-2017 Management System at http://www.ammcs2017.wlu.ca/submit-abstracts/ Due: March 15, 2017 SS-SMCGPL Organizers: Jacques Carette (McMaster University), Eugene Zima (Wilfrid Laurier University) About AMMCS =========== AMMCS-2017 is an interdisciplinary international conference in a series of AMMCS meetings held in Waterloo, Ontario, Canada. The AMMCS Conference Series aims at promoting interdisciplinary research and collaboration involving mathematical and computational sciences within a larger international community, and highlighting recent advances in Applied Mathematics, Modeling and Computational Science (AMMCS). In 2017 the conference will be held in August (August 20-25, 2017). From its inception this conference series has been organized in cooperation with AIMS and SIAM. The conference provides a unique opportunity for in-depth technical discussions and exchange of ideas in all areas involving mathematical and computational sciences, modeling and simulation, as well as their applications in natural and social sciences, engineering and technology, industry and finance. It offers to researchers, industrialists, engineers and students to present their latest research, to interact with the experts in the field, and to foster interdisciplinary collaborations required to meet the challenges of modern science, technology, and society. From mechvel at botik.ru Sun Feb 19 21:52:32 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 19 Feb 2017 23:52:32 +0300 Subject: [Agda] more about insertion to a list In-Reply-To: <1487442081.2459.12.camel@one.mechvel.pereslavl.ru> References: <1487442081.2459.12.camel@one.mechvel.pereslavl.ru> Message-ID: <1487537552.2810.13.camel@one.mechvel.pereslavl.ru> On Sat, 2017-02-18 at 21:21 +0300, Sergei Meshveliani wrote: > Who can tell, please, > why the attached code (about 30 nonempty lines) is not type-checked > in Agda 2.6.0-e384ae7 > ? > > Namely, PE.refl is reported in the end as having a wrong type. > > The code is about the lemma comm below: > > ---------------------------- > Mon = ? ? ? > > add : Mon ? List Mon ? List Mon > add (a , e) [] = (a , e) ? [] > add (a , e) ((b , e') ? mons) with compare e e' > ... > | tri> _ _ _ = (a , e ) ? (b , e') ? mons > ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) > ... | tri? _ _ _ = (a + b , e) ? mons > > comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? > add (b , e') (add (a , e ) mons) > ---------------------------- > > [..] > Am I missing something? May be I misuse `inspect' and `rewrite' ? > Can anybody fix the proof? I manage with completing a proof only by inserting several constructs of the kind with compare x y | PE.inspect (compare x) y These constructs are parasitic, because they are applied higher in the code, and must work automatically in normalization. I wonder what is this effect with `inspect'. Regards, ------ Sergei From nad at cse.gu.se Tue Feb 21 10:32:53 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 21 Feb 2017 10:32:53 +0100 Subject: [Agda] {} for nested `with' syntax In-Reply-To: <1487159108.5033.25.camel@one.mechvel.pereslavl.ru> References: <1487159108.5033.25.camel@one.mechvel.pereslavl.ru> Message-ID: <15f8efa2-4448-7585-84bf-1017ddca6dd4@cse.gu.se> On 2017-02-15 12:45, Sergei Meshveliani wrote: > A nested `with' construct often requires repeating a large pattern, so > that a program becomes difficult to read. For some related discussion, see Issue 510: https://github.com/agda/agda/issues/510 -- /NAD From kaposi.ambrus at gmail.com Tue Feb 21 18:17:16 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Tue, 21 Feb 2017 18:17:16 +0100 Subject: [Agda] TYPES 2017 2nd call for contributions Message-ID: Reminder: abstracts (2 pp easychair.cls) due by 13 March 2017. CALL FOR CONTRIBUTIONS 23rd International Conference on Types for Proofs and Programs, TYPES 2017 and EUTYPES Cost Action CA15123 meeting Budapest, Hungary, 29 May - 1 June 2017 http://types2017.elte.hu BACKGROUND The TYPES meetings are a forum to present new and on-going work in all aspects of type theory and its applications, especially in formalised and computer assisted reasoning and computer programming. The TYPES areas of interest include, but are not limited to: * foundations of type theory and constructive mathematics; * applications of type theory; * dependently typed programming; * industrial uses of type theory technology; * meta-theoretic studies of type systems; * proof assistants and proof technology; * automation in computer-assisted reasoning; * links between type theory and functional programming; * formalizing mathematics using type theory. We encourage talks proposing new ways of applying type theory. In the spirit of workshops, talks may be based on newly published papers, work submitted for publication, but also work in progress. The EUTypes Cost Action CA15123 (eutypes.cs.ru.nl) focuses on the same research topics as TYPES and partially sponsors the TYPES Conference: May 31 - June 1 are supported by and organised under the auspices of EUTypes. INVITED SPEAKERS * Edwin Brady (University of St Andrews) * Sara Negri (University of Helsinki) * Jakob Rehof (TU Dortmund) CONTRIBUTED TALKS We solicit contributed talks. Selection of those will be based on extended abstracts/short papers of 2 pp formatted with easychair.cls. The submission site is https://easychair.org/conferences/?conf=types2017. Important dates: * submission of 2 pp abstract: 13 March 2017 * notified of acceptance/rejection: 10 April 2017 * camera-ready version of abstract: 2 May 2017 Camera-ready versions of the accepted contributions will be published in an informal book of abstracts for distribution at the workshop. POST-PROCEEDINGS Similarly to TYPES 2011 and TYPES 2013-2016, we intend to publish a post-proceedings volume in the Leibniz International Proceedings in Informatics (LIPIcs) series (subject to successful negotiation with Dagstuhl Publishing). Submission to that volume would be open for everyone. Tentative submission deadline: September 2017. PROGRAMME COMMITTEE * Andreas Abel (Chalmers University Gothenburg) * Thorsten Altenkirch (University of Nottingham) * Jos? Espirito Santo (University of Minho) * Fredrik Nordvall Forsberg (University of Strathclyde) * Silvia Ghilezan (University of Novi Sad) * Hugo Herbelin (INRIA Paris-Rocquencourt) * Martin Hofmann (Ludwig Maximilian University of Munich) * Ambrus Kaposi (E?tv?s Lor?nd University) (co-chair) * Tam?s Kozsik (E?tv?s Lor?nd University) (co-chair) * Assia Mahboubi (INRIA) * Alexandre Miquel (University of the Republic, Uruguay) * Leonardo de Moura (Microsoft Research, Redmond, USA) * Keiko Nakata (SAP, Potsdam) * Andrew Polonsky (University Paris Diderot) * Simona Ronchi Della Rocca (Universit? di Torino) * Aleksy Schubert (University of Warsaw) * Wouter Swierstra (Utrecht University) * Tarmo Uustalu (Tallinn University of Technology) TYPES STEERING COMMITTEE Marc Bezem, Herman Geuvers (chair), Hugo Herbelin, Zhaohui Luo, Ralph Matthes, Bengt Nordstr?m, Andrew Polonsky, Aleksy Schubert, Tarmo Uustalu. ABOUT TYPES The TYPES meetings from 1990 to 2008 were annual workshops of a sequence of five EU funded networking projects. From 2009 to 2015, TYPES has been run as an independent conference series. From 2016, TYPES is partially supported by COST Action EUTypes CA15123. Previous TYPES meetings were held in Antibes (1990), Edinburgh (1991), B?stad (1992), Nijmegen (1993), B?stad (1994), Torino (1995), Aussois (1996), Kloster Irsee (1998), L?keberg (1999), Durham (2000), Berg en Dal near Nijmegen (2002), Torino (2003), Jouy-en-Josas near Paris (2004), Nottingham (2006), Cividale del Friuli (2007), Torino (2008), Aussois (2009), Warsaw (2010), Bergen (2011), Toulouse (2013), Paris (2014), Tallinn (2015), Novi Sad (2016). CONTACT Email: info at types2017.elte.hu Organisers: Ambrus Kaposi, Tam?s Kozsik, Andr?s Kov?cs and the Department of Programming Languages and Compilers at the Faculty of Informatics, E?tv?s Lor?nd University, Budapest. From patrikj at chalmers.se Wed Feb 22 01:15:40 2017 From: patrikj at chalmers.se (Patrik Jansson) Date: Tue, 21 Feb 2017 21:15:40 -0300 Subject: [Agda] FYI: CFP CICM 2017 Message-ID: Short: Please consider submitting to CICM 2017 by mid March. http://www.cicm-conference.org/2017/cicm.php?event=&menu=dates Details: Call for Papers 10th Conference on Intelligent Computer Mathematics - CICM 2017 - July 17-21, 2017 University of Edinburgh, Scotland http://www.cicm-conference.org/2017 ---------------------------------------------------------------------- Digital and computational solutions are becoming the prevalent means for the generation, communication, processing, storage and curation of mathematical information. Separate communities have developed to investigate and build computer based systems for computer algebra, automated deduction, and mathematical publishing as well as novel user interfaces. While all of these systems excel in their own right, their integration can lead to synergies offering significant added value. The Conference on Intelligent Computer Mathematics (CICM) offers a venue for discussing and developing solutions to the great challenges posed by the integration of these diverse areas. CICM has been held annually as a joint meeting since 2008, co-locating related conferences and workshops to advance work in these subjects. Previous meetings have been held in Birmingham (UK 2008), Grand Bend (Canada 2009), Paris (France 2010), Bertinoro (Italy 2011), Bremen (Germany 2012), Bath (UK 2013), Coimbra (Portugal 2014), Washington DC (USA 2015) and Bialystok (Poland 2016). This is a call for papers for CICM 2017, which will be held in Edinburgh, Scotland, July 17-21, 2017. CICM 2017 also invites work-in- progress papers. The principal tracks of the conference will be: * Track: Calculemus (chair: Matthew England) All topics in the intersection of computer algebra systems and automated reasoning systems including: - Automated theorem proving in computer algebra systems. - Computer algebra and symbolic computation in theorem proving systems. - Theory, design and implementation of interdisciplinary systems for computer mathematics. - Case studies and applications that involve a mix of computation and reasoning. - Case studies in formalization of mathematical theories that include non-trivial computations. - Representation of mathematics in computer algebra systems. - Input languages, programming languages, types and constraint languages, and modeling languages for mathematical assistant systems. * Track: Digital Mathematical Libraries (DML) (chair: Olaf Teschke) All topics related to the formation of a Global Digital Mathematics Library (GDML) network, ranging from experiences from existing DMLs, policies and standards facilitating interoperability, to development and integration of new techniques for content creation, preservation, enhancement and retrieval of the corpus, including: - DML creation and maintenance (content aggregation, validation, curation, enhancement). - DML architecture and representations (organization, workflows, policies, standards). - DML access and applications (retrieval, interfaces, interoperability). - DML collections and systems (experiences from various existing DMLs). * Track: Mathematical Knowledge Management (MKM) (chair: Florian Rabe) - Knowledge representation using, e.g., formal logics, computational systems, narrative document formats, or databases - Solutions to create, store, disseminate, discover, or manipulate mathematical knowledge - Corpora of knowledge inlcuding documents, theories, theorems, proofs, models, algorithms, exercises, or examples - Methods, systems, frameworks, case studies, challenges, benchmarks, or applications for mathematical knowledge - Comparisons, evaluations, or integrations of MKM solutions * Track: Systems & Projects (chair: Osman Hasan) - Systems: Stand-alone; plugins, libraries, or extensions of existing systems; or integrations of existing systems - Data: Formalizations; harvests or new processing of existing data; or case studies, test cases, or benchmark suites for systems - Projects: finished, ongoing or new - Survey papers * Track: Doctoral Programme (chair: TBD) The overall programme is organized by the General Program Chair Herman Geuvers. The local arrangements will be coordinated by Jacques Fleuriot. The publicity chair is Serge Autexier. We plan to have proceedings of the conference as in previous years with Springer Verlag as a volume in Lecture Notes in Artificial Intelligence (LNAI). *Important Dates* Conference submissions - Abstract submission deadline: 15. March 2017 - Submission deadline: 22. March 2017 - Reviews sent to authors: 26. April 2017 - Rebuttals due: 30. April 2017 - Notification of acceptance: 12. May 2017 - Camera ready copies due: 26. May 2017 - Conference: 17.-21. July 2017 Workshop Proposals - Submission deadline: 10. February 2017 - Notification of acceptance: 15. February 2017 More details on the conference are available from http://www.cicm-conference.org/2017 -- Patrik Jansson, Professor of Computer Science, Department of Computer Science and Engineering, Chalmers U. of Tech. & U. of Gothenburg https://www.chalmers.se/cse/EN/people/jansson-patrik -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Feb 22 18:13:16 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 22 Feb 2017 18:13:16 +0100 Subject: [Agda] Agda installation for all users In-Reply-To: <20170209134325.GA6558@pllab.is.ocha.ac.jp> References: <20170209134325.GA6558@pllab.is.ocha.ac.jp> Message-ID: <2ff7349c-132c-58b2-f4da-5ba09b11bf53@cse.gu.se> On 2017-02-09 14:43, Kenichi Asai wrote: > Then, I want to install the standard library. After I place the > standard library to an appropriate place [...] You should perhaps also type-check every file from the library, in order to generate all the .agdai files. -- /NAD From victor at lopezjuan.com Wed Feb 22 17:29:44 2017 From: victor at lopezjuan.com (=?UTF-8?Q?V=c3=adctor_L=c3=b3pez_Juan?=) Date: Wed, 22 Feb 2017 17:29:44 +0100 Subject: [Agda] AIM XXV - Gothenburg, May 9 - 15 Message-ID: --------------------------------------------------------------- Agda Implementors' Meeting XXV Call for participation http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXV --------------------------------------------------------------- The twenty-fifth Agda Implementors' Meeting will be held in Gothenburg, Sweden from May 9 ? 15 (Tue to Mon). Anyone with an interest in Agda is invited to attend. The meeting will be similar to previous ones: * Presentations concerning theory, implementation, and use cases of Agda and other Agda-like languages. * Discussions around issues related to the Agda language. * Plenty of time to work in, on, under or around Agda, in collaboration with other participants. Registration ------------ To participate, please fill out the following form before April 30: http://framaforms.org/registration-for-aim-xxv-1487690243 There is no registration fee. Each participant covers their own transportation, accommodation and meals. More information ---------------- Check out the wiki for travel suggestions and up-to-date information: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXV Best regards, V?ctor From jannis at limperg.de Thu Feb 23 16:32:28 2017 From: jannis at limperg.de (Jannis Limperg) Date: Thu, 23 Feb 2017 16:32:28 +0100 Subject: [Agda] Propositional equality for coinductive records Message-ID: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> Dear all, propositional equality for coinductive records is currently extremely restricted since it is not possible (as far as I can tell) to go from propositional equality of all fields to equality of the records. For example, it is impossible to define `R-ext` in the following example due to the inability to destruct `r` and `s`. data ? : Set where tt : ? data _?_ {a} {A : Set a} (x : A) : A ? Set a where refl : x ? x record R : Set where coinductive field force : R open R R-ext : {r s : R} ? force r ? force s ? r ? s R-ext = ? This contrasts with Coq (and probably Agda's old coinduction) which would allow similar equalities to be exploited. Now, propositional equality on coinductive data is not often useful anyway since it is too restrictive for most purposes. However, I have a corecursive function, say `f`, for which I can prove `force (f x) ? force (g x)` for some simpler `g`, and being able to turn this into `f x ? g x` would make it much easier to apply the equation in other proofs. Reformulating it in terms of a bisimulation (`force r ? force s ? Bisim r s`) would be possible, but much less convenient for users of `f`. So, - Has anyone else experienced this problem (and perhaps found a good workaround)? - Would it be desirable to recover this form of 'extensionality' for coinductive records, and if so how could this be done? - Is adding `R-ext` as an axiom dangerous? Thanks for your consideration, Jannis From apostolis.xekoukoulotakis at gmail.com Thu Feb 23 16:42:20 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 23 Feb 2017 17:42:20 +0200 Subject: [Agda] Propositional equality for coinductive records In-Reply-To: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> References: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> Message-ID: You can look at the cubical branch and the cubical demos. https://github.com/Saizan/cubical-demo/blob/master/Stream.agda#L45 You can turn a bisimulation into an equality. On Thu, Feb 23, 2017 at 5:32 PM, Jannis Limperg wrote: > Dear all, > > propositional equality for coinductive records is currently extremely > restricted since it is not possible (as far as I can tell) to go from > propositional equality of all fields to equality of the records. For > example, it is impossible to define `R-ext` in the following example due > to the inability to destruct `r` and `s`. > > > data ? : Set where tt : ? > > data _?_ {a} {A : Set a} (x : A) : A ? Set a where > refl : x ? x > > record R : Set where > coinductive > field force : R > > open R > > R-ext : {r s : R} ? force r ? force s ? r ? s > R-ext = ? > > This contrasts with Coq (and probably Agda's old coinduction) which > would allow similar equalities to be exploited. > > Now, propositional equality on coinductive data is not often useful > anyway since it is too restrictive for most purposes. However, I have a > corecursive function, say `f`, for which I can prove `force (f x) ? > force (g x)` for some simpler `g`, and being able to turn this into > `f x ? g x` would make it much easier to apply the equation in other > proofs. Reformulating it in terms of a bisimulation (`force r ? force s > ? Bisim r s`) would be possible, but much less convenient for users of `f`. > > So, > > - Has anyone else experienced this problem (and perhaps found a good > workaround)? > - Would it be desirable to recover this form of 'extensionality' for > coinductive records, and if so how could this be done? > - Is adding `R-ext` as an axiom dangerous? > > Thanks for your consideration, > Jannis > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jannis at limperg.de Thu Feb 23 17:04:25 2017 From: jannis at limperg.de (Jannis Limperg) Date: Thu, 23 Feb 2017 17:04:25 +0100 Subject: [Agda] Propositional equality for coinductive records In-Reply-To: References: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> Message-ID: <1859e282-0e57-34fd-6207-a12fc73820e3@limperg.de> Interesting; I'll definitely take a closer look. In the mid-term, I'm hopeful that HoTT/cubical TT will render this issue obsolete. Short-term, I unfortunately can't rely on something this bleeding-edge (and I'd have to explain cubical type theory in the associated thesis, which is a little out of my league). Cheers, Jannis From sanzhiyan at gmail.com Thu Feb 23 18:33:32 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Thu, 23 Feb 2017 18:33:32 +0100 Subject: [Agda] Propositional equality for coinductive records In-Reply-To: <1859e282-0e57-34fd-6207-a12fc73820e3@limperg.de> References: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> <1859e282-0e57-34fd-6207-a12fc73820e3@limperg.de> Message-ID: It should be consistent to postulate R-ext, similarly to how it's consistent to postulate function extensionality. On Thu, Feb 23, 2017 at 5:04 PM, Jannis Limperg wrote: > Interesting; I'll definitely take a closer look. In the mid-term, I'm > hopeful that HoTT/cubical TT will render this issue obsolete. > Short-term, I unfortunately can't rely on something this bleeding-edge > (and I'd have to explain cubical type theory in the associated thesis, > which is a little out of my league). > > Cheers, > Jannis > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From amp12 at cam.ac.uk Thu Feb 23 12:19:28 2017 From: amp12 at cam.ac.uk (Andrew Pitts) Date: Thu, 23 Feb 2017 11:19:28 +0000 Subject: [Agda] Call for participation: Workshop on Computer-aided Mathematical Proof, Cambridge UK, 10-14 July 2017 Message-ID: <56513714-821A-44CC-9F04-188425BFC581@cam.ac.uk> The following workshop may be of interest: ?? Workshop on Computer-aided Mathematical Proof, Cambridge UK, 10-14 July 2017 Applications are invited, closing date 8 April, to take part in a workshop on Computer-aided Mathematical Proof, part of the ?Big proof? programme at the Isaac Newton Institute in Cambridge. Speakers include: Jeremy Avigad, Steve Awodey, Jasmin Blanchette, Leo De Moura, Stephanie Dick, Martin Escardo, Jacques Fleuriot, Georges Gonthier, Tom Hales, Marjin Heule, Patrick Ion, Mateja Jamnik, Michael Kohlhase, Ekaterina Komendantskaya, Dan Licata, Peter Lumsdaine, Assia Mahboubi, Ursula Martin, Tobias Nipkow, Grant Passmore, Larry Paulson, Alison Pease, Floris van Doorn and Vladimir Voevodsky For more details and to apply see https://www.newton.ac.uk/event/bprw01 This event is part of the activities for the programme on Big proof (26 June -- 4 August 2017) organised by Jeremy Avigad, Georges Gonthier, Ursula Martin, J Strother Moore, Larry Paulson, Andrew Pitts and Natarajan Shankar. The workshop brings together mathematicians interested in employing proof technology in their research, logicians exploring pragmatic and foundational issues in the formalisation of mathematics, and computer scientists engaged in developing and applying proof technology. It will explore foundational, theoretical, and practical challenges in exploiting proof technology to transform mathematical practice across a range of scientific and engineering disciplines. From Thorsten.Altenkirch at nottingham.ac.uk Fri Feb 24 11:11:51 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 24 Feb 2017 10:11:51 +0000 Subject: [Agda] Propositional equality for coinductive records In-Reply-To: References: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> Message-ID: Interesting. Are there any more details about the cubical development anywhere? Cheers, Thorsten From: Agda > on behalf of Apostolis Xekoukoulotakis > Date: Thursday, 23 February 2017 at 15:42 To: Jannis Limperg > Cc: agda list > Subject: Re: [Agda] Propositional equality for coinductive records You can look at the cubical branch and the cubical demos. https://github.com/Saizan/cubical-demo/blob/master/Stream.agda#L45 You can turn a bisimulation into an equality. On Thu, Feb 23, 2017 at 5:32 PM, Jannis Limperg > wrote: Dear all, propositional equality for coinductive records is currently extremely restricted since it is not possible (as far as I can tell) to go from propositional equality of all fields to equality of the records. For example, it is impossible to define `R-ext` in the following example due to the inability to destruct `r` and `s`. data ? : Set where tt : ? data _?_ {a} {A : Set a} (x : A) : A ? Set a where refl : x ? x record R : Set where coinductive field force : R open R R-ext : {r s : R} ? force r ? force s ? r ? s R-ext = ? This contrasts with Coq (and probably Agda's old coinduction) which would allow similar equalities to be exploited. Now, propositional equality on coinductive data is not often useful anyway since it is too restrictive for most purposes. However, I have a corecursive function, say `f`, for which I can prove `force (f x) ? force (g x)` for some simpler `g`, and being able to turn this into `f x ? g x` would make it much easier to apply the equation in other proofs. Reformulating it in terms of a bisimulation (`force r ? force s ? Bisim r s`) would be possible, but much less convenient for users of `f`. So, - Has anyone else experienced this problem (and perhaps found a good workaround)? - Would it be desirable to recover this form of 'extensionality' for coinductive records, and if so how could this be done? - Is adding `R-ext` as an axiom dangerous? Thanks for your consideration, Jannis _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Fri Feb 24 14:28:04 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Fri, 24 Feb 2017 14:28:04 +0100 Subject: [Agda] Propositional equality for coinductive records In-Reply-To: References: <6f3e6e8a-1223-464b-17d2-369a1d07bdda@limperg.de> Message-ID: So far there are only the examples at https://github.com/Saizan/cubical-demo Documentation should be coming soon, also because it's now in the master branch. Best, Andrea On Fri, Feb 24, 2017 at 11:11 AM, Thorsten Altenkirch wrote: > Interesting. Are there any more details about the cubical development > anywhere? > > Cheers, > Thorsten > > From: Agda on behalf of Apostolis > Xekoukoulotakis > Date: Thursday, 23 February 2017 at 15:42 > To: Jannis Limperg > Cc: agda list > Subject: Re: [Agda] Propositional equality for coinductive records > > You can look at the cubical branch and the cubical demos. > > https://github.com/Saizan/cubical-demo/blob/master/Stream.agda#L45 > > You can turn a bisimulation into an equality. > > On Thu, Feb 23, 2017 at 5:32 PM, Jannis Limperg wrote: >> >> Dear all, >> >> propositional equality for coinductive records is currently extremely >> restricted since it is not possible (as far as I can tell) to go from >> propositional equality of all fields to equality of the records. For >> example, it is impossible to define `R-ext` in the following example due >> to the inability to destruct `r` and `s`. >> >> >> data ? : Set where tt : ? >> >> >> data _?_ {a} {A : Set a} (x : A) : A ? Set a where >> refl : x ? x >> >> record R : Set where >> coinductive >> field force : R >> >> open R >> >> R-ext : {r s : R} ? force r ? force s ? r ? s >> R-ext = ? >> >> This contrasts with Coq (and probably Agda's old coinduction) which >> would allow similar equalities to be exploited. >> >> Now, propositional equality on coinductive data is not often useful >> anyway since it is too restrictive for most purposes. However, I have a >> corecursive function, say `f`, for which I can prove `force (f x) ? >> force (g x)` for some simpler `g`, and being able to turn this into >> `f x ? g x` would make it much easier to apply the equation in other >> proofs. Reformulating it in terms of a bisimulation (`force r ? force s >> ? Bisim r s`) would be possible, but much less convenient for users of >> `f`. >> >> So, >> >> - Has anyone else experienced this problem (and perhaps found a good >> workaround)? >> - Would it be desirable to recover this form of 'extensionality' for >> coinductive records, and if so how could this be done? >> - Is adding `R-ext` as an axiom dangerous? >> >> Thanks for your consideration, >> Jannis >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at botik.ru Mon Feb 27 13:43:19 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 27 Feb 2017 15:43:19 +0300 Subject: [Agda] signature for `with' branch Message-ID: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> Who knows, please, how to reliably set a signature for the `with' branch? Consider functions like f x with P? x ... | yes _ = g x ... | no _ = aux where aux : ... or f x y with compare x y ... | tri< _ _ _ = g x ... | tri> _ _ _ = aux where aux : ... In some cases I manage to set a signature for aux. In other cases Agda (2.6.0-e384ae7) does not accept any signature at all! On the other hand, it does report of the needed signature. But it rejects this signature when it is set explicitly, reporting things like this: Not implemented: type checking of with application when checking that the expression add a (x ? xs) | no a?0 has type List ? So that I do not see any way out. Because composing `with' many times often leads to error reports. It is difficult to guess of the needed nested `with' sequence, particularly as one needs to guess at each level of whether `inspect - rewrite ' is needed. This leads to that I modify a `with' sequence in many ways, and sometimes nothing helps. And then I start to suspect a bug in Agda. And spend many hours in this stupid occupation (and to prepare a bug report also takes much of time). Sometimes I manage to set a signature for `aux' in the branch. Then, this helps a lot, because from `aux', the `with' sequence can be started by new, and the problem is split to parts. But in many cases Agda rejects all explicit signatures for `aux', so that it is not possible to introduce any function there. Please, see a small example attached. Thanks, ------ Sergei -------------- next part -------------- open import Relation.Nullary using (yes; no; ?_) open import Relation.Binary using (DecSetoid; DecTotalOrder; Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open import Data.Empty using (?-elim) open import Data.List using (List; []; _?_; map) open import Data.List.All using (All) renaming ([] to []a; _?_ to _?a_) open import Data.Nat using (?; suc; _+_) open import Data.Nat.Properties using (?-decTotalOrder; strictTotalOrder) decSetoid = DecTotalOrder.Eq.decSetoid ?-decTotalOrder open DecSetoid decSetoid using (_?_) open StrictTotalOrder strictTotalOrder using (compare) open Tri postulate anything : ? {a} {A : Set a} ? A add : ? ? List ? ? List ? add a xs with a ? 0 ... | yes _ = xs ... | no _ = aux xs where aux : List ? ? List ? aux [] = a ? [] aux (x ? xs) with compare a x ... | tri> _ _ _ = a ? x ? xs ... | tri? _ _ _ = (a + x) ? xs ... | tri< _ _ _ = x ? (add a xs) lemma : ? a xs ? a ? 0 ? All (_? 0) xs ? All (_? 0) (add a xs) lemma a [] a?0 _ with a ? 0 ... | yes _ = []a ... | no _ = a?0 ?a []a lemma a (x ? xs) a?0 (x?0 ?a xs?0) with a ? 0 ... | yes a?0 = ?-elim (a?0 a?0) ... | no _ = aux where aux : All (\y ? ? y ? 0) (add a (x ? xs)) -- | no a?0 aux = anything -- All (? section ? section ? 0 ? Data.Empty.?) -- (add a (x ? xs) | no .?p) {- with compare a x ... | tri> _ _ a>x = a?0 ?a x?0 ?a xs?0 ... | tri? _ a?x _ = a+x?0 ?a xs?0 where a+x?0 = anything ... | tri< a References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-02-27 13:43, Sergei Meshveliani wrote: > Sometimes I manage to set a signature for `aux' in the branch. > Then, this helps a lot, because from `aux', the `with' sequence can be > started by new, and the problem is split to parts. If this helps a lot, then I suggest that you do not use with at all. The with expressions are translated into regular Agda code, that you could have written yourself, with some exceptions, one of which is that with applications are not parsed (but they are not needed if you do not use with). -- /NAD From mechvel at botik.ru Mon Feb 27 20:14:54 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 27 Feb 2017 22:14:54 +0300 Subject: [Agda] signature for `with' branch In-Reply-To: References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> Message-ID: <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> On Mon, 2017-02-27 at 14:11 +0100, Nils Anders Danielsson wrote: > On 2017-02-27 13:43, Sergei Meshveliani wrote: > > Sometimes I manage to set a signature for `aux' in the branch. > > Then, this helps a lot, because from `aux', the `with' sequence can be > > started by new, and the problem is split to parts. > > If this helps a lot, then I suggest that you do not use with at all. The > with expressions are translated into regular Agda code, that you could > have written yourself, with some exceptions, one of which is that with > applications are not parsed (but they are not needed if you do not use > with). > I try to implement `lemma' from my last letter (see the code) without using `with' or `case', and fail, so far: -------------------------------------------------------------- lemma : ? a xs ? a ? 0 ? All (_? 0) xs ? All (_? 0) (add a xs) lemma a [] a?0 _ with a ? 0 ... | yes _ = []a ... | no _ = a?0 ?a []a lemma a (x ? xs) a?0 (x?0 ?a xs?0) = aux (a ? 0) where aux : Dec (a ? 0) ? All (_? 0) (add a (x ? xs)) aux (yes a?0) = ?-elim (a?0 a?0) aux (no a?0) = aux0 (compare a x) where aux0 : Tri (a < x) (a ? x) (a > x) ? All (_? 0) (add a (x ? xs)) aux0 (tri> _ _ _) = aux1 (a ? 0) where aux1 : Dec (a ? 0) ? All (_? 0) (add a (x ? xs)) aux1 (no _) = a?0 ?a x?0 ?a xs?0 --------------------------------------------------------------- The report is a ? x ? xs != add a (x ? xs) | a Data.Nat.? 0 of type List ? when checking that the expression a?0 ?a x?0 ?a xs?0 has type All (? section ? section ? 0) (add a (x ? xs)) And the pattern of (tri> _ _ _) implies the result of (a ? x ? xs) for `add'. May be I also need to avoid `with' in the implementation of 'add' ? Is this necessary? ------ Sergei From kahl at cas.mcmaster.ca Tue Feb 28 03:07:57 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Mon, 27 Feb 2017 21:07:57 -0500 Subject: [Agda] signature for `with' branch In-Reply-To: References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> Message-ID: <20170228020757.GU27843@ritchie.cas.mcmaster.ca> On Mon, Feb 27, 2017 at 02:11:31PM +0100, Nils Anders Danielsson wrote: > If this helps a lot, then I suggest that you do not use with at all. The > with expressions are translated into regular Agda code, that you could > have written yourself, with some exceptions, one of which is that with > applications are not parsed (but they are not needed if you do not use > with). How hard would it be to make that generated code, or at least something close to it, visible via an Agsy ``expand-with'' feature, that, when triggered in an appropriate place, turns the closest surrounding ``with'' into a call to an auxiliary function and inserts the definition (skeleton) of that auxiliary function? (Perhaps even in cases where Agda complains that the with-function has an illegal type, so that one can actually see that with-function and modify its definition until it has a legal type, supported by error messages that are hopefully more understandable than the one about illegal type of with-function... ) How desirable would it be to have that functionality? I can imagine using it... Wolfram From ulf.norell at gmail.com Tue Feb 28 07:11:24 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 28 Feb 2017 07:11:24 +0100 Subject: [Agda] signature for `with' branch In-Reply-To: <20170228020757.GU27843@ritchie.cas.mcmaster.ca> References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <20170228020757.GU27843@ritchie.cas.mcmaster.ca> Message-ID: C-c C-h does something in that direction: it gives you the type of the with function. But you need to get rid of the with first and put a hole there instead. / Ulf On Tue, Feb 28, 2017 at 3:07 AM, Wolfram Kahl wrote: > On Mon, Feb 27, 2017 at 02:11:31PM +0100, Nils Anders Danielsson wrote: > > If this helps a lot, then I suggest that you do not use with at all. The > > with expressions are translated into regular Agda code, that you could > > have written yourself, with some exceptions, one of which is that with > > applications are not parsed (but they are not needed if you do not use > > with). > > How hard would it be to make that generated code, > or at least something close to it, visible via an Agsy ``expand-with'' > feature, that, when triggered in an appropriate place, > turns the closest surrounding ``with'' into a call to an auxiliary function > and inserts the definition (skeleton) of that auxiliary function? > (Perhaps even in cases where Agda complains that the with-function > has an illegal type, so that one can actually see that with-function > and modify its definition until it has a legal type, > supported by error messages that are hopefully more understandable > than the one about illegal type of with-function... > ) > > How desirable would it be to have that functionality? > I can imagine using it... > > > Wolfram > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue Feb 28 11:26:57 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 28 Feb 2017 11:26:57 +0100 Subject: [Agda] signature for `with' branch In-Reply-To: <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> Message-ID: <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> On 2017-02-27 21:38, Sergei Meshveliani wrote: > when I expect that there the result for (add a (x ? xs)) must be > a ? x ? xs. The term "add a (x ? xs)" reduces to "aux (a ? 0) (x ? xs)", which is stuck, because "a ? 0" does not reduce to WHNF. (I think you forgot to send the message to which I am responding to the mailing list.) -- /NAD From mechvel at botik.ru Tue Feb 28 12:10:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 28 Feb 2017 14:10:30 +0300 Subject: [Agda] signature for `with' branch In-Reply-To: <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> Message-ID: <1488280230.2819.20.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-28 at 11:26 +0100, Nils Anders Danielsson wrote: > On 2017-02-27 21:38, Sergei Meshveliani wrote: > > when I expect that there the result for (add a (x ? xs)) must be > > a ? x ? xs. > > The term "add a (x ? xs)" reduces to "aux (a ? 0) (x ? xs)", which is > stuck, because "a ? 0" does not reduce to WHNF. > (I think you forgot to send the message to which I am responding to the > mailing list.) This is a test reply. Sorry to disturb. I copy it to agda at lists.chalmers.se and shall see whether it will come to me from the list. ------ Sergei From mechvel at botik.ru Tue Feb 28 12:49:23 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 28 Feb 2017 14:49:23 +0300 Subject: [Agda] signature for `with' branch In-Reply-To: <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> Message-ID: <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-28 at 11:26 +0100, Nils Anders Danielsson wrote: > On 2017-02-27 21:38, Sergei Meshveliani wrote: > > when I expect that there the result for (add a (x ? xs)) must be > > a ? x ? xs. > > The term "add a (x ? xs)" reduces to "aux (a ? 0) (x ? xs)", which is > stuck, because "a ? 0" does not reduce to WHNF. > > [..] I knew that it is not reduced. But how to make it reduced there without using `with' or `case' ? Generally, the matter is that I do not discover any regular and uniform way to set Agda proofs for simple statements when a proof is based on considering cases. I always know a simple naive proof, but often fail to convert it to an Agda proof, because some terms do not want to reduce along the branches. Mostly, "with | inspect" works, but not always. I attach the code again, because it has missed the mail list. Thanks, ------ Sergei -------------- next part -------------- open import Relation.Nullary using (yes; no; ?_; Dec) open import Relation.Binary using (DecSetoid; DecTotalOrder; Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open import Data.Empty using (?-elim) open import Data.List using (List; []; _?_; map) open import Data.List.All using (All) renaming ([] to []a; _?_ to _?a_) open import Data.Nat using (?; suc; _+_; _<_; _>_) open import Data.Nat.Properties using (?-decTotalOrder; strictTotalOrder) decSetoid = DecTotalOrder.Eq.decSetoid ?-decTotalOrder open DecSetoid decSetoid using (_?_) open StrictTotalOrder strictTotalOrder using (compare) open Tri postulate anything : ? {a} {A : Set a} ? A add : ? ? List ? ? List ? add a xs = aux (a ? 0) xs where aux : Dec (a ? 0) ? List ? ? List ? aux (yes _) xs = xs aux (no _) [] = a ? [] aux (no a?0) (x ? xs) = aux0 (compare a x) where aux0 : Tri (a < x) (a ? x) (a > x) ? List ? aux0 (tri> _ _ _) = a ? x ? xs aux0 (tri? _ _ _) = (a + x) ? xs aux0 (tri< _ _ _) = x ? (aux (no a?0) xs) lemma : ? a xs ? a ? 0 ? All (_? 0) xs ? All (_? 0) (add a xs) lemma _ [] _ _ = anything lemma a (x ? xs) a?0 (x?0 ?a xs?0) = aux (a ? 0) where aux : Dec (a ? 0) ? All (_? 0) (add a (x ? xs)) aux (yes a?0) = ?-elim (a?0 a?0) aux (no a?0) = aux0 (compare a x) where aux0 : Tri (a < x) (a ? x) (a > x) ? All (_? 0) (add a (x ? xs)) aux0 (tri> _ _ _) = -- add a (x ? xs) --> a ? x ? xs, -- so that (a?0 ?a x?0 ?a xs?0) is a proof aux1 (a ? 0) where aux1 : Dec (a ? 0) ? All (_? 0) (add a (x ? xs)) aux1 (no _) = a?0 ?a x?0 ?a xs?0 aux1 (yes a?0) = ?-elim (a?0 a?0) aux0 (tri? _ _ _) = anything aux0 (tri< _ _ _) = anything From nad at cse.gu.se Tue Feb 28 16:00:26 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 28 Feb 2017 16:00:26 +0100 Subject: [Agda] signature for `with' branch In-Reply-To: <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-02-28 12:49, Sergei Meshveliani wrote: > I knew that it is not reduced. But how to make it reduced there without > using `with' or `case' ? Use regular pattern matching. -- /NAD From mechvel at botik.ru Wed Mar 1 07:25:07 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 01 Mar 2017 09:25:07 +0300 Subject: [Agda] signature for `with' branch In-Reply-To: References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> Message-ID: <1488349507.2486.14.camel@one.mechvel.pereslavl.ru> On Tue, 2017-02-28 at 16:00 +0100, Nils Anders Danielsson wrote: > On 2017-02-28 12:49, Sergei Meshveliani wrote: > > I knew that it is not reduced. But how to make it reduced there without > > using `with' or `case' ? > > Use regular pattern matching. > Can anybody show, please, how to prove in Agda lemma : ? x y ? x < y ? min x y ? x by using a regular pattern matching, and without using `with' or 'case' ? min is defined here: ------------------------------------------------------------------- open import Function using (flip) open import Relation.Binary using (Rel; Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) module _ {? ?= ?<} (sto : StrictTotalOrder ? ?= ?<) where open StrictTotalOrder sto using (_?_; _<_; compare) renaming (Carrier to C) _>_ = flip _<_ open Tri min : (x y : C) ? C min x y = aux (compare x y) where aux : Tri (x < y) (x ? y) (x > y) ? C aux (tri< _ _ _) = x aux (tri? _ _ _) = x aux (tri> _ _ _) = y lemma : ? x y ? x < y ? min x y ? x lemma x y x References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> <1488349507.2486.14.camel@one.mechvel.pereslavl.ru> Message-ID: The problem you have is that you can't talk about the aux function. You can use named where modules to make it visible which enables proving the relevant lemma for it: open import Function using (flip) open import Relation.Binary using (Rel; Tri; StrictTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Empty module _ {? ?= ?<} (sto : StrictTotalOrder ? ?= ?<) where open StrictTotalOrder sto using (_?_; _<_; compare) renaming (Carrier to C) _>_ = flip _<_ open Tri min : (x y : C) ? C min x y = aux (compare x y) module min where aux : Tri (x < y) (x ? y) (x > y) ? C aux (tri< _ _ _) = x aux (tri? _ _ _) = x aux (tri> _ _ _) = y lemma-aux : ? {x y} ? x < y ? (t : Tri (x < y) (x ? y) (x > y)) ? min.aux x y t ? x lemma-aux x ?a ?b c) = ?-elim (?a x wrote: > On Tue, 2017-02-28 at 16:00 +0100, Nils Anders Danielsson wrote: > > On 2017-02-28 12:49, Sergei Meshveliani wrote: > > > I knew that it is not reduced. But how to make it reduced there without > > > using `with' or `case' ? > > > > Use regular pattern matching. > > > > > Can anybody show, please, how to prove in Agda > > lemma : ? x y ? x < y ? min x y ? x > > by using a regular pattern matching, and without using `with' or 'case' > ? > > min is defined here: > > ------------------------------------------------------------------- > open import Function using (flip) > open import Relation.Binary using (Rel; Tri; StrictTotalOrder) > open import Relation.Binary.PropositionalEquality as PE using (_?_) > > module _ {? ?= ?<} (sto : StrictTotalOrder ? ?= ?<) > where > open StrictTotalOrder sto using (_?_; _<_; compare) > renaming (Carrier to C) > _>_ = flip _<_ > open Tri > > min : (x y : C) ? C > min x y = > aux (compare x y) > where > aux : Tri (x < y) (x ? y) (x > y) ? C > aux (tri< _ _ _) = x > aux (tri? _ _ _) = x > aux (tri> _ _ _) = y > > lemma : ? x y ? x < y ? min x y ? x > lemma x y x ? > ------------------------------------------------------------------- > > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Mar 1 15:47:56 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 01 Mar 2017 17:47:56 +0300 Subject: [Agda] signature for `with' branch In-Reply-To: References: <1488199399.2689.42.camel@one.mechvel.pereslavl.ru> <1488222894.2322.9.camel@one.mechvel.pereslavl.ru> <1488227938.2555.16.camel@one.mechvel.pereslavl.ru> <2fe282ab-0c69-5b18-4bdf-a2c921c3dd90@cse.gu.se> <1488282563.3198.19.camel@one.mechvel.pereslavl.ru> <1488349507.2486.14.camel@one.mechvel.pereslavl.ru> Message-ID: <1488379676.2579.5.camel@one.mechvel.pereslavl.ru> On Wed, 2017-03-01 at 08:14 +0100, Ulf Norell wrote: > The problem you have is that you can't talk about the aux function. > You can use > named where modules to make it visible which enables > proving the relevant lemma for it: > > > open import Function using (flip) > open import Relation.Binary using (Rel; Tri; StrictTotalOrder) > open import Relation.Binary.PropositionalEquality as PE using (_?_) > open import Data.Empty > > > module _ {? ?= ?<} (sto : StrictTotalOrder ? ?= ?<) > where > open StrictTotalOrder sto using (_?_; _<_; compare) > renaming (Carrier to C) > _>_ = flip _<_ > open Tri > > > min : (x y : C) ? C > min x y = aux (compare x y) > module min where > aux : Tri (x < y) (x ? y) (x > y) ? C > aux (tri< _ _ _) = x > aux (tri? _ _ _) = x > aux (tri> _ _ _) = y > > > lemma-aux : ? {x y} ? x < y ? (t : Tri (x < y) (x ? y) (x > y)) ? > min.aux x y t ? x > lemma-aux x lemma-aux x lemma-aux x ?a ?b c) = ?-elim (?a x > > lemma : ? x y ? x < y ? min x y ? x > lemma x y x Thank you. It is nice to know that `with' and `case_of_' can be replaced. ------ Sergei From mechvel at botik.ru Thu Mar 2 10:52:33 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 02 Mar 2017 12:52:33 +0300 Subject: [Agda] example with nested `with' Message-ID: <1488448353.2439.22.camel@one.mechvel.pereslavl.ru> (This was a reply to my letter, with copying the reply to the list, but I discover that it has missed the list. So, I resend it separately). Dear Agda developers, the attached code presents problems with nested "with - inspect" construct. Can you tell, please, what am I missing about using this tool? Also I suspect a bug in "with - inspect". The code is about the lemma comm below: ---------------------------- Mon = ? ? ? add : Mon ? List Mon ? List Mon add (a , e) [] = (a , e) ? [] add (a , e) ((b , e') ? mons) with compare e e' ... | tri> _ _ _ = (a , e ) ? (b , e') ? mons ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) ... | tri? _ _ _ = (a + b , e) ? mons comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? add (b , e') (add (a , e ) mons) ---------------------------- The question is about the pattern comm a e b e' ((c , e?) ? mons) The attached code contains a full proof for this comm statement. You see, it must be proved trivially, by testing nested comparisons compare x y for (x , y) = (e , e?), (e' , e?), (e , e'), (e' , e). In the end of each branch, the proof is by PE.refl, and unreachable branches are done by the constructs like " = ?-elim (e'?e e>e') ". A proof for this does not need any detailed explanation, it needs only a comment: -- Test the comparison cases for (e , e?), (e' , e?), (e , e'), -- and the proof there is set by normalization". And the reader does not need to look into its code. So that the code needs only to process all these cases in a shortest way, without care for readability. But the given proof is rather long, it is about 130 nonempty lines. I failed to invent anything smaller. 1) Many comparison results are processed by with - inspect - rewrite. Some of such bindings occur necessary, and they do work. But Agda 2.6.0-e384ae7 forgets of some others, so that I need to repeat applying (with compare ei ej ...) down the branch for a value which must be reduced earlier. Is this a bug in Agda ? The comments (c1), (c3) ... mark such places in the program. 2) The code has the fragment ... | tri? _ e?e' _ | PE.[ rw-e?e' ] rewrite rw-e?e' = aux001 where aux001 : (a + b , e) ? (c , e?) ? mons ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux001 with compare e' e ... | tri> _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | tri< _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | tri? _ _ _ = PE.cong (_? ((c , e?) ? mons)) monEq where monEq : (a + b , e) ? (b + a , e') monEq = PE.cong? _,_ (+-comm a b) e?e' Here I would like to avoid introducing extra function aux001, it is better to write "with compare e' e ..." directly in the first line. But Agda does not allow this. Neither it is type-checked "= case compare e' e of \ ...". So that I am forced to insert many parasitic functions aux-ijkl, and cannot omit their signatures. Can anybody, please, demonstrate how to avoid this aux001 ? (see this place in the code). 3) A naive question: why does one need to write these inspect - rewrite construct in the fragments like with compare e e' | PE.inspect (compare e) e' ... | tri< _ _ _ | PE.[ rw-e ? By writing with compare e e' ... | tri< e does not one presume that is rewritten by e_; _?_) open import Data.Nat.Properties.Simple using (+-comm; +-assoc) open import Data.Nat.Properties using (strictTotalOrder) open import Function using (case_of_) ------------------------------------------------------------------------------ postulate anything : ? {a} {A : Set a} ? A -- for debug open StrictTotalOrder strictTotalOrder using (compare) renaming (trans to <-trans) Mon : Set Mon = ? ? ? open Tri add : Mon ? List Mon ? List Mon add (a , e) [] = (a , e) ? [] add (a , e) ((b , e') ? mons) with compare e e' ... | tri> _ _ _ = (a , e ) ? (b , e') ? mons ... | tri< _ _ _ = (b , e') ? (add (a , e) mons) ... | tri? _ _ _ = (a + b , e) ? mons ------------------------------------------------------------------------------ comm : ? a e b e' mons ? add (a , e ) (add (b , e') mons) ? add (b , e') (add (a , e ) mons) comm a e b e' [] with compare e e' comm a e b e' [] | tri> _ _ e>e' with compare e' e comm a e b e' [] | tri> _ _ _ | tri< _ _ _ = PE.refl comm a e b e' [] | tri> _ _ e>e' | tri> e'?e _ _ = ?-elim (e'?e e>e') comm a e b e' [] | tri> _ _ e>e' | tri? e'?e _ _ = ?-elim (e'?e e>e') comm a e b e' [] | tri? _ e?e' _ = aux where e'?e = PE.sym e?e' aux : (a + b , e) ? [] ? add (b , e') ((a , e) ? []) aux with compare e' e ... | tri> _ e'?e _ = ?-elim (e'?e e'?e) ... | tri< _ e'?e _ = ?-elim (e'?e e'?e) ... | tri? _ _ _ = PE.cong (_? []) monEq where monEq : (a + b , e) ? (b + a , e') monEq = PE.cong? _,_ (+-comm a b) e?e' comm a e b e' [] | tri< e _ _ _ = PE.refl comm a e b e' [] | tri< e _ _ e>e? | PE.[ rw-e>e? ] rewrite rw-e>e? = aux0 where aux0 : add (a , e ) (add (b , e') ((c , e?) ? mons)) ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux0 with compare e' e? | PE.inspect (compare e') e? ... | tri> _ _ e'>e? | PE.[ rw-e'>e? ] rewrite rw-e'>e? = aux00 where aux00 : add (a , e ) ((b , e') ? (c , e?) ? mons) ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux00 with compare e e' | PE.inspect (compare e) e' ... | tri> _ _ e>e' | PE.[ rw-e>e' ] rewrite rw-e>e' = aux000 where aux000 : (a , e) ? (b , e') ? (c , e?) ? mons ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux000 with compare e' e | PE.inspect (compare e') e aux000 | tri< e'e? is inspected above aux000 | tri< e' _ _ _ = PE.refl aux000 | tri< e'e?) aux000 | tri< e'e?) aux000 | tri> e'?e _ _ | _ = ?-elim (e'?e e>e') aux000 | tri? e'?e _ _ | _ = ?-elim (e'?e e>e') -- e>e? e'>e? ... | tri? _ e?e' _ | PE.[ rw-e?e' ] rewrite rw-e?e' = aux001 where -- (c2) Failed with avoiding extra function aux001. -- Why direct compare e' e ... is rejected? -- e>e? e'>e? e?e' aux001 : (a + b , e) ? (c , e?) ? mons ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux001 with compare e' e ... | tri> _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | tri< _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | tri? _ _ _ = PE.cong (_? ((c , e?) ? mons)) monEq where monEq : (a + b , e) ? (b + a , e') monEq = PE.cong? _,_ (+-comm a b) e?e' ... | tri< ee? is inspected above ... | tri> _ _ _ | tri> _ _ _ = PE.refl ... | _ | tri? _ _ e'?e = ?-elim (e'?e ee?) ... | tri< _ _ e?e? | _ = ?-elim (e?e? e>e?) ... | tri? _ e'?e? _ | PE.[ rw-e'?e? ] rewrite rw-e'?e? = aux01 where -- e>e? e'?e? e??e' = PE.sym e'?e? e>e' : e > e' e>e' = PE.subst (e >_) e??e' e>e? aux01 : add (a , e) ((b + c , e') ? mons) ? add (b , e') ((a , e) ? (c , e?) ? mons) aux01 with compare e e' | PE.inspect (compare e) e' ... | tri? _ _ e?e' | _ = ?-elim (e?e' e>e') ... | tri< _ _ e?e' | _ = ?-elim (e?e' e>e') ... | tri> _ _ e>e' | PE.[ rw-e>e' ] rewrite rw-e>e' = aux010 where aux010 : (a , e) ? (b + c , e') ? mons ? add (b , e') ((a , e) ? (c , e?) ? mons) aux010 with compare e' e | compare e' e? | PE.inspect (compare e') e? -- (c4) but e'?e? is inspected above ... | tri< _ _ _ | tri? _ _ _ | PE.[ rw-e'?e? ] rewrite rw-e'?e? = PE.refl ... | tri> e?e' _ _ | _ | _ = ?-elim (e?e' e>e') ... | tri? e?e' _ _ | _ | _ = ?-elim (e?e' e>e') ... | _ | tri> _ e'?e? _ | _ = ?-elim (e'?e? e'?e?) ... | _ | tri< _ e'?e? _ | _ = ?-elim (e'?e? e'?e?) ... | tri< e'e? e'e? aux02 : add (a , e ) ((c , e?) ? (add (b , e') mons)) ? add (b , e') ((a , e ) ? (c , e?) ? mons) aux02 with compare e e? -- (c5) but e>e? is inspected above ... | tri? _ _ e?e? = ?-elim (e?e? e>e?) ... | tri< _ _ e?e? = ?-elim (e?e? e>e?) ... | tri> _ _ e>e? with compare e' e ... | tri> e'?e _ _ = ?-elim (e'?e e' e'?e? _ _ = ?-elim (e'?e? e' _ _ e'>e? | PE.[ rw-e'>e? ] rewrite rw-e'>e? = aux00 where -- e?e? e'>e? e'>e = PE.subst (e' >_) (PE.sym e?e?) e'>e? aux00 : add (a , e) ((b , e') ? (c , e?) ? mons) ? add (b , e') ((a + c , e) ? mons) aux00 with compare e' e | PE.inspect (compare e') e ... | tri? _ _ e'?e | _ = ?-elim (e'?e e'>e) ... | tri< _ _ e'?e | _ = ?-elim (e'?e e'>e) ... | tri> e'?e e'?e e'>e | PE.[ rw-e'>e ] rewrite rw-e'>e with compare e e' | PE.inspect (compare e) e' ... | tri> _ _ e>e' | _ = ?-elim (e'?e e>e') ... | tri? _ e?e' _ | _ = ?-elim (e'?e (PE.sym e?e')) ... | tri< e _ _ e>e? = ?-elim (e?e? e>e?) ... | tri< e _ e?e' _ | _ = ?-elim (e?e' e?e') ... | tri< _ e?e' _ | _ = ?-elim (e?e' e?e') ... | _ | tri> _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | _ | tri< _ e'?e _ = ?-elim (e'?e (PE.sym e?e')) ... | tri? _ _ _ | tri? _ _ _ = PE.cong (_? mons) monEq where a+b+c?b+a+c = ?begin a + (b + c) ?[ PE.sym (+-assoc a b c) ] (a + b) + c ?[ PE.cong (_+ c) (+-comm a b) ] (b + a) + c ?[ +-assoc b a c ] b + (a + c) ?end monEq = PE.cong? _,_ a+b+c?b+a+c e?e' ... | tri< e' _ e?e? _ | _ = ?-elim (e?e? e?e?) ... | tri< _ e?e? _ | _ = ?-elim (e?e? e?e?) ... | tri? _ e?e? _ | PE.[ rw-e?e? ] rewrite rw-e?e? with compare e' e ... | tri< _ _ _ = PE.refl ... | tri> _ _ e'>e = ?-elim (e'?e e'>e) ... | tri? _ e'?e _ = ?-elim (e'?e e'?e) ... | tri< e _ _ e'>e? | PE.[ rw-e'>e? ] rewrite rw-e'>e? = aux00 where ee? -- ee? e e?e' _ _ = ?-elim (e?e' e e?e? _ _ = ?-elim (e?e? e e?e' _ _ = ?-elim (e?e' e e?e? _ _ = ?-elim (e?e? e Hi, I am programming a benchmark in Agda and would like to use machine integers. I would need bindings similar to Agda.Builtin.Float. I know there was some Agda library in the past regarding Naturals on github.com (perhaps from Alan Jeffrey?). Did anyone use machine integers in Agda and has code? Or at least the link to the old code on github. Thanks & cheers, Stephan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Fri Mar 3 07:08:50 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 3 Mar 2017 07:08:50 +0100 Subject: [Agda] Using machine integers / Data.Int from Haskell in Agda In-Reply-To: References: Message-ID: As long as you don't need the machine integers to compute at compile time, you can set up the bindings with the foreign function interface: postulate Int : Set intPlus : Int -> Int -> Int -- Agda 2.5.2 {-# COMPILED_TYPE Int Int #-} {-# COMPILED intPlus (+) #-} -- Agda > 2.5.2 {-# COMPILE GHC Int = type Int #-} {-# COMPILE GHC intPlus = (+) #-} If you need compile time computations you will either have to do a modest amount of hacking on the Agda implementation (mainly in Agda.TypeChecking.Monad.Builtin and Agda.TypeChecking.Rules.Builtin), or make do with the builtin natural numbers which map to Haskell bignums (Integer rather than Int). / Ulf On Thu, Mar 2, 2017 at 7:38 PM, stvienna wiener wrote: > Hi, > > I am programming a benchmark in Agda and would like to use machine > integers. I would need bindings similar to Agda.Builtin.Float. > > I know there was some Agda library in the past regarding Naturals on > github.com (perhaps from Alan Jeffrey?). > > Did anyone use machine integers in Agda and has code? Or at least the link > to the old code on github. > > Thanks & cheers, > Stephan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon at jonmsterling.com Sun Mar 5 16:41:32 2017 From: jon at jonmsterling.com (Jon Sterling) Date: Sun, 05 Mar 2017 07:41:32 -0800 Subject: [Agda] Adding "print" to TC monad? Message-ID: <1488728492.3051820.900985360.53420641@webmail.messagingengine.com> Hi all, I am starting to learn to use Agda's excellent reflection facilities / TC monad to implement some proof automation, and I have been thinking that it would be very useful to have a way to do "printf"-style debugging in elaborator scripts. Right now, I can kind of simulate this by throwing an error, but I would like to be able to print information without aborting the proof. Does anybody have any thoughts about adding another operation to the TC monad for printing (i.e. whether this is a good idea)? If people think this sounds like a good idea, I would probably be willing to do the hacking and submit a pull request. Best wishes, Jon From david at davidchristiansen.dk Mon Mar 6 14:32:36 2017 From: david at davidchristiansen.dk (David Christiansen) Date: Mon, 6 Mar 2017 08:32:36 -0500 Subject: [Agda] Adding "print" to TC monad? In-Reply-To: <1488728492.3051820.900985360.53420641@webmail.messagingengine.com> References: <1488728492.3051820.900985360.53420641@webmail.messagingengine.com> Message-ID: <97da2772-690d-34c5-4e80-220e84ac32ea@davidchristiansen.dk> Hi Jon, > I am starting to learn to use Agda's excellent reflection facilities / > TC monad to implement some proof automation, and I have been thinking > that it would be very useful to have a way to do "printf"-style > debugging in elaborator scripts. Right now, I can kind of simulate this > by throwing an error, but I would like to be able to print information > without aborting the proof. > > Does anybody have any thoughts about adding another operation to the TC > monad for printing (i.e. whether this is a good idea)? If people think > this sounds like a good idea, I would probably be willing to do the > hacking and submit a pull request. I've been meaning to add this to Idris for ages, and I think it's a very good idea. I saw on the Agda docs recently that there's a system like the one in Idris for re-using the pretty-printer inside of things like custom error messages, so it's probably worth having your log effect use the same part. The Lean folks have also been implementing elaborator reflection lately, with a focus on performance and tools, so it might be worth seeing what they offer for debugging. /David From scm at iis.sinica.edu.tw Mon Mar 6 15:27:58 2017 From: scm at iis.sinica.edu.tw (Shin-Cheng Mu) Date: Mon, 6 Mar 2017 23:27:58 +0900 Subject: [Agda] FOREIGN GHC pragma triggers parse error Message-ID: Hi, I just installed a fresh copy of Agda using cabal, and the latest standard library. When I tried to load files with Agda, I get parse errors at FOREIGN GHC pragmas. For example, trying Data.Empty: agda /src/Data/Empty.agda /src/Data/Empty.agda:13,5-5 /src/Data/Empty.agda:13,5: Parse error FOREIGN GHC data AgdaEmpty #-} {-# CO... Why would this happen? Agda Version 2.5.2 Standard Library Version 0.13 GHC Version 8.0.1 and if these matters... Happy Version 1.19.5 Alex version 3.2.1 Thank you! sincerely, Shin-Cheng Mu From guillaume.allais at ens-lyon.org Mon Mar 6 16:59:33 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Mon, 6 Mar 2017 16:59:33 +0100 Subject: [Agda] FOREIGN GHC pragma triggers parse error In-Reply-To: References: Message-ID: <55227e1e-de6a-018a-1c7c-3c13db9f2a19@ens-lyon.org> Hi, The master branch of agda-stdlib on github is meant to be used with the development version of Agda. For released version, you can get the appropriate tarball on the wiki: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Best, On 06/03/17 15:27, Shin-Cheng Mu wrote: > Hi, > > I just installed a fresh copy of Agda using cabal, > and the latest standard library. When I tried to > load files with Agda, I get parse errors at > FOREIGN GHC pragmas. For example, trying Data.Empty: > > agda /src/Data/Empty.agda > > /src/Data/Empty.agda:13,5-5 > /src/Data/Empty.agda:13,5: Parse error > FOREIGN > GHC data AgdaEmpty #-} > {-# CO... > > Why would this happen? > > Agda Version 2.5.2 > Standard Library Version 0.13 > GHC Version 8.0.1 > > and if these matters... > > Happy Version 1.19.5 > Alex version 3.2.1 > > Thank you! > > sincerely, > Shin-Cheng Mu > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From scm at iis.sinica.edu.tw Tue Mar 7 07:05:14 2017 From: scm at iis.sinica.edu.tw (Shin-Cheng Mu) Date: Tue, 7 Mar 2017 15:05:14 +0900 Subject: [Agda] FOREIGN GHC pragma triggers parse error In-Reply-To: <55227e1e-de6a-018a-1c7c-3c13db9f2a19@ens-lyon.org> References: <55227e1e-de6a-018a-1c7c-3c13db9f2a19@ens-lyon.org> Message-ID: Hi, > On 7 Mar 2017, at 12:59 AM, G. Allais wrote: > The master branch of agda-stdlib on github is meant to be used > with the development version of Agda. For released version, you > can get the appropriate tarball on the wiki: > http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Oops, my mistake that I didn't notice the "Installation" section on the wiki page is for the development version. Thank you! sincerely, Shin From abela at chalmers.se Wed Mar 8 20:47:57 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 8 Mar 2017 14:47:57 -0500 Subject: [Agda] How safe is Type:Type? Message-ID: {-# OPTIONS --type-in-type #-} is sometimes chosen to avoid the fiddling with universe levels. After all, Hurkens' Paradox is quite sophisticated, one should not by chance exploit the inconsistency of Type:Type in an innocent Agda project, no? Well, that's the folklore. I want to bring to mind that at least in Agda, with data types and structural recursion, there are much quicker routes to inconsistency than Hurkens' Paradox. 1. One is Thierry's 1992 example that impredicative data types are inconsistent with structural recursion: {-# OPTIONS --type-in-type #-} data ? : Set where -- An impredicative data type data D : Set where c : (f : (A : Set) ? A ? A) ? D -- Structural recursion with f args < c f is no longer valid. -- We should not be able to demonstrated that D is empty. empty : D ? ? empty (c f) = empty (f D (c f)) -- This gets us to absurdity quickly: absurd : ? absurd = empty (c ? A x ? x) 2. There is also Russell's paradox, written down by Paolo Capriotti. https://github.com/agda/agda/blob/master/test/Succeed/Russell.agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From monnier at iro.umontreal.ca Wed Mar 8 23:59:51 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Wed, 08 Mar 2017 17:59:51 -0500 Subject: [Agda] How safe is Type:Type? References: Message-ID: > data D : Set where > c : (f : (A : Set) ? A ? A) ? D > -- Structural recursion with f args < c f is no longer valid. > -- We should not be able to demonstrated that D is empty. Coq lets us define this datatype (in Prop). > empty : D ? ? > empty (c f) = empty (f D (c f)) But rejects this definition: Error: Recursive definition of empty is ill-formed. In environment empty : D -> False x : D f : forall A : Prop, A -> A Recursive call to empty has principal argument equal to "f D (c f)" instead of a subterm of "x". Recursive definition is: "fun x : D => match x with | c f => empty (f D (c f)) end". Not sure exactly what is the rule they use to decide whether a recursive call is considered as valid structural recursion. I suspect it depends on the notion of a "large inductive type" or something along these lines. Stefan From shulman at sandiego.edu Thu Mar 9 11:37:10 2017 From: shulman at sandiego.edu (Michael Shulman) Date: Thu, 9 Mar 2017 02:37:10 -0800 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: Message-ID: Pardon my ignorance, but I don't understand why anyone would accept the definition of "empty". The datatype D is not recursive; it's basically of the form data D : Set where c : X -> D for some fixed type X, which just happens to be large in this case. So its induction principle says that we get a map D -> Y whenever we have a map X -> Y. What justifies any sort of recursive call? On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier wrote: > > data D : Set where > > c : (f : (A : Set) ? A ? A) ? D > > -- Structural recursion with f args < c f is no longer valid. > > -- We should not be able to demonstrated that D is empty. > > Coq lets us define this datatype (in Prop). > > > empty : D ? ? > > empty (c f) = empty (f D (c f)) > > But rejects this definition: > > Error: > Recursive definition of empty is ill-formed. > In environment > empty : D -> False > x : D > f : forall A : Prop, A -> A > Recursive call to empty has principal argument equal to > "f D (c f)" instead of a subterm of "x". > Recursive definition is: > "fun x : D => match x with > | c f => empty (f D (c f)) > end". > > Not sure exactly what is the rule they use to decide whether a recursive > call is considered as valid structural recursion. I suspect it depends > on the notion of a "large inductive type" or something along these lines. > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattam at mattam.org Thu Mar 9 11:52:25 2017 From: mattam at mattam.org (Matthieu Sozeau) Date: Thu, 09 Mar 2017 10:52:25 +0000 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: Message-ID: Indeed in Coq we statically compute the possible recursive calls at the definition of the inductive type, independently of its use. In this case Agda is "fooled" because it thinks that [f] is a valid subterm (of type [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm when checking the guardedness/structural recursion criterion. On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman wrote: > Pardon my ignorance, but I don't understand why anyone would accept the > definition of "empty". The datatype D is not recursive; it's basically of > the form > > data D : Set where > c : X -> D > > for some fixed type X, which just happens to be large in this case. So > its induction principle says that we get a map D -> Y whenever we have a > map X -> Y. What justifies any sort of recursive call? > > > On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > wrote: > > > data D : Set where > > c : (f : (A : Set) ? A ? A) ? D > > -- Structural recursion with f args < c f is no longer valid. > > -- We should not be able to demonstrated that D is empty. > > Coq lets us define this datatype (in Prop). > > > empty : D ? ? > > empty (c f) = empty (f D (c f)) > > But rejects this definition: > > Error: > Recursive definition of empty is ill-formed. > In environment > empty : D -> False > x : D > f : forall A : Prop, A -> A > Recursive call to empty has principal argument equal to > "f D (c f)" instead of a subterm of "x". > Recursive definition is: > "fun x : D => match x with > | c f => empty (f D (c f)) > end". > > Not sure exactly what is the rule they use to decide whether a recursive > call is considered as valid structural recursion. I suspect it depends > on the notion of a "large inductive type" or something along these lines. > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Thu Mar 9 12:04:00 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 9 Mar 2017 11:04:00 +0000 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: Message-ID: On 09/03/17 10:37, Michael Shulman wrote: > Pardon my ignorance, but I don't understand why anyone would accept the > definition of "empty". The datatype D is not recursive; it's basically > of the form > > data D : Set where > c : X -> D > > for some fixed type X, which just happens to be large in this case. So > its induction principle says that we get a map D -> Y whenever we have a > map X -> Y. What justifies any sort of recursive call? In fact your type D is isomorphic to X, of course. And so can be empty only if X is empty. And the type X = ((A : Set) -> A -> A) is of course inhabited by the (polymorphic) identity function. So something seems to be wrong in the example given by Andreas. Martin > > On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > wrote: > > > data D : Set where > > c : (f : (A : Set) ? A ? A) ? D > > -- Structural recursion with f args < c f is no longer valid. > > -- We should not be able to demonstrated that D is empty. > > Coq lets us define this datatype (in Prop). > > > empty : D ? ? > > empty (c f) = empty (f D (c f)) > > But rejects this definition: > > Error: > Recursive definition of empty is ill-formed. > In environment > empty : D -> False > x : D > f : forall A : Prop, A -> A > Recursive call to empty has principal argument equal to > "f D (c f)" instead of a subterm of "x". > Recursive definition is: > "fun x : D => match x with > | c f => empty (f D (c f)) > end". > > Not sure exactly what is the rule they use to decide whether a recursive > call is considered as valid structural recursion. I suspect it depends > on the notion of a "large inductive type" or something along these > lines. > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From tmoldere at vub.ac.be Thu Mar 9 15:00:38 2017 From: tmoldere at vub.ac.be (Tim Molderez) Date: Thu, 9 Mar 2017 15:00:38 +0100 Subject: [Agda] 2017: Call for participation Message-ID: ----------------------------------------------------------------------- 2017 : The Art, Science, and Engineering of Programming April 3-6, 2017, Brussels, Belgium http://2017.programming-conference.org ----------------------------------------------------------------------- We are excited to welcome you to 2017, a new conference focused on everything to do with programming. It takes place at the Vrije Universiteit Brussel, Belgium on April 3-6. The conference is closely associated with the open-access journal "The Art, Science, and Engineering of Programming".? The journal's first two issues form the conference's research track, which means you can freely access all papers presented at the conference before it even starts! Along with the research track, 2017 features a program with two main keynotes, two symposia, eight workshops, a coding dojo, a demo track, and a student research competition. To catch a glimpse of what 2017 has to offer, feel free to have a look at our overview video: https://www.youtube.com/watch?v=GM_hLNW4ioE *********************************************************************** Program highlights *********************************************************************** Main conference: - Keynote: "Live Literate Programming" by Gilad Bracha - Keynote: "How Racket Went Meta" by Matthew Flatt - Research track: 18 full papers - Demonstrations: 10 tool demos - ACM Student Research Competition: 8 entries Co-located events: - 10th European Lisp Symposium: 2 keynotes by Hans H?bner and Bohdan Khomtchouk, ~18 papers (not final yet) - Modularity 2017: 8 invited talks by J?rg Kienzle, Shmuel Katz, Mira Mezini, Bedir Tekinerdogan, St?phane Ducasse, Uwe A?mann, Lodewijk Bergmans and Mario S?dholt - CoCoDo - RainCode Labs Compiler Coding Dojo: code together with experts Adrian Johnstone, Elizabeth Scott, Robby Findler, and more to come! - LASSY - Workshop on Live Adaptation of Software SYstems - MiniPLoP - Mini Pattern Languages of Programs writers' workshop - MOMO - Workshop on Modularity in Modeling - MoreVMs - Workshop on Modern Language Runtimes, Ecosystems, and VMs - PASS - Workshop on Programming Across the System Stack - PX - Workshop on Programming Experience - ProWeb - Programming Technology for the Future Web - Salon des Refus?s workshop Social events: - Beer reception at the conference venue (April 3rd) - Reception at the Musical Instruments Museum (April 4th) - Banquet at the Natural Sciences Museum (April 5th) *********************************************************************** Registration, attendance and accommodation *********************************************************************** - You can register for 2017 at: http://2017.programming-conference.org/attending/registration - Early registration ends soon! Please register before March 13th to obtain the early-bird discount. - More information on attending the conference is available at: http://2017.programming-conference.org/attending/reaching-the-conference - More information on accommodation is available at: http://2017.programming-conference.org/attending/accomodation *********************************************************************** About Brussels *********************************************************************** Brussels is the capital of Belgium, and home to the headquarters of the European Union. Despite its European nature and all the different languages spoken on every street corner, Brussels still has a very "village-like"? character. It's well known for its Grand-Place, its Atomium, its Manneken-Pis, its Gueuze and its Kriek, its waffles and its chocolates. Be sure to take some time off to soak up the special atmosphere of its many different districts: Take a stroll to Rue Dansaert, Halles Saint-G?ry, and Place Sainte-Catherine. Head for Saint-Boniface, Ch?telain, or Flagey. In other words, go ahead and relish Brussels, a fine and beautiful city to explore and discover. ----------------------------------------------------------------------- For more information, please visit http://2017.programming-conference.org You can also find us on Twitter (twitter.com/programmingconf) and Facebook (facebook.com/programmingconf) Looking forward to see you in Brussels, Theo D'Hondt (General chair), Wolfgang De Meuter (Organizing chair), Crista Lopes (Program chair), J?rg Kienzle, Ralf L?mmel, Hidehiko Masuhara, Tim Molderez, Tobias Pape, and Jennifer Sartor From abela at chalmers.se Thu Mar 9 15:35:18 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 9 Mar 2017 09:35:18 -0500 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: Message-ID: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Yes, that's the point. Coq has to be more careful about the structural ordering since it supports impredicativity. (The example is taken from Coquand 1992, Pattern matching with dependent types, where Thierry already points out the problem.) Agda is build on the assumption of predicativity, thus c f > f args is ok with any constructor c, be it recursive or not. When you leave the safe ground of predicativity via --type-in-type, things might go wrong in an unexpected way. My long term-plan is to replace the structural termination check by type-based termination, which does not exhibit the pathological behavior exploited here. Thus, I am not so pressed to get rid of it. However, if someone can point me to the analysis Coq does on its data types for the sake of structural recursion, it may be worthwile to think how to integrate this into Agda. Best, Andreas On 09.03.2017 05:52, Matthieu Sozeau wrote: > Indeed in Coq we statically compute the possible recursive calls at the > definition of the inductive type, independently of its use. In this case > Agda is "fooled" because it thinks that [f] is a valid subterm (of type > [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm > when checking the guardedness/structural recursion criterion. > > On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman > wrote: > > Pardon my ignorance, but I don't understand why anyone would accept > the definition of "empty". The datatype D is not recursive; it's > basically of the form > > data D : Set where > c : X -> D > > for some fixed type X, which just happens to be large in this case. > So its induction principle says that we get a map D -> Y whenever we > have a map X -> Y. What justifies any sort of recursive call? > > > On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > > wrote: > > > data D : Set where > > c : (f : (A : Set) ? A ? A) ? D > > -- Structural recursion with f args < c f is no longer valid. > > -- We should not be able to demonstrated that D is empty. > > Coq lets us define this datatype (in Prop). > > > empty : D ? ? > > empty (c f) = empty (f D (c f)) > > But rejects this definition: > > Error: > Recursive definition of empty is ill-formed. > In environment > empty : D -> False > x : D > f : forall A : Prop, A -> A > Recursive call to empty has principal argument equal to > "f D (c f)" instead of a subterm of "x". > Recursive definition is: > "fun x : D => match x with > | c f => empty (f D (c f)) > end". > > Not sure exactly what is the rule they use to decide whether a > recursive > call is considered as valid structural recursion. I suspect it > depends > on the notion of a "large inductive type" or something along > these lines. > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From Jesper at sikanda.be Thu Mar 9 15:55:26 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 9 Mar 2017 15:55:26 +0100 Subject: [Agda] How safe is Type:Type? In-Reply-To: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> References: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Message-ID: Right now, Agda considers all arguments of a constructor to be strongly rigid, even the non-recursive ones (i.e. the ones whose type doesn't mention the datatype). But this is not justified by the recursion principle for the datatype: you can only recurse on arguments that are in a recursive position. I don't know how this is enforced in Coq, but here's how I would do it in Agda. First, you need to know for a given constructor which of its arguments are recursive and which ones are not, by looking at the type of the constructor. Then, when you do free variable analysis (in Agda.TypeChecking.Free.Lazy), you only mark variables as strongly rigid if they occur in a *recursive* argument of a constructor. This should be enough to rule out your example (since the argument of c isn't recursive), and I think would also solve the problem in general. I'm tempted to try to implement this myself, but I probably won't do it until next week. So if you want to try it, go ahead. -- Jesper On Thu, Mar 9, 2017 at 3:35 PM, Andreas Abel wrote: > Yes, that's the point. Coq has to be more careful about the structural > ordering since it supports impredicativity. (The example is taken from > Coquand 1992, Pattern matching with dependent types, where Thierry already > points out the problem.) > > Agda is build on the assumption of predicativity, thus > > c f > f args > > is ok with any constructor c, be it recursive or not. > > When you leave the safe ground of predicativity via --type-in-type, things > might go wrong in an unexpected way. > > My long term-plan is to replace the structural termination check by > type-based termination, which does not exhibit the pathological behavior > exploited here. Thus, I am not so pressed to get rid of it. > > However, if someone can point me to the analysis Coq does on its data > types for the sake of structural recursion, it may be worthwile to think > how to integrate this into Agda. > > Best, > Andreas > > On 09.03.2017 05:52, Matthieu Sozeau wrote: > >> Indeed in Coq we statically compute the possible recursive calls at the >> definition of the inductive type, independently of its use. In this case >> Agda is "fooled" because it thinks that [f] is a valid subterm (of type >> [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm >> when checking the guardedness/structural recursion criterion. >> >> On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman > > wrote: >> >> Pardon my ignorance, but I don't understand why anyone would accept >> the definition of "empty". The datatype D is not recursive; it's >> basically of the form >> >> data D : Set where >> c : X -> D >> >> for some fixed type X, which just happens to be large in this case. >> So its induction principle says that we get a map D -> Y whenever we >> have a map X -> Y. What justifies any sort of recursive call? >> >> >> On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier >> > wrote: >> >> > data D : Set where >> > c : (f : (A : Set) ? A ? A) ? D >> > -- Structural recursion with f args < c f is no longer >> valid. >> > -- We should not be able to demonstrated that D is empty. >> >> Coq lets us define this datatype (in Prop). >> >> > empty : D ? ? >> > empty (c f) = empty (f D (c f)) >> >> But rejects this definition: >> >> Error: >> Recursive definition of empty is ill-formed. >> In environment >> empty : D -> False >> x : D >> f : forall A : Prop, A -> A >> Recursive call to empty has principal argument equal to >> "f D (c f)" instead of a subterm of "x". >> Recursive definition is: >> "fun x : D => match x with >> | c f => empty (f D (c f)) >> end". >> >> Not sure exactly what is the rule they use to decide whether a >> recursive >> call is considered as valid structural recursion. I suspect it >> depends >> on the notion of a "large inductive type" or something along >> these lines. >> >> >> Stefan >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Thu Mar 9 15:55:23 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 9 Mar 2017 09:55:23 -0500 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: Message-ID: On 8 March 2017 at 14:47, Andreas Abel wrote: > {-# OPTIONS --type-in-type #-} is sometimes chosen to avoid the fiddling > with universe levels. After all, Hurkens' Paradox is quite > sophisticated, one should not by chance exploit the inconsistency of > Type:Type in an innocent Agda project, no? > > 2. There is also Russell's paradox, written down by Paolo Capriotti. > > https://github.com/agda/agda/blob/master/test/Succeed/Russell.agda I realised Hurken's paradox doesn't use pattern-matching, that is, https://github.com/agda/agda/blob/aa20e7645d198de468edec62ec775ab6505b5deb/test/Succeed/Hurkens.agda continues type-checking after adding the `--no-pattern-matching` option. The same doesn't happen after adding that option to the above Russell's paradox, that is, the file doesn't type-check. 1. What could be an informal description of Agda + `--no-pattern-matching`? Agda would be something like the LF logical framework? 2. What means that Hurkens' paradox type-checks using the `--no-pattern-matching` option but Russell's paradox doesn't? Can I think that Hurkens' paradox is more fundamental (whatever it means) than Russell's paradox? Best, -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From abela at chalmers.se Thu Mar 9 16:05:29 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 9 Mar 2017 10:05:29 -0500 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Message-ID: <9092fdb1-cfd0-cbcb-6f7a-9aaddb9686d6@chalmers.se> On 09.03.2017 09:55, Jesper Cockx wrote: > First, you need to know for a given constructor which of its arguments are recursive and which ones are not, by looking at the type of the constructor. Sounds easy, but in Agda, "First" is hard to implement, since you can have meta-variables everywhere. Thus, you cannot decide whether an argument is recursive or not if there are metas left. We can maybe approximate this by assuming the worst case. Maybe the worst case is "non-recursive", thus the analysis could return either "definitely recursive" or "don't know". On 09.03.2017 09:55, Jesper Cockx wrote: > Right now, Agda considers all arguments of a constructor to be strongly > rigid, even the non-recursive ones (i.e. the ones whose type doesn't > mention the datatype). But this is not justified by the recursion > principle for the datatype: you can only recurse on arguments that are > in a recursive position. I don't know how this is enforced in Coq, but > here's how I would do it in Agda. First, you need to know for a given > constructor which of its arguments are recursive and which ones are not, > by looking at the type of the constructor. Then, when you do free > variable analysis (in Agda.TypeChecking.Free.Lazy), you only mark > variables as strongly rigid if they occur in a *recursive* argument of a > constructor. This should be enough to rule out your example (since the > argument of c isn't recursive), and I think would also solve the problem > in general. > > I'm tempted to try to implement this myself, but I probably won't do it > until next week. So if you want to try it, go ahead. > > -- Jesper > > On Thu, Mar 9, 2017 at 3:35 PM, Andreas Abel > wrote: > > Yes, that's the point. Coq has to be more careful about the > structural ordering since it supports impredicativity. (The example > is taken from Coquand 1992, Pattern matching with dependent types, > where Thierry already points out the problem.) > > Agda is build on the assumption of predicativity, thus > > c f > f args > > is ok with any constructor c, be it recursive or not. > > When you leave the safe ground of predicativity via --type-in-type, > things might go wrong in an unexpected way. > > My long term-plan is to replace the structural termination check by > type-based termination, which does not exhibit the pathological > behavior exploited here. Thus, I am not so pressed to get rid of it. > > However, if someone can point me to the analysis Coq does on its > data types for the sake of structural recursion, it may be worthwile > to think how to integrate this into Agda. > > Best, > Andreas > > On 09.03.2017 05:52, Matthieu Sozeau wrote: > > Indeed in Coq we statically compute the possible recursive calls > at the > definition of the inductive type, independently of its use. In > this case > Agda is "fooled" because it thinks that [f] is a valid subterm > (of type > [D]) of [x : D], while Coq simply doesn't categorize [f] as a > subterm > when checking the guardedness/structural recursion criterion. > > On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman > > >> wrote: > > Pardon my ignorance, but I don't understand why anyone would > accept > the definition of "empty". The datatype D is not recursive; > it's > basically of the form > > data D : Set where > c : X -> D > > for some fixed type X, which just happens to be large in > this case. > So its induction principle says that we get a map D -> Y > whenever we > have a map X -> Y. What justifies any sort of recursive call? > > > On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > > >> wrote: > > > data D : Set where > > c : (f : (A : Set) ? A ? A) ? D > > -- Structural recursion with f args < c f is no > longer valid. > > -- We should not be able to demonstrated that D is > empty. > > Coq lets us define this datatype (in Prop). > > > empty : D ? ? > > empty (c f) = empty (f D (c f)) > > But rejects this definition: > > Error: > Recursive definition of empty is ill-formed. > In environment > empty : D -> False > x : D > f : forall A : Prop, A -> A > Recursive call to empty has principal argument equal to > "f D (c f)" instead of a subterm of "x". > Recursive definition is: > "fun x : D => match x with > | c f => empty (f D (c f)) > end". > > Not sure exactly what is the rule they use to decide > whether a > recursive > call is considered as valid structural recursion. I > suspect it > depends > on the notion of a "large inductive type" or something along > these lines. > > > Stefan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From gabriel.scherer at gmail.com Thu Mar 9 16:46:56 2017 From: gabriel.scherer at gmail.com (Gabriel Scherer) Date: Thu, 9 Mar 2017 10:46:56 -0500 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Message-ID: On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > First, you need to know for a given constructor which of its > arguments are recursive and which ones are not, by looking at the type of > the constructor. Is that not too coarse-grained? It is the type occurrences within each consturctor type that are recursive or not, so I would expect different neutral terms on the same constructor variable head to be safe or not. If I had for example (pardon the non-standard syntax) c : (f : (A : Set) ? A ? { fst: A; snd: D })) ? D Matching on (c f), I would expect (fst (f T v)) to be a valid structurally recursive position, but (snd (f D (c f))) to be rejected. On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > Right now, Agda considers all arguments of a constructor to be strongly > rigid, even the non-recursive ones (i.e. the ones whose type doesn't mention > the datatype). But this is not justified by the recursion principle for the > datatype: you can only recurse on arguments that are in a recursive > position. I don't know how this is enforced in Coq, but here's how I would > do it in Agda. First, you need to know for a given constructor which of its > arguments are recursive and which ones are not, by looking at the type of > the constructor. Then, when you do free variable analysis (in > Agda.TypeChecking.Free.Lazy), you only mark variables as strongly rigid if > they occur in a *recursive* argument of a constructor. This should be enough > to rule out your example (since the argument of c isn't recursive), and I > think would also solve the problem in general. > > I'm tempted to try to implement this myself, but I probably won't do it > until next week. So if you want to try it, go ahead. > > -- Jesper > > On Thu, Mar 9, 2017 at 3:35 PM, Andreas Abel wrote: >> >> Yes, that's the point. Coq has to be more careful about the structural >> ordering since it supports impredicativity. (The example is taken from >> Coquand 1992, Pattern matching with dependent types, where Thierry already >> points out the problem.) >> >> Agda is build on the assumption of predicativity, thus >> >> c f > f args >> >> is ok with any constructor c, be it recursive or not. >> >> When you leave the safe ground of predicativity via --type-in-type, things >> might go wrong in an unexpected way. >> >> My long term-plan is to replace the structural termination check by >> type-based termination, which does not exhibit the pathological behavior >> exploited here. Thus, I am not so pressed to get rid of it. >> >> However, if someone can point me to the analysis Coq does on its data >> types for the sake of structural recursion, it may be worthwile to think how >> to integrate this into Agda. >> >> Best, >> Andreas >> >> On 09.03.2017 05:52, Matthieu Sozeau wrote: >>> >>> Indeed in Coq we statically compute the possible recursive calls at the >>> definition of the inductive type, independently of its use. In this case >>> Agda is "fooled" because it thinks that [f] is a valid subterm (of type >>> [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm >>> when checking the guardedness/structural recursion criterion. >>> >>> On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman >> > wrote: >>> >>> Pardon my ignorance, but I don't understand why anyone would accept >>> the definition of "empty". The datatype D is not recursive; it's >>> basically of the form >>> >>> data D : Set where >>> c : X -> D >>> >>> for some fixed type X, which just happens to be large in this case. >>> So its induction principle says that we get a map D -> Y whenever we >>> have a map X -> Y. What justifies any sort of recursive call? >>> >>> >>> On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier >>> > wrote: >>> >>> > data D : Set where >>> > c : (f : (A : Set) ? A ? A) ? D >>> > -- Structural recursion with f args < c f is no longer >>> valid. >>> > -- We should not be able to demonstrated that D is empty. >>> >>> Coq lets us define this datatype (in Prop). >>> >>> > empty : D ? ? >>> > empty (c f) = empty (f D (c f)) >>> >>> But rejects this definition: >>> >>> Error: >>> Recursive definition of empty is ill-formed. >>> In environment >>> empty : D -> False >>> x : D >>> f : forall A : Prop, A -> A >>> Recursive call to empty has principal argument equal to >>> "f D (c f)" instead of a subterm of "x". >>> Recursive definition is: >>> "fun x : D => match x with >>> | c f => empty (f D (c f)) >>> end". >>> >>> Not sure exactly what is the rule they use to decide whether a >>> recursive >>> call is considered as valid structural recursion. I suspect it >>> depends >>> on the notion of a "large inductive type" or something along >>> these lines. >>> >>> >>> Stefan >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> >> -- >> Andreas Abel <>< Du bist der geliebte Mensch. >> >> Department of Computer Science and Engineering >> Chalmers and Gothenburg University, Sweden >> >> andreas.abel at gu.se >> http://www.cse.chalmers.se/~abela/ >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Jesper at sikanda.be Thu Mar 9 17:24:09 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 9 Mar 2017 17:24:09 +0100 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Message-ID: Huh, you're right. I didn't know Agda accepts the definition data D : Set where c : (f : (A : Set) ? A ? A ? D) ? D but apparently it does. It also accepts data D' : Set where c : List D' ? D' in which case you're allowed to make recursive calls on any element in the list, even though the first argument of list cons is not recursive. This definitely is a harder problem than it seems at first. Now I'm also wondering how Coq computes the set of valid recursive calls. -- Jesper On Thu, Mar 9, 2017 at 4:46 PM, Gabriel Scherer wrote: > On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > > First, you need to know for a given constructor which of its > > arguments are recursive and which ones are not, by looking at the type of > > the constructor. > > Is that not too coarse-grained? It is the type occurrences within each > consturctor > type that are recursive or not, so I would expect different neutral > terms on the same > constructor variable head to be safe or not. > > If I had for example (pardon the non-standard syntax) > > c : (f : (A : Set) ? A ? { fst: A; snd: D })) ? D > > Matching on (c f), I would expect (fst (f T v)) to be a valid > structurally recursive position, > but (snd (f D (c f))) to be rejected. > > On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > > Right now, Agda considers all arguments of a constructor to be strongly > > rigid, even the non-recursive ones (i.e. the ones whose type doesn't > mention > > the datatype). But this is not justified by the recursion principle for > the > > datatype: you can only recurse on arguments that are in a recursive > > position. I don't know how this is enforced in Coq, but here's how I > would > > do it in Agda. First, you need to know for a given constructor which of > its > > arguments are recursive and which ones are not, by looking at the type of > > the constructor. Then, when you do free variable analysis (in > > Agda.TypeChecking.Free.Lazy), you only mark variables as strongly rigid > if > > they occur in a *recursive* argument of a constructor. This should be > enough > > to rule out your example (since the argument of c isn't recursive), and I > > think would also solve the problem in general. > > > > I'm tempted to try to implement this myself, but I probably won't do it > > until next week. So if you want to try it, go ahead. > > > > -- Jesper > > > > On Thu, Mar 9, 2017 at 3:35 PM, Andreas Abel wrote: > >> > >> Yes, that's the point. Coq has to be more careful about the structural > >> ordering since it supports impredicativity. (The example is taken from > >> Coquand 1992, Pattern matching with dependent types, where Thierry > already > >> points out the problem.) > >> > >> Agda is build on the assumption of predicativity, thus > >> > >> c f > f args > >> > >> is ok with any constructor c, be it recursive or not. > >> > >> When you leave the safe ground of predicativity via --type-in-type, > things > >> might go wrong in an unexpected way. > >> > >> My long term-plan is to replace the structural termination check by > >> type-based termination, which does not exhibit the pathological behavior > >> exploited here. Thus, I am not so pressed to get rid of it. > >> > >> However, if someone can point me to the analysis Coq does on its data > >> types for the sake of structural recursion, it may be worthwile to > think how > >> to integrate this into Agda. > >> > >> Best, > >> Andreas > >> > >> On 09.03.2017 05:52, Matthieu Sozeau wrote: > >>> > >>> Indeed in Coq we statically compute the possible recursive calls at the > >>> definition of the inductive type, independently of its use. In this > case > >>> Agda is "fooled" because it thinks that [f] is a valid subterm (of type > >>> [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm > >>> when checking the guardedness/structural recursion criterion. > >>> > >>> On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman >>> > wrote: > >>> > >>> Pardon my ignorance, but I don't understand why anyone would accept > >>> the definition of "empty". The datatype D is not recursive; it's > >>> basically of the form > >>> > >>> data D : Set where > >>> c : X -> D > >>> > >>> for some fixed type X, which just happens to be large in this case. > >>> So its induction principle says that we get a map D -> Y whenever > we > >>> have a map X -> Y. What justifies any sort of recursive call? > >>> > >>> > >>> On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > >>> > > wrote: > >>> > >>> > data D : Set where > >>> > c : (f : (A : Set) ? A ? A) ? D > >>> > -- Structural recursion with f args < c f is no longer > >>> valid. > >>> > -- We should not be able to demonstrated that D is empty. > >>> > >>> Coq lets us define this datatype (in Prop). > >>> > >>> > empty : D ? ? > >>> > empty (c f) = empty (f D (c f)) > >>> > >>> But rejects this definition: > >>> > >>> Error: > >>> Recursive definition of empty is ill-formed. > >>> In environment > >>> empty : D -> False > >>> x : D > >>> f : forall A : Prop, A -> A > >>> Recursive call to empty has principal argument equal to > >>> "f D (c f)" instead of a subterm of "x". > >>> Recursive definition is: > >>> "fun x : D => match x with > >>> | c f => empty (f D (c f)) > >>> end". > >>> > >>> Not sure exactly what is the rule they use to decide whether a > >>> recursive > >>> call is considered as valid structural recursion. I suspect it > >>> depends > >>> on the notion of a "large inductive type" or something along > >>> these lines. > >>> > >>> > >>> Stefan > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >> > >> > >> -- > >> Andreas Abel <>< Du bist der geliebte Mensch. > >> > >> Department of Computer Science and Engineering > >> Chalmers and Gothenburg University, Sweden > >> > >> andreas.abel at gu.se > >> http://www.cse.chalmers.se/~abela/ > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattam at mattam.org Fri Mar 10 10:25:03 2017 From: mattam at mattam.org (Matthieu Sozeau) Date: Fri, 10 Mar 2017 09:25:03 +0000 Subject: [Agda] How safe is Type:Type? In-Reply-To: References: <16c32731-574d-3ba4-23cc-4834dee3e4e6@chalmers.se> Message-ID: Hi, it is basically the analysis you describe Jesper, with a twist for nested recursion: when seeing the call to List D', we check the instantiated inductive (basically substituting the parameter in constructor types for List) for positivity and build a tree for valid recursive calls for that specific copy of List at the same time. -- Matthieu On Thu, Mar 9, 2017 at 5:24 PM Jesper Cockx wrote: > Huh, you're right. I didn't know Agda accepts the definition > > data D : Set where > c : (f : (A : Set) ? A ? A ? D) ? D > > but apparently it does. It also accepts > > data D' : Set where > c : List D' ? D' > > in which case you're allowed to make recursive calls on any element in the > list, even though the first argument of list cons is not recursive. This > definitely is a harder problem than it seems at first. Now I'm also > wondering how Coq computes the set of valid recursive calls. > > -- Jesper > > > > On Thu, Mar 9, 2017 at 4:46 PM, Gabriel Scherer > wrote: > > On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > > First, you need to know for a given constructor which of its > > arguments are recursive and which ones are not, by looking at the type of > > the constructor. > > Is that not too coarse-grained? It is the type occurrences within each > consturctor > type that are recursive or not, so I would expect different neutral > terms on the same > constructor variable head to be safe or not. > > If I had for example (pardon the non-standard syntax) > > c : (f : (A : Set) ? A ? { fst: A; snd: D })) ? D > > Matching on (c f), I would expect (fst (f T v)) to be a valid > structurally recursive position, > but (snd (f D (c f))) to be rejected. > > On Thu, Mar 9, 2017 at 9:55 AM, Jesper Cockx wrote: > > Right now, Agda considers all arguments of a constructor to be strongly > > rigid, even the non-recursive ones (i.e. the ones whose type doesn't > mention > > the datatype). But this is not justified by the recursion principle for > the > > datatype: you can only recurse on arguments that are in a recursive > > position. I don't know how this is enforced in Coq, but here's how I > would > > do it in Agda. First, you need to know for a given constructor which of > its > > arguments are recursive and which ones are not, by looking at the type of > > the constructor. Then, when you do free variable analysis (in > > Agda.TypeChecking.Free.Lazy), you only mark variables as strongly rigid > if > > they occur in a *recursive* argument of a constructor. This should be > enough > > to rule out your example (since the argument of c isn't recursive), and I > > think would also solve the problem in general. > > > > I'm tempted to try to implement this myself, but I probably won't do it > > until next week. So if you want to try it, go ahead. > > > > -- Jesper > > > > On Thu, Mar 9, 2017 at 3:35 PM, Andreas Abel wrote: > >> > >> Yes, that's the point. Coq has to be more careful about the structural > >> ordering since it supports impredicativity. (The example is taken from > >> Coquand 1992, Pattern matching with dependent types, where Thierry > already > >> points out the problem.) > >> > >> Agda is build on the assumption of predicativity, thus > >> > >> c f > f args > >> > >> is ok with any constructor c, be it recursive or not. > >> > >> When you leave the safe ground of predicativity via --type-in-type, > things > >> might go wrong in an unexpected way. > >> > >> My long term-plan is to replace the structural termination check by > >> type-based termination, which does not exhibit the pathological behavior > >> exploited here. Thus, I am not so pressed to get rid of it. > >> > >> However, if someone can point me to the analysis Coq does on its data > >> types for the sake of structural recursion, it may be worthwile to > think how > >> to integrate this into Agda. > >> > >> Best, > >> Andreas > >> > >> On 09.03.2017 05:52, Matthieu Sozeau wrote: > >>> > >>> Indeed in Coq we statically compute the possible recursive calls at the > >>> definition of the inductive type, independently of its use. In this > case > >>> Agda is "fooled" because it thinks that [f] is a valid subterm (of type > >>> [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm > >>> when checking the guardedness/structural recursion criterion. > >>> > >>> On Thu, Mar 9, 2017 at 11:37 AM Michael Shulman >>> > wrote: > >>> > >>> Pardon my ignorance, but I don't understand why anyone would accept > >>> the definition of "empty". The datatype D is not recursive; it's > >>> basically of the form > >>> > >>> data D : Set where > >>> c : X -> D > >>> > >>> for some fixed type X, which just happens to be large in this case. > >>> So its induction principle says that we get a map D -> Y whenever > we > >>> have a map X -> Y. What justifies any sort of recursive call? > >>> > >>> > >>> On Wed, Mar 8, 2017 at 2:59 PM, Stefan Monnier > >>> > > wrote: > >>> > >>> > data D : Set where > >>> > c : (f : (A : Set) ? A ? A) ? D > >>> > -- Structural recursion with f args < c f is no longer > >>> valid. > >>> > -- We should not be able to demonstrated that D is empty. > >>> > >>> Coq lets us define this datatype (in Prop). > >>> > >>> > empty : D ? ? > >>> > empty (c f) = empty (f D (c f)) > >>> > >>> But rejects this definition: > >>> > >>> Error: > >>> Recursive definition of empty is ill-formed. > >>> In environment > >>> empty : D -> False > >>> x : D > >>> f : forall A : Prop, A -> A > >>> Recursive call to empty has principal argument equal to > >>> "f D (c f)" instead of a subterm of "x". > >>> Recursive definition is: > >>> "fun x : D => match x with > >>> | c f => empty (f D (c f)) > >>> end". > >>> > >>> Not sure exactly what is the rule they use to decide whether a > >>> recursive > >>> call is considered as valid structural recursion. I suspect it > >>> depends > >>> on the notion of a "large inductive type" or something along > >>> these lines. > >>> > >>> > >>> Stefan > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >> > >> > >> -- > >> Andreas Abel <>< Du bist der geliebte Mensch. > >> > >> Department of Computer Science and Engineering > >> Chalmers and Gothenburg University, Sweden > >> > >> andreas.abel at gu.se > >> http://www.cse.chalmers.se/~abela/ > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaposi.ambrus at gmail.com Mon Mar 13 22:25:48 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Mon, 13 Mar 2017 22:25:48 +0100 Subject: [Agda] TYPES 2017 submission deadline extended Message-ID: [Submission deadline extended by a week to 20 March 2017. Consider contributing!] CALL FOR CONTRIBUTIONS 23rd International Conference on Types for Proofs and Programs, TYPES 2017 and EUTYPES Cost Action CA15123 meeting Budapest, Hungary, 29 May - 1 June 2017 http://types2017.elte.hu BACKGROUND The TYPES meetings are a forum to present new and on-going work in all aspects of type theory and its applications, especially in formalised and computer assisted reasoning and computer programming. The TYPES areas of interest include, but are not limited to: * foundations of type theory and constructive mathematics; * applications of type theory; * dependently typed programming; * industrial uses of type theory technology; * meta-theoretic studies of type systems; * proof assistants and proof technology; * automation in computer-assisted reasoning; * links between type theory and functional programming; * formalizing mathematics using type theory. We encourage talks proposing new ways of applying type theory. In the spirit of workshops, talks may be based on newly published papers, work submitted for publication, but also work in progress. FINANCIAL SUPPORT The last two days of TYPES 2017, May 31 - June 1 are supported by and organised under the auspices of EUTypes Cost Action CA15123 (https://eutypes.cs.ru.nl). On one of these days there will be an EUTypes Management Committee (MC) meeting. This means that for members of the EUTypes MC, the cost of travel and stay for these 2 days will be covered. There will likely be some funding for a limited number of other conference participants (speakers). The funding is subject to COST rules, and invitations will be sent out via the e-cost system after the 1st of May. INVITED SPEAKERS * Edwin Brady (University of St Andrews) * Sara Negri (University of Helsinki) * Jakob Rehof (TU Dortmund) CONTRIBUTED TALKS We solicit contributed talks. Selection of those will be based on extended abstracts/short papers of 2 pp formatted with easychair.cls. The submission site is https://easychair.org/conferences/?conf=types2017. Important dates: * submission of 2 pp abstract: 20 March 2017 * notified of acceptance/rejection: 17 April 2017 * camera-ready version of abstract: 8 May 2017 Camera-ready versions of the accepted contributions will be published in an informal book of abstracts for distribution at the workshop. POST-PROCEEDINGS Similarly to TYPES 2011 and TYPES 2013-2016, we intend to publish a post-proceedings volume in the Leibniz International Proceedings in Informatics (LIPIcs) series. Submission to that volume will be open for everyone. Tentative submission deadline: September 2017. PROGRAMME COMMITTEE * Andreas Abel (Chalmers University Gothenburg) * Thorsten Altenkirch (University of Nottingham) * Jos? Espirito Santo (University of Minho) * Fredrik Nordvall Forsberg (University of Strathclyde) * Silvia Ghilezan (University of Novi Sad) * Hugo Herbelin (INRIA Paris-Rocquencourt) * Martin Hofmann (Ludwig Maximilian University of Munich) * Ambrus Kaposi (E?tv?s Lor?nd University) (co-chair) * Tam?s Kozsik (E?tv?s Lor?nd University) (co-chair) * Assia Mahboubi (INRIA) * Alexandre Miquel (University of the Republic, Uruguay) * Leonardo de Moura (Microsoft Research, Redmond, USA) * Keiko Nakata (SAP, Potsdam) * Andrew Polonsky (University Paris Diderot) * Simona Ronchi Della Rocca (Universit? di Torino) * Aleksy Schubert (University of Warsaw) * Wouter Swierstra (Utrecht University) * Tarmo Uustalu (Tallinn University of Technology) TYPES STEERING COMMITTEE Marc Bezem, Herman Geuvers (chair), Hugo Herbelin, Zhaohui Luo, Ralph Matthes, Bengt Nordstr?m, Andrew Polonsky, Aleksy Schubert, Tarmo Uustalu. ABOUT TYPES The TYPES meetings from 1990 to 2008 were annual workshops of a sequence of five EU funded networking projects. From 2009 to 2015, TYPES has been run as an independent conference series. From 2016, TYPES is partially supported by COST Action EUTypes CA15123. Previous TYPES meetings were held in Antibes (1990), Edinburgh (1991), B?stad (1992), Nijmegen (1993), B?stad (1994), Torino (1995), Aussois (1996), Kloster Irsee (1998), L?keberg (1999), Durham (2000), Berg en Dal near Nijmegen (2002), Torino (2003), Jouy-en-Josas near Paris (2004), Nottingham (2006), Cividale del Friuli (2007), Torino (2008), Aussois (2009), Warsaw (2010), Bergen (2011), Toulouse (2013), Paris (2014), Tallinn (2015), Novi Sad (2016). CONTACT Email: info at types2017.elte.hu Organisers: Ambrus Kaposi, Tam?s Kozsik, Andr?s Kov?cs and the Department of Programming Languages and Compilers at the Faculty of Informatics, E?tv?s Lor?nd University, Budapest. From noam.zeilberger at gmail.com Tue Mar 14 19:59:37 2017 From: noam.zeilberger at gmail.com (Noam Zeilberger) Date: Tue, 14 Mar 2017 19:59:37 +0100 Subject: [Agda] productivity of fibonacci stream Message-ID: Hello Agda List, This might be a FAQ, but I was wondering why the canonical implementation of the stream of Fibonacci numbers using copatterns does not pass Agda's termination checker? By "canonical implementation" (cf. section 2.3 of http://www2.tcs.ifi.lmu.de/~abel/popl13.pdf), I mean the following: ==== open import Agda.Builtin.Nat public record Stream (A : Set) : Set where coinductive field hd : A tl : Stream A open Stream zipWith : {A B C : Set} ? (A ? B ? C) ? Stream A ? Stream B ? Stream C hd (zipWith f xs ys) = f (hd xs) (hd ys) tl (zipWith f xs ys) = zipWith f (tl xs) (tl ys) fib : Stream Nat hd fib = 0 hd (tl fib) = 1 tl (tl fib) = zipWith _+_ fib (tl fib) ==== which yields the following warning: ==== Termination checking failed for the following functions: fib Problematic calls: fib (at .../Fib.agda:19,27-30) tl fib (at .../Fib.agda:19,35-38) ==== Any hints as to why Agda is complaining? Noam From akr at mail.muni.cz Tue Mar 14 20:32:07 2017 From: akr at mail.muni.cz (Adam Krupicka) Date: Tue, 14 Mar 2017 20:32:07 +0100 Subject: [Agda] productivity of fibonacci stream In-Reply-To: References: Message-ID: <87d1djwt6w.fsf@mail.muni.cz> Hi, I think Agda needs help figuring out that zipWith doesn't do something silly, like throw away the first element of both lists before zipping, thus making the definitin of fib unproductive. We can ensure this by using sized types: open import Agda.Builtin.Nat public open import Size record Stream (A : Set) (i : Size) : Set where coinductive field hd : A tl : {j : Size< i} ? Stream A j open Stream zipWith : {A B C : Set} {i : Size} ? (A ? B ? C) ? Stream A i ? Stream B i ? Stream C i hd (zipWith f xs ys) = f (hd xs) (hd ys) tl (zipWith f xs ys) = zipWith f (tl xs) (tl ys) fib : ? {i} ? Stream Nat i hd fib = 0 hd (tl fib) = 1 tl (tl fib) = zipWith _+_ fib (tl fib) A.K. Noam Zeilberger writes: > Hello Agda List, > > This might be a FAQ, but I was wondering why the canonical > implementation of the stream of Fibonacci numbers using copatterns > does not pass Agda's termination checker? By "canonical > implementation" (cf. section 2.3 of > http://www2.tcs.ifi.lmu.de/~abel/popl13.pdf), I mean the following: > > ==== > open import Agda.Builtin.Nat public > > record Stream (A : Set) : Set where > coinductive > field > hd : A > tl : Stream A > open Stream > > zipWith : {A B C : Set} ? (A ? B ? C) ? Stream A ? Stream B ? Stream C > hd (zipWith f xs ys) = f (hd xs) (hd ys) > tl (zipWith f xs ys) = zipWith f (tl xs) (tl ys) > > fib : Stream Nat > hd fib = 0 > hd (tl fib) = 1 > tl (tl fib) = zipWith _+_ fib (tl fib) > ==== > > which yields the following warning: > ==== > Termination checking failed for the following functions: > fib > Problematic calls: > fib > (at .../Fib.agda:19,27-30) > tl fib > (at .../Fib.agda:19,35-38) > ==== > > Any hints as to why Agda is complaining? > > Noam > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.brunerie at gmail.com Tue Mar 14 20:34:43 2017 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 14 Mar 2017 15:34:43 -0400 Subject: [Agda] productivity of fibonacci stream In-Reply-To: References: Message-ID: Hi Noam, Here is my understanding of the situation. In order for this definition of [fib] to be productive, the function [zipWith] needs to have the special property that in order to produce one element of the output, it should only look at at most two elements of its first argument and at most at one element of its second argument. Indeed, it?s possible to have for instance a function [Stream A -> Stream A] which requires to look at ten elements of the input in order to produce only one element of the output (for instance the function returning the substream of elements with index divisible by 10). If it were the case for [zipWith] then [fib] would clearly not be productive, as it would require the second element of [tl fib] to produce the first element of [tl (tl fib)] (which are the same element). Now in your case, it happens that [zipWith] only needs one element of each of its arguments in order to produce one element of the output, so it all works out, but Agda does not understand this on its own. In order to make that pass the productivity checker, you can use sized types which are exactly a way to state things like "this function needs to look at at most one element of the input to produce one element of the output". You can probably find papers of Andreas about sized types and coinduction. Best, Guillaume On Tue, Mar 14, 2017 at 2:59 PM, Noam Zeilberger wrote: > Hello Agda List, > > This might be a FAQ, but I was wondering why the canonical > implementation of the stream of Fibonacci numbers using copatterns > does not pass Agda's termination checker? By "canonical > implementation" (cf. section 2.3 of > http://www2.tcs.ifi.lmu.de/~abel/popl13.pdf), I mean the following: > > ==== > open import Agda.Builtin.Nat public > > record Stream (A : Set) : Set where > coinductive > field > hd : A > tl : Stream A > open Stream > > zipWith : {A B C : Set} ? (A ? B ? C) ? Stream A ? Stream B ? Stream C > hd (zipWith f xs ys) = f (hd xs) (hd ys) > tl (zipWith f xs ys) = zipWith f (tl xs) (tl ys) > > fib : Stream Nat > hd fib = 0 > hd (tl fib) = 1 > tl (tl fib) = zipWith _+_ fib (tl fib) > ==== > > which yields the following warning: > ==== > Termination checking failed for the following functions: > fib > Problematic calls: > fib > (at .../Fib.agda:19,27-30) > tl fib > (at .../Fib.agda:19,35-38) > ==== > > Any hints as to why Agda is complaining? > > Noam > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noam.zeilberger at gmail.com Tue Mar 14 21:05:10 2017 From: noam.zeilberger at gmail.com (Noam Zeilberger) Date: Tue, 14 Mar 2017 21:05:10 +0100 Subject: [Agda] productivity of fibonacci stream In-Reply-To: References: Message-ID: Thank you, Guillaume, for the explanation, and thank you Adam for the example code using sized types -- both are very clear! Noam On Tue, Mar 14, 2017 at 8:34 PM, Guillaume Brunerie wrote: > Hi Noam, > > Here is my understanding of the situation. > > In order for this definition of [fib] to be productive, the function > [zipWith] needs to have the special property that in order to produce one > element of the output, it should only look at at most two elements of its > first argument and at most at one element of its second argument. > Indeed, it?s possible to have for instance a function [Stream A -> Stream A] > which requires to look at ten elements of the input in order to produce only > one element of the output (for instance the function returning the substream > of elements with index divisible by 10). If it were the case for [zipWith] > then [fib] would clearly not be productive, as it would require the second > element of [tl fib] to produce the first element of [tl (tl fib)] (which are > the same element). > > Now in your case, it happens that [zipWith] only needs one element of each > of its arguments in order to produce one element of the output, so it all > works out, but Agda does not understand this on its own. In order to make > that pass the productivity checker, you can use sized types which are > exactly a way to state things like "this function needs to look at at most > one element of the input to produce one element of the output". You can > probably find papers of Andreas about sized types and coinduction. > > Best, > Guillaume > > On Tue, Mar 14, 2017 at 2:59 PM, Noam Zeilberger > wrote: >> >> Hello Agda List, >> >> This might be a FAQ, but I was wondering why the canonical >> implementation of the stream of Fibonacci numbers using copatterns >> does not pass Agda's termination checker? By "canonical >> implementation" (cf. section 2.3 of >> http://www2.tcs.ifi.lmu.de/~abel/popl13.pdf), I mean the following: >> >> ==== >> open import Agda.Builtin.Nat public >> >> record Stream (A : Set) : Set where >> coinductive >> field >> hd : A >> tl : Stream A >> open Stream >> >> zipWith : {A B C : Set} ? (A ? B ? C) ? Stream A ? Stream B ? Stream C >> hd (zipWith f xs ys) = f (hd xs) (hd ys) >> tl (zipWith f xs ys) = zipWith f (tl xs) (tl ys) >> >> fib : Stream Nat >> hd fib = 0 >> hd (tl fib) = 1 >> tl (tl fib) = zipWith _+_ fib (tl fib) >> ==== >> >> which yields the following warning: >> ==== >> Termination checking failed for the following functions: >> fib >> Problematic calls: >> fib >> (at .../Fib.agda:19,27-30) >> tl fib >> (at .../Fib.agda:19,35-38) >> ==== >> >> Any hints as to why Agda is complaining? >> >> Noam >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > From monnier at iro.umontreal.ca Thu Mar 9 15:23:35 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Thu, 09 Mar 2017 09:23:35 -0500 Subject: [Agda] How safe is Type:Type? In-Reply-To: (Matthieu Sozeau's message of "Thu, 09 Mar 2017 10:52:25 +0000") References: Message-ID: > Indeed in Coq we statically compute the possible recursive calls at the > definition of the inductive type, independently of its use. In this case > Agda is "fooled" because it thinks that [f] is a valid subterm (of type > [D]) of [x : D], while Coq simply doesn't categorize [f] as a subterm when > checking the guardedness/structural recursion criterion. I think Agda's termination checker is based on the notion of size (where a function's size is taken extensionally, so any output of the function is of course smaller than the function itself) rather than the notion of induction. In the case of impredicativity this breaks down, since now our impredicative identity function can take itself as argument and return itself as value, so its extensional representation is not just infinite (as is common) but circular. Stefan From stvienna at gmail.com Wed Mar 22 00:07:34 2017 From: stvienna at gmail.com (stvienna wiener) Date: Wed, 22 Mar 2017 00:07:34 +0100 Subject: [Agda] Fix emacs compile hook after updating to new agda version Message-ID: Hi all, When I compile an agda file, I get the emacs error: "wrong type argument sequencep, ask". I googled it and it is quite a common error and I know at least one other agda user who has the same problem. Does anyone know a fix? Thanks and best regards, Stephan -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Wed Mar 22 09:37:21 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Wed, 22 Mar 2017 09:37:21 +0100 Subject: [Agda] Fix emacs compile hook after updating to new agda version In-Reply-To: References: Message-ID: Hi Stephan, Have you tried running `agda-mode compile`? Cheers, On 22/03/17 00:07, stvienna wiener wrote: > Hi all, > > > When I compile an agda file, I get the emacs error: > "wrong type argument sequencep, ask". > > I googled it and it is quite a common error and I know at least one > other agda user who has the same problem. > > Does anyone know a fix? > > Thanks and best regards, > Stephan > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From nad at cse.gu.se Wed Mar 22 15:53:45 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 22 Mar 2017 15:53:45 +0100 Subject: [Agda] Fix emacs compile hook after updating to new agda version In-Reply-To: References: Message-ID: On 2017-03-22 00:07, stvienna wiener wrote: > When I compile an agda file, I get the emacs error: > "wrong type argument sequencep, ask". > > I googled it and it is quite a common error and I know at least one other agda user who has the same problem. > > Does anyone know a fix? I've pushed a fix. -- /NAD From andrej.bauer at andrej.com Tue Mar 28 13:30:56 2017 From: andrej.bauer at andrej.com (Andrej Bauer) Date: Tue, 28 Mar 2017 13:30:56 +0200 Subject: [Agda] Two PhD positions in Ljubljana starting October 2017 Message-ID: We are looking for two PhD students at the Faculty of Mathematics and Physics, University of Ljubljana. The programme starts in October 2017 and lasts three years. The positions will be fully funded (subject to approval by the funding agency). The candidates should have a Master's degree in mathematics or computer science. No knowledge of Slovene is required. The first PhD student will be advised by dr. Andrej Bauer. The topic of research is foundations of type theory. The candidate should have interest in mathematical aspects of type theory, and familiarity with proof assistants is desirable. The second PhD student will be advised by dr. Matija Pretnar. The topic of research is the theory of programming languages with a focus on computational effects. The candidate should have interest in both the mathematical foundations and practical implementation of programming languages. Candidates should send their applications as soon as possible, but no later than the end of April, to Andrej Bauer or Matija Pretnar , depending on their primary interest. Please include a short CV, academic record, and a statement of interest. Andrej Bauer and Matija Pretnar From abela at chalmers.se Tue Mar 28 14:34:08 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 28 Mar 2017 14:34:08 +0200 Subject: [Agda] Maintain compatibility with ghc 7.8? Message-ID: Ubuntu 16.04 LTS has ghc-7.10, maybe we can phase out the support of ghc 7.8 as a platform to compile Agda on?! If you wish for support of 7.8 still, please raise your voice and give a reason. Best, Andreas -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From guillaume.allais at ens-lyon.org Tue Mar 28 15:27:48 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Tue, 28 Mar 2017 15:27:48 +0200 Subject: [Agda] Maintain compatibility with ghc 7.8? In-Reply-To: References: Message-ID: <7185ebba-a674-fa08-8eec-05f562633220@ens-lyon.org> Debian stable is still on 7.6 (altough backports make it possible to upgrade to 7.10): https://packages.debian.org/search?keywords=ghc&searchon=names&suite=all§ion=all On 28/03/17 14:34, Andreas Abel wrote: > Ubuntu 16.04 LTS has ghc-7.10, maybe we can phase out the support of ghc > 7.8 as a platform to compile Agda on?! > > If you wish for support of 7.8 still, please raise your voice and give a > reason. > > Best, > Andreas > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From andreas.abel at ifi.lmu.de Tue Mar 28 16:46:44 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 28 Mar 2017 16:46:44 +0200 Subject: [Agda] Maintain compatibility with ghc 7.8? In-Reply-To: References: <7185ebba-a674-fa08-8eec-05f562633220@ens-lyon.org> Message-ID: <05f8694e-e06b-6824-e42f-7537a152e55c@ifi.lmu.de> Ok, there seems to be interest in ghc 7.8 compatibility. Thanks for your feedback! --Andreas On 28.03.2017 16:17, Martin Escardo wrote: > > > On 28/03/17 14:27, G. Allais wrote: >> Debian stable is still on 7.6 (altough backports make it >> possible to upgrade to 7.10): >> >> https://packages.debian.org/search?keywords=ghc&searchon=names&suite=all§ion=all > > If it is not much trouble, I would like Agda to run in Ubuntu 14.04, for > several reasons (a machine I use for teaching needs 14.04 as some > software I need is broken in 16.04 (yes, we do teach Agda here), a > lightweight netbook I use for travelling doesn't like 16.04, and I tend > to use Agda for in-flight entertainment :-) ) > > Martin > > >> >> On 28/03/17 14:34, Andreas Abel wrote: >>> Ubuntu 16.04 LTS has ghc-7.10, maybe we can phase out the support of ghc >>> 7.8 as a platform to compile Agda on?! >>> >>> If you wish for support of 7.8 still, please raise your voice and give a >>> reason. >>> >>> Best, >>> Andreas >>> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From amal at ccs.neu.edu Wed Mar 29 03:31:49 2017 From: amal at ccs.neu.edu (Amal Ahmed) Date: Tue, 28 Mar 2017 21:31:49 -0400 Subject: [Agda] Oregon PL Summer School 2017: register by April 1 Message-ID: <1A148D7B-F454-4053-A8F2-DEBC38666495@ccs.neu.edu> *** Reminder: The OPLSS registration deadline is April 1st *** We are pleased to announce the program for the 16th annual Oregon Programming Languages Summer School (OPLSS) to be held from June 26th to July 8th, 2017 at the University of Oregon in Eugene. The registration deadline is April 1st, 2017. Full information on registration and scholarships can be found here: http://www.cs.uoregon.edu/Activities/summerschool This year's program is titled: A Spectrum of Types. The speakers and topics include: Amal Ahmed -- Correct and Secure Compilation for Multi-Language Software Northeastern University Edwin Brady -- Dependent Types in the Idris Programming Language University of St. Andrews Ron Garcia -- Gradual Typing University of British Columbia Robert Harper -- Programming Languages Background Carnegie Mellon University Neel Krishnaswami -- Dependent Types and Linearity University of Cambridge Dan Licata -- Programming Languages Background Wesleyan University Frank Pfenning -- Substructural Type Systems and Concurrent Programming Carnegie Mellon University Sam Tobin-Hochstadt -- Contracts and Gradual Types Indiana University David Van Horn -- Redex, Abstract Machines, and Abstract Interpretation University of Maryland The school has a long and successful tradition (sponsored by the NSF, ACM SIGPLAN, and industry). It covers current research in the theory and practice of programming languages. Material is presented at a tutorial level that will help graduate students and researchers from academia or industry understand the critical issues and open problems confronting the field. Prerequisites are an elementary knowledge of logic and mathematics, as covered in undergraduate classes on discrete mathematics, and some knowledge of programming languages at the level of an undergraduate survey course. A *new feature* this year is the option for students to attend a Review session from June 23rd to 25th -- the three days before the summer school officially begins. The review will cover operational semantics, type systems, and basic proof techniques, and will help graduate and especially undergraduate students who have not had a previous course in this material prepare for the main part of the school. Please contact the organizers if you have questions about whether the review will be helpful given your background. We hope you can join us for this excellent program! Amal Ahmed Dan Licata Zena Ariola -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logo-small.png Type: image/png Size: 20102 bytes Desc: not available URL: From manuel at enigmage.de Wed Mar 29 19:28:58 2017 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Wed, 29 Mar 2017 19:28:58 +0200 Subject: [Agda] Trouble with sizes Message-ID: <31067601-970c-b59d-264a-6f2836e6c5c7@enigmage.de> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Wed Mar 29 21:54:22 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 29 Mar 2017 22:54:22 +0300 Subject: [Agda] Agda options Message-ID: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I have the following notes and questions about the Agda type checking options (for Agda 2.6.0-85c6255). 1. I use the option -v profile:7 which I copy from certain old letter by Wolfram. And it reports a profiling (shown below). On the other hand, I look at the text produced by the command agda --help , and do not find there any occurrence of the word `profil'. Where the profiling option is referenced? 2. The --help list shows the options with-K, without-K. Which one is the default? I have read certain explanation about the K axiom. It says that K means uniqueness of any identity proof. Suppose that one programs f : (x y : Carrier) ? x ? y ? Carrier for any Setoid. Does with-K option mean that the type checker presumes that it holds the property (x y : Carrier) ? x ? y ? x ? y ? 3. I am trying to profile type checking on my application program. Agda type-checks many modules before coming to Foo.agda. And Foo.agda has nothing besides importing modules and opening a certain parametric module with giving it a parameter instance. First all modules before Foo.agda are type-checked. Then I command > agda $agdaLibOpt -v profile:7 +RTS -K90m -M8G -RTS Foo.agda And it reports ------------------------------------------------------------------ Loading M1 Loading M2 ... Loading FactorizationRing.FtRing (/home/mechvel/agda/tosave/bugs/tcPerf-mar28-2017/FactorizationRing/FtRing.agdai). Finished Foo. Total 143,264ms Miscellaneous 300ms Serialization 67,128ms (75,508ms) Serialization.BuildInterface 4,648ms Serialization.BinaryEncode 3,148ms Serialization.Sort 332ms Serialization.Compress 252ms Deserialization 51,819ms DeadCode 8,212ms Typing 7,296ms Scoping 64ms (84ms) Scoping.InverseScopeLookup 20ms Import 44ms ------------------------------------------------------------------- "Loading FactorizationRing.FtRing" means that this module is only being loaded but not type-checked. Right? About Foo.agda, it does not report Loading nor "checking". And I expect that the time segment between the report of "Loading FactorizationRing.FtRing" and before appearing of "Finished Foo" is the time taken by type-checking Foo.agda. Right? 3.1. The `time' command shows that this process lasts about 144 sec. So, I guess that in the line "Total 143,264ms" comma parts thousands, so that this means 143 seconds and 264 milliseconds. Right? 3.2. What is Serialization and Deserialization (in short) ? What does it mean the second number (in parentheses) in the line of Serialization? Having the above profiling, how can we derive the time spent to "Loading" ready modules before starting to type-check Foo.agda ? (I observe that it is about 50 seconds). Thanks, ------ Sergei From m.escardo at cs.bham.ac.uk Wed Mar 29 22:36:30 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Wed, 29 Mar 2017 21:36:30 +0100 Subject: [Agda] Date for PhD defense In-Reply-To: <8714070d-d59b-9e1d-b1ff-328f1d7ab755@gmail.com> References: <8714070d-d59b-9e1d-b1ff-328f1d7ab755@gmail.com> Message-ID: <102d3117-a197-073b-b3fb-e3b3a7cf4345@cs.bham.ac.uk> Dear Tarmo, I would like to attend this. Could you please confirm when you intend the PhD defense to be? Many thanks! Best, Martin On 29/03/17 21:33, Benedikt Ahrens wrote: > > Workshop on > Foundations for Practical Formalization of Mathematics > > 26 - 27 April 2017 > Nantes, France > > Meeting in the framework of the COST EUTypes Action > (https://eutypes.cs.ru.nl/) > > > # Goals of the workshop > > Proof assistants are now state of the art tools for formalizing > mathematical reasoning, both for the verification of proofs in > mathematics itself and for the verification of software and hardware in > computer science. > > The workshop aims to bring together researchers interested in > formalizing mathematics and in proof assistants based on dependent type > theory, homotopy type theory, higher inductive types and cubical type > theory, to discuss how type-based proof assistant can be used for the > practical formalization and verification of mathematical proofs. > > # Call for contributions > > We encourage talk proposals on the aforementioned topics. To propose a > talk, please send an email with title and abstract to Benedikt Ahrens > (benedikt DOT ahrens AT inria DOT fr). > > # Funding > > Funding for travel and accommodation is available. If you would like to > be considered for funding, please mention this in your talk proposal. > > # Further information > > Further information is available on https://fpfm.github.io/ . > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Wed Mar 29 22:37:36 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Wed, 29 Mar 2017 21:37:36 +0100 Subject: [Agda] Date for PhD defense In-Reply-To: <102d3117-a197-073b-b3fb-e3b3a7cf4345@cs.bham.ac.uk> References: <8714070d-d59b-9e1d-b1ff-328f1d7ab755@gmail.com> <102d3117-a197-073b-b3fb-e3b3a7cf4345@cs.bham.ac.uk> Message-ID: <14a0543f-ea61-be2d-7d2e-2ba2b8b8c617@cs.bham.ac.uk> Oh, mistake! Apologies to all involved. I deleted HoTT, but didn't notice Agda and coq-club. Embarrassing. Sorry about that. Martin On 29/03/17 21:36, Martin Escardo wrote: > Dear Tarmo, > > I would like to attend this. Could you please confirm when you intend > the PhD defense to be? > > Many thanks! > > Best, > Martin > > On 29/03/17 21:33, Benedikt Ahrens wrote: >> >> Workshop on >> Foundations for Practical Formalization of Mathematics >> >> 26 - 27 April 2017 >> Nantes, France >> >> Meeting in the framework of the COST EUTypes Action >> (https://eutypes.cs.ru.nl/) >> >> >> # Goals of the workshop >> >> Proof assistants are now state of the art tools for formalizing >> mathematical reasoning, both for the verification of proofs in >> mathematics itself and for the verification of software and hardware in >> computer science. >> >> The workshop aims to bring together researchers interested in >> formalizing mathematics and in proof assistants based on dependent type >> theory, homotopy type theory, higher inductive types and cubical type >> theory, to discuss how type-based proof assistant can be used for the >> practical formalization and verification of mathematical proofs. >> >> # Call for contributions >> >> We encourage talk proposals on the aforementioned topics. To propose a >> talk, please send an email with title and abstract to Benedikt Ahrens >> (benedikt DOT ahrens AT inria DOT fr). >> >> # Funding >> >> Funding for travel and accommodation is available. If you would like to >> be considered for funding, please mention this in your talk proposal. >> >> # Further information >> >> Further information is available on https://fpfm.github.io/ . >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From abela at chalmers.se Thu Mar 30 00:56:22 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 30 Mar 2017 00:56:22 +0200 Subject: [Agda] Trouble with sizes In-Reply-To: <31067601-970c-b59d-264a-6f2836e6c5c7@enigmage.de> References: <31067601-970c-b59d-264a-6f2836e6c5c7@enigmage.de> Message-ID: <67f29144-a1f6-91d4-0701-5abf8f488787@chalmers.se> Could be the following issue: https://github.com/agda/agda/issues/2420 On 29.03.2017 19:28, Manuel B?renz wrote: > Dear list, > > I'm trying to write some simple code using sizes. Here is something that > I don't understand: > > > open import Size public > > record Test {i : Size} : Set where > field > test : {j : Size< i} ? ? > > > Take this code and try to load it. It will show the following error: > > Sort _2 [ at /....agda:5,28-35 ] ???? Errors > ???????????????????????????????????????????????? Failed to solve the > following constraints: dLub Set (? j ? Set _2) =< Set > > > > What's going on? > > Manuel > > -- > I'm using Enigmail on Thunderbird to sign and encrypt my emails with GPG! Why not try it yourself? https://enigmail.net/ > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From benedikt.ahrens at gmail.com Wed Mar 29 22:33:42 2017 From: benedikt.ahrens at gmail.com (Benedikt Ahrens) Date: Wed, 29 Mar 2017 22:33:42 +0200 Subject: [Agda] Call for Contributions: Foundations for Practical Formalization of Mathematics Message-ID: <8714070d-d59b-9e1d-b1ff-328f1d7ab755@gmail.com> Workshop on Foundations for Practical Formalization of Mathematics 26 - 27 April 2017 Nantes, France Meeting in the framework of the COST EUTypes Action (https://eutypes.cs.ru.nl/) # Goals of the workshop Proof assistants are now state of the art tools for formalizing mathematical reasoning, both for the verification of proofs in mathematics itself and for the verification of software and hardware in computer science. The workshop aims to bring together researchers interested in formalizing mathematics and in proof assistants based on dependent type theory, homotopy type theory, higher inductive types and cubical type theory, to discuss how type-based proof assistant can be used for the practical formalization and verification of mathematical proofs. # Call for contributions We encourage talk proposals on the aforementioned topics. To propose a talk, please send an email with title and abstract to Benedikt Ahrens (benedikt DOT ahrens AT inria DOT fr). # Funding Funding for travel and accommodation is available. If you would like to be considered for funding, please mention this in your talk proposal. # Further information Further information is available on https://fpfm.github.io/ . From ulf.norell at gmail.com Thu Mar 30 09:18:08 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Thu, 30 Mar 2017 09:18:08 +0200 Subject: [Agda] Agda options In-Reply-To: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> References: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> Message-ID: On Wed, Mar 29, 2017 at 9:54 PM, Sergei Meshveliani wrote: > > 1. > I use the option -v profile:7 > > Where the profiling option is referenced? > They're not, as far as I know. You can give -v profile.modules:10 or -v profile.definitions:10 to get a breakdown of the type checking time per module or definition. There's also -v profile.interactive:10 which will time Emacs mode commands like C-c C-n. > 2. > The --help list shows the options with-K, without-K. > Which one is the default? > --with-K > I have read certain explanation about the K axiom. It says that K means > uniqueness of any identity proof. > Suppose that one programs > > f : (x y : Carrier) ? x ? y ? Carrier > > for any Setoid. Does with-K option mean that the type checker > presumes that it holds the property > > (x y : Carrier) ? x ? y ? x ? y > ? > No. Very much simplified, --without-K means you cannot pattern match a proof of x ? x against refl. > 3. > I am trying to profile type checking on my application program. > Agda type-checks many modules before coming to Foo.agda. > And Foo.agda has nothing besides importing modules and opening a > certain parametric module with giving it a parameter instance. > > First all modules before Foo.agda are type-checked. > Then I command > > > agda $agdaLibOpt -v profile:7 +RTS -K90m -M8G -RTS Foo.agda > > And it reports > > ------------------------------------------------------------------ > Loading M1 > Loading M2 > ... > Loading FactorizationRing.FtRing > (/home/mechvel/agda/tosave/bugs/tcPerf-mar28-2017/ > FactorizationRing/FtRing.agdai). > > Finished Foo. > Total 143,264ms > Miscellaneous 300ms > Serialization 67,128ms (75,508ms) > Serialization.BuildInterface 4,648ms > Serialization.BinaryEncode 3,148ms > Serialization.Sort 332ms > Serialization.Compress 252ms > Deserialization 51,819ms > DeadCode 8,212ms > Typing 7,296ms > Scoping 64ms (84ms) > Scoping.InverseScopeLookup 20ms > Import 44ms > ------------------------------------------------------------------- > > "Loading FactorizationRing.FtRing" > means that this module is only being loaded but not type-checked. > Right? > Yes. > About Foo.agda, it does not report Loading nor "checking". > And I expect that the time segment between the report of > "Loading FactorizationRing.FtRing" and before appearing of > "Finished Foo" is the time taken by type-checking Foo.agda. > Right? > Right. It does say "Checking Foo" at the top. It loads the other modules as it finds the import statements during scope checking, so there might be some scope checking time before the last "Loading", but no type checking. > 3.1. > The `time' command shows that this process lasts about 144 sec. > > So, I guess that in the line > "Total 143,264ms" > > comma parts thousands, so that this means 143 seconds and 264 > milliseconds. > Right? > Yes. > > 3.2. > What is Serialization and Deserialization (in short) ? > What does it mean the second number (in parentheses) in the line of > Serialization? > Serialization is the writing of interface files for type checked modules and Deserialization is the reading of such interface files (the 'Loading' bit). The number in parenthesis is including all subentries (Serialization.BuildInterfaces, ...). > Having the above profiling, how can we derive the time spent to > "Loading" ready modules before starting to type-check Foo.agda ? > (I observe that it is about 50 seconds). > Deserialization 51,819ms / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Thu Mar 30 09:50:00 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Thu, 30 Mar 2017 09:50:00 +0200 Subject: [Agda] Trouble with sizes In-Reply-To: <31067601-970c-b59d-264a-6f2836e6c5c7@enigmage.de> References: <31067601-970c-b59d-264a-6f2836e6c5c7@enigmage.de> Message-ID: The error message could be better, but "dLub Set (? j ? Set _2) =< Set" is trying to say that the sort computed for your pi type "{j : Size< i} ? ?" is supposed to be smaller or equal to Set. It can't know the sort of the codomain yet because you still have to fill it in, so that's what the Set _2 represents. "dLub" stands for dependent least upper bound. On Wed, Mar 29, 2017 at 7:28 PM, Manuel B?renz wrote: > Dear list, > > I'm trying to write some simple code using sizes. Here is something that I > don't understand: > > > open import Size public > > record Test {i : Size} : Set where > field > test : {j : Size< i} ? ? > > > Take this code and try to load it. It will show the following error: > > Sort _2 [ at /....agda:5,28-35 ] ???? Errors > ???????????????????????????????????????????????? Failed to solve the > following constraints: dLub Set (? j ? Set _2) =< Set > > > > What's going on? > > Manuel > > -- > I'm using Enigmail on Thunderbird to sign and encrypt my emails with GPG! > Why not try it yourself? https://enigmail.net/ > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From francois.pottier at inria.fr Thu Mar 30 10:01:32 2017 From: francois.pottier at inria.fr (=?UTF-8?Q?Fran=c3=a7ois_Pottier?=) Date: Thu, 30 Mar 2017 10:01:32 +0200 Subject: [Agda] First call for talk proposals: Higher-Order Programming with Effects, HOPE 2017 Message-ID: <60c18ba1-06bb-9553-8f0e-fe7070f01e30@inria.fr> ------------------------------------------------------------------------------ CALL FOR TALK PROPOSALS HOPE 2017 The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects September 3, 2017 Oxford, United Kingdom (the day before ICFP 2017) http://icfp17.sigplan.org/track/hope-2017-papers ------------------------------------------------------------------------------ The HOPE workshop series are intended to bring together researchers interested in the design, semantics, implementation, and verification of higher-order effectful programs. They are informal, consisting of invited talks, contributed talks on work in progress, and open-ended discussion sessions. They are dedicated to John Reynolds, whose work is an inspiration to us all. The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects will take place on Sunday, September 3, 2017, that is, the day before ICFP 2017, in Oxford, United Kingdom. # Goals of the Workshop A recurring theme in many papers at ICFP, and in the research of many ICFP attendees, is the interaction of higher-order programming with various kinds of effects: storage effects, I/O, control effects, concurrency, etc. While effects are of critical importance in many applications, they also make code harder to build, maintain, and reason about. Higher-order languages (both functional and object-oriented) provide a variety of abstraction mechanisms to help "tame" or "encapsulate" effects (e.g. monads, ADTs, ownership types, typestate, first-class events, transactions, Hoare Type Theory, session types, substructural and region-based type systems), and a number of different semantic models and verification technologies have been developed in order to codify and exploit the benefits of this encapsulation (e.g. bisimulations, step-indexed Kripke logical relations, higher-order separation logic, game semantics, various modal logics). But there remain many open problems, and the field is highly active. The goal of the HOPE workshop is to bring researchers from a variety of different backgrounds and perspectives together to exchange new and exciting ideas concerning the design, semantics, implementation, and verification of higher-order effectful programs. We want HOPE to be as informal and interactive as possible. The program will thus involve a combination of invited talks, contributed talks about work in progress, and open-ended discussion sessions. There will be no published proceedings, but participants will be invited to submit working documents, talk slides, etc., to be made available online. # Call for Talk Proposals We solicit proposals for contributed talks. We recommend preparing proposals of at most 2 pages, in either plain text or PDF format. However, we will accept longer proposals or submissions to other conferences, under the understanding that PC members are only expected to read the first two pages of such longer submissions. When submitting talk proposals, authors should specify how long a talk the speaker wishes to give. By default, contributed talks will be 30 minutes long, but proposals for shorter or longer talks will also be considered. Speakers may also submit supplementary material (e.g. a full paper, talk slides) if they desire, which PC members are free (but not expected) to read. We are interested in talks on all topics related to the interaction of higher-order programming and computational effects. Talks about work in progress are particularly encouraged. If you have any questions about the relevance of a particular topic, please contact the PC chairs, Fran?ois Pottier (francois.pottier at inria.fr) and Aleks Nanevski (aleks.nanevski at imdea.org). # Important Dates * Deadline for talk proposals: June 1st, 2017 (Thursday) * Notification of acceptance: July 1st, 2017 (Saturday) * Workshop: September 3, 2017 (Sunday) # Submission Link The submission website is https://icfp-hope17.hotcrp.com/ . # Workshop Organization Program Co-Chairs: Fran?ois Pottier (Inria Paris) Aleks Nanevski (IMDEA Software Institute) Program Committee: Edwin Brady University of St Andrews Pierre-?variste Dagand LIP6/CNRS Atsushi Igarashi Kyoto University Robbert Krebbers Delft University of Technology Vivek Nigam Federal University of Para?ba Matija Pretnar University of Ljubljana Azalea Raad Imperial College London Aseem Rastogi Microsoft Research Filip Sieczkowski University of Wroc?aw Niki Vazou University of Maryland From asr at eafit.edu.co Thu Mar 30 16:35:39 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 30 Mar 2017 09:35:39 -0500 Subject: [Agda] Agda options In-Reply-To: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> References: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> Message-ID: On 29 March 2017 at 14:54, Sergei Meshveliani wrote: > The --help list shows the options with-K, without-K. > Which one is the default? > > I have read certain explanation about the K axiom. It says that K means > uniqueness of any identity proof. See http://agda.readthedocs.io/en/latest/language/without-k.html . -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From apostolis.xekoukoulotakis at gmail.com Thu Mar 30 17:24:05 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 30 Mar 2017 18:24:05 +0300 Subject: [Agda] Many ways to open a module - Is there a reason? Message-ID: If the module is a record, we use "open Pair p" If it is a simple module "open B" if it is a parametrized module "module C = B a open C" or "open module C = B a" I find that all these different ways to open a module complicate things. I would prefer if there was a single concept and that reflected into a uniform way of opening a module. For example, every module is a record. A parametrized module is a parametrized record. And omit "Pair". Just write: "open p" or "open (p a)". -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Thu Mar 30 18:09:43 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 30 Mar 2017 18:09:43 +0200 Subject: [Agda] Agda options In-Reply-To: References: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-03-30 16:35, Andr?s Sicard-Ram?rez wrote: > See http://agda.readthedocs.io/en/latest/language/without-k.html . This documentation is outdated. There is a new implementation of --without-K now, see Eliminating dependent pattern matching without K by Cockx et al. (https://doi.org/10.1017/S0956796816000174). -- /NAD From Jesper at sikanda.be Thu Mar 30 18:20:04 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 30 Mar 2017 18:20:04 +0200 Subject: [Agda] Agda options In-Reply-To: References: <1490817262.2539.79.camel@one.mechvel.pereslavl.ru> Message-ID: Actually, that paper is outdated as well. Specifically, it now uses a new more powerful unification algorithm as described in our papers "Unifiers as Equivalences: Proof-Relevant Unification of Dependently Typed Data" ( https://lirias.kuleuven.be/handle/123456789/544210) and "Lifting Proof-Relevant Unification to Higher Dimensions" ( https://lirias.kuleuven.be/handle/123456789/556894). I didn't realize we still use the documentation of the original --without-K, I'll update it as soon as possible. -- Jesper On Thu, Mar 30, 2017 at 6:09 PM, Nils Anders Danielsson wrote: > On 2017-03-30 16:35, Andr?s Sicard-Ram?rez wrote: > >> See http://agda.readthedocs.io/en/latest/language/without-k.html . >> > > This documentation is outdated. There is a new implementation of > --without-K now, see Eliminating dependent pattern matching without K by > Cockx et al. (https://doi.org/10.1017/S0956796816000174). > > -- > /NAD > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Thu Mar 30 20:32:51 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Thu, 30 Mar 2017 20:32:51 +0200 Subject: [Agda] Many ways to open a module - Is there a reason? In-Reply-To: References: Message-ID: A module is the (not always happy) combination of a name space and a list of hypotheses (module telescope). I also wish we could open a record value r just by open r but this is not possible as "open" is a scope operation and scope checking is done /before/ type checking. However, to get the type R of r (which tells you the field names), you would need type checking. This is why you have to write open R r Note that "R r" is just application of the module R to term r. Maybe what confuses you is that for each record type there is a record module with the same name? Best, Andreas On 30.03.2017 17:24, Apostolis Xekoukoulotakis wrote: > If the module is a record, we use > > "open Pair p" > > If it is a simple module > > "open B" > > if it is a parametrized module > > "module C = B a > open C" > > or > > "open module C = B a" > > > I find that all these different ways to open a module complicate things. > I would prefer if there was a single concept and that reflected into a > uniform way of opening a module. > > For example, every module is a record. > A parametrized module is a parametrized record. > > And omit "Pair". Just write: > "open p" > > or > > "open (p a)". > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Thu Mar 30 21:11:59 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 30 Mar 2017 22:11:59 +0300 Subject: [Agda] Many ways to open a module - Is there a reason? In-Reply-To: References: Message-ID: On Thu, Mar 30, 2017 at 9:32 PM, Andreas Abel wrote: > A module is the (not always happy) combination of a name space and a list > of hypotheses (module telescope). > > I also wish we could open a record value r just by > > open r > > but this is not possible as "open" is a scope operation and scope checking > is done /before/ type checking. However, to get the type R of r (which > tells you the field names), you would need type checking. > This is a good technical reason. > This is why you have to write > > open R r > > Note that "R r" is just application of the module R to term r. > > Maybe what confuses you is that for each record type there is a record > module with the same name? > This does not have any practical significance other than showing that the way we open records derives from the general rule. One could add to the documentation , the module that is created with the record type, so as to explain that r is a term and "R r" an application. ex. "record Pair : Set where" creates the module : "module Pair (p : Pair) where" https://agda.readthedocs.io/en/v2.5.2/language/record-types.html#record-modules > > Best, > Andreas > > > On 30.03.2017 17:24, Apostolis Xekoukoulotakis wrote: > >> If the module is a record, we use >> >> "open Pair p" >> >> If it is a simple module >> >> "open B" >> >> if it is a parametrized module >> >> "module C = B a >> open C" >> >> or >> >> "open module C = B a" >> >> >> I find that all these different ways to open a module complicate things. >> I would prefer if there was a single concept and that reflected into a >> uniform way of opening a module. >> >> For example, every module is a record. >> A parametrized module is a parametrized record. >> >> And omit "Pair". Just write: >> "open p" >> >> or >> >> "open (p a)". >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Thu Mar 30 22:20:16 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 30 Mar 2017 23:20:16 +0300 Subject: [Agda] about serialization Message-ID: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> Dear Agda developers, consider the modules M1.agda and M2.agda of --------------------------------------- module M1 where open import Data.Nat using (?; _+_) module M11 (p : ?) where f : ? ? ? f x = p + x ---------------------------------------- module M2 where open import Data.Nat using (?; suc) open import M1 using (module M11) open M11 2 using (f) g : ? ? ? g x = f (suc x) ----------------------------------------- And suppose that M1 is type-checked earlier. 1) Then, how eager is the type checker in processing the definition for g ? Probably, it substitutes 2 into the body of M11, and into f, and it becomes f x = 2 + x. Then it normalizes everything, and f becomes f x = suc (suc x). Then it substitutes the obtained definition for f into the definition for g, and normalizes this to g x = suc (suc (suc x)). Right? Or may be, it delays the above operations for where g is used? 2) If we comment out the last two lines for g, then will the type checker do the above substitution into M11 and normalization for the definition of f ? Thanks, ------ Sergei From ulf.norell at gmail.com Fri Mar 31 07:24:44 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 31 Mar 2017 07:24:44 +0200 Subject: [Agda] about serialization In-Reply-To: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> Message-ID: Your code turns into (roughly) module M1 where M11.f : (p : ?) ? ? ? ? M11.f p x = p + x module M2 where f = M1.M11.f 2 g : ? ? ? g x = f (suc x) No normalisation takes place. / Ulf On Thu, Mar 30, 2017 at 10:20 PM, Sergei Meshveliani wrote: > Dear Agda developers, > > consider the modules M1.agda and M2.agda of > > --------------------------------------- > module M1 where > open import Data.Nat using (?; _+_) > > module M11 (p : ?) > where > f : ? ? ? > f x = p + x > > ---------------------------------------- > module M2 where > open import Data.Nat using (?; suc) > open import M1 using (module M11) > > open M11 2 using (f) > > g : ? ? ? > g x = f (suc x) > ----------------------------------------- > > And suppose that M1 is type-checked earlier. > > 1) Then, how eager is the type checker in processing the definition > for g ? > > Probably, it substitutes 2 into the body of M11, and into f, > and it becomes > f x = 2 + x. > > Then it normalizes everything, and f becomes f x = suc (suc x). > > Then it substitutes the obtained definition for f into the definition > for g, and normalizes this to > g x = suc (suc (suc x)). > > Right? > > Or may be, it delays the above operations for where g is used? > > 2) If we comment out the last two lines for g, > then will the type checker do the above substitution into M11 and > normalization for the definition of f ? > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpientka at cs.mcgill.ca Fri Mar 31 10:03:56 2017 From: bpientka at cs.mcgill.ca (Brigitte Pientka) Date: Fri, 31 Mar 2017 10:03:56 +0200 Subject: [Agda] PPDP 2017: Call For Papers Message-ID: <65AD0B6E-F8FD-4F94-8138-298A053B10CD@cs.mcgill.ca> ======================================================== CALL FOR PAPERS 19th International Symposium on Principles and Practice of Declarative Programming PPDP 2017 Namur, Belgium, October 9-11, 2017 (co-located with LOPSTR'17) http://complogic.cs.mcgill.ca/ppdp2017 ======================================================== SUBMISSION DEADLINE: 12 May (abstracts) / 19 MAY (papers) ======================================================== PPDP 2017 is a forum that brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics from principles to practice, from foundations to applications. Topics of interest include, but are not limited to ** Language Design: domain-specific languages; interoperability; concurrency, parallelism, and distribution; modules; probabilistic languages; reactive languages; database languages; knowledge representation languages; languages with objects; language extensions for tabulation; metaprogramming. ** Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; garbage collection; memory management. ** Foundations: type systems; type classes; dependent types; logical frameworks; monads; resource analysis; cost models; continuations; control; state; effects; semantics. ** Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. ** Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. This year the conference will be co-located with the 27th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2017). IMPORTANT DATES: Abstract Submission: 12 May 2017 Paper Submission: 19 May 2017 Paper Rebuttal: 10 July 2017 Notification: 20 July 2017 Final Version: 15 Aug 2017 SUBMISSION CATEGORIES: Submissions can be made in three categories: regular Research Papers, System Descriptions, and Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures and bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submissions of research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 6 pages. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using declarative programming * comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum * curricular issues encountered when using declarative programming in education * real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general * novel use of declarative programming in the classroom * programming pearl that illustrates a nifty new data structure or programming technique. SUBMISSION GUIDELINES: Submissions must be formatted using ACM style files (latest release December 2016) using the instructions at https://www.acm.org/publications/proceedings-template To prepare your submission using LaTex: * Download acmart.zip from https://www.ctan.org/pkg/acmart * Unzip acmart.zip * Run latex acmart.ins to produce an acmart.cls file * Run pdflatex sample-sigconf.tex to check that your installation works correctly * Write your paper using sample-sigconf.tex as a template Proofs of theoretical results that do not fit within the page limit, executables of systems, code of case studies, benchmarks used to evaluate a given system, etc., should be made available, via a reference to a website or in an appendix of the paper. Reviewers will be encouraged to consider this additional material, but are not obliged to. Submissions must be self-contained within the respective page limit; considering the additional material should not be necessary to assess the merits of a submission. At least one author of each accepted submission will be expected to attend and present their paper at the conference. Papers must be submitted via easychair. The submission site is at https://easychair.org/conferences/?conf=ppdp2017 PROCEEDING Accepted papers will be published in the ACM International Conference Proceedings Series. PROGRAM CHAIR Brigitte Pientka (McGill University) PROGRAM COMMITTEE Andreas Abel (Gothenburg University) Nadia Amin (EPFL) Zena M. Ariola (University of Oregon) Kenichi Asai (Ochanomizu University) James Cheney (University of Edinburgh) Mariangiola Dezani-Ciancaglini (University of Torino) Santiago Escobar (Universitat Polit?cnica de Val?ncia) Amy Felty (University of Ottawa) Tom Fr?hwirth (University of Ulm) Patricia Johann (Appalachian State University) Neel Krishnaswami (University of Cambridge) Michael Leuschel (Universit?t D?sseldorf) Yanhong Annie Liu (Stony Brook University) Andres Loeh (Well-Typed) Vivek Nigam (Federal University of Paraiba / fortiss) Naoki Nishida (Nagoya University) Catuscia Palamidessi (INRIA) Brigitte Pientka (McGill University) (PC Chair) Ulrich Schoepp (Ludwig Maximilian University) Chung-chieh Shan (Indiana University) Bernardo Toninho (Imperial College London) LOCAL ORGANIZER (joint with LOPSTR): Wim Vanhoff (University of Namur) ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri Mar 31 22:41:37 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 31 Mar 2017 23:41:37 +0300 Subject: [Agda] about serialization In-Reply-To: References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> Message-ID: <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> On Fri, 2017-03-31 at 07:24 +0200, Ulf Norell wrote: > Your code turns into (roughly) > module M1 where > M11.f : (p : ?) ? ? ? ? > M11.f p x = p + x > > > module M2 where > f = M1.M11.f 2 > g : ? ? ? > g x = f (suc x) > > > No normalisation takes place. My real example is of the scheme ----------------- M1.agda ----------- module M1 where open import Data.Nat using (?; _+_) module M11 (p : ?) where f : ? ? ? f x = p + x ----------------- M2.agda ----------- module M2 where open import Data.Nat using (?; suc) open import M1 using (module M11) module M11-2 = M11 2 ------------------------------------- So that M2 does almost nothing. Only in the real example M11 has certain complex definitions inside it, with p : CommutativeMonoid (represented by a dependent record). But real M2 has nothing besides importing p from a certain parametric module and declaring module M11-p = M11 p. In the above example I replace this with the line module M11-2 = M11 2. And type-checking of the real M2.agda takes 75 sec on a 3 GHz machine, and needs more than 3 Gb heap. The question is: what does it with M2.agda ? What is substituted where and what is being normalized? Thanks, ------ Sergei From kahl at cas.mcmaster.ca Sat Apr 1 04:38:08 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Fri, 31 Mar 2017 22:38:08 -0400 Subject: [Agda] about serialization In-Reply-To: <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> Message-ID: <20170401023808.GD31479@ritchie.cas.mcmaster.ca> On Fri, Mar 31, 2017 at 11:41:37PM +0300, Sergei Meshveliani wrote: > My real example is of the scheme > > [...] > So that M2 does almost nothing. > > Only in the real example M11 has certain complex definitions inside > it, with p : CommutativeMonoid (represented by a dependent record). > But real M2 has nothing besides importing p from a certain > parametric module and declaring > module M11-p = M11 p. > > In the above example I replace this with the line > > module M11-2 = M11 2. > > And type-checking of the real M2.agda takes 75 sec on a 3 GHz machine, > and needs more than 3 Gb heap. Have you tried this with Andrea Vezzosi's patch from https://github.com/agda/agda/issues/1625#issuecomment-132196576 ? Wolfram From mechvel at botik.ru Sat Apr 1 14:45:31 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 01 Apr 2017 15:45:31 +0300 Subject: [Agda] about serialization In-Reply-To: <20170401023808.GD31479@ritchie.cas.mcmaster.ca> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> Message-ID: <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> On Fri, 2017-03-31 at 22:38 -0400, Wolfram Kahl wrote: > On Fri, Mar 31, 2017 at 11:41:37PM +0300, Sergei Meshveliani wrote: > > My real example is of the scheme > > > > [...] > > So that M2 does almost nothing. > > > > Only in the real example M11 has certain complex definitions inside > > it, with p : CommutativeMonoid (represented by a dependent record). > > But real M2 has nothing besides importing p from a certain > > parametric module and declaring > > module M11-p = M11 p. > > > > In the above example I replace this with the line > > > > module M11-2 = M11 2. > > > > And type-checking of the real M2.agda takes 75 sec on a 3 GHz machine, > > and needs more than 3 Gb heap. > > Have you tried this with Andrea Vezzosi's patch from > https://github.com/agda/agda/issues/1625#issuecomment-132196576 > ? Thank you. I am going to try it. But anyway I need to understand: what generally the type checker does in the examples of this kind. Here is a simplified example. module OfSemigroup is given an arbitrary semigroup H as a parameter, and it defines certain items using H. module OfRing is given an arbitrary ring R as a parameter. It defines *-semigroup-2 -- a direct product of the multiplcative semigroup of R with itself. module M is given an arbitrary ring R as a parameter. And its only implementation is where open OfRing R using (*-semigroup-2) module OfMulSemigroup = OfSemigroup *-semigroup-2 Suppose that M1 and M2 have been type-checked earlier. When type-checking M, * what is substituted to where? * what is being normalized? * what part can be expensive? The concrete code is below. Can, please, the Agda developers comment? --------------------------------- M1.agda ------------------------ module M1 where open import Relation.Binary using (Setoid) open import Algebra using (Semigroup) open import Relation.Binary.Product.Pointwise using (_?-setoid_) module OfSemigroup {? ?=} (H : Semigroup ? ?=) where open Semigroup H using (setoid) setoid-2 : Setoid _ _ setoid-2 = setoid ?-setoid setoid ----------------------------------- M2.agda ----------------------- module M2 where open import Relation.Binary using (Rel) open import Algebra using (Semigroup; Ring) open import Algebra.Structures using (IsSemigroup) open import Algebra.FunctionProperties using (Op?) open import Data.Product using (_?_; _,_) open import Data.Nat using (?) _?-semigroup_ : ? {? ?= ? ?=} ? Semigroup ? ?= ? Semigroup ? ?= ? Semigroup _ _ H? ?-semigroup H? = record{ Carrier = C? ? C? ; _?_ = eq ; _?_ = _??_ ; isSemigroup = isSmg } where open Semigroup H? using () renaming (Carrier to C?; _?_ to _??_; _?_ to _??_) open Semigroup H? using () renaming (Carrier to C?; _?_ to _??_; _?_ to _??_) eq : Rel (C? ? C?) _ eq (x , y) (x' , y') = x ?? x' ? y ?? y' _??_ : Op? (C? ? C?) (x , y) ?? (x' , y') = (x ?? x' , y ?? y') postulate isSmg : IsSemigroup eq _??_ module OfRing {? ?=} (R : Ring ? ?=) where open Ring R using (*-semigroup) *-semigroup-2 : Semigroup _ _ *-semigroup-2 = *-semigroup ?-semigroup *-semigroup record Foo : Set ? where field fromNat : ? ? Ring.Carrier R ---------------------------------- M.agda ---------------------- open import Algebra using (Ring) open import M1 using (module OfSemigroup) open import M2 using (module OfRing) module M {? ?=} (R : Ring ? ?=) where open OfRing R using (*-semigroup-2) module OfMulSemigroup = OfSemigroup *-semigroup-2 ---------------------------------------------------------------- In the real example a) Semigroup and Ring are defined as certain nested records, b) the module OfRing does with *-semigroup something more complex than _?-semigroup_. Thanks, ------ Sergei From robby at eecs.northwestern.edu Sat Apr 1 15:34:06 2017 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat, 1 Apr 2017 08:34:06 -0500 Subject: [Agda] the Racket summer school of semantics and languages Message-ID: The Racket Summer School of Semantics and Languages Last Call Imagine yourself confronted with a Mystery Programming Language and charged with the task of figuring out its semantics. What would you do? What if you have a formal executable semantics and want to build a production language for it? If these questions intrigue you, attend the Racket Summer School: http://summer-school.racket-lang.org/2017/ This is not your run-of-the-mill summer school. We will do our best to make it exciting, entertaining, and useful to a broad spectrum of attendees, both academic and industrial. P.S. As soon as you get accepted, we will send you your first problem set. Get ready. From martin.stone.davis at gmail.com Sun Apr 2 08:12:07 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sat, 1 Apr 2017 23:12:07 -0700 Subject: [Agda] help explaining instance resolution Message-ID: <3ce42f89-4b6b-4b71-f768-d2236a16aec8@gmail.com> {- Can someone explain why test2 succeeds but test1 fails (with unsolved metas & constraints)? How does the addition of the ? isRelation ? parameter to IsSymmetric2 help? I figure it must somehow have to do with some metas getting solved, therefore allowing instance search to succeed, but beyond that I'm quite foggy. -} {-# OPTIONS --show-implicit #-} record IsSymmetric1 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) : Set where field symmetry1 : ? {x y} ? Q (F x y) (F y x) open IsSymmetric1 ? ? ? record IsRelation {A : Set} (Q : A ? A ? Set) : Set where no-eta-equality record IsSymmetric2 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) ? isRelation : IsRelation Q ? : Set where field symmetry2 : ? {x y} ? Q (F x y) (F y x) open IsSymmetric2 ? ? ? postulate B : Set G : B ? B ? B R : B ? B ? Set instance I-IsSymmetric1 : IsSymmetric1 {B} G R instance I-IsRelation : IsRelation R instance I-IsSymmetric2 : IsSymmetric2 {B} G R test1 : ? {x y} ? R (G x y) (G y x) test1 = symmetry1 -- yellow unless {F = G} or {Q = R} is specified {- _A_39 : Set [ at ?.agda:29,9-18 ] _F_40 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] _Q_41 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? Set [ at ?.agda:29,9-18 ] _r_42 : IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} {.y}) [ at ?.agda:29,9-18 ] _x_43 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] _y_44 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] _45 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] _46 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] ???? Errors ???????????????????????????????????????????????? Failed to solve the following constraints: Resolve instance argument _42 : {.x .y : B} ? IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} {.y}) Candidates I-IsSymmetric1 : IsSymmetric1 {B} G R [55] _Q_41 {.x} {.y} (_F_40 {.x} {.y} (_x_43 {.x} {.y}) (_y_44 {.x} {.y})) (_F_40 {.x} {.y} (_y_44 {.x} {.y}) (_x_43 {.x} {.y})) =< R (G .x .y) (G .y .x) : Set _45 := ? {.x} {.y} ? IsSymmetric1.symmetry1 (_r_42 {.x} {.y}) {_x_43 {.x} {.y}} {_y_44 {.x} {.y}} [blocked on problem 55] -} test2 : ? {x y} ? R (G x y) (G y x) test2 = symmetry2 From martin.stone.davis at gmail.com Mon Apr 3 09:33:31 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Mon, 3 Apr 2017 00:33:31 -0700 Subject: [Agda] help explaining instance resolution In-Reply-To: <3ce42f89-4b6b-4b71-f768-d2236a16aec8@gmail.com> References: <3ce42f89-4b6b-4b71-f768-d2236a16aec8@gmail.com> Message-ID: I realised just now that this question is probably more appropriately posted on stackoverflow, so I'll post it there (after I check to see if someone has already answered a similar question). On 04/01/2017 11:12 PM, Martin Stone Davis wrote: > {- Can someone explain why test2 succeeds but test1 fails (with > unsolved metas & constraints)? How does the addition of the ? > isRelation ? parameter to IsSymmetric2 help? I figure it must somehow > have to do with some metas getting solved, therefore allowing instance > search to succeed, but beyond that I'm quite foggy. -} > > {-# OPTIONS --show-implicit #-} > > record IsSymmetric1 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) : Set > where > field > symmetry1 : ? {x y} ? Q (F x y) (F y x) > > open IsSymmetric1 ? ? ? > > record IsRelation {A : Set} (Q : A ? A ? Set) : Set where > no-eta-equality > > record IsSymmetric2 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) ? > isRelation : IsRelation Q ? : Set where > field > symmetry2 : ? {x y} ? Q (F x y) (F y x) > > open IsSymmetric2 ? ? ? > > postulate > B : Set > G : B ? B ? B > R : B ? B ? Set > instance I-IsSymmetric1 : IsSymmetric1 {B} G R > instance I-IsRelation : IsRelation R > instance I-IsSymmetric2 : IsSymmetric2 {B} G R > > test1 : ? {x y} ? R (G x y) (G y x) > test1 = symmetry1 -- yellow unless {F = G} or {Q = R} is specified > {- > _A_39 : Set [ at ?.agda:29,9-18 ] > _F_40 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? _A_39 {.x} {.y} [ at > ?.agda:29,9-18 ] > _Q_41 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? Set [ at ?.agda:29,9-18 ] > _r_42 : IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} > {.y}) [ at ?.agda:29,9-18 ] > _x_43 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] > _y_44 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] > _45 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] > _46 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] > > ???? Errors ???????????????????????????????????????????????? > Failed to solve the following constraints: > Resolve instance argument > _42 : > {.x .y : B} ? > IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} {.y}) > Candidates I-IsSymmetric1 : IsSymmetric1 {B} G R > [55] _Q_41 {.x} {.y} > (_F_40 {.x} {.y} (_x_43 {.x} {.y}) (_y_44 {.x} {.y})) > (_F_40 {.x} {.y} (_y_44 {.x} {.y}) (_x_43 {.x} {.y})) > =< R (G .x .y) (G .y .x) > : Set > _45 := > ? {.x} {.y} ? > IsSymmetric1.symmetry1 (_r_42 {.x} {.y}) {_x_43 {.x} {.y}} > {_y_44 {.x} {.y}} > [blocked on problem 55] > -} > > test2 : ? {x y} ? R (G x y) (G y x) > test2 = symmetry2 > From Thorsten.Altenkirch at nottingham.ac.uk Mon Apr 3 15:08:53 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 3 Apr 2017 13:08:53 +0000 Subject: [Agda] pattern matching order Message-ID: Hi, I tried to define the following function by pattern matching codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) codeDouble {zero} (b , ()) codeDouble {suc n} (false , zero) = zero codeDouble {suc n} (true , zero) = suc zero codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t reduce. This can be fixed by changing the order codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) codeDouble {zero} (b , ()) codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) codeDouble {suc n} (false , zero) = zero codeDouble {suc n} (true , zero) = suc zero I guess I can answer this myself: since I first match on the boolean agda decides also to do case analysis first on the boolean and then on the Fin which duplicates my last line and has the effect that the defining equality doesn?t hold definitionally (this is always a bit agda). In this case agda could have matched my definition by changing the order. Is this too much to ask for? Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Mon Apr 3 16:21:09 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 3 Apr 2017 16:21:09 +0200 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: Hi Thorsten, this is this issue #408 https://github.com/agda/agda/issues/408 You can read there that I implemented a split strategy that would make your code work, but did not activate it, since fixes the split strategy to an extend where changing the order of clauses could not give you the other behavior. In particular, it was not backwards-compatible. Whether we should turn on the new split strategy is still undecided (since 2012). However, now you can use the --exact-split flag to let Agda alert you when your clauses do not lead to definitional equalities. Cheers, Andreas On 03.04.2017 15:08, Thorsten Altenkirch wrote: > Hi, > > I tried to define the following function by pattern matching > > codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > codeDouble {zero} (b , ()) > codeDouble {suc n} (false , zero) = zero > codeDouble {suc n} (true , zero) = suc zero > codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > > But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t > reduce. This can be fixed by changing the order > > codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > codeDouble {zero} (b , ()) > codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > codeDouble {suc n} (false , zero) = zero > codeDouble {suc n} (true , zero) = suc zero > > I guess I can answer this myself: since I first match on the boolean > agda decides also to do case analysis first on the boolean and then on > the Fin which duplicates my last line and has the effect that the > defining equality doesn?t hold definitionally (this is always a bit > agda). In this case agda could have matched my definition by changing > the order. Is this too much to ask for? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From Thorsten.Altenkirch at nottingham.ac.uk Mon Apr 3 18:21:06 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 3 Apr 2017 16:21:06 +0000 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: Thank you, Andreas. Wouldn?t it be possible to have a flag to say wether one wants the old behaviour or the new one? Cheers, Thorsten On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" wrote: >Hi Thorsten, > >this is this issue #408 > > https://github.com/agda/agda/issues/408 > >You can read there that I implemented a split strategy that would make >your code work, but did not activate it, since fixes the split strategy >to an extend where changing the order of clauses could not give you the >other behavior. In particular, it was not backwards-compatible. >Whether we should turn on the new split strategy is still undecided >(since 2012). > >However, now you can use the --exact-split flag to let Agda alert you >when your clauses do not lead to definitional equalities. > >Cheers, >Andreas > >On 03.04.2017 15:08, Thorsten Altenkirch wrote: >> Hi, >> >> I tried to define the following function by pattern matching >> >> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >> codeDouble {zero} (b , ()) >> codeDouble {suc n} (false , zero) = zero >> codeDouble {suc n} (true , zero) = suc zero >> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >> >> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t >> reduce. This can be fixed by changing the order >> >> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >> codeDouble {zero} (b , ()) >> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >> codeDouble {suc n} (false , zero) = zero >> codeDouble {suc n} (true , zero) = suc zero >> >> I guess I can answer this myself: since I first match on the boolean >> agda decides also to do case analysis first on the boolean and then on >> the Fin which duplicates my last line and has the effect that the >> defining equality doesn?t hold definitionally (this is always a bit >> agda). In this case agda could have matched my definition by changing >> the order. Is this too much to ask for? >> >> Cheers, >> Thorsten >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please send it back to me, and immediately delete it. >> >> Please do not use, copy or disclose the information contained in this >> message or in any attachment. Any views or opinions expressed by the >> author of this email do not necessarily reflect the views of the >> University of Nottingham. >> >> This message has been checked for viruses but the contents of an >> attachment may still contain software viruses which could damage your >> computer system, you are advised to perform your own checks. Email >> communications with the University of Nottingham may be monitored as >> permitted by UK legislation. >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > >-- >Andreas Abel <>< Du bist der geliebte Mensch. > >Department of Computer Science and Engineering >Chalmers and Gothenburg University, Sweden > >andreas.abel at gu.se >http://www.cse.chalmers.se/~abela/ >_______________________________________________ >Agda mailing list >Agda at lists.chalmers.se >https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From m.escardo at cs.bham.ac.uk Mon Apr 3 21:12:48 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 3 Apr 2017 20:12:48 +0100 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: On 03/04/17 17:21, Thorsten Altenkirch wrote: > Thank you, Andreas. > > Wouldn?t it be possible to have a flag to say wether one wants the old > behaviour or the new one? In any case, please, please try to not break code: some of us have spent countless hours, days, months and years producing proofs, some of which haven't been written down in research papers yet. If you have to break my proofs because they are wrong, then so be it. But please think twice if you are going to break them just to improve the language. Thanks! Best, Martin > > Cheers, > Thorsten > > On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" > wrote: > >> Hi Thorsten, >> >> this is this issue #408 >> >> https://github.com/agda/agda/issues/408 >> >> You can read there that I implemented a split strategy that would make >> your code work, but did not activate it, since fixes the split strategy >> to an extend where changing the order of clauses could not give you the >> other behavior. In particular, it was not backwards-compatible. >> Whether we should turn on the new split strategy is still undecided >> (since 2012). >> >> However, now you can use the --exact-split flag to let Agda alert you >> when your clauses do not lead to definitional equalities. >> >> Cheers, >> Andreas >> >> On 03.04.2017 15:08, Thorsten Altenkirch wrote: >>> Hi, >>> >>> I tried to define the following function by pattern matching >>> >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>> codeDouble {zero} (b , ()) >>> codeDouble {suc n} (false , zero) = zero >>> codeDouble {suc n} (true , zero) = suc zero >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>> >>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t >>> reduce. This can be fixed by changing the order >>> >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>> codeDouble {zero} (b , ()) >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>> codeDouble {suc n} (false , zero) = zero >>> codeDouble {suc n} (true , zero) = suc zero >>> >>> I guess I can answer this myself: since I first match on the boolean >>> agda decides also to do case analysis first on the boolean and then on >>> the Fin which duplicates my last line and has the effect that the >>> defining equality doesn?t hold definitionally (this is always a bit >>> agda). In this case agda could have matched my definition by changing >>> the order. Is this too much to ask for? >>> >>> Cheers, >>> Thorsten >>> >>> >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please send it back to me, and immediately delete it. >>> >>> Please do not use, copy or disclose the information contained in this >>> message or in any attachment. Any views or opinions expressed by the >>> author of this email do not necessarily reflect the views of the >>> University of Nottingham. >>> >>> This message has been checked for viruses but the contents of an >>> attachment may still contain software viruses which could damage your >>> computer system, you are advised to perform your own checks. Email >>> communications with the University of Nottingham may be monitored as >>> permitted by UK legislation. >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> >> -- >> Andreas Abel <>< Du bist der geliebte Mensch. >> >> Department of Computer Science and Engineering >> Chalmers and Gothenburg University, Sweden >> >> andreas.abel at gu.se >> http://www.cse.chalmers.se/~abela/ >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From apostolis.xekoukoulotakis at gmail.com Mon Apr 3 21:36:44 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Mon, 3 Apr 2017 22:36:44 +0300 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: Exact split is too restrictive. I think that it needs to be relaxed if it is to be used. I had to disable it. Consider this example : This is a vert common programming pattern. ``` {-# OPTIONS --exact-split #-} module test where open import Data.Nat data Test : Set where A : Test B : Test C : Test D : Test fun : Test ? ? ? ? fun A n = zero fun x n = {!!} ``` If Test has 100 constructors and all 99 are used by fun in the same way, exact split would force the programmer to write the same code for the 99 remaining constructors. Maybe we can relax the exact-split to not take this case into account. On Mon, Apr 3, 2017 at 10:12 PM, Martin Escardo wrote: > > > On 03/04/17 17:21, Thorsten Altenkirch wrote: > > Thank you, Andreas. > > > > Wouldn?t it be possible to have a flag to say wether one wants the old > > behaviour or the new one? > > In any case, please, please try to not break code: some of us have spent > countless hours, days, months and years producing proofs, some of which > haven't been written down in research papers yet. If you have to break > my proofs because they are wrong, then so be it. But please think twice > if you are going to break them just to improve the language. > > Thanks! > > Best, > Martin > > > > > > Cheers, > > Thorsten > > > > On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" > > wrote: > > > >> Hi Thorsten, > >> > >> this is this issue #408 > >> > >> https://github.com/agda/agda/issues/408 > >> > >> You can read there that I implemented a split strategy that would make > >> your code work, but did not activate it, since fixes the split strategy > >> to an extend where changing the order of clauses could not give you the > >> other behavior. In particular, it was not backwards-compatible. > >> Whether we should turn on the new split strategy is still undecided > >> (since 2012). > >> > >> However, now you can use the --exact-split flag to let Agda alert you > >> when your clauses do not lead to definitional equalities. > >> > >> Cheers, > >> Andreas > >> > >> On 03.04.2017 15:08, Thorsten Altenkirch wrote: > >>> Hi, > >>> > >>> I tried to define the following function by pattern matching > >>> > >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > >>> codeDouble {zero} (b , ()) > >>> codeDouble {suc n} (false , zero) = zero > >>> codeDouble {suc n} (true , zero) = suc zero > >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > >>> > >>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t > >>> reduce. This can be fixed by changing the order > >>> > >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > >>> codeDouble {zero} (b , ()) > >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > >>> codeDouble {suc n} (false , zero) = zero > >>> codeDouble {suc n} (true , zero) = suc zero > >>> > >>> I guess I can answer this myself: since I first match on the boolean > >>> agda decides also to do case analysis first on the boolean and then on > >>> the Fin which duplicates my last line and has the effect that the > >>> defining equality doesn?t hold definitionally (this is always a bit > >>> agda). In this case agda could have matched my definition by changing > >>> the order. Is this too much to ask for? > >>> > >>> Cheers, > >>> Thorsten > >>> > >>> > >>> > >>> This message and any attachment are intended solely for the addressee > >>> and may contain confidential information. If you have received this > >>> message in error, please send it back to me, and immediately delete it. > >>> > >>> Please do not use, copy or disclose the information contained in this > >>> message or in any attachment. Any views or opinions expressed by the > >>> author of this email do not necessarily reflect the views of the > >>> University of Nottingham. > >>> > >>> This message has been checked for viruses but the contents of an > >>> attachment may still contain software viruses which could damage your > >>> computer system, you are advised to perform your own checks. Email > >>> communications with the University of Nottingham may be monitored as > >>> permitted by UK legislation. > >>> > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >> > >> > >> -- > >> Andreas Abel <>< Du bist der geliebte Mensch. > >> > >> Department of Computer Science and Engineering > >> Chalmers and Gothenburg University, Sweden > >> > >> andreas.abel at gu.se > >> http://www.cse.chalmers.se/~abela/ > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please send it back to me, and immediately delete it. > > > > Please do not use, copy or disclose the information contained in this > > message or in any attachment. Any views or opinions expressed by the > > author of this email do not necessarily reflect the views of the > > University of Nottingham. > > > > This message has been checked for viruses but the contents of an > > attachment may still contain software viruses which could damage your > > computer system, you are advised to perform your own checks. Email > > communications with the University of Nottingham may be monitored as > > permitted by UK legislation. > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Mon Apr 3 22:31:27 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 3 Apr 2017 22:31:27 +0200 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: <0f2819f1-2f9b-3bfb-37f4-cb5aa3ff8470@chalmers.se> Yes, for this reason we have the pragma {-# CATCHALL #-}. {-# OPTIONS --exact-split #-} data Test : Set where A B C D : Test fun : Test ? Set fun A = Test {-# CATCHALL #-} fun x = {!!} On 03.04.2017 21:36, Apostolis Xekoukoulotakis wrote: > Exact split is too restrictive. I think that it needs to be relaxed if > it is to be used. I had to disable it. > > Consider this example : This is a vert common programming pattern. > > ``` > {-# OPTIONS --exact-split #-} > > module test where > > open import Data.Nat > > data Test : Set where > A : Test > B : Test > C : Test > D : Test > > > fun : Test ? ? ? ? > fun A n = zero > fun x n = {!!} > > ``` > > If Test has 100 constructors and all 99 are used by fun in the same way, > exact split would force the programmer to write the same code for the 99 > remaining constructors. > > Maybe we can relax the exact-split to not take this case into account. > > On Mon, Apr 3, 2017 at 10:12 PM, Martin Escardo > wrote: > > > > On 03/04/17 17:21, Thorsten Altenkirch wrote: > > Thank you, Andreas. > > > > Wouldn?t it be possible to have a flag to say wether one wants the old > > behaviour or the new one? > > In any case, please, please try to not break code: some of us have spent > countless hours, days, months and years producing proofs, some of which > haven't been written down in research papers yet. If you have to break > my proofs because they are wrong, then so be it. But please think twice > if you are going to break them just to improve the language. > > Thanks! > > Best, > Martin > > > > > > Cheers, > > Thorsten > > > > On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" > > on behalf of > abela at chalmers.se > wrote: > > > >> Hi Thorsten, > >> > >> this is this issue #408 > >> > >> https://github.com/agda/agda/issues/408 > > >> > >> You can read there that I implemented a split strategy that would > make > >> your code work, but did not activate it, since fixes the split > strategy > >> to an extend where changing the order of clauses could not give > you the > >> other behavior. In particular, it was not backwards-compatible. > >> Whether we should turn on the new split strategy is still undecided > >> (since 2012). > >> > >> However, now you can use the --exact-split flag to let Agda alert you > >> when your clauses do not lead to definitional equalities. > >> > >> Cheers, > >> Andreas > >> > >> On 03.04.2017 15:08, Thorsten Altenkirch wrote: > >>> Hi, > >>> > >>> I tried to define the following function by pattern matching > >>> > >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > >>> codeDouble {zero} (b , ()) > >>> codeDouble {suc n} (false , zero) = zero > >>> codeDouble {suc n} (true , zero) = suc zero > >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > >>> > >>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? > didn?t > >>> reduce. This can be fixed by changing the order > >>> > >>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) > >>> codeDouble {zero} (b , ()) > >>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) > >>> codeDouble {suc n} (false , zero) = zero > >>> codeDouble {suc n} (true , zero) = suc zero > >>> > >>> I guess I can answer this myself: since I first match on the boolean > >>> agda decides also to do case analysis first on the boolean and > then on > >>> the Fin which duplicates my last line and has the effect that the > >>> defining equality doesn?t hold definitionally (this is always a bit > >>> agda). In this case agda could have matched my definition by > changing > >>> the order. Is this too much to ask for? > >>> > >>> Cheers, > >>> Thorsten > >>> > >>> > >>> > >>> This message and any attachment are intended solely for the > addressee > >>> and may contain confidential information. If you have received this > >>> message in error, please send it back to me, and immediately > delete it. > >>> > >>> Please do not use, copy or disclose the information contained in > this > >>> message or in any attachment. Any views or opinions expressed > by the > >>> author of this email do not necessarily reflect the views of the > >>> University of Nottingham. > >>> > >>> This message has been checked for viruses but the contents of an > >>> attachment may still contain software viruses which could damage > your > >>> computer system, you are advised to perform your own checks. Email > >>> communications with the University of Nottingham may be monitored as > >>> permitted by UK legislation. > >>> > >>> > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > > >>> > >> > >> > >> -- > >> Andreas Abel <>< Du bist der geliebte Mensch. > >> > >> Department of Computer Science and Engineering > >> Chalmers and Gothenburg University, Sweden > >> > >> andreas.abel at gu.se > >> http://www.cse.chalmers.se/~abela/ > > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please send it back to me, and immediately > delete it. > > > > Please do not use, copy or disclose the information contained in this > > message or in any attachment. Any views or opinions expressed by the > > author of this email do not necessarily reflect the views of the > > University of Nottingham. > > > > This message has been checked for viruses but the contents of an > > attachment may still contain software viruses which could damage your > > computer system, you are advised to perform your own checks. Email > > communications with the University of Nottingham may be monitored as > > permitted by UK legislation. > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Mon Apr 3 22:34:49 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 3 Apr 2017 22:34:49 +0200 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: I have surely seen the affliction of my people which are in Egypt, and have heard their cry by reason of their taskmasters; for I know their sorrows. On 03.04.2017 21:12, Martin Escardo wrote: > > > On 03/04/17 17:21, Thorsten Altenkirch wrote: >> Thank you, Andreas. >> >> Wouldn?t it be possible to have a flag to say wether one wants the old >> behaviour or the new one? > > In any case, please, please try to not break code: some of us have spent > countless hours, days, months and years producing proofs, some of which > haven't been written down in research papers yet. If you have to break > my proofs because they are wrong, then so be it. But please think twice > if you are going to break them just to improve the language. > > Thanks! > > Best, > Martin > > >> >> Cheers, >> Thorsten >> >> On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" >> wrote: >> >>> Hi Thorsten, >>> >>> this is this issue #408 >>> >>> https://github.com/agda/agda/issues/408 >>> >>> You can read there that I implemented a split strategy that would make >>> your code work, but did not activate it, since fixes the split strategy >>> to an extend where changing the order of clauses could not give you the >>> other behavior. In particular, it was not backwards-compatible. >>> Whether we should turn on the new split strategy is still undecided >>> (since 2012). >>> >>> However, now you can use the --exact-split flag to let Agda alert you >>> when your clauses do not lead to definitional equalities. >>> >>> Cheers, >>> Andreas >>> >>> On 03.04.2017 15:08, Thorsten Altenkirch wrote: >>>> Hi, >>>> >>>> I tried to define the following function by pattern matching >>>> >>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>> codeDouble {zero} (b , ()) >>>> codeDouble {suc n} (false , zero) = zero >>>> codeDouble {suc n} (true , zero) = suc zero >>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>> >>>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t >>>> reduce. This can be fixed by changing the order >>>> >>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>> codeDouble {zero} (b , ()) >>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>> codeDouble {suc n} (false , zero) = zero >>>> codeDouble {suc n} (true , zero) = suc zero >>>> >>>> I guess I can answer this myself: since I first match on the boolean >>>> agda decides also to do case analysis first on the boolean and then on >>>> the Fin which duplicates my last line and has the effect that the >>>> defining equality doesn?t hold definitionally (this is always a bit >>>> agda). In this case agda could have matched my definition by changing >>>> the order. Is this too much to ask for? >>>> >>>> Cheers, >>>> Thorsten >>>> >>>> >>>> >>>> This message and any attachment are intended solely for the addressee >>>> and may contain confidential information. If you have received this >>>> message in error, please send it back to me, and immediately delete it. >>>> >>>> Please do not use, copy or disclose the information contained in this >>>> message or in any attachment. Any views or opinions expressed by the >>>> author of this email do not necessarily reflect the views of the >>>> University of Nottingham. >>>> >>>> This message has been checked for viruses but the contents of an >>>> attachment may still contain software viruses which could damage your >>>> computer system, you are advised to perform your own checks. Email >>>> communications with the University of Nottingham may be monitored as >>>> permitted by UK legislation. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> >>> >>> -- >>> Andreas Abel <>< Du bist der geliebte Mensch. >>> >>> Department of Computer Science and Engineering >>> Chalmers and Gothenburg University, Sweden >>> >>> andreas.abel at gu.se >>> http://www.cse.chalmers.se/~abela/ >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please send it back to me, and immediately delete it. >> >> Please do not use, copy or disclose the information contained in this >> message or in any attachment. Any views or opinions expressed by the >> author of this email do not necessarily reflect the views of the >> University of Nottingham. >> >> This message has been checked for viruses but the contents of an >> attachment may still contain software viruses which could damage your >> computer system, you are advised to perform your own checks. Email >> communications with the University of Nottingham may be monitored as >> permitted by UK legislation. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From m.escardo at cs.bham.ac.uk Mon Apr 3 23:12:30 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 3 Apr 2017 22:12:30 +0100 Subject: [Agda] pattern matching order In-Reply-To: References: Message-ID: <765a1ed6-d76b-c8f9-6b61-4fc24408006b@cs.bham.ac.uk> On 03/04/17 21:34, Andreas Abel wrote: > I have surely seen the affliction of my people which are in Egypt, and > have heard their cry by reason of their taskmasters; for I know their > sorrows. Absit iniuria. Abundans cautela non nocet. Martin > > On 03.04.2017 21:12, Martin Escardo wrote: >> >> >> On 03/04/17 17:21, Thorsten Altenkirch wrote: >>> Thank you, Andreas. >>> >>> Wouldn?t it be possible to have a flag to say wether one wants the old >>> behaviour or the new one? >> >> In any case, please, please try to not break code: some of us have spent >> countless hours, days, months and years producing proofs, some of which >> haven't been written down in research papers yet. If you have to break >> my proofs because they are wrong, then so be it. But please think twice >> if you are going to break them just to improve the language. >> >> Thanks! >> >> Best, >> Martin >> >> >>> >>> Cheers, >>> Thorsten >>> >>> On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" >>> wrote: >>> >>>> Hi Thorsten, >>>> >>>> this is this issue #408 >>>> >>>> https://github.com/agda/agda/issues/408 >>>> >>>> You can read there that I implemented a split strategy that would make >>>> your code work, but did not activate it, since fixes the split strategy >>>> to an extend where changing the order of clauses could not give you the >>>> other behavior. In particular, it was not backwards-compatible. >>>> Whether we should turn on the new split strategy is still undecided >>>> (since 2012). >>>> >>>> However, now you can use the --exact-split flag to let Agda alert you >>>> when your clauses do not lead to definitional equalities. >>>> >>>> Cheers, >>>> Andreas >>>> >>>> On 03.04.2017 15:08, Thorsten Altenkirch wrote: >>>>> Hi, >>>>> >>>>> I tried to define the following function by pattern matching >>>>> >>>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>>> codeDouble {zero} (b , ()) >>>>> codeDouble {suc n} (false , zero) = zero >>>>> codeDouble {suc n} (true , zero) = suc zero >>>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>>> >>>>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t >>>>> reduce. This can be fixed by changing the order >>>>> >>>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>>> codeDouble {zero} (b , ()) >>>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>>> codeDouble {suc n} (false , zero) = zero >>>>> codeDouble {suc n} (true , zero) = suc zero >>>>> >>>>> I guess I can answer this myself: since I first match on the boolean >>>>> agda decides also to do case analysis first on the boolean and then on >>>>> the Fin which duplicates my last line and has the effect that the >>>>> defining equality doesn?t hold definitionally (this is always a bit >>>>> agda). In this case agda could have matched my definition by changing >>>>> the order. Is this too much to ask for? >>>>> >>>>> Cheers, >>>>> Thorsten >>>>> >>>>> >>>>> >>>>> This message and any attachment are intended solely for the addressee >>>>> and may contain confidential information. If you have received this >>>>> message in error, please send it back to me, and immediately delete >>>>> it. >>>>> >>>>> Please do not use, copy or disclose the information contained in this >>>>> message or in any attachment. Any views or opinions expressed by the >>>>> author of this email do not necessarily reflect the views of the >>>>> University of Nottingham. >>>>> >>>>> This message has been checked for viruses but the contents of an >>>>> attachment may still contain software viruses which could damage your >>>>> computer system, you are advised to perform your own checks. Email >>>>> communications with the University of Nottingham may be monitored as >>>>> permitted by UK legislation. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>> >>>> >>>> -- >>>> Andreas Abel <>< Du bist der geliebte Mensch. >>>> >>>> Department of Computer Science and Engineering >>>> Chalmers and Gothenburg University, Sweden >>>> >>>> andreas.abel at gu.se >>>> http://www.cse.chalmers.se/~abela/ >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >>> >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please send it back to me, and immediately delete it. >>> >>> Please do not use, copy or disclose the information contained in this >>> message or in any attachment. Any views or opinions expressed by the >>> author of this email do not necessarily reflect the views of the >>> University of Nottingham. >>> >>> This message has been checked for viruses but the contents of an >>> attachment may still contain software viruses which could damage your >>> computer system, you are advised to perform your own checks. Email >>> communications with the University of Nottingham may be monitored as >>> permitted by UK legislation. >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From martin.stone.davis at gmail.com Tue Apr 4 00:04:47 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Mon, 3 Apr 2017 15:04:47 -0700 Subject: [Agda] help explaining instance resolution In-Reply-To: References: <3ce42f89-4b6b-4b71-f768-d2236a16aec8@gmail.com> Message-ID: ...which is now here . On 04/03/2017 12:33 AM, Martin Stone Davis wrote: > I realised just now that this question is probably more appropriately > posted on stackoverflow, so I'll post it there (after I check to see > if someone has already answered a similar question). > > > On 04/01/2017 11:12 PM, Martin Stone Davis wrote: >> {- Can someone explain why test2 succeeds but test1 fails (with >> unsolved metas & constraints)? How does the addition of the ? >> isRelation ? parameter to IsSymmetric2 help? I figure it must somehow >> have to do with some metas getting solved, therefore allowing >> instance search to succeed, but beyond that I'm quite foggy. -} >> >> {-# OPTIONS --show-implicit #-} >> >> record IsSymmetric1 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) : Set >> where >> field >> symmetry1 : ? {x y} ? Q (F x y) (F y x) >> >> open IsSymmetric1 ? ? ? >> >> record IsRelation {A : Set} (Q : A ? A ? Set) : Set where >> no-eta-equality >> >> record IsSymmetric2 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) ? >> isRelation : IsRelation Q ? : Set where >> field >> symmetry2 : ? {x y} ? Q (F x y) (F y x) >> >> open IsSymmetric2 ? ? ? >> >> postulate >> B : Set >> G : B ? B ? B >> R : B ? B ? Set >> instance I-IsSymmetric1 : IsSymmetric1 {B} G R >> instance I-IsRelation : IsRelation R >> instance I-IsSymmetric2 : IsSymmetric2 {B} G R >> >> test1 : ? {x y} ? R (G x y) (G y x) >> test1 = symmetry1 -- yellow unless {F = G} or {Q = R} is specified >> {- >> _A_39 : Set [ at ?.agda:29,9-18 ] >> _F_40 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? _A_39 {.x} {.y} [ at >> ?.agda:29,9-18 ] >> _Q_41 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? Set [ at ?.agda:29,9-18 ] >> _r_42 : IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} >> {.y}) [ at ?.agda:29,9-18 ] >> _x_43 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] >> _y_44 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] >> _45 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] >> _46 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] >> >> ???? Errors ???????????????????????????????????????????????? >> Failed to solve the following constraints: >> Resolve instance argument >> _42 : >> {.x .y : B} ? >> IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} {.y}) >> Candidates I-IsSymmetric1 : IsSymmetric1 {B} G R >> [55] _Q_41 {.x} {.y} >> (_F_40 {.x} {.y} (_x_43 {.x} {.y}) (_y_44 {.x} {.y})) >> (_F_40 {.x} {.y} (_y_44 {.x} {.y}) (_x_43 {.x} {.y})) >> =< R (G .x .y) (G .y .x) >> : Set >> _45 := >> ? {.x} {.y} ? >> IsSymmetric1.symmetry1 (_r_42 {.x} {.y}) {_x_43 {.x} {.y}} >> {_y_44 {.x} {.y}} >> [blocked on problem 55] >> -} >> >> test2 : ? {x y} ? R (G x y) (G y x) >> test2 = symmetry2 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Tue Apr 4 09:04:26 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 4 Apr 2017 09:04:26 +0200 Subject: [Agda] pattern matching order In-Reply-To: <765a1ed6-d76b-c8f9-6b61-4fc24408006b@cs.bham.ac.uk> References: <765a1ed6-d76b-c8f9-6b61-4fc24408006b@cs.bham.ac.uk> Message-ID: <4bdc69ea-1d60-dbff-a382-cd41b56ca0da@chalmers.se> On 03.04.2017 23:12, Martin Escardo wrote: > On 03/04/17 21:34, Andreas Abel wrote: >> I have surely seen the affliction of my people which are in Egypt, and >> have heard their cry by reason of their taskmasters; for I know their >> sorrows. > > Absit iniuria. > > Abundans cautela non nocet. ;) Got me! That already exceeded what was left of my Latin training. But I called upon the Great Database, and it delivered me from the state of ignorance. --Andreas >> On 03.04.2017 21:12, Martin Escardo wrote: >>> >>> >>> On 03/04/17 17:21, Thorsten Altenkirch wrote: >>>> Thank you, Andreas. >>>> >>>> Wouldn?t it be possible to have a flag to say wether one wants the old >>>> behaviour or the new one? >>> >>> In any case, please, please try to not break code: some of us have spent >>> countless hours, days, months and years producing proofs, some of which >>> haven't been written down in research papers yet. If you have to break >>> my proofs because they are wrong, then so be it. But please think twice >>> if you are going to break them just to improve the language. >>> >>> Thanks! >>> >>> Best, >>> Martin >>> >>> >>>> >>>> Cheers, >>>> Thorsten >>>> >>>> On 03/04/2017, 15:21, "Agda on behalf of Andreas Abel" >>>> wrote: >>>> >>>>> Hi Thorsten, >>>>> >>>>> this is this issue #408 >>>>> >>>>> https://github.com/agda/agda/issues/408 >>>>> >>>>> You can read there that I implemented a split strategy that would make >>>>> your code work, but did not activate it, since fixes the split strategy >>>>> to an extend where changing the order of clauses could not give you the >>>>> other behavior. In particular, it was not backwards-compatible. >>>>> Whether we should turn on the new split strategy is still undecided >>>>> (since 2012). >>>>> >>>>> However, now you can use the --exact-split flag to let Agda alert you >>>>> when your clauses do not lead to definitional equalities. >>>>> >>>>> Cheers, >>>>> Andreas >>>>> >>>>> On 03.04.2017 15:08, Thorsten Altenkirch wrote: >>>>>> Hi, >>>>>> >>>>>> I tried to define the following function by pattern matching >>>>>> >>>>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>>>> codeDouble {zero} (b , ()) >>>>>> codeDouble {suc n} (false , zero) = zero >>>>>> codeDouble {suc n} (true , zero) = suc zero >>>>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>>>> >>>>>> But to my confusion the term "codeDouble {suc n} (b , suc x) ? didn?t >>>>>> reduce. This can be fixed by changing the order >>>>>> >>>>>> codeDouble : ?{n : ?} ? Bool ? Fin n ? Fin (double n) >>>>>> codeDouble {zero} (b , ()) >>>>>> codeDouble {suc n} (b , suc x) = suc (suc (codeDouble (b , x)) ) >>>>>> codeDouble {suc n} (false , zero) = zero >>>>>> codeDouble {suc n} (true , zero) = suc zero >>>>>> >>>>>> I guess I can answer this myself: since I first match on the boolean >>>>>> agda decides also to do case analysis first on the boolean and then on >>>>>> the Fin which duplicates my last line and has the effect that the >>>>>> defining equality doesn?t hold definitionally (this is always a bit >>>>>> agda). In this case agda could have matched my definition by changing >>>>>> the order. Is this too much to ask for? >>>>>> >>>>>> Cheers, >>>>>> Thorsten >>>>>> >>>>>> >>>>>> >>>>>> This message and any attachment are intended solely for the addressee >>>>>> and may contain confidential information. If you have received this >>>>>> message in error, please send it back to me, and immediately delete >>>>>> it. >>>>>> >>>>>> Please do not use, copy or disclose the information contained in this >>>>>> message or in any attachment. Any views or opinions expressed by the >>>>>> author of this email do not necessarily reflect the views of the >>>>>> University of Nottingham. >>>>>> >>>>>> This message has been checked for viruses but the contents of an >>>>>> attachment may still contain software viruses which could damage your >>>>>> computer system, you are advised to perform your own checks. Email >>>>>> communications with the University of Nottingham may be monitored as >>>>>> permitted by UK legislation. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Agda mailing list >>>>>> Agda at lists.chalmers.se >>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>> >>>>> >>>>> >>>>> -- >>>>> Andreas Abel <>< Du bist der geliebte Mensch. >>>>> >>>>> Department of Computer Science and Engineering >>>>> Chalmers and Gothenburg University, Sweden >>>>> >>>>> andreas.abel at gu.se >>>>> http://www.cse.chalmers.se/~abela/ >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >>>> >>>> >>>> >>>> This message and any attachment are intended solely for the addressee >>>> and may contain confidential information. If you have received this >>>> message in error, please send it back to me, and immediately delete it. >>>> >>>> Please do not use, copy or disclose the information contained in this >>>> message or in any attachment. Any views or opinions expressed by the >>>> author of this email do not necessarily reflect the views of the >>>> University of Nottingham. >>>> >>>> This message has been checked for viruses but the contents of an >>>> attachment may still contain software viruses which could damage your >>>> computer system, you are advised to perform your own checks. Email >>>> communications with the University of Nottingham may be monitored as >>>> permitted by UK legislation. >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From ulf.norell at gmail.com Tue Apr 4 11:43:54 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 4 Apr 2017 11:43:54 +0200 Subject: [Agda] help explaining instance resolution In-Reply-To: References: <3ce42f89-4b6b-4b71-f768-d2236a16aec8@gmail.com> Message-ID: Answered here . / Ulf On Tue, Apr 4, 2017 at 12:04 AM, Martin Stone Davis < martin.stone.davis at gmail.com> wrote: > ...which is now here > > . > > On 04/03/2017 12:33 AM, Martin Stone Davis wrote: > > I realised just now that this question is probably more appropriately > posted on stackoverflow, so I'll post it there (after I check to see if > someone has already answered a similar question). > > > On 04/01/2017 11:12 PM, Martin Stone Davis wrote: > > {- Can someone explain why test2 succeeds but test1 fails (with unsolved > metas & constraints)? How does the addition of the ? isRelation ? parameter > to IsSymmetric2 help? I figure it must somehow have to do with some metas > getting solved, therefore allowing instance search to succeed, but beyond > that I'm quite foggy. -} > > {-# OPTIONS --show-implicit #-} > > record IsSymmetric1 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) : Set > where > field > symmetry1 : ? {x y} ? Q (F x y) (F y x) > > open IsSymmetric1 ? ? ? > > record IsRelation {A : Set} (Q : A ? A ? Set) : Set where > no-eta-equality > > record IsSymmetric2 {A : Set} (F : A ? A ? A) (Q : A ? A ? Set) ? > isRelation : IsRelation Q ? : Set where > field > symmetry2 : ? {x y} ? Q (F x y) (F y x) > > open IsSymmetric2 ? ? ? > > postulate > B : Set > G : B ? B ? B > R : B ? B ? Set > instance I-IsSymmetric1 : IsSymmetric1 {B} G R > instance I-IsRelation : IsRelation R > instance I-IsSymmetric2 : IsSymmetric2 {B} G R > > test1 : ? {x y} ? R (G x y) (G y x) > test1 = symmetry1 -- yellow unless {F = G} or {Q = R} is specified > {- > _A_39 : Set [ at ?.agda:29,9-18 ] > _F_40 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? _A_39 {.x} {.y} [ at > ?.agda:29,9-18 ] > _Q_41 : _A_39 {.x} {.y} ? _A_39 {.x} {.y} ? Set [ at ?.agda:29,9-18 ] > _r_42 : IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} > {.y}) [ at ?.agda:29,9-18 ] > _x_43 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] > _y_44 : _A_39 {.x} {.y} [ at ?.agda:29,9-18 ] > _45 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] > _46 : R (G .x .y) (G .y .x) [ at ?.agda:29,9-18 ] > > ???? Errors ???????????????????????????????????????????????? > Failed to solve the following constraints: > Resolve instance argument > _42 : > {.x .y : B} ? > IsSymmetric1 {_A_39 {.x} {.y}} (_F_40 {.x} {.y}) (_Q_41 {.x} {.y}) > Candidates I-IsSymmetric1 : IsSymmetric1 {B} G R > [55] _Q_41 {.x} {.y} > (_F_40 {.x} {.y} (_x_43 {.x} {.y}) (_y_44 {.x} {.y})) > (_F_40 {.x} {.y} (_y_44 {.x} {.y}) (_x_43 {.x} {.y})) > =< R (G .x .y) (G .y .x) > : Set > _45 := > ? {.x} {.y} ? > IsSymmetric1.symmetry1 (_r_42 {.x} {.y}) {_x_43 {.x} {.y}} > {_y_44 {.x} {.y}} > [blocked on problem 55] > -} > > test2 : ? {x y} ? R (G x y) (G y x) > test2 = symmetry2 > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Tue Apr 4 12:02:29 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 4 Apr 2017 12:02:29 +0200 Subject: [Agda] about serialization In-Reply-To: <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> Message-ID: On Sat, Apr 1, 2017 at 2:45 PM, Sergei Meshveliani wrote: > > But anyway I need to understand: what generally the type checker does in > the examples of this kind. > Here is a simplified example. > > module OfSemigroup is given an arbitrary semigroup H as a parameter, > and it defines certain items using H. > > module OfRing is given an arbitrary ring R as a parameter. > It defines *-semigroup-2 -- a direct product of the multiplcative > semigroup of R with itself. > > module M is given an arbitrary ring R as a parameter. > And its only implementation is > where > open OfRing R using (*-semigroup-2) > module OfMulSemigroup = OfSemigroup *-semigroup-2 > > Suppose that M1 and M2 have been type-checked earlier. > When type-checking M, > * what is substituted to where? > * what is being normalized? > * what part can be expensive? > Nothing is normalised and the only type checking that happens is to check that the given module arguments match the types expected by the module. The arguments are substituted into the types of the module definitions, but not the bodies. Nevertheless, this may create very big types that take a long time to serialise. What does the profile information tell you about where the time is spent? My money would be on serialisation. / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Apr 4 16:29:37 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 04 Apr 2017 17:29:37 +0300 Subject: [Agda] about serialization In-Reply-To: References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> Message-ID: <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> On Tue, 2017-04-04 at 12:02 +0200, Ulf Norell wrote: > On Sat, Apr 1, 2017 at 2:45 PM, Sergei Meshveliani > wrote: > > But anyway I need to understand: what generally the type > checker does in > the examples of this kind. > Here is a simplified example. > > module OfSemigroup is given an arbitrary semigroup H as a > parameter, > and it defines certain items using H. > > module OfRing is given an arbitrary ring R as a parameter. > It defines *-semigroup-2 -- a direct product of the > multiplcative > semigroup of R with itself. > > module M is given an arbitrary ring R as a parameter. > And its only implementation is > where > open OfRing R using (*-semigroup-2) > module OfMulSemigroup = OfSemigroup *-semigroup-2 > > Suppose that M1 and M2 have been type-checked earlier. > When type-checking M, > * what is substituted to where? > * what is being normalized? > * what part can be expensive? > > > Nothing is normalised and the only type checking that happens is > to check that the given module arguments match the types expected > by the module. The arguments are substituted into the types of the > module definitions, but not the bodies. Nevertheless, this may create > very big types that take a long time to serialise. What does the > profile information tell you about where the time is spent? My money > would be on serialisation. > Thank you for explanation. In the real example, it reports for -M8G and 3 GHz machine: Total 122,391ms Miscellaneous 51,607ms UFtRing0 70,784ms Serialization 49,883ms (61,239ms) Deserialization 51,303ms, where M.agda = UFtRing0.agda, the first 3 lines are of profile.modules:10, the last 2 lines are of profile:7. I am trying to understand what is happening there so that takes a great cost. Let us, so far, consider only the cost of Serialization. For the above M.agda, I have in reality quite a small source: ------------------------------------------------------------------- module UFtRing0 where open import Data.Product using (_,_) -- of application----- open import Structures3 using (UpIntegralRing; UpIntegralRing-with??) open import Structures4 using (module OverIntegralRing-0) open import Structures6 using (module OverIntegralRing-2) open import FtMonoid1 using (module OfCCMonoid-1) open import FtRing using (module OverIntegralRing-5) module UniqueFtRing-0 {? ?=} (upIR?? : UpIntegralRing-with?? ? ?=) (open OverIntegralRing-2 upIR?? using (Prime?split)) (open OverIntegralRing-5 upIR?? using (FactorizationRing)) (ftRing : FactorizationRing) (prime?split : Prime?split) where open OverIntegralRing-0 upIR?? using (_?'?_; *upCMon-NZ; *cancel-nz) module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) *cancel-nz ---------------------------------------------------------------------- The last line "module NZPack1 = ..." takes 93 % of the type check cost. This is visible when we comment out this line. It remains to see what happens when type checking this last line. OfCCMonoid-1 is defined in previous .agda file: module OfCCMonoid-1 {? ?=} (upCMon?? : UpCommutativeMonoid-with?? ? ?=) (let upCMon = proj? upCMon??) (open UpCommutativeMonoid upCMon using (setoid; _?_)) (cancel : LCancellation setoid _?_) where ... (1) So, the type checker checks that *upCMon-NZ : UpCommutativeMonoid. This has been checked earlier, in the module OverIntegralRing-0.agda, so its Serialization cost here is zero Right? (2) The type checker processes all the signatures in the module OfCCMonoid-1, with substituting there the parameter values. The main parameter value is *upCMon-NZ, (the parameters _?'?_ and *cancel-nz give a smaller cost, also they are considered similarly). *upCMon-NZ is imported from OverIntegralRing-0 as ready. This (nested record structure) is the instance of a generic structure of CommutativeMonoid for the case of the monoid of nonzero elements in the given IR : IntegralRing, for multiplication in IR. It may be a large term. And *upCMon-NZ is substituted into all signatures in OfCCMonoid-1. C = Carrier is extracted from upCMon??; the latter is replaced according to *upCMon-NZ, so that C is being replaced in with Nonzero in OfCCMonoid-1. For example, in pairValue : C ? ? ? C pairValue = uncurry _^_ the signature is replaced with pairValue : Nonzero ? ? ? Nonzero, and the second line is not touched. Right? The signature pairToAsd : C ? ? ? Associated ? ? is replaced with pairToAsd : Nonzero ? ? ? Associated-NZ ? ? Here a notion of Associated is imported by open OfAssociated upCMon?? using (Associated; ...), upCMon?? is replaced there (in a previous .agda module) with *upCMon-NZ, and Associated is replaced there with a certain Associated-NZ, and this has been done when type checking previous .agda modules. In the definition record Factorization (a : C) : Set (? ? ?=) where constructor factorization? field multiset : Multiset allPrime : All IsPrime $ msKeys multiset productEq : a ~ msValue multiset Multiset is replaced with certain Multiset-NZ, IsPrime with IsPrime-NZ, Both these values are checked and ready in previous .agda modules. OfCCMonoid-1 is so that (according to your explanation) only the above trivial substitutions are done for the values prepared and checked in previous .agda files. Only the size of terms being substituted may be large. For example, *upCMon-NZ is a structure which contains a proof for that nonzero elements Nonzero in upIR : IntegralRing form a commutative monoid for multiplication, and also implementation for several operations for Monomial. These construct and proof are simple conceptually, but take about 150 nonempty lines of the source in the module devoted to substructures (sub-semigroup, sub-monoid, etc). I do not know: how the term for this *upCMon-NZ instance is stored in the memory. In the .agdai file, it may take much size (agdai files are large). But this refers to Deserialization, right? And symbolic substitutions with this term refer to Serialization. Right? I do not know how to find: which substitution is the most expensive here. Intuitively, noone can (probably) be expensive for serialization. Because a thing there is unfolded once in the memory, and then many references are copied (?). But I do not know how Agda performs these substitutions. May be, profile.definitions:10 will help? The declaration module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) *cancel-nz leads to substituting of the parts of *upCMon-NZ into the definitions in the module OfCCMonoid-1 which is type-checked in previous .agda files. How to measure the cost of any of these substitutions? Thanks, ------ Sergei From byorgey at gmail.com Wed Apr 5 04:39:06 2017 From: byorgey at gmail.com (Brent Yorgey) Date: Wed, 05 Apr 2017 02:39:06 +0000 Subject: [Agda] CFP: Workshop on Type-driven Development (TyDe '17) Message-ID: -------------------------------------------------------------------------------- CALL FOR PAPERS 2nd Workshop on Type-Driven Development (TyDe '17) 3 September 2017, Oxford, UK http://tydeworkshop.org/2017 -------------------------------------------------------------------------------- # Goals of the workshop The workshop on Type-Driven Development aims to show how static type information may be used effectively in the development of computer programs. Co-located with ICFP, this workshop brings together leading researchers and practitioners who are using or exploring types as a means of program development. We welcome all contributions, both theoretical and practical, on a range of topics including: - dependently typed programming; - generic programming; - design and implementation of programming languages, exploiting types in novel ways; - exploiting typed data, data dependent data, or type providers; - static and dynamic analyses of typed programs; - tools, IDEs, or testing tools exploiting type information; - pearls, being elegant, instructive examples of types used in the derivation, calculation, or construction of programs. # Invited speaker Andrew Kennedy, Facebook, UK # Program Committee - Nada Amin, EPFL, Switzerland - Ana Bove, Chalmers University of Technology, Sweden - Patricia Johann, Appalachian State University, US - Yukiyoshi Kameyama, University of Tsukuba, Japan - Sam Lindley, The University of Edinburgh, UK (co-chair) - Limin Jia, CMU, US - Assia Mahboubi, INRIA Saclay, France - Liam O?Connor, University of New South Wales, Australia - Nicolas Oury, Jane Street, UK - Jennifer Paykin, University of Pennsylvania, US - Paula Severi, University of Leicester, UK - Tarmo Uustalu, Tallinn University of Technology, Estonia - Jeremy Yallop, University of Cambridge, UK - Brent Yorgey, Hendrix College, US (co-chair) # Proceedings and Copyright We plan to have formal proceedings, published by the ACM. Accepted papers will be included in the ACM Digital Library. Authors must grant ACM publication rights upon acceptance, but may retain copyright if they wish. Authors are encouraged to publish auxiliary material with their paper (source code, test data, and so forth). The proceedings will be freely available for download from the ACM Digital Library from one week before the start of the conference until two weeks after the conference. # Submission details Submissions should fall into one of two categories: - Regular research papers (12 pages) - Extended abstracts (2 pages) The bibliography will not be counted against the page limits for either category. Regular research papers are expected to present novel and interesting research results, and will be included in the formal proceedings. Extended abstracts should report work in progress that the authors would like to present at the workshop. Extended abstracts will be distributed to workshop attendees but will not be published in the formal proceedings. We welcome submissions from PC members (with the exception of the two co-chairs), but these submissions will be held to a higher standard. Submission is handled through HotCRP: https://icfp-tyde17.hotcrp.com/ All submissions should be in portable document format (PDF) and formatted using the ACM SIGPLAN style guidelines: http://www.sigplan.org/Resources/Author/ *Note* that the ACM SIGPLAN style guidelines have changed from previous years! In particular, submissions should use the new 'acmart' format and 'sigplan' subformat. Extended abstracts must be submitted with the label 'Extended abstract' clearly in the title. # Important Dates - Regular paper deadline: Wednesday, 24th May, 2017 - Extended abstract deadline: Wednesday, 7th June, 2017 - Author notification: Wednesday, 28th June, 2017 - Deadline for camera ready version: Saturday, 15th July, 2017 - Workshop: Sunday, 3rd September, 2017 # Travel Support Student attendees with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC program, see its web page: http://www.sigplan.org/PAC/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Wed Apr 5 09:10:13 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Wed, 5 Apr 2017 09:10:13 +0200 Subject: [Agda] 2nd call for papers: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury Message-ID: <473e3e5d-7155-5532-7291-78ecc69f5590@cs.ru.nl> ----------------------------- C A L L F O R P A P E R S ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == INVITED SPEAKERS == Conor McBride University of Strathclyde (UK) C?t?lin Hri?cu INRIA Paris (FR) == IMPORTANT DATES == Submission of draft papers: 5 May, 2017 Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == Co-Chairs Meng Wang University of Kent (UK) Scott Owens University of Kent (UK) PC Jeremy Yallop University of Cambridge (UK) Nicolas Wu University of Bristol (UK) Laura Castro University of A Coru?a (ES) Gabriel Scherer Northeastern University (US) Edwin Brady University of St Andrews (UK) Janis Voigtl?nder Radboud University Nijmegen (NL) Peter Achten Radboud University Nijmegen (NL) Tom Schrijvers KU Leuven (BE) Matthew Fluet Rochester Institute of Technology (US) Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario (AG) Patricia Johann Appalachian State University (US) Bruno Oliveira The University of Hong Kong (HK) Rita Loogen Philipps-Universit?t Marburg (GE) David Van Horn University of Marylan (US) Soichiro Hidaka Hosei University (JP) Micha? Pa?ka Chalmers University of Technology (SE) Sandrine Blazy University of Rennes 1 - IRISA (FR) From ulf.norell at gmail.com Wed Apr 5 10:43:22 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 5 Apr 2017 10:43:22 +0200 Subject: [Agda] about serialization In-Reply-To: <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> Message-ID: As you noticed from the profiling information almost all time is spent on serialisation and deserialisation. Given that you mostly have module application this likely means that your types are very big. You can inspect the types of everything in a module with the command C-c C-o. If you first turn on showing implicit arguments (C-c C-x C-h) you should be able to spot the problematic types. Note that deserialisation also takes a lot of time, i.e. loading the already checked modules is expensive, so your problems are not restricted to M.agda. / Ulf On Tue, Apr 4, 2017 at 4:29 PM, Sergei Meshveliani wrote: > On Tue, 2017-04-04 at 12:02 +0200, Ulf Norell wrote: > > On Sat, Apr 1, 2017 at 2:45 PM, Sergei Meshveliani > > wrote: > > > > But anyway I need to understand: what generally the type > > checker does in > > the examples of this kind. > > Here is a simplified example. > > > > module OfSemigroup is given an arbitrary semigroup H as a > > parameter, > > and it defines certain items using H. > > > > module OfRing is given an arbitrary ring R as a parameter. > > It defines *-semigroup-2 -- a direct product of the > > multiplcative > > semigroup of R with itself. > > > > module M is given an arbitrary ring R as a parameter. > > And its only implementation is > > where > > open OfRing R using (*-semigroup-2) > > module OfMulSemigroup = OfSemigroup *-semigroup-2 > > > > Suppose that M1 and M2 have been type-checked earlier. > > When type-checking M, > > * what is substituted to where? > > * what is being normalized? > > * what part can be expensive? > > > > > > Nothing is normalised and the only type checking that happens is > > to check that the given module arguments match the types expected > > by the module. The arguments are substituted into the types of the > > module definitions, but not the bodies. Nevertheless, this may create > > very big types that take a long time to serialise. What does the > > profile information tell you about where the time is spent? My money > > would be on serialisation. > > > > Thank you for explanation. > > In the real example, it reports for -M8G and 3 GHz machine: > > Total 122,391ms > Miscellaneous 51,607ms > UFtRing0 70,784ms > > Serialization 49,883ms (61,239ms) > Deserialization 51,303ms, > > where M.agda = UFtRing0.agda, > the first 3 lines are of profile.modules:10, > the last 2 lines are of profile:7. > > I am trying to understand what is happening there so that takes a great > cost. > Let us, so far, consider only the cost of Serialization. > > For the above M.agda, I have in reality quite a small source: > > ------------------------------------------------------------------- > module UFtRing0 where > open import Data.Product using (_,_) > > -- of application----- > open import Structures3 using (UpIntegralRing; UpIntegralRing-with??) > open import Structures4 using (module OverIntegralRing-0) > open import Structures6 using (module OverIntegralRing-2) > open import FtMonoid1 using (module OfCCMonoid-1) > open import FtRing using (module OverIntegralRing-5) > > module UniqueFtRing-0 {? ?=} > (upIR?? : UpIntegralRing-with?? ? ?=) > (open OverIntegralRing-2 upIR?? using (Prime?split)) > (open OverIntegralRing-5 upIR?? using (FactorizationRing)) > (ftRing : FactorizationRing) > (prime?split : Prime?split) > where > open OverIntegralRing-0 upIR?? using (_?'?_; *upCMon-NZ; *cancel-nz) > > module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) *cancel-nz > ---------------------------------------------------------------------- > > The last line "module NZPack1 = ..." > takes 93 % of the type check cost. This is visible when we comment out > this line. > > It remains to see what happens when type checking this last line. > > OfCCMonoid-1 is defined in previous .agda file: > > module OfCCMonoid-1 {? ?=} > (upCMon?? : UpCommutativeMonoid-with?? ? ?=) > (let upCMon = proj? upCMon??) > (open UpCommutativeMonoid upCMon using (setoid; _?_)) > (cancel : LCancellation setoid _?_) > where ... > > > (1) So, the type checker checks that *upCMon-NZ : UpCommutativeMonoid. > This has been checked earlier, in the module OverIntegralRing-0.agda, > so its Serialization cost here is zero > Right? > > (2) The type checker processes all the signatures in the module > OfCCMonoid-1, with substituting there the parameter values. > > The main parameter value is *upCMon-NZ, > (the parameters _?'?_ and *cancel-nz give a smaller cost, also they > are considered similarly). > > *upCMon-NZ is imported from OverIntegralRing-0 as ready. > This (nested record structure) is the instance of a generic structure of > CommutativeMonoid for the case of the monoid of nonzero elements in the > given IR : IntegralRing, for multiplication in IR. It may be a large > term. > > And *upCMon-NZ is substituted into all signatures in OfCCMonoid-1. > C = Carrier is extracted from upCMon??; the latter is replaced > according to *upCMon-NZ, so that C is being replaced in with > Nonzero in OfCCMonoid-1. > > For example, in > pairValue : C ? ? ? C > pairValue = uncurry _^_ > > the signature is replaced with > pairValue : Nonzero ? ? ? Nonzero, > > and the second line is not touched. > Right? > > The signature > pairToAsd : C ? ? ? Associated ? ? > > is replaced with > pairToAsd : Nonzero ? ? ? Associated-NZ ? ? > > Here a notion of Associated is imported by > open OfAssociated upCMon?? using (Associated; ...), > > upCMon?? is replaced there (in a previous .agda module) with *upCMon-NZ, > and Associated is replaced there with a certain Associated-NZ, > and this has been done when type checking previous .agda modules. > > In the definition > > record Factorization (a : C) : Set (? ? ?=) > where > constructor factorization? > > field multiset : Multiset > allPrime : All IsPrime $ msKeys multiset > productEq : a ~ msValue multiset > > Multiset is replaced with certain Multiset-NZ, > IsPrime with IsPrime-NZ, > Both these values are checked and ready in previous .agda modules. > > OfCCMonoid-1 is so that (according to your explanation) only the above > trivial substitutions are done for the values prepared and checked in > previous .agda files. > > Only the size of terms being substituted may be large. > For example, *upCMon-NZ is a structure which contains a proof for that > nonzero elements Nonzero in upIR : IntegralRing form a commutative > monoid for multiplication, and also implementation for several > operations for Monomial. > > These construct and proof are simple conceptually, but take > about 150 nonempty lines of the source in the module devoted to > substructures (sub-semigroup, sub-monoid, etc). > I do not know: how the term for this *upCMon-NZ instance is stored in > the memory. > In the .agdai file, it may take much size (agdai files are large). > But this refers to Deserialization, right? > And symbolic substitutions with this term refer to Serialization. > Right? > I do not know how to find: > which substitution is the most expensive here. > > Intuitively, noone can (probably) be expensive for serialization. > Because a thing there is unfolded once in the memory, and then many > references are copied (?). > But I do not know how Agda performs these substitutions. > May be, > profile.definitions:10 > will help? > The declaration > module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) *cancel-nz > > leads to substituting of the parts of *upCMon-NZ into the definitions in > the module OfCCMonoid-1 which is type-checked in previous .agda files. > How to measure the cost of any of these substitutions? > > Thanks, > > ------ > Sergei > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Apr 5 15:35:50 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 05 Apr 2017 16:35:50 +0300 Subject: [Agda] about serialization In-Reply-To: References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> Message-ID: <1491399350.11306.23.camel@scico.botik.ru> Ulf, thank you for explanation. On Wed, 2017-04-05 at 10:43 +0200, Ulf Norell wrote: > [..] > > Note that deserialisation also takes a lot of time, i.e. loading the > already checked modules is expensive, so your problems are not > restricted to M.agda. For the current state of my DoCon-A project, loading modules checked earlier does not present a bottleneck. Because this small example is reduced, and real expensive examples need > 12 Gb, and loading takes may be 5% of the total cost. > As you noticed from the profiling information almost all time is spent > on > serialisation and deserialisation. Given that you mostly have module > application this likely means that your types are very big. You can > inspect the types of everything in a module with the command C-c C-o. > If you first turn on showing implicit arguments (C-c C-x C-h) you > should be able to spot the problematic types. > This is interesting. For example, OfCCMonoid-1 has pairValue : C ? ? ? C pairValue = uncurry _^_ And I set f = FtMonoid1.pairValue to the head module M. And I command C-c C-x C-h, C-c C-o M.f to see the type obtained by substitution of the parts of the *upCMon-NZ parameter into OfCCMonoid-1.pairValue This type can be defined as -------------------------------------------------------- (let C = .Relation.Binary.DecSetoid.Carrier (.Structures0.UpDSet.decSetoid (.Structures0.UpMagma.upDSet (.Structures0a.UpSemigroup.upMagma (.Structures1.UpMonoid.upSemigroup (.Structures1.UpCommutativeMonoid.upMonoid (OverIntegralRing-0.*upCMon-NZ {?} {?=} upIR??))))) ) in {? ?= : .Agda.Primitive.Level} (upIR?? : UpIntegralRing-with?? ? ?=) ? Data.Product._?_ {? .Agda.Primitive.? ?=} {.Agda.Primitive.lzero} C .Agda.Builtin.Nat.Nat ? C ) ------------------------------------------------------- But in the report the expression of C is printed twice. How the checker stores it internally? There are probably more complex items in OfCCMonoid-1, and if things are really copied this way, this indeed may lead to a great cost. Regards, ------ Sergei > / Ulf > > On Tue, Apr 4, 2017 at 4:29 PM, Sergei Meshveliani > wrote: > On Tue, 2017-04-04 at 12:02 +0200, Ulf Norell wrote: > > On Sat, Apr 1, 2017 at 2:45 PM, Sergei Meshveliani > > > wrote: > > > > But anyway I need to understand: what generally the > type > > checker does in > > the examples of this kind. > > Here is a simplified example. > > > > module OfSemigroup is given an arbitrary semigroup > H as a > > parameter, > > and it defines certain items using H. > > > > module OfRing is given an arbitrary ring R as a > parameter. > > It defines *-semigroup-2 -- a direct product of > the > > multiplcative > > semigroup of R with itself. > > > > module M is given an arbitrary ring R as a > parameter. > > And its only implementation is > > where > > open OfRing R using (*-semigroup-2) > > module OfMulSemigroup = OfSemigroup > *-semigroup-2 > > > > Suppose that M1 and M2 have been type-checked > earlier. > > When type-checking M, > > * what is substituted to where? > > * what is being normalized? > > * what part can be expensive? > > > > > > Nothing is normalised and the only type checking that > happens is > > to check that the given module arguments match the types > expected > > by the module. The arguments are substituted into the types > of the > > module definitions, but not the bodies. Nevertheless, this > may create > > very big types that take a long time to serialise. What does > the > > profile information tell you about where the time is spent? > My money > > would be on serialisation. > > > > > Thank you for explanation. > > In the real example, it reports for -M8G and 3 GHz machine: > > Total 122,391ms > Miscellaneous 51,607ms > UFtRing0 70,784ms > > Serialization 49,883ms (61,239ms) > Deserialization 51,303ms, > > where M.agda = UFtRing0.agda, > the first 3 lines are of profile.modules:10, > the last 2 lines are of profile:7. > > I am trying to understand what is happening there so that > takes a great > cost. > Let us, so far, consider only the cost of Serialization. > > For the above M.agda, I have in reality quite a small source: > > ------------------------------------------------------------------- > module UFtRing0 where > open import Data.Product using (_,_) > > -- of application----- > open import Structures3 using (UpIntegralRing; > UpIntegralRing-with??) > open import Structures4 using (module OverIntegralRing-0) > open import Structures6 using (module OverIntegralRing-2) > open import FtMonoid1 using (module OfCCMonoid-1) > open import FtRing using (module OverIntegralRing-5) > > module UniqueFtRing-0 {? ?=} > (upIR?? : UpIntegralRing-with?? ? ?=) > (open OverIntegralRing-2 upIR?? using > (Prime?split)) > (open OverIntegralRing-5 upIR?? using > (FactorizationRing)) > (ftRing : FactorizationRing) > (prime?split : Prime?split) > where > open OverIntegralRing-0 upIR?? using (_?'?_; *upCMon-NZ; > *cancel-nz) > > module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) > *cancel-nz > ---------------------------------------------------------------------- > > The last line "module NZPack1 = ..." > takes 93 % of the type check cost. This is visible when we > comment out > this line. > > It remains to see what happens when type checking this last > line. > > OfCCMonoid-1 is defined in previous .agda file: > > module OfCCMonoid-1 {? ?=} > (upCMon?? : UpCommutativeMonoid-with?? ? ?=) > (let upCMon = proj? upCMon??) > (open UpCommutativeMonoid upCMon using > (setoid; _?_)) > (cancel : LCancellation setoid _?_) > where ... > > > (1) So, the type checker checks that *upCMon-NZ : > UpCommutativeMonoid. > This has been checked earlier, in the module > OverIntegralRing-0.agda, > so its Serialization cost here is zero > Right? > > (2) The type checker processes all the signatures in the > module > OfCCMonoid-1, with substituting there the parameter > values. > > The main parameter value is *upCMon-NZ, > (the parameters _?'?_ and *cancel-nz give a smaller cost, > also they > are considered similarly). > > *upCMon-NZ is imported from OverIntegralRing-0 as ready. > This (nested record structure) is the instance of a generic > structure of > CommutativeMonoid for the case of the monoid of nonzero > elements in the > given IR : IntegralRing, for multiplication in IR. It may be > a large > term. > > And *upCMon-NZ is substituted into all signatures in > OfCCMonoid-1. > C = Carrier is extracted from upCMon??; the latter is > replaced > according to *upCMon-NZ, so that C is being replaced in > with > Nonzero in OfCCMonoid-1. > > For example, in > pairValue : C ? ? ? C > pairValue = uncurry _^_ > > the signature is replaced with > pairValue : Nonzero ? ? ? Nonzero, > > and the second line is not touched. > Right? > > The signature > pairToAsd : C ? ? ? Associated ? ? > > is replaced with > pairToAsd : Nonzero ? ? ? Associated-NZ ? ? > > Here a notion of Associated is imported by > open OfAssociated upCMon?? using (Associated; ...), > > upCMon?? is replaced there (in a previous .agda module) with > *upCMon-NZ, > and Associated is replaced there with a certain > Associated-NZ, > and this has been done when type checking previous .agda > modules. > > In the definition > > record Factorization (a : C) : Set (? ? ?=) > where > constructor factorization? > > field multiset : Multiset > allPrime : All IsPrime $ msKeys multiset > productEq : a ~ msValue multiset > > Multiset is replaced with certain Multiset-NZ, > IsPrime with IsPrime-NZ, > Both these values are checked and ready in previous .agda > modules. > > OfCCMonoid-1 is so that (according to your explanation) only > the above > trivial substitutions are done for the values prepared and > checked in > previous .agda files. > > Only the size of terms being substituted may be large. > For example, *upCMon-NZ is a structure which contains a > proof for that > nonzero elements Nonzero in upIR : IntegralRing form a > commutative > monoid for multiplication, and also implementation for several > operations for Monomial. > > These construct and proof are simple conceptually, but take > about 150 nonempty lines of the source in the module devoted > to > substructures (sub-semigroup, sub-monoid, etc). > I do not know: how the term for this *upCMon-NZ instance is > stored in > the memory. > In the .agdai file, it may take much size (agdai files are > large). > But this refers to Deserialization, right? > And symbolic substitutions with this term refer to > Serialization. > Right? > I do not know how to find: > which substitution is the most expensive here. > > Intuitively, noone can (probably) be expensive for > serialization. > Because a thing there is unfolded once in the memory, and then > many > references are copied (?). > But I do not know how Agda performs these substitutions. > May be, > profile.definitions:10 > will help? > The declaration > module NZPack1 = OfCCMonoid-1 (*upCMon-NZ , _?'?_) > *cancel-nz > > leads to substituting of the parts of *upCMon-NZ into the > definitions in > the module OfCCMonoid-1 which is type-checked in > previous .agda files. > How to measure the cost of any of these substitutions? > > Thanks, > > ------ > Sergei > > > > > From ulf.norell at gmail.com Wed Apr 5 16:16:48 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 5 Apr 2017 16:16:48 +0200 Subject: [Agda] about serialization In-Reply-To: <1491399350.11306.23.camel@scico.botik.ru> References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> <1491399350.11306.23.camel@scico.botik.ru> Message-ID: On Wed, Apr 5, 2017 at 3:35 PM, Sergei Meshveliani wrote: > > This type can be defined as > > -------------------------------------------------------- > (let C = > .Relation.Binary.DecSetoid.Carrier (.Structures0.UpDSet.decSetoid > (.Structures0.UpMagma.upDSet > (.Structures0a.UpSemigroup.upMagma > (.Structures1.UpMonoid.upSemigroup > (.Structures1.UpCommutativeMonoid.upMonoid > (OverIntegralRing-0.*upCMon-NZ {?} {?=} upIR??))))) > ) > in > {? ?= : .Agda.Primitive.Level} > (upIR?? : UpIntegralRing-with?? ? ?=) ? > Data.Product._?_ {? .Agda.Primitive.? ?=} {.Agda.Primitive.lzero} > C > .Agda.Builtin.Nat.Nat > ? > C > ) > ------------------------------------------------------- > > But in the report the expression of C is printed twice. > How the checker stores it internally? > It is stored twice. Some sharing is recovered during serialisation, but it's not represented explicitly so it will be destroyed by substitution. / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Apr 5 18:22:44 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 05 Apr 2017 19:22:44 +0300 Subject: [Agda] about serialization In-Reply-To: References: <1490905216.3348.32.camel@one.mechvel.pereslavl.ru> <1490992897.2903.22.camel@one.mechvel.pereslavl.ru> <20170401023808.GD31479@ritchie.cas.mcmaster.ca> <1491050731.2862.46.camel@one.mechvel.pereslavl.ru> <1491316177.2747.131.camel@one.mechvel.pereslavl.ru> <1491399350.11306.23.camel@scico.botik.ru> Message-ID: <1491409364.2648.26.camel@one.mechvel.pereslavl.ru> On Wed, 2017-04-05 at 16:16 +0200, Ulf Norell wrote: > > > On Wed, Apr 5, 2017 at 3:35 PM, Sergei Meshveliani > wrote: > > This type can be defined as > > -------------------------------------------------------- > (let C = > .Relation.Binary.DecSetoid.Carrier > (.Structures0.UpDSet.decSetoid > (.Structures0.UpMagma.upDSet > (.Structures0a.UpSemigroup.upMagma > (.Structures1.UpMonoid.upSemigroup > (.Structures1.UpCommutativeMonoid.upMonoid > (OverIntegralRing-0.*upCMon-NZ {?} {?=} upIR??))))) > ) > in > {? ?= : .Agda.Primitive.Level} > (upIR?? : UpIntegralRing-with?? ? ?=) ? > Data.Product._?_ {? .Agda.Primitive.? ?=} > {.Agda.Primitive.lzero} > C > .Agda.Builtin.Nat.Nat > ? > C > ) > ------------------------------------------------------- > > But in the report the expression of C is printed twice. > How the checker stores it internally? > > It is stored twice. Some sharing is recovered during serialisation, > but it's not > represented explicitly so it will be destroyed by substitution. > The module OfCCMonoid-1 to which the parameter type substitution is applied has about 30 signatures of kind (foo : Foo). And each of them after substitution is printed by C-c C-o on about 30 lines on average -- in the format of C-c C-o. So, all the substituted types (with many copies) in this module take about 900 lines to print. This is about 16 screen pages. I wonder of whether this is large enough to take 33 sec of serialization for the head module (on a 3 GHz machine). 1) It has sense to make available the sharing output format for C-c C-o -- which somehow uses `let' and avoids copies. With this it will be easier to see what happens with types. 2) In principle, how usable/difficult can be the sharing representation of types in the checker? It is easy to agree with substitution. And I wonder about pattern matching, unification, normalization. What the Agda developers think of this? Thanks, ------ Sergei From amal at ccs.neu.edu Thu Apr 6 00:13:29 2017 From: amal at ccs.neu.edu (Amal Ahmed) Date: Wed, 5 Apr 2017 18:13:29 -0400 Subject: [Agda] OPLSS: register by April 15th Message-ID: *** The OPLSS registration deadline has been extended to April 15th *** We are pleased to announce the program for the 16th annual Oregon Programming Languages Summer School (OPLSS) to be held from June 26th to July 8th, 2017 at the University of Oregon in Eugene. The registration deadline is April 1st, 2017. Full information on registration and scholarships can be found here: http://www.cs.uoregon.edu/Activities/summerschool This year's program is titled: A Spectrum of Types. The speakers and topics include: Amal Ahmed -- Correct and Secure Compilation for Multi-Language Software Northeastern University Edwin Brady -- Dependent Types in the Idris Programming Language University of St. Andrews Ron Garcia -- Gradual Typing University of British Columbia Robert Harper -- Programming Languages Background Carnegie Mellon University Neel Krishnaswami -- Dependent Types and Linearity University of Cambridge Dan Licata -- Programming Languages Background Wesleyan University Frank Pfenning -- Substructural Type Systems and Concurrent Programming Carnegie Mellon University Sam Tobin-Hochstadt -- Contracts and Gradual Types Indiana University David Van Horn -- Redex, Abstract Machines, and Abstract Interpretation University of Maryland The school has a long and successful tradition (sponsored by the NSF, ACM SIGPLAN, and industry). It covers current research in the theory and practice of programming languages. Material is presented at a tutorial level that will help graduate students and researchers from academia or industry understand the critical issues and open problems confronting the field. Prerequisites are an elementary knowledge of logic and mathematics, as covered in undergraduate classes on discrete mathematics, and some knowledge of programming languages at the level of an undergraduate survey course. A *new feature* this year is the option for students to attend a Review session from June 23rd to 25th -- the three days before the summer school officially begins. The review will cover operational semantics, type systems, and basic proof techniques, and will help graduate and especially undergraduate students who have not had a previous course in this material prepare for the main part of the school. Please contact the organizers if you have questions about whether the review will be helpful given your background. We hope you can join us for this excellent program! Amal Ahmed Dan Licata Zena Ariola -------------- next part -------------- An HTML attachment was scrubbed... URL: From xu at math.lmu.de Thu Apr 6 15:57:22 2017 From: xu at math.lmu.de (Chuangjie Xu) Date: Thu, 06 Apr 2017 15:57:22 +0200 Subject: [Agda] Autumn school "Proof and Computation" Message-ID: <20170406155722.13395b3bd3ynwd36@webmail.mathematik.uni-muenchen.de> Autumn school "Proof and Computation" Herrsching, Germany, 23rd to 26th September 2017 http://www.mathematik.uni-muenchen.de/~schwicht/pc17.php An international autumn school "Proof and Computation" will be held from 23rd to 26th September 2017 at Haus der bayerischen Landwirtschaft Herrsching in Herrsching near Munich. Its aim is to bring together young researchers in the field of Foundations of Mathematics, Computer Science and Philosophy. SCORE -------------------- - Predicative Foundations - Constructive Mathematics and Type Theory - Computation in Higher Types - Extraction of Programs from Proofs - Algorithmic Aspects in Financial Mathematics COURSES -------------------- - Mark Bickford on Constructive Analysis in NuPrl - Laura Crosilla on Foundations of Predicative Mathematics - Hajime Ishihara on Constructive Reverse Mathematics - Ulrich Kohlenbach on Proof Mining - Davide Rinaldi on Constructivising Transfinite Algebra - Andrei Rodin on Foundations of Axiomatic Mathematics - Gregor Svindland on Algorithmic Aspects in Financial Mathematics WORKING GROUPS -------------------- There will be an opportunity to form ad-hoc groups working on specific projects, but also to discuss in more general terms the vision of constructing correct programs from proofs. APPLICATIONS -------------------- Graduate or PhD students and young postdoctoral researches are invited to apply. Applications must be accompanied by a letter of recommendation, preferably from the thesis adviser, and should be sent to Chuangjie Xu (xu at math.lmu.de). DEADLINE for applications: **30th May 2017**. Applicants will be notified by 30th June 2017. FINANCIAL SUPPORT -------------------- The workshop is supported by the Udo Keller Stiftung (Hamburg), the CID (Computing with Infinite Data) programme of the European Commission and a JSPS core-to-core project. Successful applicants will be offered full-board accommodation for the days of the autumn school. There are no funds, however, to reimburse travel or further expenses, which successful applicants will have to cover otherwise. Klaus Mainzer Peter Schuster Helmut Schwichtenberg ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From apostolis.xekoukoulotakis at gmail.com Fri Apr 7 13:59:00 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 7 Apr 2017 14:59:00 +0300 Subject: [Agda] Case split creates too many {_} Message-ID: ``` removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | (drepl=>repl+ {frll = frll} ind lind) ... | g | r = {!!} ``` case splitting creates this: ``` removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | (drepl=>repl+ {frll = frll} ind lind) removeCom {_} {_} {_} {_} {_} {frll} (_?_ {pll} {_} {_} {_} {ind} lf lf?) (_?? {_} {_} {_} {_} {_} {_} {_} {lind} ic) | .(replLL _ (ind +? lind) frll) | refl = ? ``` instead of : ``` removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | (drepl=>repl+ {frll = frll} ind lind) removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) (_?? {lind = lind} ic) | .(replLL _ (ind +? lind) frll) | refl = ? ``` I wonder if the behavior can be changed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Fri Apr 7 14:33:21 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 7 Apr 2017 14:33:21 +0200 Subject: [Agda] Case split creates too many {_} In-Reply-To: References: Message-ID: <26e756c6-31fd-fd94-08a9-cf2231fcdc04@ifi.lmu.de> Agda uses {_} to skip unsupplied hidden arguments. Instead it could use a named hidden argument for the supplied one {frll}. Could you put a reasonably small self-contained test case on the issue tracker? Thanks, Andreas On 07.04.2017 13:59, Apostolis Xekoukoulotakis wrote: > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > ... | g | r = {!!} > > ``` > case splitting creates this: > > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > removeCom {_} {_} {_} {_} {_} {frll} (_?_ {pll} {_} {_} {_} {ind} lf > lf?) (_?? {_} {_} {_} {_} {_} {_} {_} {lind} ic) | .(replLL _ (ind +? > lind) frll) | refl = ? > ``` > > instead of : > > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) | .(replLL _ (ind +? lind) frll) | refl = ? > ``` > > I wonder if the behavior can be changed. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Mon Apr 10 09:00:20 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 10 Apr 2017 09:00:20 +0200 Subject: [Agda] Printing named arguments [Re: Case split creates too many {_}] In-Reply-To: References: <26e756c6-31fd-fd94-08a9-cf2231fcdc04@ifi.lmu.de> Message-ID: <9ed9dbf3-980d-9f6f-c7ec-ec5c48d3ec71@chalmers.se> Thanks, Martin, for the explanation. I can confirm that a named argument like {x = x} can cause quite some confusion to the reader. (It looks non-sensical unless you are familiar with the specifics of Agda syntax.) Now, if you look at the bug report https://github.com/agda/agda/issues/2537 you see that the current situation is incoherent. Agda preserves named arguments in the usual case, but not for with-clauses. I think that should be fixed. The next question is whether Agda should *introduce* named arguments or rather use a sequence of {_} arguments when, for instance, you split on a hidden argument. For your taste, Agda should not introduce named arguments ever in printing. Maybe a flag like --no-named-arguments could represent this style of printing terms. On 07.04.2017 16:23, Martin Escardo wrote: > On 07/04/17 15:01, Andreas Abel wrote: >> Hi Martin, >> >> when it comes to interactive editing, we are striving for the commands >> to preserve/imitate the user code as much as possible. Thus, if the >> user has chosen named arguments, the splitter should preserve this >> style, instead of switching to positional arguments. >> >> Why are you fond of the current behavior? > > Because, for personal idiosyncratic reasons, I don't use named > arguments. Writing {x = x} {y = y} doesn't look idiomatic, and is > confusing for people who don't know Agda but who I want to be able to > understand my code. I write the Agda code for myself to read, and not > for simply having something accepted and blessed by the Agda typchecker. > If you are never going to write {x = a}, and you write always {x = x}, > this seems a wrong design. And {x = x} looks very curious and cryptic. > Anyway, you can safely ignore my opinion. But this is what it is. > Additionally I think adding variables that are not used in types makes > the types very unreadable. > > Best, > Martin > > >> >> Best, >> Andreas >> >> On 07.04.2017 16:02, Martin Escardo wrote: >>> Hi Andreas, for several reasons, I like the way things are regarding >>> this. If there is any change, could it be achieved by a different >>> control sequence, so as to preserve the existing behaviour? Thanks, >>> Martin >>> >>> On 07/04/17 13:33, Andreas Abel wrote: >>>> Agda uses {_} to skip unsupplied hidden arguments. Instead it could use >>>> a named hidden argument for the supplied one {frll}. >>>> >>>> Could you put a reasonably small self-contained test case on the issue >>>> tracker? >>>> >>>> Thanks, >>>> Andreas >>>> >>>> On 07.04.2017 13:59, Apostolis Xekoukoulotakis wrote: >>>>> ``` >>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>> ... | g | r = {!!} >>>>> >>>>> ``` >>>>> case splitting creates this: >>>>> >>>>> ``` >>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>> removeCom {_} {_} {_} {_} {_} {frll} (_?_ {pll} {_} {_} {_} {ind} lf >>>>> lf?) (_?? {_} {_} {_} {_} {_} {_} {_} {lind} ic) | .(replLL _ (ind +? >>>>> lind) frll) | refl = ? >>>>> ``` >>>>> >>>>> instead of : >>>>> >>>>> ``` >>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>> (_?? {lind = lind} ic) | .(replLL _ (ind +? lind) frll) | refl = ? >>>>> ``` >>>>> >>>>> I wonder if the behavior can be changed. >>>>> >>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>> >>>> >>> >> >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Mon Apr 10 14:17:51 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 10 Apr 2017 15:17:51 +0300 Subject: [Agda] Vezzosi's patch Message-ID: <1491826671.29946.21.camel@scico.botik.ru> Wolfram wrote recently > Have you tried this with Andrea Vezzosi's patch from > https://github.com/agda/agda/issues/1625#issuecomment-132196576 I have looked there. This patch is about src/full/Agda/TypeChecking/Conversion.hs I have Development Agda of March 21, 2017 (ghc-7.10.2, Debian Linux) And the patch is probably the difference file for some old Agda. Is this all right? Well, I named the patch V.diff and commanded > mv V.diff src/full/Agda/TypeChecking/ > cd src/full/Agda/TypeChecking > patch Conversion.hs < V.diff It reports that this point is found, and issues Conversion.hs with is about 500 byte longer. Is this a correct way to use this patch? Then, I install the obtained Agda, and install the standard library. Then I type-check my application. But its error report is different. The original Agda succeeds, and the patched Agda first type-checks several files and then reports something like a wrong type in a certain .agda file. I wonder, how to use this patch. Thanks, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Mon Apr 10 14:26:19 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Mon, 10 Apr 2017 15:26:19 +0300 Subject: [Agda] Printing named arguments [Re: Case split creates too many {_}] In-Reply-To: <9ed9dbf3-980d-9f6f-c7ec-ec5c48d3ec71@chalmers.se> References: <26e756c6-31fd-fd94-08a9-cf2231fcdc04@ifi.lmu.de> <9ed9dbf3-980d-9f6f-c7ec-ec5c48d3ec71@chalmers.se> Message-ID: With Andreas commit, the behavior is to replicate the style the programmer used, which means that nothing will change for you. I do remember being confused by "{x = x}" as well when I was learning the language. I am too battling with cleaning the code so as to be readable. A very important thing is to learn when to use implicit vs explicit arguments. I haven't mastered that yet. I also wonder whether there is a difference in complexity between mathematical proofs and software development. As far as I know, Mathematics are characterized by elegance and simplicity. On Mon, Apr 10, 2017 at 10:00 AM, Andreas Abel wrote: > Thanks, Martin, > > for the explanation. I can confirm that a named argument like > > {x = x} > > can cause quite some confusion to the reader. (It looks non-sensical > unless you are familiar with the specifics of Agda syntax.) > > Now, if you look at the bug report > > https://github.com/agda/agda/issues/2537 > > you see that the current situation is incoherent. Agda preserves named > arguments in the usual case, but not for with-clauses. I think that should > be fixed. > > The next question is whether Agda should *introduce* named arguments or > rather use a sequence of {_} arguments when, for instance, you split on a > hidden argument. > > For your taste, Agda should not introduce named arguments ever in > printing. Maybe a flag like > > --no-named-arguments > > could represent this style of printing terms. > > On 07.04.2017 16:23, Martin Escardo wrote: > >> On 07/04/17 15:01, Andreas Abel wrote: >> >>> Hi Martin, >>> >>> when it comes to interactive editing, we are striving for the commands >>> to preserve/imitate the user code as much as possible. Thus, if the >>> user has chosen named arguments, the splitter should preserve this >>> style, instead of switching to positional arguments. >>> >>> Why are you fond of the current behavior? >>> >> >> Because, for personal idiosyncratic reasons, I don't use named >> arguments. Writing {x = x} {y = y} doesn't look idiomatic, and is >> confusing for people who don't know Agda but who I want to be able to >> understand my code. I write the Agda code for myself to read, and not >> for simply having something accepted and blessed by the Agda typchecker. >> If you are never going to write {x = a}, and you write always {x = x}, >> this seems a wrong design. And {x = x} looks very curious and cryptic. >> Anyway, you can safely ignore my opinion. But this is what it is. >> Additionally I think adding variables that are not used in types makes >> the types very unreadable. >> >> Best, >> Martin >> >> >> >>> Best, >>> Andreas >>> >>> On 07.04.2017 16:02, Martin Escardo wrote: >>> >>>> Hi Andreas, for several reasons, I like the way things are regarding >>>> this. If there is any change, could it be achieved by a different >>>> control sequence, so as to preserve the existing behaviour? Thanks, >>>> Martin >>>> >>>> On 07/04/17 13:33, Andreas Abel wrote: >>>> >>>>> Agda uses {_} to skip unsupplied hidden arguments. Instead it could >>>>> use >>>>> a named hidden argument for the supplied one {frll}. >>>>> >>>>> Could you put a reasonably small self-contained test case on the issue >>>>> tracker? >>>>> >>>>> Thanks, >>>>> Andreas >>>>> >>>>> On 07.04.2017 13:59, Apostolis Xekoukoulotakis wrote: >>>>> >>>>>> ``` >>>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>>> ... | g | r = {!!} >>>>>> >>>>>> ``` >>>>>> case splitting creates this: >>>>>> >>>>>> ``` >>>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>>> removeCom {_} {_} {_} {_} {_} {frll} (_?_ {pll} {_} {_} {_} {ind} lf >>>>>> lf?) (_?? {_} {_} {_} {_} {_} {_} {_} {lind} ic) | .(replLL _ (ind +? >>>>>> lind) frll) | refl = ? >>>>>> ``` >>>>>> >>>>>> instead of : >>>>>> >>>>>> ``` >>>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>>> (_?? {lind = lind} ic) with (replLL ll ind (replLL pll lind frll)) | >>>>>> (drepl=>repl+ {frll = frll} ind lind) >>>>>> removeCom {frll = frll} (_?_ {pll = pll} {ll = ll} {ind = ind} lf lf?) >>>>>> (_?? {lind = lind} ic) | .(replLL _ (ind +? lind) frll) | refl = ? >>>>>> ``` >>>>>> >>>>>> I wonder if the behavior can be changed. >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Agda mailing list >>>>>> Agda at lists.chalmers.se >>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kahl at cas.mcmaster.ca Mon Apr 10 14:58:55 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Mon, 10 Apr 2017 08:58:55 -0400 Subject: [Agda] Vezzosi's patch In-Reply-To: <1491826671.29946.21.camel@scico.botik.ru> References: <1491826671.29946.21.camel@scico.botik.ru> Message-ID: <20170410125855.GP19542@ritchie.cas.mcmaster.ca> On Mon, Apr 10, 2017 at 03:17:51PM +0300, Sergei Meshveliani wrote: > Wolfram wrote recently > > > Have you tried this with Andrea Vezzosi's patch from > > https://github.com/agda/agda/issues/1625#issuecomment-132196576 > > I have looked there. This patch is about > src/full/Agda/TypeChecking/Conversion.hs > > I have Development Agda of March 21, 2017 (ghc-7.10.2, Debian Linux) > And the patch is probably the difference file for some old Agda. > Is this all right? For me, it is still working at least on 2.5.2. > Well, I named the patch V.diff and commanded > > > mv V.diff src/full/Agda/TypeChecking/ > > > cd src/full/Agda/TypeChecking > > > patch Conversion.hs < V.diff > > It reports that this point is found, and issues Conversion.hs > with is about 500 byte longer. > > Is this a correct way to use this patch? Looks good. > Then, I install the obtained Agda, and install the standard library. > Then I type-check my application. Did you remove all .agdai files? (Apparently you used a separate standard library installation --- good.) With the patch, some .agdai files are different; I haven't tried to analyse this. > But its error report is different. The original Agda succeeds, and the > patched Agda first type-checks several files and then reports something > like a wrong type in a certain .agda file. I haven't had such a case yet --- if you can isolate this, it would probably be very useful if you could report that example under https://github.com/agda/agda/issues/1625 . Wolfram From abela at chalmers.se Mon Apr 10 15:29:27 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 10 Apr 2017 15:29:27 +0200 Subject: [Agda] When to use implicit arguments [Re: Printing named arguments] In-Reply-To: References: <26e756c6-31fd-fd94-08a9-cf2231fcdc04@ifi.lmu.de> <9ed9dbf3-980d-9f6f-c7ec-ec5c48d3ec71@chalmers.se> Message-ID: <36b44b94-80f8-f5b7-b463-c2cd26436977@chalmers.se> > A very important thing is to learn when to use implicit vs explicit > arguments. In my experience, Agda can usually not infer an argument you case on. For instance, +-assoc : ? m n o ? (m + n) + o ? m + (n + o) +-assoc zero _ _ = refl +-assoc (suc m) n o = cong suc $ +-assoc m n o Here, it makes sense to make n and o implicit, but not m. Agda can reconstruct n and o usually when you use +-assoc to prove a goal (whose type is known). However, when you are using 'rewrite', you need to pass all arguments ... rewrite +-assoc a b c since Agda needs to compute the equality you want to rewrite with from the term `+-assoc a b c'. Thus, in a 'rewrite'-heavy style, one can only omit arguments that are inferable from other arguments, not the one inferable from the target. Best, Andreas On 10.04.2017 14:26, Apostolis Xekoukoulotakis wrote: > With Andreas commit, the behavior is to replicate the style the > programmer used, which means that nothing will change for you. > > I do remember being confused by > "{x = x}" as well when I was learning the language. > > I am too battling with cleaning the code so as to be readable. > A very important thing is to learn when to use implicit vs explicit > arguments. > I haven't mastered that yet. > > I also wonder whether there is a difference in complexity between > mathematical proofs and software development. > As far as I know, Mathematics are characterized by elegance and simplicity. > > On Mon, Apr 10, 2017 at 10:00 AM, Andreas Abel > wrote: > > Thanks, Martin, > > for the explanation. I can confirm that a named argument like > > {x = x} > > can cause quite some confusion to the reader. (It looks > non-sensical unless you are familiar with the specifics of Agda syntax.) > > Now, if you look at the bug report > > https://github.com/agda/agda/issues/2537 > > > you see that the current situation is incoherent. Agda preserves > named arguments in the usual case, but not for with-clauses. I > think that should be fixed. > > The next question is whether Agda should *introduce* named arguments > or rather use a sequence of {_} arguments when, for instance, you > split on a hidden argument. > > For your taste, Agda should not introduce named arguments ever in > printing. Maybe a flag like > > --no-named-arguments > > could represent this style of printing terms. > > On 07.04.2017 16:23, Martin Escardo wrote: > > On 07/04/17 15:01, Andreas Abel wrote: > > Hi Martin, > > when it comes to interactive editing, we are striving for > the commands > to preserve/imitate the user code as much as possible. > Thus, if the > user has chosen named arguments, the splitter should > preserve this > style, instead of switching to positional arguments. > > Why are you fond of the current behavior? > > > Because, for personal idiosyncratic reasons, I don't use named > arguments. Writing {x = x} {y = y} doesn't look idiomatic, and is > confusing for people who don't know Agda but who I want to be > able to > understand my code. I write the Agda code for myself to read, > and not > for simply having something accepted and blessed by the Agda > typchecker. > If you are never going to write {x = a}, and you write always {x > = x}, > this seems a wrong design. And {x = x} looks very curious and > cryptic. > Anyway, you can safely ignore my opinion. But this is what it is. > Additionally I think adding variables that are not used in types > makes > the types very unreadable. > > Best, > Martin > > > > Best, > Andreas > > On 07.04.2017 16:02, Martin Escardo wrote: > > Hi Andreas, for several reasons, I like the way things > are regarding > this. If there is any change, could it be achieved by a > different > control sequence, so as to preserve the existing > behaviour? Thanks, > Martin > > On 07/04/17 13:33, Andreas Abel wrote: > > Agda uses {_} to skip unsupplied hidden arguments. > Instead it could use > a named hidden argument for the supplied one {frll}. > > Could you put a reasonably small self-contained test > case on the issue > tracker? > > Thanks, > Andreas > > On 07.04.2017 13:59, Apostolis Xekoukoulotakis wrote: > > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = > ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind > (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > ... | g | r = {!!} > > ``` > case splitting creates this: > > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = > ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind > (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > removeCom {_} {_} {_} {_} {_} {frll} (_?_ {pll} > {_} {_} {_} {ind} lf > lf?) (_?? {_} {_} {_} {_} {_} {_} {_} {lind} ic) > | .(replLL _ (ind +? > lind) frll) | refl = ? > ``` > > instead of : > > ``` > removeCom {frll = frll} (_?_ {pll = pll} {ll = > ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) with (replLL ll ind > (replLL pll lind frll)) | > (drepl=>repl+ {frll = frll} ind lind) > removeCom {frll = frll} (_?_ {pll = pll} {ll = > ll} {ind = ind} lf lf?) > (_?? {lind = lind} ic) | .(replLL _ (ind +? > lind) frll) | refl = ? > ``` > > I wonder if the behavior can be changed. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Mon Apr 10 22:29:17 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 10 Apr 2017 23:29:17 +0300 Subject: [Agda] Vezzosi's patch In-Reply-To: <20170410125855.GP19542@ritchie.cas.mcmaster.ca> References: <1491826671.29946.21.camel@scico.botik.ru> <20170410125855.GP19542@ritchie.cas.mcmaster.ca> Message-ID: <1491856157.4648.61.camel@one.mechvel.pereslavl.ru> On Mon, 2017-04-10 at 08:58 -0400, Wolfram Kahl wrote: > On Mon, Apr 10, 2017 at 03:17:51PM +0300, Sergei Meshveliani wrote: > > Wolfram wrote recently > > > > > Have you tried this with Andrea Vezzosi's patch from > > > https://github.com/agda/agda/issues/1625#issuecomment-132196576 > > > > I have looked there. This patch is about > > src/full/Agda/TypeChecking/Conversion.hs > > > > I have Development Agda of March 21, 2017 (ghc-7.10.2, Debian Linux) > > And the patch is probably the difference file for some old Agda. > > Is this all right? > > For me, it is still working at least on 2.5.2. > > > Well, I named the patch V.diff and commanded > > > > > mv V.diff src/full/Agda/TypeChecking/ > > > > > cd src/full/Agda/TypeChecking > > > > > patch Conversion.hs < V.diff > > > > It reports that this point is found, and issues Conversion.hs > > with is about 500 byte longer. > > > > Is this a correct way to use this patch? > > Looks good. > > > Then, I install the obtained Agda, and install the standard library. > > Then I type-check my application. > > Did you remove all .agdai files? (Apparently you used a separate > standard library installation --- good.) With the patch, some .agdai > files are different; I haven't tried to analyse this. > > > But its error report is different. The original Agda succeeds, and the > > patched Agda first type-checks several files and then reports something > > like a wrong type in a certain .agda file. > > I haven't had such a case yet --- if you can isolate this, it would > probably be very useful if you could report that example under > https://github.com/agda/agda/issues/1625 . > Now I repeat this by new with Development Agda of April 10, 2017 (call it Agda-main), , and the standard library of the same date. I apply the Vezzosi's patch, and then install Agda and standard library, and this makes it Agda-patched. 1) Then I test Agda-patched on a relative small example that profiles Serialization, Deserialization, Total for a certain last module (as I wrote about a week ago). In this example the cost explosion is due to substituting for a module parameter a certain large value expression, which expression occurs copied many times in the obtained module instance. The patch does not help type check performance in this example, Agda-patched is a bit slower. --sharing makes it even more slow. 2) Type-checking the DoCon-A-2.00 library reports an error somewhere before the middle, while Agda-main type-checks it. I do not know, which one is more correct, because it is difficult to see what is the matter there ("Agda-main accepts it, so one can program things further"). The report is --------------------------------------------------------------- /home/mechvel/doconA/2.00/source/List/Multiset0.agda:1122,62-74 Set != (Set (?= ? ?)) when checking that the expression m>mults-tail has type _x_2041 A C-Show decInhabited mS mSets .Relation.Unary.? All(All (? z ? suc (_i_2040 A C-Show decInhabited mS mSets) ? proj? (upperMultiplicity mSets))) --------------------------------------------------------------- If people ask, I can provide a reference to the code -- "a report of a certain unclear-so-far effect in Agda-patched". This is about 1/5 of the DoCon-A-2.00 library, and it is large. Digression ---------- Currently, my main question to Agda is: what to do with the internal data explosion produced by substituting a value for a parameter into a module? into a type? For example, a module M1 has a parameter C : Set, and C occurs 20 times in M1; a module M2 has C' = . And M2 includes has declaration open M1 C' using ... The representation of C' is copied 20 times in memory, and so on. Probably, the type checker needs to internally represent the needed module instance as let C' = <...> in M1-inst, and a similar approach to be applied to representing a type. May be this will lead to problems with pattern matching, unification, I cannot tell now, I expect that the Agda developers know better. Regards, ------ Sergei From mechvel at botik.ru Mon Apr 17 13:00:44 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 14:00:44 +0300 Subject: [Agda] making a pair explodes Message-ID: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> Dear Agda developers, The following fragment shows a certain remarkable detail: f : (b : C) ? IsPrime b ? Domain _ _ f b prime-b = let open ForPrime b prime-b using (rFoo; ...) rIR = proj? rFoo _?r?_ = proj? rFoo rR = Foo.ring rIR rR?? = (rR , _?r?_) -- ** in anything Here ForPrime is a paramtric module, Foo is a record. All the needed previous .agda files have been checked earlier, within about 10 Gb heap and 50 minutes. And checking this f explodes: for 26 Gb 3 hours is not enough, so I have interrupted it. I set `anything' there in order to see which part of let-in makes the checker explode. And it occurs that commenting out the last line in let-in makes f checked in a small time: Finished Foo Total 62,991ms Miscellaneous 360ms Deserialization 53,299ms Serialization 4,772ms (9,012ms) Serialization.BinaryEncode 4,072ms Serialization.Sort 88ms Serialization.Compress 76ms Import 156ms Typing 84ms (88ms) DeadCode 60ms Scoping 12ms ModuleName 12ms So: rR and _?r?_ are checked in a small time, while composing them into a pair gives explosion. I know about the effect of large terms being substituted into a parametric module - the effect produced by a certain lack of data sharing in the type representation. But: really only composing this pair must lead to this explosion? Can you guess and tell what may be happening there? I can provide the full code. But it is large, and needs about 10 Gb heap to type-check. Thanks, ------- Sergei From sanzhiyan at gmail.com Mon Apr 17 13:22:32 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Mon, 17 Apr 2017 13:22:32 +0200 Subject: [Agda] making a pair explodes In-Reply-To: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> Message-ID: A couple of questions: - Does it help if you provide the type signature for "rR??" ? - What about doing putting the local definitions in a "where" clause rather than a "let"? On Mon, Apr 17, 2017 at 1:00 PM, Sergei Meshveliani wrote: > Dear Agda developers, > > The following fragment shows a certain remarkable detail: > > f : (b : C) ? IsPrime b ? Domain _ _ > f b prime-b = > let open ForPrime b prime-b using (rFoo; ...) > rIR = proj? rFoo > _?r?_ = proj? rFoo > rR = Foo.ring rIR > rR?? = (rR , _?r?_) -- ** > in > anything > > Here ForPrime is a paramtric module, Foo is a record. > All the needed previous .agda files have been checked earlier, > within about 10 Gb heap and 50 minutes. > And checking this f explodes: for 26 Gb 3 hours is not enough, so I > have interrupted it. > > I set `anything' there in order to see which part of let-in makes the > checker explode. > > And it occurs that commenting out the last line in let-in makes f > checked in a small time: > > Finished Foo > Total 62,991ms > Miscellaneous 360ms > Deserialization 53,299ms > Serialization 4,772ms (9,012ms) > Serialization.BinaryEncode 4,072ms > Serialization.Sort 88ms > Serialization.Compress 76ms > Import 156ms > Typing 84ms (88ms) > DeadCode 60ms > Scoping 12ms > ModuleName 12ms > > > So: rR and _?r?_ are checked in a small time, > while composing them into a pair gives explosion. > > I know about the effect of large terms being substituted into a > parametric module - the effect produced by a certain lack of data > sharing in the type representation. > > But: really only composing this pair must lead to this explosion? > Can you guess and tell what may be happening there? > > I can provide the full code. > But it is large, and needs about 10 Gb heap to type-check. > > Thanks, > > ------- > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Mon Apr 17 15:17:49 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 16:17:49 +0300 Subject: [Agda] making a pair explodes In-Reply-To: References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> Message-ID: <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> On Mon, 2017-04-17 at 13:22 +0200, Andrea Vezzosi wrote: > A couple of questions: > > - Does it help if you provide the type signature for "rR??" ? > - What about doing putting the local definitions in a "where" clause > rather than a "let"? Great! Adding the type signature for rR?? helps. Under 3 Gb heap, it takes 74 seconds to type-check. The type check cost reduces probably more than 100 times. Thank you very much. I could suspect this effect with the type signature, but I have forgotten to try it. This is indeed a relief. Because during last four years this is the main example in my project for dependent types in computer algebra. This example was tried two years earlier; its type check has failed in the same way. Now it is time to revisit it. And it occurs that it is sufficient to add a single type signature. Can you, please, give a hint: how does this occur that without this signature the checker spends this much computation? Further: the whole project needs the minimum of 10 Gb to check, and is checked in 64 minutes. And it is highly desirable to reduce this to 7 Gb, or even better, to 3 Gb. And there are many places where I skip type signatures (in order to make the code looking shorter). Suppose that I add some type signatures to the modules that take most of the cost to check. Does this worth trying? Thanks, ------ Sergei > On Mon, Apr 17, 2017 at 1:00 PM, Sergei Meshveliani wrote: > > Dear Agda developers, > > > > The following fragment shows a certain remarkable detail: > > > > f : (b : C) ? IsPrime b ? Domain _ _ > > f b prime-b = > > let open ForPrime b prime-b using (rFoo; ...) > > rIR = proj? rFoo > > _?r?_ = proj? rFoo > > rR = Foo.ring rIR > > rR?? = (rR , _?r?_) -- ** > > in > > anything > > > > Here ForPrime is a paramtric module, Foo is a record. > > All the needed previous .agda files have been checked earlier, > > within about 10 Gb heap and 50 minutes. > > And checking this f explodes: for 26 Gb 3 hours is not enough, so I > > have interrupted it. > > > > I set `anything' there in order to see which part of let-in makes the > > checker explode. > > > > And it occurs that commenting out the last line in let-in makes f > > checked in a small time: > > > > Finished Foo > > Total 62,991ms > > Miscellaneous 360ms > > Deserialization 53,299ms > > Serialization 4,772ms (9,012ms) > > Serialization.BinaryEncode 4,072ms > > Serialization.Sort 88ms > > Serialization.Compress 76ms > > Import 156ms > > Typing 84ms (88ms) > > DeadCode 60ms > > Scoping 12ms > > ModuleName 12ms > > > > > > So: rR and _?r?_ are checked in a small time, > > while composing them into a pair gives explosion. > > > > I know about the effect of large terms being substituted into a > > parametric module - the effect produced by a certain lack of data > > sharing in the type representation. > > > > But: really only composing this pair must lead to this explosion? > > Can you guess and tell what may be happening there? > > > > I can provide the full code. > > But it is large, and needs about 10 Gb heap to type-check. > > > > Thanks, > > > > ------- > > Sergei > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > From sanzhiyan at gmail.com Mon Apr 17 16:04:17 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Mon, 17 Apr 2017 16:04:17 +0200 Subject: [Agda] making a pair explodes In-Reply-To: <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> Message-ID: I wouldn't be able to say much about why the type signature made things much better, it's mostly that I was even surprised the expression fully typechecked, if it did with no unresolved constraints, considering that it's hard to infer the type of a pair constructed like that. What is the type of _,_ exactly? On Mon, Apr 17, 2017 at 3:17 PM, Sergei Meshveliani wrote: > On Mon, 2017-04-17 at 13:22 +0200, Andrea Vezzosi wrote: >> A couple of questions: >> >> - Does it help if you provide the type signature for "rR??" ? >> - What about doing putting the local definitions in a "where" clause >> rather than a "let"? > > > Great! > Adding the type signature for rR?? helps. > Under 3 Gb heap, it takes 74 seconds to type-check. > > The type check cost reduces probably more than 100 times. > > Thank you very much. > > I could suspect this effect with the type signature, but I have > forgotten to try it. > > This is indeed a relief. > Because during last four years this is the main example in my project > for dependent types in computer algebra. This example was tried two > years earlier; its type check has failed in the same way. > Now it is time to revisit it. And it occurs that it is sufficient to add > a single type signature. > > Can you, please, give a hint: how does this occur that without this > signature the checker spends this much computation? > > Further: the whole project needs the minimum of 10 Gb to check, and is > checked in 64 minutes. > And it is highly desirable to reduce this to 7 Gb, or even better, to > 3 Gb. > And there are many places where I skip type signatures (in order to make > the code looking shorter). > Suppose that I add some type signatures to the modules that take most of > the cost to check. Does this worth trying? > > Thanks, > > ------ > Sergei > > >> On Mon, Apr 17, 2017 at 1:00 PM, Sergei Meshveliani wrote: >> > Dear Agda developers, >> > >> > The following fragment shows a certain remarkable detail: >> > >> > f : (b : C) ? IsPrime b ? Domain _ _ >> > f b prime-b = >> > let open ForPrime b prime-b using (rFoo; ...) >> > rIR = proj? rFoo >> > _?r?_ = proj? rFoo >> > rR = Foo.ring rIR >> > rR?? = (rR , _?r?_) -- ** >> > in >> > anything >> > >> > Here ForPrime is a paramtric module, Foo is a record. >> > All the needed previous .agda files have been checked earlier, >> > within about 10 Gb heap and 50 minutes. >> > And checking this f explodes: for 26 Gb 3 hours is not enough, so I >> > have interrupted it. >> > >> > I set `anything' there in order to see which part of let-in makes the >> > checker explode. >> > >> > And it occurs that commenting out the last line in let-in makes f >> > checked in a small time: >> > >> > Finished Foo >> > Total 62,991ms >> > Miscellaneous 360ms >> > Deserialization 53,299ms >> > Serialization 4,772ms (9,012ms) >> > Serialization.BinaryEncode 4,072ms >> > Serialization.Sort 88ms >> > Serialization.Compress 76ms >> > Import 156ms >> > Typing 84ms (88ms) >> > DeadCode 60ms >> > Scoping 12ms >> > ModuleName 12ms >> > >> > >> > So: rR and _?r?_ are checked in a small time, >> > while composing them into a pair gives explosion. >> > >> > I know about the effect of large terms being substituted into a >> > parametric module - the effect produced by a certain lack of data >> > sharing in the type representation. >> > >> > But: really only composing this pair must lead to this explosion? >> > Can you guess and tell what may be happening there? >> > >> > I can provide the full code. >> > But it is large, and needs about 10 Gb heap to type-check. >> > >> > Thanks, >> > >> > ------- >> > Sergei >> > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > > From mechvel at botik.ru Mon Apr 17 16:23:22 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 17:23:22 +0300 Subject: [Agda] making a pair explodes In-Reply-To: References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> Message-ID: <1492439002.3635.2.camel@one.mechvel.pereslavl.ru> On Mon, 2017-04-17 at 16:04 +0200, Andrea Vezzosi wrote: > I wouldn't be able to say much about why the type signature made > things much better, it's mostly that I was even surprised the > expression fully typechecked, if it did with no unresolved > constraints, considering that it's hard to infer the type of a pair > constructed like that. > > What is the type of _,_ exactly? > The one imported from Standard library by open import Data.Product using (_,_; ...) > On Mon, Apr 17, 2017 at 3:17 PM, Sergei Meshveliani wrote: > > On Mon, 2017-04-17 at 13:22 +0200, Andrea Vezzosi wrote: > >> A couple of questions: > >> > >> - Does it help if you provide the type signature for "rR??" ? > >> - What about doing putting the local definitions in a "where" clause > >> rather than a "let"? > > > > > > Great! > > Adding the type signature for rR?? helps. > > Under 3 Gb heap, it takes 74 seconds to type-check. > > > > The type check cost reduces probably more than 100 times. > > > > Thank you very much. > > > > I could suspect this effect with the type signature, but I have > > forgotten to try it. > > > > This is indeed a relief. > > Because during last four years this is the main example in my project > > for dependent types in computer algebra. This example was tried two > > years earlier; its type check has failed in the same way. > > Now it is time to revisit it. And it occurs that it is sufficient to add > > a single type signature. > > > > Can you, please, give a hint: how does this occur that without this > > signature the checker spends this much computation? > > > > Further: the whole project needs the minimum of 10 Gb to check, and is > > checked in 64 minutes. > > And it is highly desirable to reduce this to 7 Gb, or even better, to > > 3 Gb. > > And there are many places where I skip type signatures (in order to make > > the code looking shorter). > > Suppose that I add some type signatures to the modules that take most of > > the cost to check. Does this worth trying? > > > > Thanks, > > > > ------ > > Sergei > > > > > >> On Mon, Apr 17, 2017 at 1:00 PM, Sergei Meshveliani wrote: > >> > Dear Agda developers, > >> > > >> > The following fragment shows a certain remarkable detail: > >> > > >> > f : (b : C) ? IsPrime b ? Domain _ _ > >> > f b prime-b = > >> > let open ForPrime b prime-b using (rFoo; ...) > >> > rIR = proj? rFoo > >> > _?r?_ = proj? rFoo > >> > rR = Foo.ring rIR > >> > rR?? = (rR , _?r?_) -- ** > >> > in > >> > anything > >> > > >> > Here ForPrime is a paramtric module, Foo is a record. > >> > All the needed previous .agda files have been checked earlier, > >> > within about 10 Gb heap and 50 minutes. > >> > And checking this f explodes: for 26 Gb 3 hours is not enough, so I > >> > have interrupted it. > >> > > >> > I set `anything' there in order to see which part of let-in makes the > >> > checker explode. > >> > > >> > And it occurs that commenting out the last line in let-in makes f > >> > checked in a small time: > >> > > >> > Finished Foo > >> > Total 62,991ms > >> > Miscellaneous 360ms > >> > Deserialization 53,299ms > >> > Serialization 4,772ms (9,012ms) > >> > Serialization.BinaryEncode 4,072ms > >> > Serialization.Sort 88ms > >> > Serialization.Compress 76ms > >> > Import 156ms > >> > Typing 84ms (88ms) > >> > DeadCode 60ms > >> > Scoping 12ms > >> > ModuleName 12ms > >> > > >> > > >> > So: rR and _?r?_ are checked in a small time, > >> > while composing them into a pair gives explosion. > >> > > >> > I know about the effect of large terms being substituted into a > >> > parametric module - the effect produced by a certain lack of data > >> > sharing in the type representation. > >> > > >> > But: really only composing this pair must lead to this explosion? > >> > Can you guess and tell what may be happening there? > >> > > >> > I can provide the full code. > >> > But it is large, and needs about 10 Gb heap to type-check. > >> > > >> > Thanks, > >> > > >> > ------- > >> > Sergei > >> > > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > > > > From carette at mcmaster.ca Mon Apr 17 16:24:58 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Mon, 17 Apr 2017 10:24:58 -0400 Subject: [Agda] making a pair explodes In-Reply-To: <1492439002.3635.2.camel@one.mechvel.pereslavl.ru> References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> <1492439002.3635.2.camel@one.mechvel.pereslavl.ru> Message-ID: > What is the type of _,_ exactly? Full dependent product. Sometimes _,'_ can be considerably faster if cartesian product is what is wanted. Jacques From mechvel at botik.ru Mon Apr 17 20:42:52 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 21:42:52 +0300 Subject: [Agda] making a pair explodes In-Reply-To: References: <1492426844.2593.17.camel@one.mechvel.pereslavl.ru> <1492435069.3095.45.camel@one.mechvel.pereslavl.ru> Message-ID: <1492454572.2691.10.camel@one.mechvel.pereslavl.ru> On Mon, 2017-04-17 at 16:04 +0200, Andrea Vezzosi wrote: > I wouldn't be able to say much about why the type signature made > things much better, it's mostly that I was even surprised the > expression fully typechecked, if it did with no unresolved > constraints, considering that it's hard to infer the type of a pair > constructed like that. > > What is the type of _,_ exactly? > _,_ is of Standard. But may be your question refers to something else. For any occasion, I add: _,_ is used here in rR?? = (rR , _?r?_) And this pair has type CommutativeRing-with?? ? (? ? ?=). And the latter defined as CommutativeRing-with?? : ? (? ?= : Level) ? Set (suc (? ? ?=)) CommutativeRing-with?? ? ?= = ? \ (R : CommutativeRing ? ?=) ? let M = CommutativeRing.*magma R in Decidable? (Magma._?_ M) -- commutative ring with a decidable division relation. > On Mon, Apr 17, 2017 at 3:17 PM, Sergei Meshveliani wrote: > > On Mon, 2017-04-17 at 13:22 +0200, Andrea Vezzosi wrote: > >> A couple of questions: > >> > >> - Does it help if you provide the type signature for "rR??" ? > >> - What about doing putting the local definitions in a "where" clause > >> rather than a "let"? > > > > > > Great! > > Adding the type signature for rR?? helps. > > Under 3 Gb heap, it takes 74 seconds to type-check. > > > > The type check cost reduces probably more than 100 times. > > > > Thank you very much. > > > > I could suspect this effect with the type signature, but I have > > forgotten to try it. > > > > This is indeed a relief. > > Because during last four years this is the main example in my project > > for dependent types in computer algebra. This example was tried two > > years earlier; its type check has failed in the same way. > > Now it is time to revisit it. And it occurs that it is sufficient to add > > a single type signature. > > > > Can you, please, give a hint: how does this occur that without this > > signature the checker spends this much computation? > > > > Further: the whole project needs the minimum of 10 Gb to check, and is > > checked in 64 minutes. > > And it is highly desirable to reduce this to 7 Gb, or even better, to > > 3 Gb. > > And there are many places where I skip type signatures (in order to make > > the code looking shorter). > > Suppose that I add some type signatures to the modules that take most of > > the cost to check. Does this worth trying? > > > > Thanks, > > > > ------ > > Sergei > > > > > >> On Mon, Apr 17, 2017 at 1:00 PM, Sergei Meshveliani wrote: > >> > Dear Agda developers, > >> > > >> > The following fragment shows a certain remarkable detail: > >> > > >> > f : (b : C) ? IsPrime b ? Domain _ _ > >> > f b prime-b = > >> > let open ForPrime b prime-b using (rFoo; ...) > >> > rIR = proj? rFoo > >> > _?r?_ = proj? rFoo > >> > rR = Foo.ring rIR > >> > rR?? = (rR , _?r?_) -- ** > >> > in > >> > anything > >> > > >> > Here ForPrime is a paramtric module, Foo is a record. > >> > All the needed previous .agda files have been checked earlier, > >> > within about 10 Gb heap and 50 minutes. > >> > And checking this f explodes: for 26 Gb 3 hours is not enough, so I > >> > have interrupted it. > >> > > >> > I set `anything' there in order to see which part of let-in makes the > >> > checker explode. > >> > > >> > And it occurs that commenting out the last line in let-in makes f > >> > checked in a small time: > >> > > >> > Finished Foo > >> > Total 62,991ms > >> > Miscellaneous 360ms > >> > Deserialization 53,299ms > >> > Serialization 4,772ms (9,012ms) > >> > Serialization.BinaryEncode 4,072ms > >> > Serialization.Sort 88ms > >> > Serialization.Compress 76ms > >> > Import 156ms > >> > Typing 84ms (88ms) > >> > DeadCode 60ms > >> > Scoping 12ms > >> > ModuleName 12ms > >> > > >> > > >> > So: rR and _?r?_ are checked in a small time, > >> > while composing them into a pair gives explosion. > >> > > >> > I know about the effect of large terms being substituted into a > >> > parametric module - the effect produced by a certain lack of data > >> > sharing in the type representation. > >> > > >> > But: really only composing this pair must lead to this explosion? > >> > Can you guess and tell what may be happening there? > >> > > >> > I can provide the full code. > >> > But it is large, and needs about 10 Gb heap to type-check. > >> > > >> > Thanks, > >> > > >> > ------- > >> > Sergei > >> > > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > > > > From mechvel at botik.ru Mon Apr 17 22:07:18 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 23:07:18 +0300 Subject: [Agda] Typing.CheckRHS Message-ID: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I continue investigating the type check cost of various parts in my project. And for certain module Integer2.agda, the option -v profile:7 shows something new: Typing.CheckRHS 267,464ms This occurs the greatest part in Total for this module (while in other considered modules the main part was Serialization and Serialization). Can you, please comment this? Thanks, ------ Sergei From mechvel at botik.ru Mon Apr 17 22:27:34 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 17 Apr 2017 23:27:34 +0300 Subject: [Agda] old .agdai Message-ID: <1492460854.3352.4.camel@one.mechvel.pereslavl.ru> Dear Agda developers, when I make a change to the source Foo.agda, and apply the checker, does this make a difference for the check performance of whether Foo.agdai is deleted before checking or not? Thanks, ------ Sergei From ulf.norell at gmail.com Mon Apr 17 22:32:27 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 17 Apr 2017 22:32:27 +0200 Subject: [Agda] old .agdai In-Reply-To: <1492460854.3352.4.camel@one.mechvel.pereslavl.ru> References: <1492460854.3352.4.camel@one.mechvel.pereslavl.ru> Message-ID: Not measurably. If there is an agdai file it will hash the source code and compare against the hash stored in the interface file. / Ulf On Mon, Apr 17, 2017 at 10:27 PM, Sergei Meshveliani wrote: > Dear Agda developers, > > when I make a change to the source Foo.agda, and apply the checker, > does this make a difference for the check performance of whether > Foo.agdai is deleted before checking or not? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Mon Apr 17 23:11:33 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Mon, 17 Apr 2017 23:11:33 +0200 Subject: [Agda] Typing.CheckRHS In-Reply-To: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> Message-ID: <9920c233-4b98-b1e3-5a85-7ce8d4985692@ifi.lmu.de> This says you spent 267 seconds on checking right-hand-sides of equations (or type signatures, I suppose). [I do not remember having introduced this benchmark subcategory of Typing.] On 17.04.2017 22:07, Sergei Meshveliani wrote: > Dear Agda developers, > > I continue investigating the type check cost of various parts in my > project. > And for certain module Integer2.agda, the option -v profile:7 > shows something new: > > Typing.CheckRHS 267,464ms > > This occurs the greatest part in Total for this module > (while in other considered modules the main part was Serialization and > Serialization). > Can you, please comment this? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Mon Apr 17 23:14:24 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 18 Apr 2017 00:14:24 +0300 Subject: [Agda] Typing.CheckRHS In-Reply-To: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> Message-ID: <1492463664.3561.22.camel@one.mechvel.pereslavl.ru> On Mon, 2017-04-17 at 23:07 +0300, Sergei Meshveliani wrote: > Dear Agda developers, > > I continue investigating the type check cost of various parts in my > project. > And for certain module Integer2.agda, the option -v profile:7 > shows something new: > > Typing.CheckRHS 267,464ms > > This occurs the greatest part in Total for this module > (while in other considered modules the main part was Serialization and > Serialization). > Can you, please comment this? First I comment out a large last part in Integer2.agda. Then I move the "{-" mark down, to add a small current piece of code, and see how the checker profile report changes. And I find the point at which the cost jumps up. The Total increases 2.5 times, and instead of Serialization and Deserialization, the main cost part becomes Typing.CheckRHS 266,620ms What does this Typing.CheckRHS mean, what is its difference to Serialization ? The responsible fragment is small: hasSquare?-asd : Decidable HasSquare-asd hasSquare?-asd (asd' (x , x?0)) = case Nat2.hasSquare? ? x ? of \ { (yes hasSq-?x?) ? let hasSq-x : HasSquare x hasSq-x = proj? HasSquare-x??HasSquare-?x? hasSq-?x? in yes $ HasSquare?HasSquare-asd hasSq-x ; (no ?hasSq-?x?) ? let ?hasSq[X] : ? HasSquare-asd (asd' (x , x?0)) ?hasSq[X] = \hasSq[X] ? let hasSq-x = HasSquare-asd?HasSquare x?0 hasSq[X] hasSq-?x? = proj? HasSquare-x??HasSquare-?x? hasSq-x in ?hasSq-?x? hasSq-?x? in no ?hasSq[X] } Can you please, give a hint about what can be happening there in the checker? (The code is about an integer x having a square factor, (abs x) : Nat having a square factor, and (asd x) having a square factor -- about the relation between these three assertions. And asd x means here x or (- x). The module Integer2.hs uses many instances for ? of rather complex deneric structures. ). Thanks, ------ Sergei From ulf.norell at gmail.com Tue Apr 18 06:58:44 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 18 Apr 2017 06:58:44 +0200 Subject: [Agda] Typing.CheckRHS In-Reply-To: <1492463664.3561.22.camel@one.mechvel.pereslavl.ru> References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> <1492463664.3561.22.camel@one.mechvel.pereslavl.ru> Message-ID: Why don't you try to nail down the culprit further by replacing terms by 'any', defined as postulate any : ? {a} {A : Set a} ? Set ? / Ulf On Mon, Apr 17, 2017 at 11:14 PM, Sergei Meshveliani wrote: > On Mon, 2017-04-17 at 23:07 +0300, Sergei Meshveliani wrote: > > Dear Agda developers, > > > > I continue investigating the type check cost of various parts in my > > project. > > And for certain module Integer2.agda, the option -v profile:7 > > shows something new: > > > > Typing.CheckRHS 267,464ms > > > > This occurs the greatest part in Total for this module > > (while in other considered modules the main part was Serialization and > > Serialization). > > Can you, please comment this? > > > First I comment out a large last part in Integer2.agda. > Then I move the "{-" mark down, to add a small current piece of code, > and see how the checker profile report changes. > And I find the point at which the cost jumps up. > The Total increases 2.5 times, and instead of Serialization and > Deserialization, the main cost part becomes > > Typing.CheckRHS 266,620ms > > What does this Typing.CheckRHS mean, what is its difference to > Serialization ? > The responsible fragment is small: > > hasSquare?-asd : Decidable HasSquare-asd > hasSquare?-asd (asd' (x , x?0)) = > case > Nat2.hasSquare? ? x ? > of \ > { (yes hasSq-?x?) ? > let hasSq-x : HasSquare x > hasSq-x = proj? HasSquare-x??HasSquare-?x? hasSq-?x? > in yes $ HasSquare?HasSquare-asd hasSq-x > > ; (no ?hasSq-?x?) ? > let > ?hasSq[X] : ? HasSquare-asd (asd' (x , x?0)) > ?hasSq[X] = > \hasSq[X] ? > let hasSq-x = HasSquare-asd?HasSquare x?0 hasSq[X] > hasSq-?x? = proj? HasSquare-x??HasSquare-?x? hasSq-x > in ?hasSq-?x? hasSq-?x? > in > no ?hasSq[X] > } > > Can you please, give a hint about what can be happening there in the > checker? > > (The code is about an integer x having a square factor, (abs x) : Nat > having a square factor, and (asd x) having a square factor > -- about the relation between these three assertions. And asd x means > here x or (- x). > > The module Integer2.hs uses many instances for ? of rather complex > deneric structures. > ). > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Apr 18 13:10:03 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 18 Apr 2017 14:10:03 +0300 Subject: [Agda] Typing.CheckRHS In-Reply-To: <9920c233-4b98-b1e3-5a85-7ce8d4985692@ifi.lmu.de> References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> <9920c233-4b98-b1e3-5a85-7ce8d4985692@ifi.lmu.de> Message-ID: <1492513803.27429.3.camel@scico.botik.ru> On Mon, 2017-04-17 at 23:11 +0200, Andreas Abel wrote: > This says you spent 267 seconds on checking right-hand-sides of > equations (or type signatures, I suppose). [I do not remember having > introduced this benchmark subcategory of Typing.] What is the relation between the processes of Serialization and Typing.CheckRHS ? What intersection do they have? Does the former include the latter? Thanks, ------ Sergei > On 17.04.2017 22:07, Sergei Meshveliani wrote: > > Dear Agda developers, > > > > I continue investigating the type check cost of various parts in my > > project. > > And for certain module Integer2.agda, the option -v profile:7 > > shows something new: > > > > Typing.CheckRHS 267,464ms > > > > This occurs the greatest part in Total for this module > > (while in other considered modules the main part was Serialization and > > Serialization). > > Can you, please comment this? > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > From andrei.paskevich at lri.fr Tue Apr 18 13:32:29 2017 From: andrei.paskevich at lri.fr (Andrei Paskevich) Date: Tue, 18 Apr 2017 13:32:29 +0200 Subject: [Agda] VSTTE 2017 - Second Call for Papers Message-ID: <20170418113229.2gl6vqqaqy3moo6n@tikki.lri.fr> 9th Working Conference on Verified Software: Theories, Tools, and Experiments (VSTTE) https://vstte17.lri.fr July 22-23, 2017, Heidelberg, Germany Co-located with the 29th International Conference on Computer-Aided Verification, CAV 2017 Important Dates * Abstract submission: Mon, Apr 24, 2017 * Full paper submission: Mon, May 1, 2017 * Notification: Mon, Jun 5, 2017 * VSTTE: Sat-Sun, Jul 22-23, 2017 * Camera-ready: Mon, Aug 21, 2017 Overview The goal of the VSTTE conference series is to advance the state of the art in the science and technology of software verification, through the interaction of theory development, tool evolution, and experimental validation. We welcome submissions describing significant advances in the production of verified software, i.e., software that has been proved to meet its functional specifications. Submissions of theoretical, practical, and experimental contributions are equally encouraged, including those that focus on specific problems or problem domains. We are especially interested in submissions describing large-scale verification efforts that involve collaboration, theory unification, tool integration, and formalized domain knowledge. We also welcome papers describing novel experiments and case studies evaluating verification techniques and technologies. Topics of interest for VSTTE include education, requirements modeling, specification languages, specification/verification/certification case studies, formal calculi, software design methods, automatic code generation, refinement methodologies, compositional analysis, verification tools (e.g., static analysis, dynamic analysis, model checking, theorem proving, satisfiability), tool integration, benchmarks, challenge problems, and integrated verification environments. Paper Submissions We accept both long (limited to 16 pages) and short (limited to 10 pages) paper submissions. Short submissions also cover Verification Pearls describing an elegant proof or proof technique. Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Each submission will be evaluated by at least three members of the Program Committee. We expect that one author of every accepted paper will present their work at the conference. Paper submissions must be written in English using the LNCS LaTeX format (http://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines) and must include a cogent and self-contained description of the ideas, methods, results, and comparison to existing work. Papers will be submitted via EasyChair at the VSTTE 2017 conference page (https://www.easychair.org/conferences/?conf=vstte2017). The post-conference proceedings of VSTTE 2017 will be published in the LNCS series. Authors of accepted papers will be requested to sign the copyright transfer form. A selection of best papers will be invited for publication in the Journal of Automated Reasoning. Invited Speakers * Christoph Weidenbach (Max Planck Institute for Informatics, Germany) * Santiago Zanella-Beguelin (Microsoft Research, UK) Program Committee * June Andronick (University of New South Wales, Australia) * Christel Baier (TU Dresden, Germany) * Sandrine Blazy (Universit? de Rennes 1, France) * Arthur Chargu?raud (Inria, France) * Ernie Cohen (Amazon Web Services, USA) * Rayna Dimitrova (MPI-SWS, Germany) * Carlo A. Furia (Chalmers University of Technology, Sweden) * Arie Gurfinkel (University of Waterloo, Canada) * Hossein Hojjat (Rochester Institute of Technology, USA) * Marieke Huisman (University of Twente, Netherlands) * Bart Jacobs (KU Leuven, Belgium) * Rajeev Joshi (NASA Jet Propulsion Laboratory, USA) * Zachary Kincaid (Princeton University, USA) * Akash Lal (Microsoft Research, India) * Shuvendu Lahiri (Microsoft Research, USA) * Francesco Logozzo (Facebook, USA) * Peter M?ller (ETH Z?rich, Switzerland) * Jorge A. Navas (SRI International, USA) * Scott Owens (University of Kent, UK) * Andrei Paskevich (Universit? Paris-Sud, France), co-chair * Gerhard Schellhorn (Universit?t Augsburg, Germany) * Peter Schrammel (University of Sussex, UK) * Natarajan Shankar (SRI International, USA) * Mihaela Sighireanu (Universit? Paris-Diderot, France) * Julien Signoles (CEA LIST, France) * Michael Tautschnig (Queen Mary University of London, UK) * Tachio Terauchi (JAIST, Japan) * Oksana Tkachuk (NASA Ames Research Center, USA) * Mattias Ulbrich (Karlsruhe Institute of Technology, Germany) * Thomas Wies (New York University, USA), co-chair From ulf.norell at gmail.com Tue Apr 18 13:32:17 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 18 Apr 2017 13:32:17 +0200 Subject: [Agda] Typing.CheckRHS In-Reply-To: <1492513803.27429.3.camel@scico.botik.ru> References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> <9920c233-4b98-b1e3-5a85-7ce8d4985692@ifi.lmu.de> <1492513803.27429.3.camel@scico.botik.ru> Message-ID: In the output of -v profile each line represents a disjoint activity. If you sum the numbers in the first column you should end up with the total time spent. Some activities a broken down into subactivities (like Typing) in which case the total time for all Typing.* activities are shown in parenthesis after the Typing entry. / Ulf On Tue, Apr 18, 2017 at 1:10 PM, Sergei Meshveliani wrote: > On Mon, 2017-04-17 at 23:11 +0200, Andreas Abel wrote: > > This says you spent 267 seconds on checking right-hand-sides of > > equations (or type signatures, I suppose). [I do not remember having > > introduced this benchmark subcategory of Typing.] > > What is the relation between the processes of Serialization and > Typing.CheckRHS ? > What intersection do they have? Does the former include the latter? > > Thanks, > > ------ > Sergei > > > > On 17.04.2017 22:07, Sergei Meshveliani wrote: > > > Dear Agda developers, > > > > > > I continue investigating the type check cost of various parts in my > > > project. > > > And for certain module Integer2.agda, the option -v profile:7 > > > shows something new: > > > > > > Typing.CheckRHS 267,464ms > > > > > > This occurs the greatest part in Total for this module > > > (while in other considered modules the main part was Serialization and > > > Serialization). > > > Can you, please comment this? > > > > > > Thanks, > > > > > > ------ > > > Sergei > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Apr 18 18:18:45 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 18 Apr 2017 19:18:45 +0300 Subject: [Agda] Typing.CheckRHS In-Reply-To: References: <1492459638.3167.11.camel@one.mechvel.pereslavl.ru> <1492463664.3561.22.camel@one.mechvel.pereslavl.ru> Message-ID: <1492532325.2424.34.camel@one.mechvel.pereslavl.ru> On Tue, 2017-04-18 at 06:58 +0200, Ulf Norell wrote: > Why don't you try to nail down the culprit further by replacing terms > by > 'any', defined as > > > postulate any : ? {a} {A : Set a} ? Set > > > ? Indeed, I did this. But the thing is not clear. By setting `anything' in various places, I find that in the below `case' the main cost gives the `yes' branch: (yes hasSq-?x?) ? let hasSq-x : HasSquare x hasSq-x = proj? HasSquare-x??HasSquare-?x? hasSq-?x? -- (1) in yes $ HasSquare?HasSquare-asd hasSq-x -- (2) This makes it Total 408 Typing.CheckRHS 150 Serialization 121 (156) Deserialization 64 There remain the two RHS to try to replace with `anything': (1) and (2). If any one of them is replaced with `anything', then the profiling shows Total 155 Typing.CheckRHS 0 Serialization 72 (81) Deserialization 65 CheckRHS disappears, for some unknown reason. I hoped to find a place for which inserting a signature reduces greatly the type check cost, similarly as with the example (call it (I)) where the cost is reduced more than 100 times. But now I think that there is not such a place. The effect of (I) is probably due to a bug in Agda: instead of reporting of that something is not solved ("providing some signature may help") it continues trying to solve something. And as the whole project is type-checked under 12 Gb in 64 minutes, then there probably is not any similar place. (?) Thanks, ------ Sergei > / Ulf > > On Mon, Apr 17, 2017 at 11:14 PM, Sergei Meshveliani > wrote: > On Mon, 2017-04-17 at 23:07 +0300, Sergei Meshveliani wrote: > > Dear Agda developers, > > > > I continue investigating the type check cost of various > parts in my > > project. > > And for certain module Integer2.agda, the option -v > profile:7 > > shows something new: > > > > Typing.CheckRHS 267,464ms > > > > This occurs the greatest part in Total for this module > > (while in other considered modules the main part was > Serialization and > > Serialization). > > Can you, please comment this? > > > First I comment out a large last part in Integer2.agda. > Then I move the "{-" mark down, to add a small current piece > of code, > and see how the checker profile report changes. > And I find the point at which the cost jumps up. > The Total increases 2.5 times, and instead of Serialization > and > Deserialization, the main cost part becomes > > Typing.CheckRHS 266,620ms > > What does this Typing.CheckRHS mean, what is its difference to > Serialization ? > The responsible fragment is small: > > hasSquare?-asd : Decidable HasSquare-asd > hasSquare?-asd (asd' (x , x?0)) = > case > Nat2.hasSquare? ? x ? > of \ > { (yes hasSq-?x?) ? > let hasSq-x : HasSquare x > hasSq-x = proj? HasSquare-x??HasSquare-?x? > hasSq-?x? > in yes $ HasSquare?HasSquare-asd hasSq-x > > ; (no ?hasSq-?x?) ? > let > ?hasSq[X] : ? HasSquare-asd (asd' (x , x?0)) > ?hasSq[X] = > \hasSq[X] ? > let hasSq-x = HasSquare-asd?HasSquare x?0 > hasSq[X] > hasSq-?x? = proj? HasSquare-x??HasSquare-?x? > hasSq-x > in ?hasSq-?x? hasSq-?x? > in > no ?hasSq[X] > } > > Can you please, give a hint about what can be happening there > in the > checker? > > (The code is about an integer x having a square factor, > (abs x) : Nat > having a square factor, and (asd x) having a square factor > -- about the relation between these three assertions. And asd > x means > here x or (- x). > > The module Integer2.hs uses many instances for ? of rather > complex > deneric structures. > ). > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > From mechvel at botik.ru Fri Apr 21 19:27:00 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 21 Apr 2017 20:27:00 +0300 Subject: [Agda] length-* in library Message-ID: <1492795620.2551.4.camel@one.mechvel.pereslavl.ru> Dear list, Standard library has length-map, ..., length-filter in List.Properties. And it may have sense to add length-reverse (equation) and length-zipWith (equation with min of length). Regards, ------ Sergei From mechvel at botik.ru Sat Apr 22 12:49:20 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 22 Apr 2017 13:49:20 +0300 Subject: [Agda] =?utf-8?q?=E2=8A=93_in_Nat?= Message-ID: <1492858160.2660.4.camel@one.mechvel.pereslavl.ru> Dear list, This is on Standard library. Data.Nat defines _?_, and Data.Nat.Properties proves certain properties of _?_. And I have an impression that it lacks a lemma ??both : ? m n ? m ? n ? m ? m ? n ? n Regards, ------ Sergei From abela at chalmers.se Sat Apr 22 20:35:16 2017 From: abela at chalmers.se (Andreas Abel) Date: Sat, 22 Apr 2017 20:35:16 +0200 Subject: [Agda] =?utf-8?q?=E2=8A=93_in_Nat?= In-Reply-To: <1492858160.2660.4.camel@one.mechvel.pereslavl.ru> References: <1492858160.2660.4.camel@one.mechvel.pereslavl.ru> Message-ID: Dear Sergei, well, there is m?n?m : ? m n ? m ? n ? m m?n?m zero _ = z?n m?n?m (suc m) zero = z?n m?n?m (suc m) (suc n) = s?s $ m?n?m m n and there is commutativity of the minium. isDistributiveLattice : IsDistributiveLattice _?_ _?_ _?_ isDistributiveLattice = record { isLattice = record { isEquivalence = PropEq.isEquivalence ; ?-comm = ?-comm ; ?-assoc = ?-assoc ; ?-cong = cong? _?_ ; ?-comm = ?-comm ; ?-assoc = ?-assoc ; ?-cong = cong? _?_ ; absorptive = absorptive-?-? } ; ?-?-distrib? = proj? distrib-?-? } Together, you get what you need. Best, Andreas On 22.04.2017 12:49, Sergei Meshveliani wrote: > Dear list, > > This is on Standard library. > > Data.Nat defines _?_, and Data.Nat.Properties proves certain > properties of _?_. > And I have an impression that it lacks a lemma > > ??both : ? m n ? m ? n ? m ? m ? n ? n > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sat Apr 22 21:52:27 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 22 Apr 2017 22:52:27 +0300 Subject: [Agda] =?utf-8?q?=E2=8A=93_in_Nat?= In-Reply-To: References: <1492858160.2660.4.camel@one.mechvel.pereslavl.ru> Message-ID: <1492890747.2775.6.camel@one.mechvel.pereslavl.ru> On Sat, 2017-04-22 at 20:35 +0200, Andreas Abel wrote: > Dear Sergei, > > well, there is > > m?n?m : ? m n ? m ? n ? m > m?n?m zero _ = z?n > m?n?m (suc m) zero = z?n > m?n?m (suc m) (suc n) = s?s $ m?n?m m n > > and there is commutativity of the minium. > [..] > Together, you get what you need. Indeed, I missed this name of m?n?m. Thank you. ------ Sergei From w.s.swierstra at uu.nl Mon Apr 24 08:59:58 2017 From: w.s.swierstra at uu.nl (Wouter Swierstra) Date: Mon, 24 Apr 2017 08:59:58 +0200 Subject: [Agda] 6 Assistant professor positions at the University of Utrecht Message-ID: The department of Information and Computing Sciences of Utrecht University is looking for: 6 talented Assistant Professors in Information and Computing Sciences (Tenure Track 0.8 - 1.0 FTE) (Female/Male), including one Westerdijk fellowship (Female) We have a strong tradition of research using functional languages -- please consider applying! ## Job description We are searching for excellent candidates, preferably on the Assistant Professor level. Candidates must have expertise in Computing and Information Sciences, related to our current research groups and teaching programmes. We are looking for outstanding candidates who will invigorate and enrich the scope of expertise of our Department and can enhance its involvement in interdisciplinary research projects within and outside the university. The quality of the candidate is leading, but preferred areas of expertise are Data Science, Programming Languages, Information Science, Computer Graphics and Serious Games. As teaching is an important and satisfying part of our work we are searching for people with a demonstrable motivation to teach. The preferred candidate has teaching experience, and is actively interested in improving her or his teaching, the courses and the teaching programme. Also candidates largely focusing on teaching will be considered. ## Qualifications Ideally your eligibility is exemplified by: ### Research: * PhD in Computer Science, Information Science or another relevant discipline; * track record of international publications in leading conferences and journals; * experience with or good prospects for acquiring external research funds; * vision on future research directions in own area of expertise; * experience with or readiness to supervise PhD projects; * active role in international scientific communities. ### Teaching: * enthusiasm for teaching and student supervision; * ability to teach in departmental BSc and MSc programmes; * vision on teaching and your own contribution to teaching. Please note that we are also interested in candidates with a focus on teaching! ### Leadership: * play an active and cooperative role in the department and the University; * willingness to organize scientific events, such as research seminars or teaching seminars; * willingness to partake in departmental committees. In view of the gender balance we strongly encourage qualified women to apply. ## Offer The candidate is offered a position for 3-5 years, depending on experience (0.8 / 1.0 FTE). Depending on experience and the specific field of expertise a tenure-track position could be offered. Salary depends on qualifications and experience, and ranges between 3,068euro and 5,330euro (scale 10 - 12 Collective Labour Agreement Dutch Universities) gross per month for a full-time employment. In case of proven outstanding performance an appointment as associate professor could be considered. The salary is supplemented with a holiday bonus of 8% and an end-of-year bonus of 8,3% per year. We offer flexible employment conditions (according to a multiple choice model), working-from-home facilities, partially paid parental leave, a pension scheme, and collective insurance schemes. Facilities for sports and child care are available on our campus, which is only 15 minutes away from the historical city center of Utrecht. ## About the organization A better future for everyone. This ambition motivates our scientists in executing their leading research and inspiring teaching. At Utrecht University, the various disciplines collaborate intensively towards major societal themes. Our focus is on Dynamics of Youth, Institutions for Open Societies, Life Sciences and Sustainability. The city of Utrecht is one of the oldest cities in the Netherlands, with a charming old center and an internationally oriented culture that is strongly influenced by its century-old university. Utrecht city has been consistently ranked as one of the most livable cities in the Netherlands. The Faculty of Science consists of six departments: Biology, Pharmaceutical Sciences, Information and Computing Sciences, Physics and Astronomy, Chemistry and Mathematics. The Faculty is home to 5,900 students and nearly 1,600 staff and is internationally renowned for the quality of its research. The Faculty's academic programmes reflect developments in today's society. The Department of Information and Computing Sciences is nationally and internationally renowned for its research in Computer Science and Information Science. The research of the Department focuses on fundamental aspects of Computing and Information Sciences. Current research groups are Algorithmic Data Analysis, Algorithms and Complexity, Decision Support Systems, Intelligent Systems, Simulation of Complex Systems, Multimedia, Geometric Computing, Organisation and Information, Software Technology, Software Technology of Learning and Teaching. Relevant areas of interdisciplinary research include Game Research and Technology, Foundations of Complex Systems, Applied Data Science and Integrative Bioinformatics. The Department has, among others, close collaborations with the University Medical Center, the Departments of Physics and Mathematics, and the Faculties of Humanities and Geosciences. The Department offers Bachelor programmes in Computer Science and Information Science, and four English language research Master programmes in Artificial Intelligence, Business Informatics, Computing Science, and Game and Media Technology. The Department is developing Master programmes in Data Science. High enrolment figures and good student ratings make the education very successful. The Department currently comprises 9 full-time chairs and 100 other scientific staff, including postdocs and PhD-students. Due to our successful teaching programmes and our ambitions in research the Department is expanding. We are therefore actively searching for 6 talented Research and Teaching Assistant Professors in Information and Computing Sciences. Please note that positions offered will vary, depending on experience and expertise. We will offer the top candidate a fully financed PhD position. We offer the top female candidate a Westerdijk fellowship which includes a fully financed PhD student and a 50K euro research budget. In case this is the same person the second PhD student will be offered to the second candidate on the list. ## Additional information Additional information about the vacancy can be obtained from: Prof M. van Kreveld, (M.J.vanKreveld at uu.nl), Research Director or Ria van Vlimmeren (M.F.J.vanVlimmeren at uu.nl), Secretary to the Board of the Department. As part of the selection procedure, the candidate is expected to give an outline of her/his research plans in a written report and/or an oral presentation. ## Apply Application deadline is 14 May 2017. To apply go to: https://www.uu.nl/en/organisation/working-at-utrecht-university/jobs and please attach a letter of motivation, curriculum vitae and (email) addresses of two referees. ## More information: https://www.uu.nl/en https://www.uu.nl/en/organisation/faculty-of-science https://www.uu.nl/en/organisation/department-of-information-and-computing-sciences https://www.uu.nl/en/organisation/faculty-of-science/about-us/westerdijk-fellowship https://www.uu.nl/en/organisation/working-at-utrecht-university/terms-of-employment https://www.uu.nl/en/organisation/working-at-utrecht-university From andrei.paskevich at lri.fr Tue Apr 25 12:30:49 2017 From: andrei.paskevich at lri.fr (Andrei Paskevich) Date: Tue, 25 Apr 2017 12:30:49 +0200 Subject: [Agda] VSTTE 2017 - Deadline Extension Message-ID: <20170425103049.ajs5n237qwkhf2ue@tikki.lri.fr> *** DEADLINE EXTENSION *** 9th Working Conference on Verified Software: Theories, Tools, and Experiments (VSTTE) https://vstte17.lri.fr July 22-23, 2017, Heidelberg, Germany Co-located with the 29th International Conference on Computer-Aided Verification, CAV 2017 Deadline Extension The deadlines for submitting abstracts and full papers have been extended by one week. The new deadlines are firm. Important Dates * Abstract submission (extended): Mon, May 1, 2017 (AoE) * Full paper submission (extended): Mon, May 8, 2017 (AoE) * Notification: Mon, Jun 5, 2017 * VSTTE: Sat-Sun, Jul 22-23, 2017 * Camera-ready: Mon, Aug 21, 2017 Overview The goal of the VSTTE conference series is to advance the state of the art in the science and technology of software verification, through the interaction of theory development, tool evolution, and experimental validation. We welcome submissions describing significant advances in the production of verified software, i.e., software that has been proved to meet its functional specifications. Submissions of theoretical, practical, and experimental contributions are equally encouraged, including those that focus on specific problems or problem domains. We are especially interested in submissions describing large-scale verification efforts that involve collaboration, theory unification, tool integration, and formalized domain knowledge. We also welcome papers describing novel experiments and case studies evaluating verification techniques and technologies. Topics of interest for VSTTE include education, requirements modeling, specification languages, specification/verification/certification case studies, formal calculi, software design methods, automatic code generation, refinement methodologies, compositional analysis, verification tools (e.g., static analysis, dynamic analysis, model checking, theorem proving, satisfiability), tool integration, benchmarks, challenge problems, and integrated verification environments. Paper Submissions We accept both long (limited to 16 pages, references not included) and short (limited to 10 pages, references not included) paper submissions. Short submissions also cover Verification Pearls describing an elegant proof or proof technique. Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Each submission will be evaluated by at least three members of the Program Committee. We expect that one author of every accepted paper will present their work at the conference. Paper submissions must be written in English using the LNCS LaTeX format (http://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines) and must include a cogent and self-contained description of the ideas, methods, results, and comparison to existing work. Papers will be submitted via EasyChair at the VSTTE 2017 conference page (https://www.easychair.org/conferences/?conf=vstte2017). The post-conference proceedings of VSTTE 2017 will be published in the LNCS series. Authors of accepted papers will be requested to sign the copyright transfer form. A selection of best papers will be invited for publication in the Journal of Automated Reasoning. Invited Speakers * Christoph Weidenbach (Max Planck Institute for Informatics, Germany) * Santiago Zanella-Beguelin (Microsoft Research, UK) Program Chairs * Andrei Paskevich (Universit? Paris-Sud, France) * Thomas Wies (New York University, USA) Program Committee * June Andronick (University of New South Wales, Australia) * Christel Baier (TU Dresden, Germany) * Sandrine Blazy (Universit? de Rennes 1, France) * Arthur Chargu?raud (Inria, France) * Ernie Cohen (Amazon Web Services, USA) * Rayna Dimitrova (MPI-SWS, Germany) * Carlo A. Furia (Chalmers University of Technology, Sweden) * Arie Gurfinkel (University of Waterloo, Canada) * Hossein Hojjat (Rochester Institute of Technology, USA) * Marieke Huisman (University of Twente, Netherlands) * Bart Jacobs (KU Leuven, Belgium) * Rajeev Joshi (NASA Jet Propulsion Laboratory, USA) * Zachary Kincaid (Princeton University, USA) * Akash Lal (Microsoft Research, India) * Shuvendu Lahiri (Microsoft Research, USA) * Francesco Logozzo (Facebook, USA) * Peter M?ller (ETH Z?rich, Switzerland) * Jorge A. Navas (SRI International, USA) * Scott Owens (University of Kent, UK) * Gerhard Schellhorn (Universit?t Augsburg, Germany) * Peter Schrammel (University of Sussex, UK) * Natarajan Shankar (SRI International, USA) * Mihaela Sighireanu (Universit? Paris-Diderot, France) * Julien Signoles (CEA LIST, France) * Michael Tautschnig (Queen Mary University of London, UK) * Tachio Terauchi (JAIST, Japan) * Oksana Tkachuk (NASA Ames Research Center, USA) * Mattias Ulbrich (Karlsruhe Institute of Technology, Germany) From abela at chalmers.se Tue Apr 25 14:42:41 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 25 Apr 2017 14:42:41 +0200 Subject: [Agda] Senior Lectureships in Computer Science at Chalmers and Gothenburg U Message-ID: We are hiring full-time permanent lecturers! http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=4987 http://www.gu.se/english/about_the_university/job-opportunities/vacancies-details/?id=381 The positions are focusing on teaching, but some time will be available for research as well. Excerpt from the description: Major responsibilities The scientific area is Computer Science, interpreted broadly. The position is a full-time tenured appointment with focus on education and pedagogical development. You will teach a variety of topics in Computer Science; there may include courses such as programming, data structures, algorithms and databases. You will also supervise bachelor level projects and master?s theses. Besides teaching, you will keep up with the technical and pedagogical development in the areas of the position and introduce new methods in the curriculum. As a faculty member you will share the responsibility of the administration and management of the department and the educational programmes. You will collaborate with industrial, academic or governmental partners, and take part in the research conducted at the department. In addition, you are encouraged to apply for funding of further pedagogical advancement of our programmes, and for research funding. -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From manuel at enigmage.de Tue Apr 25 16:50:51 2017 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Tue, 25 Apr 2017 16:50:51 +0200 Subject: [Agda] Problems with strict positivity Message-ID: <8d26fa90-ac5c-4425-2276-66e795706922@enigmage.de> Dear list, I'm experiencing strange behaviour with strict positivity. It seems to me that in some cases, the strict positivity test is different for records than for algebraic datatypes. Consider this example, which might need a fairly recent development version of the standard library: A : ? {c ?} {C : Container c} ? ? C ? (Set ?) ? Set (c ? ?) A (s , f) = ? p ? f p record thing {?} (C : Container ?) : Set ? where coinductive field getThing : ? C ? (thing C) open thing record testRecord {?} {C : Container ?} (aThing : thing C) : Set ? where inductive field testField : A (map testRecord (getThing aThing)) data testData {?} {C : Container ?} (aThing : thing C) : Set ? where testCons : A (map testData (getThing aThing)) ? testData aThing I'm sorry for not being able to condense it further. The strange behaviour is this: The definition of testRecord is rejected with the following error message: testRecord is not strictly positive, because it occurs in the 7th argument to map in the 4th argument to A in the definition of testRecord. But the definition of testData goes through without a problem! Is there an actual difference between the two? Should there be one? (The reason why I'm worrying about this is because I need a record for coinduction.) Best regards, Manuel -- I'm using Enigmail on Thunderbird to sign and encrypt my emails with GPG! Why not try it yourself? https://enigmail.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From andreas.abel at ifi.lmu.de Tue Apr 25 17:11:54 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 25 Apr 2017 17:11:54 +0200 Subject: [Agda] Problems with strict positivity In-Reply-To: <8d26fa90-ac5c-4425-2276-66e795706922@enigmage.de> References: <8d26fa90-ac5c-4425-2276-66e795706922@enigmage.de> Message-ID: Hello Manuel, I recently fixed https://github.com/agda/agda/issues/1899 The fix has not been released yet, it will be part of Agda 2.5.3 or 2.6.0. Could you try your example with the development version of Agda? Best, Andreas On 25.04.2017 16:50, Manuel B?renz wrote: > Dear list, > > I'm experiencing strange behaviour with strict positivity. It seems to > me that in some cases, the strict positivity test is different for > records than for algebraic datatypes. > > Consider this example, which might need a fairly recent development > version of the standard library: > > A : ? {c ?} {C : Container c} ? ? C ? (Set ?) ? Set (c ? ?) > A (s , f) = ? p ? f p > > record thing {?} (C : Container ?) : Set ? where > coinductive > field > getThing : ? C ? (thing C) > open thing > > record testRecord {?} {C : Container ?} (aThing : thing C) : Set ? where > inductive > field > testField : A (map testRecord (getThing aThing)) > > data testData {?} {C : Container ?} (aThing : thing C) : Set ? where > testCons : A (map testData (getThing aThing)) ? testData aThing > > I'm sorry for not being able to condense it further. > > The strange behaviour is this: The definition of testRecord is rejected > with the following error message: > > testRecord is not strictly positive, because it occurs > in the 7th argument to map > in the 4th argument to A > in the definition of testRecord. > > But the definition of testData goes through without a problem! Is there > an actual difference between the two? Should there be one? > > (The reason why I'm worrying about this is because I need a record for > coinduction.) > > Best regards, Manuel > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From kaposi.ambrus at gmail.com Fri Apr 28 11:05:36 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Fri, 28 Apr 2017 11:05:36 +0200 Subject: [Agda] Call for participation: TYPES 2017. Registration is open Message-ID: * registration is open * invited talks: Sara Negri, Edwin Brady, Jakob Rehof * 51 contributed talks CALL FOR PARTICIPATION 23rd International Conference on Types for Proofs and Programs, TYPES 2017 and EUTYPES Cost Action CA15123 meeting Budapest, Hungary, 29 May - 1 June 2017 http://types2017.elte.hu BACKGROUND The TYPES meetings are a forum to present new and on-going work in all aspects of type theory and its applications, especially in formalised and computer assisted reasoning and computer programming. The TYPES areas of interest include, but are not limited to: * foundations of type theory and constructive mathematics; * applications of type theory; * dependently typed programming; * industrial uses of type theory technology; * meta-theoretic studies of type systems; * proof assistants and proof technology; * automation in computer-assisted reasoning; * links between type theory and functional programming; * formalizing mathematics using type theory. FINANCIAL SUPPORT The first two days of TYPES 2017, May 29 - 30 are organised by EUTypes Cost Action CA15123 (https://eutypes.cs.ru.nl). On May 30 there will be an EUTypes Management Committee (MC) meeting, and on both days there will be WG meetings. This means that members of the EUTypes MC will be invited for these 2 days through the e-cost system, and their cost of travel and stay will be covered. There will likely be some funding for a limited number of other invited speakers. The funding is subject to COST rules, and invitations will be sent out via the e-cost system after the 1st of May. INVITED SPEAKERS * Edwin Brady (University of St Andrews): An Architecture for Dependently Typed Applications in Idris * Sara Negri (University of Helsinki): TBA * Jakob Rehof (TU Dortmund): Bounding Principles for Decision Problems with Intersection Types CONTRIBUTED TALKS 51 talks were accepted, see http://types2017.elte.hu/#accepted for the list of accepted papers and http://types2017.elte.hu/#programme for the programme. REGISTRATION Registration is open: http://types2017.elte.hu/#registration The early bird fee is 250 EUR + 30 EUR for the excursion (optional). Please register for the excursion because it is a great opportunity for discussion of research ideas in a relaxed environment and for general networking. For students, the early bird registration fee is 200 EUR. VENUE Budapest is the capital of Hungary with around two million inhabitants. The conference will be held at E?tv?s Lor?nd University. Among the graduates of this university were John von Neumann and Paul Erdos. The conference dinner will take place during a boat cruise on the river Danube which separates the Buda and Pest parts of the city. PROGRAMME COMMITTEE * Andreas Abel (Chalmers University Gothenburg) * Thorsten Altenkirch (University of Nottingham) * Jos? Espirito Santo (University of Minho) * Fredrik Nordvall Forsberg (University of Strathclyde) * Silvia Ghilezan (University of Novi Sad) * Hugo Herbelin (INRIA Paris-Rocquencourt) * Martin Hofmann (Ludwig Maximilian University of Munich) * Ambrus Kaposi (E?tv?s Lor?nd University) (co-chair) * Tam?s Kozsik (E?tv?s Lor?nd University) (co-chair) * Assia Mahboubi (INRIA) * Alexandre Miquel (University of the Republic, Uruguay) * Leonardo de Moura (Microsoft Research, Redmond, USA) * Keiko Nakata (SAP, Potsdam) * Andrew Polonsky (University Paris Diderot) * Simona Ronchi Della Rocca (Universit? di Torino) * Aleksy Schubert (University of Warsaw) * Wouter Swierstra (Utrecht University) * Tarmo Uustalu (Tallinn University of Technology) CONTACT Email: info at types2017.elte.hu Organisers: Ambrus Kaposi, Tam?s Kozsik, Andr?s Kov?cs and the Department of Programming Languages and Compilers at the Faculty of Informatics, E?tv?s Lor?nd University, Budapest. From mechvel at botik.ru Fri Apr 28 22:21:06 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 28 Apr 2017 23:21:06 +0300 Subject: [Agda] `search' format Message-ID: <1493410866.2792.15.camel@one.mechvel.pereslavl.ru> Can people tell, please, what may be a sensible general format for searching in a list? I consider this one: search : ? {p} {P : A ? Set p} ? (P? : Decidable P) ? (xs : List A) ? Found P? xs ? All (?_ ? P) xs where Found is defined as record Found {p} {P : A ? Set p} (P? : Decidable P) (xs : List A) : Set _ where field prefix : List A found : A suffix : List A ?prefix : All (?_ ? P) prefix P-found : P found concatEq : prefix ++ (found ? suffix) ? xs I think this expresses completely the axioms for searching in a list. Has Standard library something similar? (I am sorry if the list answered to this long ago, I just do not recall). Thanks, ------ Sergei From andreas.abel at ifi.lmu.de Sat Apr 29 17:26:54 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 29 Apr 2017 17:26:54 +0200 Subject: [Agda] `search' format In-Reply-To: <1493410866.2792.15.camel@one.mechvel.pereslavl.ru> References: <1493410866.2792.15.camel@one.mechvel.pereslavl.ru> Message-ID: <4918bf2a-ecd6-a551-6dcf-22ba57bf9f1e@ifi.lmu.de> It looks like you want to find the first element that satisfies P. I'd do this with an inductive predicate for the result: open import Data.List open import Data.List.Any open import Data.List.All open import Relation.Nullary open import Relation.Nullary.Decidable open import Relation.Unary data FirstMatch {A : Set} (P : A ? Set) : List A ? Set where here : ?{x xs} (p : P x) ? FirstMatch P (x ? xs) there : ?{x xs} (?p : ? (P x)) (ps : FirstMatch P xs) ? FirstMatch P (x ? xs) findFirst : ?{A : Set}{P : A ? Set} (f : Decidable P) ? Decidable (FirstMatch P) findFirst f [] = no ?() findFirst f (x ? xs) with f x findFirst f (x ? xs) | yes p = yes (here p) findFirst f (x ? xs) | no ?p with findFirst f xs findFirst f (x ? xs) | no ?p | yes p = yes (there ?p p) findFirst f (x ? xs) | no ?p | no ?q = no ?{ (here p) ? ?p p ; (there _ q) ? ?q q} On 28.04.2017 22:21, Sergei Meshveliani wrote: > Can people tell, please, > > what may be a sensible general format for searching in a list? > > I consider this one: > > search : ? {p} {P : A ? Set p} ? (P? : Decidable P) ? (xs : List A) ? > > Found P? xs ? All (?_ ? P) xs > > where Found is defined as > > record Found {p} {P : A ? Set p} (P? : Decidable P) (xs : List A) : > Set _ > where > field prefix : List A > found : A > suffix : List A > ?prefix : All (?_ ? P) prefix > P-found : P found > concatEq : prefix ++ (found ? suffix) ? xs > > I think this expresses completely the axioms for searching in a list. > > Has Standard library something similar? > > (I am sorry if the list answered to this long ago, I just do not > recall). > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Sun Apr 30 18:24:06 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sun, 30 Apr 2017 19:24:06 +0300 Subject: [Agda] Some suggestions for the 'where' syntax and C-c C-, Message-ID: Consider this example : ``` module test where data T : Set where t : T tt : T data D : T ? Set where d : D t dt : D tt f : T ? T f t = tt f tt = t g : (x : T) ? D (f (f (f x))) g x = {!!} where e = (f (f (f x))) ``` A. When someone checks the hole with C-c C-, , he does not see the type of e. B. It would be nice if the goal type and the context were updated to contain the e variable. If the expressions are very long, I currently have to check them very carefully to see if the variable I have defined is the same as the expression. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Sun Apr 30 19:48:46 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sun, 30 Apr 2017 20:48:46 +0300 Subject: [Agda] Some suggestions for the 'where' syntax and C-c C-, In-Reply-To: References: Message-ID: There is an issue already. https://github.com/agda/agda/issues/888 On Sun, Apr 30, 2017 at 7:24 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > Consider this example : > > ``` > module test where > > > data T : Set where > t : T > tt : T > > data D : T ? Set where > d : D t > dt : D tt > > > f : T ? T > f t = tt > f tt = t > > g : (x : T) ? D (f (f (f x))) > g x = {!!} where > e = (f (f (f x))) > > ``` > > A. When someone checks the hole with C-c C-, , he does not see the type of > e. > > B. It would be nice if the goal type and the context were updated to > contain the e variable. > > If the expressions are very long, I currently have to check them very > carefully to see if the variable I have defined is the same as the > expression. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Mon May 1 15:49:15 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Mon, 1 May 2017 15:49:15 +0200 Subject: [Agda] Final call for papers: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury Message-ID: <7e77af73-6f01-f5ca-2232-59d1ca21a225@cs.ru.nl> ----------------------------- F I N A L C A L L F O R P A P E R S ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == INVITED SPEAKERS == Conor McBride University of Strathclyde (UK) C?t?lin Hri?cu INRIA Paris (FR) == IMPORTANT DATES == Submission of draft papers: 5 May, 2017 Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == Co-Chairs Meng Wang University of Kent (UK) Scott Owens University of Kent (UK) PC Jeremy Yallop University of Cambridge (UK) Nicolas Wu University of Bristol (UK) Laura Castro University of A Coru?a (ES) Gabriel Scherer Northeastern University (US) Edwin Brady University of St Andrews (UK) Janis Voigtl?nder Radboud University Nijmegen (NL) Peter Achten Radboud University Nijmegen (NL) Tom Schrijvers KU Leuven (BE) Matthew Fluet Rochester Institute of Technology (US) Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario (AG) Patricia Johann Appalachian State University (US) Bruno Oliveira The University of Hong Kong (HK) Rita Loogen Philipps-Universit?t Marburg (GE) David Van Horn University of Marylan (US) Soichiro Hidaka Hosei University (JP) Micha? Pa?ka Chalmers University of Technology (SE) Sandrine Blazy University of Rennes 1 - IRISA (FR) From abela at chalmers.se Mon May 1 21:22:01 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 1 May 2017 21:22:01 +0200 Subject: [Agda] APLAS 2017 call for papers Message-ID: <322740f8-060d-f161-1966-51aa6e44261a@chalmers.se> ********************************************************************* APLAS 2017 Call for Papers 15th Asian Symposium on Programming Languages and Systems Suzhou, China, November 27-29, 2017 https://www-aplas.github.io/ ********************************************************************* # Important Dates - Abstract deadline: Tuesday, June 13, 2017 - Paper deadline: Friday, June 16, 2017 - Author response: Wednesday-Friday, July 26-28, 2017 - Author notification: Monday, August 14, 2017 - Camera-ready deadline: Friday, September 1, 2017 - Conference: Monday-Wednesday, November 27-29, 2017 All deadline times are AoE. # About APLAS aims to stimulate programming language research by providing a forum for the presentation of latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia but is an international forum that serves the worldwide programming languages community. APLAS is sponsored by the Asian Association for Foundation of Software (AAFS), founded by Asian researchers in cooperation with many researchers from Europe and the USA. Past APLAS symposiums were successfully held in Hanoi ('16), Pohang ('15), Singapore ('14), Melbourne ('13), Kyoto ('12), Kenting ('11), Shanghai ('10), Seoul ('09), Bangalore ('08), Singapore ('07), Sydney ('06), Tsukuba ('05), Taipei ('04), and Beijing ('03) after three informal workshops. Proceedings of the past symposiums were published in Springer's LNCS. # Topics The symposium is devoted to foundational and practical issues broadly spanning the areas of programming languages and systems. Papers are solicited on topics such as - semantics, logics, foundational theory - design of languages, type systems, and foundational calculi - domain-specific languages - compilers, interpreters, abstract machines - program derivation, synthesis, and transformation - program analysis, verification, model-checking - logic, constraint, probabilistic, and quantum programming - software security - concurrency and parallelism - tools and environments for programming and implementation Topics are not limited to those discussed in previous symposiums. Papers identifying future directions of programming and those addressing the rapid changes of the underlying computing platforms are especially welcome. Demonstration of systems and tools in the scope of APLAS are welcome to the System and Tool demonstrations category. Authors concerned about the appropriateness of a topic are welcome to consult with program chair prior to submission. # Submission We solicit submissions in two categories: - **Regular research papers** describing original scientific research results, including system development and case studies. Regular research papers *should not exceed 18 pages* in the Springer LNCS format, including bibliography and figures. This category encompasses both theoretical and implementation (also known as system descriptions) papers. In either case, submissions should clearly identify what has been accomplished and why it is significant. Submissions will be judged on the basis of significance, relevance, correctness, originality, and clarity. System descriptions papers should contain a link to a working system and will be judged on originality, usefulness, and design. In case of lack of space, proofs, experimental results, or any information supporting the technical results of the paper could be provided as an appendix or a link to a web page, but reviewers are not obliged to read them. - **System and tool demonstrations** describing a demonstration of a tool or a system that support theory, program construction, reasoning, or program execution in the scope of APLAS. The main purpose of a tool paper is to display a completed, robust and well-documented tool--highlighting the overall functionality of the tool, the interfaces of the tool, interesting examples and applications of the tool, an assessment of the tool's strengths and weaknesses, and a summary of documentation/support available with the tool. Authors of tool demonstration proposals are expected to present a live demonstration of the tool at the conference. It is highly desirable that the tools are available on the web. System and Tool papers should not exceed 8 pages in the Springer LNCS format, including bibliography and figures. They may include an additional appendix of up to 6 extra pages giving the outline, screenshots, examples, etc. to indicate the content of the proposed live demo. Papers should be submitted electronically via the submission web page https://easychair.org/conferences/?conf=aplas2017 using EasyChair. The acceptable format is PDF. Submitted papers must be unpublished and not submitted for publication elsewhere. Papers must be written in English. The proceedings will be published as a volume in Springer's LNCS series. Accepted papers must be presented at the conference. # Review Process *New for APLAS 2017* ## Lightweight Double-Blind Reviewing Process APLAS 2017 will use a lightweight double-blind reviewing process. Following this process means that reviewers will not see the authors' names or affiliations as they initially review a paper. The authors' names will then be revealed to the reviewers only once their reviews have been submitted. To facilitate this process, submitted papers must adhere to the following: - **Author names and institutions must be omitted** and - References to the authors' own related work should be in the third person (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission, makes the job of reviewing the paper more difficult, or interferes with the process of disseminating new ideas. For example, important background references should *not* be omitted or anonymized, even if they are written by the same authors and share common ideas, techniques, or infrastructure. Authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ## Author Response Period During the author response period, authors will be able to read reviews and respond to them as appropriate. ## Research Integrity The Program Committee reserves the right, up until the time of publication, to reverse a decision of paper acceptance. Reversal is possible if fatal flaws are discovered in the paper, or research integrity is found to have been seriously breached. # Organizers ## General Chair Xinyu Feng (University of Science and Technology of China) ## Program Chair Bor-Yuh Evan Chang (University of Colorado Boulder) ## Program Committee Andreas Abel (Gothenburg University) Aws Albarghouthi (University of Wisconsin-Madison) Sam Blackshear (Facebook) Yu-Fang Chen (Academia Sinica) Yuting Chen (Shanghai Jiao Tong University) Stephen Chong (Harvard University) Vijay D'Silva (Google) Benjamin Delaware (Purdue University) Rayna Dimitrova (MPI-SWS) Cezara Dragoi (INRIA, ENS, CNRS) William Harris (Georgia Institute of Technology) Guoliang Jin (North Carolina State University) Akash Lal (Microsoft Research, India) Vu Le (Microsoft) Akimasa Morihata (University of Tokyo) Sergio Mover (University of Colorado Boulder) Santosh Nagarakatte (Rutgers University) Hakjoo Oh (Korea University) Bruno C. D. S. Oliveira (The University of Hong Kong) Xiaokang Qiu (Purdue University) Arjun Radhakrishna (University of Pennsylvania) Aseem Rastogi (Microsoft Research) Sukyoung Ryu (KAIST) Ilya Sergey (University College London) Makoto Tatsuta (National Institute of Informatics) Tachio Terauchi (JAIST) Bow-Yaw Wang (Academia Sinica) Yingfei Xiong (Peking University) Kwangkeun Yi (Seoul National University) Danfeng Zhang (Pennsylvania State University) Xin Zhang (Georgia institute of Technology) Kenny Zhu (Shanghai Jiao Tong University) ## Local Organization Chair Ming Fu (University of Science and Technology of China) -- Conference Website: https://www-aplas.github.io/ EasyChair: https://easychair.org/conferences/?conf=aplas2017 -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Tue May 2 11:10:25 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 02 May 2017 12:10:25 +0300 Subject: [Agda] `search' format In-Reply-To: <4918bf2a-ecd6-a551-6dcf-22ba57bf9f1e@ifi.lmu.de> References: <1493410866.2792.15.camel@one.mechvel.pereslavl.ru> <4918bf2a-ecd6-a551-6dcf-22ba57bf9f1e@ifi.lmu.de> Message-ID: <1493716225.2563.21.camel@one.mechvel.pereslavl.ru> On Sat, 2017-04-29 at 17:26 +0200, Andreas Abel wrote: > It looks like you want to find the first element that satisfies P. > > I'd do this with an inductive predicate for the result: > > open import Data.List > open import Data.List.Any > open import Data.List.All > > open import Relation.Nullary > open import Relation.Nullary.Decidable > open import Relation.Unary > > data FirstMatch {A : Set} (P : A ? Set) : List A ? Set where > here : ?{x xs} (p : P x) ? FirstMatch P (x ? xs) > there : ?{x xs} (?p : ? (P x)) (ps : FirstMatch P xs) > ? FirstMatch P (x ? xs) > > findFirst : ?{A : Set}{P : A ? Set} (f : Decidable P) > ? Decidable (FirstMatch P) > findFirst f [] = no ?() > findFirst f (x ? xs) with f x > findFirst f (x ? xs) | yes p = yes (here p) > findFirst f (x ? xs) | no ?p with findFirst f xs > findFirst f (x ? xs) | no ?p | yes p = yes (there ?p p) > findFirst f (x ? xs) | no ?p | no ?q = no > ?{ (here p) ? ?p p ; (there _ q) ? ?q q} > I see, thank you. I thought of the partition prefix, found, suffix to be explicitly returned together with a proof for prefix ++ (found ? suffix) ? xs. Anyway, these parts can be somehow `extracted' from FirstMatch. Meanwhile I use Found and Search (shown below), and I thought of whether Standard library has anything close to this. Because this is not nice to reinvent an item of Standard. I have come to this because I use the partition prefix, found, suffix to arrange a termination proof for recursion with a list. Because each prefix and suffix has a smaller length than xs. Regards, ------ Sergei > On 28.04.2017 22:21, Sergei Meshveliani wrote: > > Can people tell, please, > > > > what may be a sensible general format for searching in a list? > > > > I consider this one: > > > > search : ? {p} {P : A ? Set p} ? (P? : Decidable P) ? (xs : List A) ? > > > > Found P? xs ? All (?_ ? P) xs > > > > where Found is defined as > > > > record Found {p} {P : A ? Set p} (P? : Decidable P) (xs : List A) : > > Set _ > > where > > field prefix : List A > > found : A > > suffix : List A > > ?prefix : All (?_ ? P) prefix > > P-found : P found > > concatEq : prefix ++ (found ? suffix) ? xs > > > > I think this expresses completely the axioms for searching in a list. > > > > Has Standard library something similar? > > > > (I am sorry if the list answered to this long ago, I just do not > > recall). > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > From apostolis.xekoukoulotakis at gmail.com Wed May 3 09:24:59 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 3 May 2017 10:24:59 +0300 Subject: [Agda] Help at propositional equality proof that contains subst. Message-ID: Hello, I have something like this : ``` postulate B : Set A : B ? Set big_expression : {b : B} ? (a : A b) ? B h : {b : B} ? (a : A b) ? A (big_expression a) eq : {b : B} ? (a : A b) ? (big_expression a) ? b f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a f = {!!} ``` h is defined inductively, thus it would be very easy to prove this if I did not have subst in the equality. Any advice on how to proceed? I can't find a way to remove subst. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Wed May 3 10:51:52 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 3 May 2017 10:51:52 +0200 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: Hi, Did you already try to use `with (eq a)` and then match with refl? I think that should do the trick. Otherwise, the brute-force way to get rid of annoying equality proofs in your types is by using the J eliminator. But the result is usually not very pretty... -- Jesper On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > Hello, > > I have something like this : > > ``` > postulate > B : Set > A : B ? Set > big_expression : {b : B} ? (a : A b) ? B > h : {b : B} ? (a : A b) ? A (big_expression a) > eq : {b : B} ? (a : A b) ? (big_expression a) ? b > > f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a > f = {!!} > > ``` > > h is defined inductively, thus it would be very easy to prove this if I > did not have subst in the equality. > > Any advice on how to proceed? > > I can't find a way to remove subst. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Wed May 3 10:58:36 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 3 May 2017 11:58:36 +0300 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: I tried 'with (big_expression a) | (eq a)' . It does not work because of the h function. It says that the result is not well typed. >From what I understand, we cannot abstract (eq a) without abstracting the h function, but I need the h function to do the proof. On Wed, May 3, 2017 at 11:51 AM, Jesper Cockx wrote: > Hi, > > Did you already try to use `with (eq a)` and then match with refl? I think > that should do the trick. > > Otherwise, the brute-force way to get rid of annoying equality proofs in > your types is by using the J eliminator. But the result is usually not very > pretty... > > -- Jesper > > On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis < > apostolis.xekoukoulotakis at gmail.com> wrote: > >> Hello, >> >> I have something like this : >> >> ``` >> postulate >> B : Set >> A : B ? Set >> big_expression : {b : B} ? (a : A b) ? B >> h : {b : B} ? (a : A b) ? A (big_expression a) >> eq : {b : B} ? (a : A b) ? (big_expression a) ? b >> >> f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a >> f = {!!} >> >> ``` >> >> h is defined inductively, thus it would be very easy to prove this if I >> did not have subst in the equality. >> >> Any advice on how to proceed? >> >> I can't find a way to remove subst. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Wed May 3 12:18:17 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 3 May 2017 12:18:17 +0200 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: I tried to find a solution, but I think what you're trying to do is impossible. You have postulated a proof of `(big_expression a) ? b`, but an actual proof of this equality is impossible because this would imply that `a` has type `A (big_expression a)`, which is cyclic. The unifier (sensibly) refuses to construct this cyclic type of `a`, so matching with refl on the proof fails. Since it's impossible to have this proof reduce to `refl`, it's also impossible to simplify the expression `subst A (eq a) (h a)`. -- Jesper On Wed, May 3, 2017 at 10:58 AM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > I tried 'with (big_expression a) | (eq a)' . It does not work because of > the h function. > > It says that the result is not well typed. > > From what I understand, we cannot abstract (eq a) without abstracting the > h function, but I need the h function to do the proof. > > > > On Wed, May 3, 2017 at 11:51 AM, Jesper Cockx wrote: > >> Hi, >> >> Did you already try to use `with (eq a)` and then match with refl? I >> think that should do the trick. >> >> Otherwise, the brute-force way to get rid of annoying equality proofs in >> your types is by using the J eliminator. But the result is usually not very >> pretty... >> >> -- Jesper >> >> On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis < >> apostolis.xekoukoulotakis at gmail.com> wrote: >> >>> Hello, >>> >>> I have something like this : >>> >>> ``` >>> postulate >>> B : Set >>> A : B ? Set >>> big_expression : {b : B} ? (a : A b) ? B >>> h : {b : B} ? (a : A b) ? A (big_expression a) >>> eq : {b : B} ? (a : A b) ? (big_expression a) ? b >>> >>> f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a >>> f = {!!} >>> >>> ``` >>> >>> h is defined inductively, thus it would be very easy to prove this if I >>> did not have subst in the equality. >>> >>> Any advice on how to proceed? >>> >>> I can't find a way to remove subst. >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Wed May 3 14:12:43 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Wed, 3 May 2017 14:12:43 +0200 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: It might make sense to state and prove f with heterogeneous equality instead, it's possibly a weaker statement, but you won't have subst in the type then. On Wed, May 3, 2017 at 10:58 AM, Apostolis Xekoukoulotakis wrote: > I tried 'with (big_expression a) | (eq a)' . It does not work because of the > h function. > > It says that the result is not well typed. > > From what I understand, we cannot abstract (eq a) without abstracting the h > function, but I need the h function to do the proof. > > > > On Wed, May 3, 2017 at 11:51 AM, Jesper Cockx wrote: >> >> Hi, >> >> Did you already try to use `with (eq a)` and then match with refl? I think >> that should do the trick. >> >> Otherwise, the brute-force way to get rid of annoying equality proofs in >> your types is by using the J eliminator. But the result is usually not very >> pretty... >> >> -- Jesper >> >> On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis >> wrote: >>> >>> Hello, >>> >>> I have something like this : >>> >>> ``` >>> postulate >>> B : Set >>> A : B ? Set >>> big_expression : {b : B} ? (a : A b) ? B >>> h : {b : B} ? (a : A b) ? A (big_expression a) >>> eq : {b : B} ? (a : A b) ? (big_expression a) ? b >>> >>> f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a >>> f = {!!} >>> >>> ``` >>> >>> h is defined inductively, thus it would be very easy to prove this if I >>> did not have subst in the equality. >>> >>> Any advice on how to proceed? >>> >>> I can't find a way to remove subst. >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From apostolis.xekoukoulotakis at gmail.com Wed May 3 16:47:03 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 3 May 2017 17:47:03 +0300 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: I uploaded my code to see the actual function. https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79f5032125a1/agda/IndexLLProp.agda#L178 The proofs I use in 'subst2' are here: https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79f5032125a1/agda/IndexLLProp.agda#L154 https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79f5032125a1/agda/LinLogic.agda#L135 Andrea, I tried to use heterogeneous equality. I will give it one more try. On Wed, May 3, 2017 at 3:12 PM, Andrea Vezzosi wrote: > It might make sense to state and prove f with heterogeneous equality > instead, it's possibly a weaker statement, but you won't have subst in > the type then. > > > > On Wed, May 3, 2017 at 10:58 AM, Apostolis Xekoukoulotakis > wrote: > > I tried 'with (big_expression a) | (eq a)' . It does not work because of > the > > h function. > > > > It says that the result is not well typed. > > > > From what I understand, we cannot abstract (eq a) without abstracting > the h > > function, but I need the h function to do the proof. > > > > > > > > On Wed, May 3, 2017 at 11:51 AM, Jesper Cockx wrote: > >> > >> Hi, > >> > >> Did you already try to use `with (eq a)` and then match with refl? I > think > >> that should do the trick. > >> > >> Otherwise, the brute-force way to get rid of annoying equality proofs in > >> your types is by using the J eliminator. But the result is usually not > very > >> pretty... > >> > >> -- Jesper > >> > >> On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis > >> wrote: > >>> > >>> Hello, > >>> > >>> I have something like this : > >>> > >>> ``` > >>> postulate > >>> B : Set > >>> A : B ? Set > >>> big_expression : {b : B} ? (a : A b) ? B > >>> h : {b : B} ? (a : A b) ? A (big_expression a) > >>> eq : {b : B} ? (a : A b) ? (big_expression a) ? b > >>> > >>> f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a > >>> f = {!!} > >>> > >>> ``` > >>> > >>> h is defined inductively, thus it would be very easy to prove this if I > >>> did not have subst in the equality. > >>> > >>> Any advice on how to proceed? > >>> > >>> I can't find a way to remove subst. > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >>> > >> > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed May 3 21:29:36 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 03 May 2017 22:29:36 +0300 Subject: [Agda] =?utf-8?q?infix_=E2=88=B8-mono_=3F?= Message-ID: <1493839776.2513.7.camel@one.mechvel.pereslavl.ru> Dear list, Standard library has infix _+-mono_ and _*-mono_ in Data.Nat.Properties. So, why ?-mono is prefix? Regards, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Thu May 4 07:44:35 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 4 May 2017 08:44:35 +0300 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: I think that I introduced the cycle in my attempt to simplify the example. This seems to be closer to what my code actually looks like: ``` postulate B : Set A : B ? Set big_expression : (c : B) ? {b : B} ? (a : A b) ? B h : (c : B) ? {b : B} ? (a : A b) ? A (big_expression c a) eq : (c : B) ? {b : B} ? (a : A b) ? (big_expression c a) ? c f : {b : B} ? (a : A b) ? subst A (eq b a) (h b a) ? a f = {!!} ``` I hope that this is cycle free. (In my code eq holds under stricter conditions than h`s input but here their inputs are the same. f is to be proved under these stricter conditions.) On Wed, May 3, 2017 at 5:47 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > I uploaded my code to see the actual function. > > https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79 > f5032125a1/agda/IndexLLProp.agda#L178 > > The proofs I use in 'subst2' are here: > > https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79 > f5032125a1/agda/IndexLLProp.agda#L154 > > https://github.com/xekoukou/sparrow/blob/750bcebeb488c52f1b95083e8cff79 > f5032125a1/agda/LinLogic.agda#L135 > > Andrea, > I tried to use heterogeneous equality. I will give it one more try. > > On Wed, May 3, 2017 at 3:12 PM, Andrea Vezzosi > wrote: > >> It might make sense to state and prove f with heterogeneous equality >> instead, it's possibly a weaker statement, but you won't have subst in >> the type then. >> >> >> >> On Wed, May 3, 2017 at 10:58 AM, Apostolis Xekoukoulotakis >> wrote: >> > I tried 'with (big_expression a) | (eq a)' . It does not work because >> of the >> > h function. >> > >> > It says that the result is not well typed. >> > >> > From what I understand, we cannot abstract (eq a) without abstracting >> the h >> > function, but I need the h function to do the proof. >> > >> > >> > >> > On Wed, May 3, 2017 at 11:51 AM, Jesper Cockx >> wrote: >> >> >> >> Hi, >> >> >> >> Did you already try to use `with (eq a)` and then match with refl? I >> think >> >> that should do the trick. >> >> >> >> Otherwise, the brute-force way to get rid of annoying equality proofs >> in >> >> your types is by using the J eliminator. But the result is usually not >> very >> >> pretty... >> >> >> >> -- Jesper >> >> >> >> On Wed, May 3, 2017 at 9:24 AM, Apostolis Xekoukoulotakis >> >> wrote: >> >>> >> >>> Hello, >> >>> >> >>> I have something like this : >> >>> >> >>> ``` >> >>> postulate >> >>> B : Set >> >>> A : B ? Set >> >>> big_expression : {b : B} ? (a : A b) ? B >> >>> h : {b : B} ? (a : A b) ? A (big_expression a) >> >>> eq : {b : B} ? (a : A b) ? (big_expression a) ? b >> >>> >> >>> f : {b : B} ? (a : A b) ? subst A (eq a) (h a) ? a >> >>> f = {!!} >> >>> >> >>> ``` >> >>> >> >>> h is defined inductively, thus it would be very easy to prove this if >> I >> >>> did not have subst in the equality. >> >>> >> >>> Any advice on how to proceed? >> >>> >> >>> I can't find a way to remove subst. >> >>> >> >>> _______________________________________________ >> >>> Agda mailing list >> >>> Agda at lists.chalmers.se >> >>> https://lists.chalmers.se/mailman/listinfo/agda >> >>> >> >> >> > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpientka at cs.mcgill.ca Thu May 4 10:30:07 2017 From: bpientka at cs.mcgill.ca (Brigitte Pientka) Date: Thu, 4 May 2017 10:30:07 +0200 Subject: [Agda] PPDP 2017: Call For Papers (Abstract 12 May / Paper 19 May) Message-ID: ======================================================== CALL FOR PAPERS 19th International Symposium on Principles and Practice of Declarative Programming PPDP 2017 Namur, Belgium, October 9-11, 2017 (co-located with LOPSTR'17) http://complogic.cs.mcgill.ca/ppdp2017 ======================================================== SUBMISSION DEADLINE: 12 May (abstracts) / 19 May (papers) ======================================================== PPDP 2017 is a forum that brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics from principles to practice, from foundations to applications. Topics of interest include, but are not limited to ** Language Design: domain-specific languages; interoperability; concurrency, parallelism, and distribution; modules; probabilistic languages; reactive languages; database languages; knowledge representation languages; languages with objects; language extensions for tabulation; metaprogramming. ** Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; garbage collection; memory management. ** Foundations: type systems; type classes; dependent types; logical frameworks; monads; resource analysis; cost models; continuations; control; state; effects; semantics. ** Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. ** Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. This year the conference will be co-located with the 27th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2017). IMPORTANT DATES: Abstract Submission: 12 May 2017 Paper Submission: 19 May 2017 Paper Rebuttal: 10 July 2017 Notification: 20 July 2017 Final Version: 15 Aug 2017 SUBMISSION CATEGORIES: Submissions can be made in three categories: regular Research Papers, System Descriptions, and Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures and bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submissions of research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 6 pages. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using declarative programming * comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum * curricular issues encountered when using declarative programming in education * real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general * novel use of declarative programming in the classroom * programming pearl that illustrates a nifty new data structure or programming technique. SUBMISSION GUIDELINES: Submissions must be formatted using ACM style files (latest release December 2016) using the instructions at https://www.acm.org/publications/proceedings-template To prepare your submission using LaTex: * Download acmart.zip from https://www.ctan.org/pkg/acmart * Unzip acmart.zip * Run latex acmart.ins to produce an acmart.cls file * Run pdflatex sample-sigconf.tex to check that your installation works correctly * Write your paper using sample-sigconf.tex as a template Proofs of theoretical results that do not fit within the page limit, executables of systems, code of case studies, benchmarks used to evaluate a given system, etc., should be made available, via a reference to a website or in an appendix of the paper. Reviewers will be encouraged to consider this additional material, but are not obliged to. Submissions must be self-contained within the respective page limit; considering the additional material should not be necessary to assess the merits of a submission. At least one author of each accepted submission will be expected to attend and present their paper at the conference. Papers must be submitted via easychair. The submission site is at https://easychair.org/conferences/?conf=ppdp2017 PROCEEDING Accepted papers will be published in the ACM International Conference Proceedings Series. PROGRAM CHAIR Brigitte Pientka (McGill University) PROGRAM COMMITTEE Andreas Abel (Gothenburg University) Nadia Amin (EPFL) Zena M. Ariola (University of Oregon) Kenichi Asai (Ochanomizu University) James Cheney (University of Edinburgh) Mariangiola Dezani-Ciancaglini (University of Torino) Santiago Escobar (Universitat Polit?cnica de Val?ncia) Amy Felty (University of Ottawa) Thom Fr?hwirth (University of Ulm) Patricia Johann (Appalachian State University) Neel Krishnaswami (University of Cambridge) Micha?l Leuschel (Universit?t D?sseldorf) Yanhong Annie Liu (Stony Brook University) Andres Loeh (Well-Typed) Vivek Nigam (Federal University of Paraiba / fortiss) Naoki Nishida (Nagoya University) Catuscia Palamidessi (INRIA) Brigitte Pientka (McGill University) (PC Chair) Ulrich Schoepp (Ludwig Maximilian University) Chung-chieh Shan (Indiana University) Bernardo Toninho (Imperial College London) LOCAL ORGANIZER (joint with LOPSTR): Wim Vanhoof (University of Namur) ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Thu May 4 10:38:03 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 4 May 2017 10:38:03 +0200 Subject: [Agda] =?utf-8?q?infix_=E2=88=B8-mono_=3F?= In-Reply-To: <1493839776.2513.7.camel@one.mechvel.pereslavl.ru> References: <1493839776.2513.7.camel@one.mechvel.pereslavl.ru> Message-ID: <73447950-3f45-d771-ffeb-9dc6eb3ff328@cse.gu.se> On 2017-05-03 21:29, Sergei Meshveliani wrote: > Standard library has infix _+-mono_ and _*-mono_ in > Data.Nat.Properties. > So, why ?-mono is prefix? I don't know. My guess is that this happened by accident. -- /NAD From asr at eafit.edu.co Thu May 4 13:51:42 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 4 May 2017 06:51:42 -0500 Subject: [Agda] =?utf-8?q?infix_=E2=88=B8-mono_=3F?= In-Reply-To: <73447950-3f45-d771-ffeb-9dc6eb3ff328@cse.gu.se> References: <1493839776.2513.7.camel@one.mechvel.pereslavl.ru> <73447950-3f45-d771-ffeb-9dc6eb3ff328@cse.gu.se> Message-ID: On 4 May 2017 at 03:38, Nils Anders Danielsson wrote: > On 2017-05-03 21:29, Sergei Meshveliani wrote: >> >> Standard library has infix _+-mono_ and _*-mono_ in >> Data.Nat.Properties. >> So, why ?-mono is prefix? > > > I don't know. My guess is that this happened by accident. Could you fix the accident, please. (I prefer a prefix version of these functions) -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From m.escardo at cs.bham.ac.uk Thu May 4 14:06:50 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 4 May 2017 13:06:50 +0100 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: Message-ID: <31bc60b2-8f01-ecf5-78d4-b5b0dfb664e3@cs.bham.ac.uk> On 04/05/17 06:44, apostolis.xekoukoulotakis at gmail.com wrote: > This seems to be closer to what my code actually looks like: > > postulate > B : Set > A : B ? Set > big_expression : (c : B) ? {b : B} ? (a : A b) ? B > h : (c : B) ? {b : B} ? (a : A b) ? A (big_expression c a) > eq : (c : B) ? {b : B} ? (a : A b) ? (big_expression c a) ? c > > f : {b : B} ? (a : A b) ? subst A (eq b a) (h b a) ? a > f = {!!} We have eq b a : big_expression b a = b h b a : A(big_expression b a) Consider the instantiations A b = Bool big_expression c {b} a = c h c {b} a = true eq b a = refl So the type subst A (eq b a) (h b a) ? a amounts to subst A refl true = a, that is, true = a. Hence we have f : {b : B} ? (a : Bool) ? true ? a which of course can't be proved. Hence, in the generality you have things above, you can't complete the definition of f. Of course it may well be that for your specific B, A, big_expression, h and eq, you can complete the definition of f. You will need to cook-up a more specific abstraction of your code for us to be able to help more here in this list. I hope this helps. Martin From nad at cse.gu.se Thu May 4 14:11:31 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 4 May 2017 14:11:31 +0200 Subject: [Agda] =?utf-8?q?infix_=E2=88=B8-mono_=3F?= In-Reply-To: References: <1493839776.2513.7.camel@one.mechvel.pereslavl.ru> <73447950-3f45-d771-ffeb-9dc6eb3ff328@cse.gu.se> Message-ID: <32b5de47-035d-ccb9-f671-42427e853090@cse.gu.se> On 2017-05-04 13:51, Andr?s Sicard-Ram?rez wrote: > Could you fix the accident, please. > > (I prefer a prefix version of these functions) And I prefer the infix version. I also suspect that you would break more code by renaming _+-mono_ and _*-mono_ than by renaming ?-mono. Furthermore one could argue that it is better to leave the names as they are, to avoid breaking code. I no longer maintain the standard library, so I'm leaving this decision to others. -- /NAD From anders.mortberg at inria.fr Thu May 4 19:08:38 2017 From: anders.mortberg at inria.fr (Anders) Date: Thu, 4 May 2017 19:08:38 +0200 Subject: [Agda] Call for Contributions: Workshop on HoTT/UF (with FSCD 2017) Message-ID: ========================================================== CALL FOR CONTRIBUTIONS Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF, at FSCD 2017) ========================================================== ------------------------------------------------------------------------ Workshop on Homotopy Type Theory and Univalent Foundations September 8-9, 2017, Oxford, United Kingdom https://hott-uf.github.io/2017/ Co-located with FSCD 2017 https://www.cs.ox.ac.uk/conferences/fscd2017/ Abstract submission deadline: June 30 ------------------------------------------------------------------------ Homotopy Type Theory is a young area of logic, combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. The goal of this workshop is to bring together researchers interested in all aspects of Homotopy Type Theory/Univalent Foundations: from the study of syntax and semantics of type theory to practical formalization in proof assistants based on univalent type theory. As part of the workshop there will be an introductory tutorial intended to make the invited and contributed talks accessible to non-experts. ============================ # Invited talks/tutorials * Thorsten Altenkirch (University of Nottingham) (tutorial) * Ulrik Buchholtz (Technical University of Darmstadt) * Thierry Coquand (University of Gothenburg) ================ # Submissions * Abstract submission deadline: June 30 * Author notification: mid July Submissions should consist of a title and a 1-2 pages abstract, in pdf format, via https://easychair.org/conferences/?conf=hottuf17 Considering the broad background of the expected audience, we encourage authors to include information of pedagogical value in their abstract, such as motivation and context of their work. ====================== # Program committee * Paolo Capriotti (University of Nottingham) * Chris Kapulkin (University of Western Ontario) * Peter LeFanu Lumsdaine (Stockholm University) * Assia Mahboubi (Inria Saclay) * Paige North (University of Cambridge) * Nicolas Tabareau (Inria Nantes) ================ # Organizers * Benedikt Ahrens (Inria Nantes) * Simon Huber (University of Gothenburg) * Anders M?rtberg (Inria Sophia Antipolis) From manuel at enigmage.de Thu May 4 20:07:00 2017 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Thu, 4 May 2017 20:07:00 +0200 Subject: [Agda] Problems with strict positivity In-Reply-To: References: <8d26fa90-ac5c-4425-2276-66e795706922@enigmage.de> Message-ID: <9b20f8b2-9f51-7ae1-406c-92924bd46db0@enigmage.de> Yes, that seems to fix it! Thank you very much. On 25/04/17 17:11, Andreas Abel wrote: > Hello Manuel, > > I recently fixed > > https://github.com/agda/agda/issues/1899 > > The fix has not been released yet, it will be part of Agda 2.5.3 or > 2.6.0. > > Could you try your example with the development version of Agda? > > Best, > Andreas > > On 25.04.2017 16:50, Manuel B?renz wrote: >> Dear list, >> >> I'm experiencing strange behaviour with strict positivity. It seems to >> me that in some cases, the strict positivity test is different for >> records than for algebraic datatypes. >> >> Consider this example, which might need a fairly recent development >> version of the standard library: >> >> A : ? {c ?} {C : Container c} ? ? C ? (Set ?) ? Set (c ? ?) >> A (s , f) = ? p ? f p >> >> record thing {?} (C : Container ?) : Set ? where >> coinductive >> field >> getThing : ? C ? (thing C) >> open thing >> >> record testRecord {?} {C : Container ?} (aThing : thing C) : Set ? where >> inductive >> field >> testField : A (map testRecord (getThing aThing)) >> >> data testData {?} {C : Container ?} (aThing : thing C) : Set ? where >> testCons : A (map testData (getThing aThing)) ? testData aThing >> >> I'm sorry for not being able to condense it further. >> >> The strange behaviour is this: The definition of testRecord is rejected >> with the following error message: >> >> testRecord is not strictly positive, because it occurs >> in the 7th argument to map >> in the 4th argument to A >> in the definition of testRecord. >> >> But the definition of testData goes through without a problem! Is there >> an actual difference between the two? Should there be one? >> >> (The reason why I'm worrying about this is because I need a record for >> coinduction.) >> >> Best regards, Manuel >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -- I'm using Enigmail on Thunderbird to sign and encrypt my emails with GPG! Why not try it yourself? https://enigmail.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From igorzsci at gmail.com Thu May 4 20:41:32 2017 From: igorzsci at gmail.com (v0id_NULL) Date: Fri, 5 May 2017 04:41:32 +1000 Subject: [Agda] Difference between parameterized and indexed datatypes Message-ID: Dear list, Help me please. I can not understand what difference between these definitions. data T1 {?} : Set ? where c1 : T1 data T2 : {? : _} ? Set ? where c2 : T2 Why first one is approved but second one is rejected with error "The sort of T2 cannot depend on its indices in the type {? : Agda.Primitive.Level} ? Set ? when checking the definition of T2"? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Thu May 4 20:52:12 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Thu, 4 May 2017 20:52:12 +0200 Subject: [Agda] Difference between parameterized and indexed datatypes In-Reply-To: References: Message-ID: The sort is not allowed to depend on an index to prevent you from defining things like data D : (a : Level) -> Set a where c0 : D lzero c1 : D (lsuc lzero) _+_ : (a b : Level) -> D a -> D b -> D (a ? b) I don't know that having such definitions would break anything, but I also have no idea what they mean. In principle the restriction could be relaxed to allow your definition, but that would make it more complex to implement and explain, and offer no tangible benefits. We would allow exactly those cases where the level could be made a parameter. / Ulf On Thu, May 4, 2017 at 8:41 PM, v0id_NULL wrote: > Dear list, > > Help me please. I can not understand what difference between these > definitions. > > data T1 {?} : Set ? where > c1 : T1 > > data T2 : {? : _} ? Set ? where > c2 : T2 > > Why first one is approved but second one is rejected with error > "The sort of T2 cannot depend on its indices in the type {? : > Agda.Primitive.Level} ? Set ? when checking the definition of T2"? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From byorgey at gmail.com Thu May 4 23:57:56 2017 From: byorgey at gmail.com (Brent Yorgey) Date: Thu, 04 May 2017 21:57:56 +0000 Subject: [Agda] 2nd CFP: Workshop on Type-driven Development (TyDe '17) In-Reply-To: References: Message-ID: -------------------------------------------------------------------------------- CALL FOR PAPERS 2nd Workshop on Type-Driven Development (TyDe '17) 3 September 2017, Oxford, UK http://tydeworkshop.org/2017 -------------------------------------------------------------------------------- # Goals of the workshop The workshop on Type-Driven Development aims to show how static type information may be used effectively in the development of computer programs. Co-located with ICFP, this workshop brings together leading researchers and practitioners who are using or exploring types as a means of program development. We welcome all contributions, both theoretical and practical, on a range of topics including: - dependently typed programming; - generic programming; - design and implementation of programming languages, exploiting types in novel ways; - exploiting typed data, data dependent data, or type providers; - static and dynamic analyses of typed programs; - tools, IDEs, or testing tools exploiting type information; - pearls, being elegant, instructive examples of types used in the derivation, calculation, or construction of programs. # Invited speaker Andrew Kennedy, Facebook, UK # Program Committee - Nada Amin, EPFL, Switzerland - Ana Bove, Chalmers University of Technology, Sweden - Patricia Johann, Appalachian State University, US - Yukiyoshi Kameyama, University of Tsukuba, Japan - Sam Lindley, The University of Edinburgh, UK (co-chair) - Limin Jia, CMU, US - Assia Mahboubi, INRIA Saclay, France - Liam O?Connor, University of New South Wales, Australia - Nicolas Oury, Jane Street, UK - Jennifer Paykin, University of Pennsylvania, US - Paula Severi, University of Leicester, UK - Tarmo Uustalu, Tallinn University of Technology, Estonia - Jeremy Yallop, University of Cambridge, UK - Brent Yorgey, Hendrix College, US (co-chair) # Proceedings and Copyright We plan to have formal proceedings, published by the ACM. Accepted papers will be included in the ACM Digital Library. Authors must grant ACM publication rights upon acceptance, but may retain copyright if they wish. Authors are encouraged to publish auxiliary material with their paper (source code, test data, and so forth). The proceedings will be freely available for download from the ACM Digital Library from one week before the start of the conference until two weeks after the conference. # Submission details Submissions should fall into one of two categories: - Regular research papers (12 pages) - Extended abstracts (2 pages) The bibliography will not be counted against the page limits for either category. Regular research papers are expected to present novel and interesting research results, and will be included in the formal proceedings. Extended abstracts should report work in progress that the authors would like to present at the workshop. Extended abstracts will be distributed to workshop attendees but will not be published in the formal proceedings. We welcome submissions from PC members (with the exception of the two co-chairs), but these submissions will be held to a higher standard. Submission is handled through HotCRP: https://icfp-tyde17.hotcrp.com/ All submissions should be in portable document format (PDF) and formatted using the ACM SIGPLAN style guidelines: http://www.sigplan.org/Resources/Author/ *Note* that the ACM SIGPLAN style guidelines have changed from previous years! In particular, submissions should use the new ?acmart? format and the two-column ?sigplan? subformat (not to be confused with the one-column ?acmlarge? subformat!). Extended abstracts must be submitted with the label 'Extended abstract' clearly in the title. # Important Dates - Regular paper deadline: Wednesday, 24th May, 2017 - Extended abstract deadline: Wednesday, 7th June, 2017 - Author notification: Wednesday, 28th June, 2017 - Deadline for camera ready version: Saturday, 15th July, 2017 - Workshop: Sunday, 3rd September, 2017 # Travel Support Student attendees with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC program, see its web page: http://www.sigplan.org/PAC/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Fri May 5 06:43:13 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 5 May 2017 07:43:13 +0300 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: <31bc60b2-8f01-ecf5-78d4-b5b0dfb664e3@cs.bham.ac.uk> References: <31bc60b2-8f01-ecf5-78d4-b5b0dfb664e3@cs.bham.ac.uk> Message-ID: I think to have solved the problem by first proving heterogeneous equality and then abstracting function h. I made a concrete example below. You can try filling the hole and see if you can prove the statement without using heterogeneous equality. ``` module test where open import Data.Nat module _ where open import Relation.Binary.PropositionalEquality data A : ? ? Set where cz : A zero ca : {n : ?} ? A n ? A (suc n) h : {b : ?} ? A b ? A (b + zero) h cz = cz h (ca a) = ca (h a) eq : (c : ?) ? (c + zero) ? c eq zero = refl eq (suc c) = cong (? x ? suc x) (eq c) f : {b : ?} ? (a : A b) ? subst A (eq b) (h a) ? a f {zero} cz = refl f {suc b} (ca n) = {!!} -- with (b + zero) | (eq b) -- ... | g | r = ? module _ where open import Relation.Binary.HeterogeneousEquality g : {b : ?} ? (a : A b) ? h a ? a g cz = refl g (ca {n} a) = cong? {B = A} {C = (? x y ? A (suc x))} (? x y ? ca {n = x} y) (?-to-? (eq n)) (g a) module _ where open import Relation.Binary.PropositionalEquality open import Relation.Binary.HeterogeneousEquality using (_?_ ; refl ; ?-to-?) af : (b w : ?) (eq : w ? b) (a : A b) ? (h : A b ? A w) ? (h a ? a) ? subst A eq (h a) ? a af b .b refl a h hteq = ?-to-? hteq fg : {b : ?} ? (a : A b) ? subst A (eq b) (h a) ? a fg {b} a = af b (b + zero) (eq b) a h (g a) ``` On Thu, May 4, 2017 at 3:06 PM, Martin Escardo wrote: > > > On 04/05/17 06:44, apostolis.xekoukoulotakis at gmail.com wrote: > >> This seems to be closer to what my code actually looks like: >> >> postulate >> B : Set >> A : B ? Set >> big_expression : (c : B) ? {b : B} ? (a : A b) ? B >> h : (c : B) ? {b : B} ? (a : A b) ? A (big_expression c a) >> eq : (c : B) ? {b : B} ? (a : A b) ? (big_expression c a) ? c >> >> f : {b : B} ? (a : A b) ? subst A (eq b a) (h b a) ? a >> f = {!!} >> > > We have > > eq b a : big_expression b a = b > h b a : A(big_expression b a) > > Consider the instantiations > > A b = Bool > big_expression c {b} a = c > h c {b} a = true > eq b a = refl > > So the type subst A (eq b a) (h b a) ? a amounts to > > subst A refl true = a, > > that is, > true = a. > > Hence we have > > f : {b : B} ? (a : Bool) ? true ? a > > which of course can't be proved. > > Hence, in the generality you have things above, you can't complete the > definition of f. > > Of course it may well be that for your specific B, A, big_expression, > h and eq, you can complete the definition of f. > > You will need to cook-up a more specific abstraction of your code > for us to be able to help more here in this list. > > I hope this helps. > > Martin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Fri May 5 07:16:02 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 5 May 2017 07:16:02 +0200 Subject: [Agda] Help at propositional equality proof that contains subst. In-Reply-To: References: <31bc60b2-8f01-ecf5-78d4-b5b0dfb664e3@cs.bham.ac.uk> Message-ID: The trick is to also abstract over the recursive call: f : {b : ?} ? (a : A b) ? subst A (eq b) (h a) ? a f {zero} cz = refl f {suc b} (ca n) with b + zero | eq b | h n | f n ... | .b | refl | hn | ih = cong ca ih / Ulf On Fri, May 5, 2017 at 6:43 AM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > I think to have solved the problem by first proving heterogeneous equality > and then abstracting function h. > I made a concrete example below. You can try filling the hole and see if > you can prove the statement without using heterogeneous equality. > > ``` > module test where > > open import Data.Nat > > module _ where > open import Relation.Binary.PropositionalEquality > > > data A : ? ? Set where > cz : A zero > ca : {n : ?} ? A n ? A (suc n) > > h : {b : ?} ? A b ? A (b + zero) > h cz = cz > h (ca a) = ca (h a) > > eq : (c : ?) ? (c + zero) ? c > eq zero = refl > eq (suc c) = cong (? x ? suc x) (eq c) > > f : {b : ?} ? (a : A b) ? subst A (eq b) (h a) ? a > f {zero} cz = refl > f {suc b} (ca n) = {!!} -- with (b + zero) | (eq b) > -- ... | g | r = ? > > > module _ where > open import Relation.Binary.HeterogeneousEquality > > g : {b : ?} ? (a : A b) ? h a ? a > g cz = refl > g (ca {n} a) = cong? {B = A} {C = (? x y ? A (suc x))} (? x y ? ca {n = > x} y) (?-to-? (eq n)) (g a) > > > module _ where > open import Relation.Binary.PropositionalEquality > open import Relation.Binary.HeterogeneousEquality using (_?_ ; refl ; > ?-to-?) > > af : (b w : ?) (eq : w ? b) (a : A b) ? (h : A b ? A w) ? (h a ? a) > ? subst A eq (h a) ? a > af b .b refl a h hteq = ?-to-? hteq > > > fg : {b : ?} ? (a : A b) ? subst A (eq b) (h a) ? a > fg {b} a = af b (b + zero) (eq b) a h (g a) > > > ``` > > On Thu, May 4, 2017 at 3:06 PM, Martin Escardo > wrote: > >> >> >> On 04/05/17 06:44, apostolis.xekoukoulotakis at gmail.com wrote: >> >>> This seems to be closer to what my code actually looks like: >>> >>> postulate >>> B : Set >>> A : B ? Set >>> big_expression : (c : B) ? {b : B} ? (a : A b) ? B >>> h : (c : B) ? {b : B} ? (a : A b) ? A (big_expression c a) >>> eq : (c : B) ? {b : B} ? (a : A b) ? (big_expression c a) ? c >>> >>> f : {b : B} ? (a : A b) ? subst A (eq b a) (h b a) ? a >>> f = {!!} >>> >> >> We have >> >> eq b a : big_expression b a = b >> h b a : A(big_expression b a) >> >> Consider the instantiations >> >> A b = Bool >> big_expression c {b} a = c >> h c {b} a = true >> eq b a = refl >> >> So the type subst A (eq b a) (h b a) ? a amounts to >> >> subst A refl true = a, >> >> that is, >> true = a. >> >> Hence we have >> >> f : {b : B} ? (a : Bool) ? true ? a >> >> which of course can't be proved. >> >> Hence, in the generality you have things above, you can't complete the >> definition of f. >> >> Of course it may well be that for your specific B, A, big_expression, >> h and eq, you can complete the definition of f. >> >> You will need to cook-up a more specific abstraction of your code >> for us to be able to help more here in this list. >> >> I hope this helps. >> >> Martin >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri May 5 12:25:32 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 05 May 2017 13:25:32 +0300 Subject: [Agda] Char + String Message-ID: <1493979932.2919.13.camel@one.mechvel.pereslavl.ru> Dear List, I have the following simple question about Standard library. To prepend c : Char to str : String, I write open import Data.String using (...) renaming (_++_ to _++'_) import Data.Char.Base as CharBase str' = (CharBase.show c) ++' str (++ is renamed, because there is also used Data.List.++ in the module). Can this str' be written simpler? For example, to prepend to Vec, one can use Data.Vec._?_ Thanks, ------ Sergei From mechvel at botik.ru Fri May 5 22:25:41 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 05 May 2017 23:25:41 +0300 Subject: [Agda] Char + String In-Reply-To: <1493979932.2919.13.camel@one.mechvel.pereslavl.ru> References: <1493979932.2919.13.camel@one.mechvel.pereslavl.ru> Message-ID: <1494015941.3313.10.camel@one.mechvel.pereslavl.ru> On Fri, 2017-05-05 at 13:25 +0300, Sergei Meshveliani wrote: > [..] > To prepend c : Char to str : String, I write > open import Data.String using (...) renaming (_++_ to _++'_) > import Data.Char.Base as CharBase > > str' = (CharBase.show c) ++' str > (++ is renamed, because there is also used Data.List.++ in the > module). It occurs that this is not prepending a Char, because the above `show' sets something extra there. Instead it works Str.toString (c ? (Str.fromString str)). It costs O(length str). But is there possible a simpler expression (and not so expensive) ? Thanks, ------ Sergei From mechvel at botik.ru Fri May 5 22:35:19 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 05 May 2017 23:35:19 +0300 Subject: [Agda] Char + String In-Reply-To: <1494015941.3313.10.camel@one.mechvel.pereslavl.ru> References: <1493979932.2919.13.camel@one.mechvel.pereslavl.ru> <1494015941.3313.10.camel@one.mechvel.pereslavl.ru> Message-ID: <1494016519.3462.4.camel@one.mechvel.pereslavl.ru> On Fri, 2017-05-05 at 23:25 +0300, Sergei Meshveliani wrote: > On Fri, 2017-05-05 at 13:25 +0300, Sergei Meshveliani wrote: > > [..] > > > To prepend c : Char to str : String, I write > > > open import Data.String using (...) renaming (_++_ to _++'_) > > import Data.Char.Base as CharBase > > > > str' = (CharBase.show c) ++' str > > > (++ is renamed, because there is also used Data.List.++ in the > > module). > > > It occurs that this is not prepending a Char, because the above `show' > sets something extra there. > > Instead it works > Str.toString (c ? (Str.fromString str)). > > It costs O(length str). > > But is there possible a simpler expression > (and not so expensive) ? I am sorry: may be this is Str.toString (c ? []) ++' str Regards, ------ Sergei From P.Achten at cs.ru.nl Mon May 8 10:34:43 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Mon, 8 May 2017 10:34:43 +0200 Subject: [Agda] Deadline extension may 15: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury Message-ID: <26acc05f-bc58-b143-221b-3b434372723b@cs.ru.nl> TFP 2017 EXTENSION: Deadline extension until Monday, 15 May (anywhere on earth). -------------------------------------------------------------------------------- We encourage anyone who wants to present their work at TFP in Canterbury, England this June to submit a 2-10 page abstract if time is too short to put together a full paper. ----------------------------- F I N A L C A L L F O R P A P E R S ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == INVITED SPEAKERS == Conor McBride University of Strathclyde (UK) C?t?lin Hri?cu INRIA Paris (FR) == IMPORTANT DATES == Submission of draft papers: ***15 May, 2017*** extension Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == Co-Chairs Meng Wang University of Kent (UK) Scott Owens University of Kent (UK) PC Jeremy Yallop University of Cambridge (UK) Nicolas Wu University of Bristol (UK) Laura Castro University of A Coru?a (ES) Gabriel Scherer Northeastern University (US) Edwin Brady University of St Andrews (UK) Janis Voigtl?nder Radboud University Nijmegen (NL) Peter Achten Radboud University Nijmegen (NL) Tom Schrijvers KU Leuven (BE) Matthew Fluet Rochester Institute of Technology (US) Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario (AG) Patricia Johann Appalachian State University (US) Bruno Oliveira The University of Hong Kong (HK) Rita Loogen Philipps-Universit?t Marburg (GE) David Van Horn University of Marylan (US) Soichiro Hidaka Hosei University (JP) Micha? Pa?ka Chalmers University of Technology (SE) Sandrine Blazy University of Rennes 1 - IRISA (FR) From francois.pottier at inria.fr Wed May 10 13:06:01 2017 From: francois.pottier at inria.fr (=?UTF-8?Q?Fran=c3=a7ois_Pottier?=) Date: Wed, 10 May 2017 13:06:01 +0200 Subject: [Agda] Second call for talk proposals: Higher-Order Programming with Effects, HOPE 2017 Message-ID: <09a45bc5-4a46-312d-2ebc-1e82df4da778@inria.fr> ------------------------------------------------------------------------------ CALL FOR TALK PROPOSALS HOPE 2017 The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects September 3, 2017 Oxford, United Kingdom (the day before ICFP 2017) http://icfp17.sigplan.org/track/hope-2017-papers ------------------------------------------------------------------------------ The HOPE workshop series are intended to bring together researchers interested in the design, semantics, implementation, and verification of higher-order effectful programs. They are informal, consisting of invited talks, contributed talks on work in progress, and open-ended discussion sessions. They are dedicated to John Reynolds, whose work is an inspiration to us all. The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects will take place on Sunday, September 3, 2017, that is, the day before ICFP 2017, in Oxford, United Kingdom. # Goals of the Workshop A recurring theme in many papers at ICFP, and in the research of many ICFP attendees, is the interaction of higher-order programming with various kinds of effects: storage effects, I/O, control effects, concurrency, etc. While effects are of critical importance in many applications, they also make code harder to build, maintain, and reason about. Higher-order languages (both functional and object-oriented) provide a variety of abstraction mechanisms to help "tame" or "encapsulate" effects (e.g. monads, ADTs, ownership types, typestate, first-class events, transactions, Hoare Type Theory, session types, substructural and region-based type systems), and a number of different semantic models and verification technologies have been developed in order to codify and exploit the benefits of this encapsulation (e.g. bisimulations, step-indexed Kripke logical relations, higher-order separation logic, game semantics, various modal logics). But there remain many open problems, and the field is highly active. The goal of the HOPE workshop is to bring researchers from a variety of different backgrounds and perspectives together to exchange new and exciting ideas concerning the design, semantics, implementation, and verification of higher-order effectful programs. We want HOPE to be as informal and interactive as possible. The program will thus involve a combination of invited talks, contributed talks about work in progress, and open-ended discussion sessions. There will be no published proceedings, but participants will be invited to submit working documents, talk slides, etc., to be made available online. # Call for Talk Proposals We solicit proposals for contributed talks. We recommend preparing proposals of at most 2 pages, in either plain text or PDF format. However, we will accept longer proposals or submissions to other conferences, under the understanding that PC members are only expected to read the first two pages of such longer submissions. When submitting talk proposals, authors should specify how long a talk the speaker wishes to give. By default, contributed talks will be 30 minutes long, but proposals for shorter or longer talks will also be considered. Speakers may also submit supplementary material (e.g. a full paper, talk slides) if they desire, which PC members are free (but not expected) to read. We are interested in talks on all topics related to the interaction of higher-order programming and computational effects. Talks about work in progress are particularly encouraged. If you have any questions about the relevance of a particular topic, please contact the PC chairs, Fran?ois Pottier (francois.pottier at inria.fr) and Aleks Nanevski (aleks.nanevski at imdea.org). # Important Dates * Deadline for talk proposals: June 1st, 2017 (Thursday) * Notification of acceptance: July 1st, 2017 (Saturday) * Workshop: September 3, 2017 (Sunday) # Submission Link The submission website is https://icfp-hope17.hotcrp.com/ . # Workshop Organization Program Co-Chairs: Fran?ois Pottier (Inria Paris) Aleks Nanevski (IMDEA Software Institute) Program Committee: Edwin Brady University of St Andrews Pierre-?variste Dagand LIP6/CNRS Atsushi Igarashi Kyoto University Robbert Krebbers Delft University of Technology Vivek Nigam Federal University of Para?ba Matija Pretnar University of Ljubljana Azalea Raad Imperial College London Aseem Rastogi Microsoft Research Filip Sieczkowski University of Wroc?aw Niki Vazou University of Maryland From andrei at inf.unibe.ch Wed May 10 16:16:40 2017 From: andrei at inf.unibe.ch (Andrei Chis) Date: Wed, 10 May 2017 16:16:40 +0200 Subject: [Agda] 2nd CfP: SLE 2017 (10th ACM SIGPLAN International Conference on Software Language Engineering) Message-ID: ======================================================================== **Call for Papers** 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017) 23-24 October 2017, Vancouver, Canada (Co-located with SPLASH 2017) General chair: Benoit Combemale, University of Rennes 1, France Program co-chairs: Marjan Mernik, University of Maribor, Slovenia Bernhard Rumpe, RWTH Aachen University, Germany Artifact evaluation chairs: Tanja Mayerhofer, TU Wien, Austria Laurence Tratt, King's College London, UK Keynote Speaker: Peter D. Mosses, Swansea University, UK (http://cs.swan.ac.uk/~cspdm/) http://conf.researchr.org/track/sle-2017/sle-2017-papers http://www.sleconf.org/2017 Follow us on twitter: https://twitter.com/sleconf ======================================================================== Software Language Engineering (SLE) is the application of systematic, disciplined, and measurable approaches to the development, use, deployment, and maintenance of software languages. The term "software language" is used broadly, and includes: general-purpose programming languages; domain-specific languages (e.g. BPMN, Simulink, Modelica); modeling and metamodeling languages (e.g. SysML and UML); data models and ontologies (e.g. XML-based and OWL-based languages and vocabularies). ### Important Dates Fri 2 Jun 2017 - Abstract Submission Fri 9 Jun 2017 - Paper Submission Fri 4 Aug 2017 - Author Notification Thu 10 Aug 2017 - Artifact Submission Fri 1 Sep 2017 - Artifact Notification Fri 8 Sep 2017 - Camera Ready Deadline Sun 22 Oct - SLE workshops Mon 23 Oct - Tue 24 Oct 2017 - SLE Conference ### Topics of Interest SLE aims to be broad-minded and inclusive about relevance and scope. We solicit high-quality contributions in areas ranging from theoretical and conceptual contributions to tools, techniques, and frameworks in the domain of language engineering. Topics relevant to SLE cover generic aspects of software languages development rather than aspects of engineering a specific language. In particular, SLE is interested in principled engineering approaches and techniques in the following areas: * Language Design and Implementation * Approaches and methodologies for language design * Static semantics (e.g., design rules, well-formedness constraints) * Techniques for behavioral / executable semantics * Generative approaches (incl. code synthesis, compilation) * Meta-languages, meta-tools, language workbenches * Language Validation * Verification and formal methods for languages * Testing techniques for languages * Simulation techniques for languages * Language Integration and Composition * Coordination of heterogeneous languages and tools * Mappings between languages (incl. transformation languages) * Traceability between languages * Deployment of languages to different platforms * Language Maintenance * Software language reuse * Language evolution * Language families and variability * Domain-specific approaches for any aspects of SLE (design, implementation, validation, maintenance) * Empirical evaluation and experience reports of language engineering tools * User studies evaluating usability * Performance benchmarks * Industrial applications ### Types of Submissions * **Research papers**: These should report a substantial research contribution to SLE or successful application of SLE techniques or both. Full paper submissions must not exceed 12 pages including bibliography in ACM SIGPLAN acmart conference style ( http://www.sigplan.org/Resources/Author/). * **Tool papers**: Because of SLE's interest in tools, we seek papers that present software tools related to the field of SLE. Selection criteria include originality of the tool, its innovative aspects, and relevance to SLE. Any of the SLE topics of interest are appropriate areas for tool demonstrations. Submissions must provide a tool description of 4 pages including bibliography in ACM SIGPLAN acmart conference style ( http://www.sigplan.org/Resources/Author/), and a demonstration outline including screenshots of up to 6 pages. Tool demonstrations must have the keywords ?Tool Demo? or ?Tool Demonstration? in the title. The 4-page tool description will, if the demonstration is accepted, be published in the proceedings. The 6-page demonstration outline will be used by the program committee only for evaluating the submission. * **Industrial papers**: These should describe real-world application scenarios of SLE in industry, explained in their context with an analysis of the challenges that were overcome and the lessons which the audience can learn from this experience. Industry paper submissions must not exceed 6 pages including bibliography in ACM SIGPLAN acmart conference style ( http://www.sigplan.org/Resources/Author/). * **New ideas / vision papers**: New ideas papers should describe new, non-conventional SLE research approaches that depart from standard practice. They are intended to describe well-defined research ideas that are at an early stage of investigation. Vision papers are intended to present new unifying theories about existing SLE research that can lead to the development of new technologies or approaches. New ideas / vision papers must not exceed 4 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). ### Artifact evaluation SLE will for the second year use an evaluation process for assessing the quality of artifacts on which papers are based. The aim of this evaluation process is to foster a culture of experimental reproducibility as well as a higher quality in the research area as a whole. Authors of papers accepted for SLE 2017 will be invited to submit artifacts. Any kind of artifact that is presented in the paper, supplements the paper with further details, or underlies the paper can be submitted. This includes, for instance, tools, grammars, metamodels, models, programs, algorithms, scripts, proofs, datasets, statistical tests, checklists, surveys, interview scripts, visualizations, annotated bibliographies, and tutorials. The submitted artifacts will be reviewed by a dedicated Artifact Evaluation Committee (AEC). Artifacts that live up to the expectations created by the paper will receive a badge of approval from the AEC. The approved artifacts will be invited for inclusion in the electronic conference proceedings published in the ACM Digital Library. This will ensure the permanent and durable storage of the artifacts alongside the published papers fostering the repeatability of experiments, enabling precise comparison with alternative approaches, and helping the dissemination of the author?s ideas in detail. Participating in the artifact evaluation and publishing approved artifacts in the ACM Digital Library is voluntary. However, we strongly encourage authors to consider this possibility as the availability of artifacts will greatly benefit readers of papers and increase the impact of the work. Note that the artifact evaluation cannot affect the acceptance of the paper, because it only happens after the decision about acceptance has been made. ### Publications All submitted papers will be reviewed by at least three members of the program committee. All accepted papers, including tool papers, industrial papers and new ideas / vision papers will be published in ACM Digital Library. Selected accepted papers will be invited to a special issue of the Computer Languages, Systems and Structures (COMLAN) journal. ### Awards * **Distinguished paper**: Award for most notable paper, as determined by the PC chairs based on the recommendations of the program committee. * **Distinguished reviewer**: Award for distinguished reviewer, as determined by the PC chairs using feedback from the authors. * **Distinguished artifact**: Award for the artifact most significantly exceeding expectations, as determined by the AEC chairs based on the recommendations of the artifact evaluation committee. ### Program Committee Marjan Mernik (co-chair), University of Maribor, Slovenia Bernhard Rumpe (co-chair), RWTH Aachen University, Germany Christian Berger, Chalmers, Sweden Mark van den Brand, TU Eindhoven, The Netherlands Ruth Breu, University of Innsbruck, Austria Jordi Cabot, ICREA, Spain Walter Cazzola, University of Milan, Italy Marsha Chechik, University of Toronto, Canada Tony Clark, Middlesex University, UK Tom Dinkelaker, Ericsson, Germany Bernd Fischer, Stellenbosch University, South Africa Sebastian Gerard, CEA, France Jeff Gray, University of Alabama, USA Esther Guerra, Autonomous University of Madrid, Spain Michael Homer, Victoria University of Wellington, New Zealand Ralf L?mmel, University of Koblenz-Landau, Germany Tihamer Levendovszky, Microsoft, USA Gunter Mussbacher, McGill University, Canada Terence Parr, University of San Francisco, USA Jaroslav Porub?n, University of Ko?ice, Slovakia Jan Ringert, Tel Aviv University, Israel Julia Rubin, University of British Columbia, Canada Tony Sloane, Macquarie University, Australia Eugene Syriani, University of Montreal, Canada Emma S?derberg, Google, Denmark Eric Van Wyk, University of Minnesota, USA Jurgen Vinju, CWI, Netherlands Eric Walkingshaw, Oregon State University, USA Andreas Wortmann, RWTH Aachen University, Germany Tian Zhang, Nanjing University, China ### Contact For any question, please contact the organizers via email: sle2017 at inria.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri May 12 20:43:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 12 May 2017 21:43:29 +0300 Subject: [Agda] notes on type check performance Message-ID: <1494614609.2400.25.camel@one.mechvel.pereslavl.ru> Dear list, These are several notes concerning the type check performance. I. Sharing representation ========================= Probably the current problem is implementing a real sharing representation of a term. For example, to make the type checker work with let T = (A ? A) ? (A ? A) ? (A ? A) in T ? T instead of its expanded form. Agda has the --sharing option, but it helps in rare cases, at least, no in my DoCon-A project. II. One of the principal exponent cost source ============================================= The following is about the source of the type check cost which has a fundamental origin and is common to Agda and Coq. - On 2017-01-13 Robbert Krebbers wrote: -------- This may be related: having large chains of coercions is also problematic in Coq, see [1]: There is also a severe efficiency issue: the complexity of Coq's term comparison algorithm is exponential in the length of the coercion chain. While this is clearly a problem specific to the current Coq implementation, it is hard and unlikely to be resolved soon, so it seems prudent to seek a design that does not run into it. The paper [1] describes another way of organizing algebraic hierarchies in Coq so that these long chains of coercions can be avoided. It quite crucially relies on Coq's canonical structures mechanism, so I have no clue whether you can practically do something similar in Agda. [1] Fran?ois Garillot, Georges Gonthier, Assia Mahboubi, Laurence Rideau. Packaging Mathematical Structures. TPHOLs'09. https://hal.inria.fr/inria-00368403v2 ---------------------------------------------------------------------- The paper [1] writes in introduction: " While this unbundling allows for maximal flexibility, it also induces a proliferation of arguments that is rapidly overwhelming. A typical algebraic structure, such as a ring, involves half a dozen constants and even more axioms. Moreover such structures are often nested, e.g., for the Cayley-Hamilton theorem one needs to consider the ring of polynomials over the ring of matrices over a general commutative ring. The size of the terms involved grows as C^n , where C is the number of separate components of a structure, and n is the structure nesting depth. For Cayley-Hamilton we would have C = 15 and n = 3, and thus terms large enough to make theorem proving impractical, given that algorithms in user-level tactics are more often than not nonlinear. " I am trying to understand this example, and thus to understand the nature of this particular source of the exponent cost grow effect. It is about the construction of Pol (SquareMatrix (R : CommutativeRing)), and let us imagine that this is coded in Agda. Here CommutativeRing is a record defining a notion of an abstract commutative ring - something similar to CommutativeRing of Agda Standard library. a) CommutativeRing has the operations 0#, 1#, _+_, _-_, _*_, zeroLaw, unityLaw, +oppositeLaw, +-assoc, +-comm, *-assoc, *-comm, distributivityLawFor+*, may be something else. All right, let us assume that there are about 15 operations ("constants and axioms", as the paper writes). b) SquareMatrix over any (R : CommutativeRing) is a data structure to be defined in application. This is something like let C = Carrier R in List (Vec C n), with the condition of length of the vector list equal to n. If R : CommutativeRing, then indeed, for SquareMatrix R there can be implemented the operations #0, #1, _+_, _-_, _*_, zeroLaw, unityLaw, +oppositeLaw, +-assoc, +-comm; *-assoc, distributivityLawFor+*. Here _*_ is multiplication of two n ? n matrices, and the implementation actually proves that these matrix operations satisfy the axioms of Ring. This makes it the instance squareMatrixRing : Ring. c) For any (R : Ring) an univariate polynomial domain Pol R can be defined as a data structure. There can be defined the operations 0#, 1#, _+_, _*_ for Pol R. If R is commutative by _*_, then Pol R can be proved a certain CommutativeRing instance. If R is not commutative, then, I expect, probably, Pol R can be proved a certain Ring instance. d) So, we have that the construct of Pol (SquareMatrix (R : CommutativeRing)) is expressed in the Agda program as ? R : CommutativeRing, -- abstract ? n : ?, n > 0, mR = (squareMatrixRing R n) : Ring, pmR = (polynomialRing mR) : Ring. About 15 operation instances are implemented in mR, Implementing _+_ for mR needs to use only 0# and _+_ of R. Implementing _*_ for mR needs to use almost all operations of R, this makes it a certain term depending of 15 argument operations. Further, about 15 operation instances are implemented in pmR, Implementing _*_ for pmR uses almost all operations of mR. Assume that each operation instance implementation op in mR is represented merely as a _tree_ where each node expresses an operation. This node has several outbound edges, each edge points to some operation op' in R which is used in the implementation of op. The paper authors write: "The size of the terms involved grows as C^n". I understand this so that the size of the trees involved in the described above Agda program for pmR = (polynomialRing mR) : Ring is bounded by 15 ^ 3 - provided that the above trees are stored in memory in expanded unfolded form. In various unlucky examples this upper bound of 15^3 is reached. Assume roughly that each operation in the mR instance is a term in which occur 15 operations from R (like it is for the _*_ instance). So the tree size for mR (the type expression size) is 15^2. Assume roughly that each operation in the pmR instance is a term in which occur 15 operations from mR (like it is for the _*_ instance). Then, we have that that the tree for pmR has 15^3 leaves. And note that in this term the terms for mR._+_ and mR._*_ are copied many times. And the implementation term for rm._*_ is large. I guess that this is what the authors wrote about. II.2. What DoCon-A has with this respect ======================================== * DoCon-0.04.1 has the generic tower from Semigroup and Monoid up to CommutativeRing, IntegralRing, FactorizationMonoid, FactorizationRing, UniqueFactorizationRing, Field. * FactorizationRing relies on the structure of Multiset and on the instance of CommutativeMonoid for (Multiset D) for D : DecSetoid and for the sum operation on multisets. Various theorems rely on the instance of CommutativeMonoid Nonzero for multipication on nonzero elements in any R : IntegralRing. * There are implemented all the above instances for Integer, except Field. And the (FactorizationRing Integer) instance is implemented via (FactorizationNonoid (Nat \ 0)). This concerns _only an ordinary textbook on basic algebra_, a book of about, say, 200 pages. For this particular textbook, the depth of term for the instances involved is bounded. The depth in the above example from [1] is 3. (1) A similar depth bound in DoCon-A-0.04.1 is somewhat about 5. (2) Now, DoCon-A-0.04.1 needs 8 Gb memory and 64 minutes to type-check on a 3 GHz machine. (3) On the other hand, the corresponding definitions and rigorous constructive proofs take only about 200 pages in a textbook, and a human checks these proofs by reading this book. A human will check it, probably, in 20 days. But the type checker processes the text millions times faster. We see that the checker of (3) takes a small resource on this term of size C^5, while that checker of (2) takes a large resource. May be, this inefficiency can be improved by introducing the let-in representation of terms. The paper [1] describes a certain subtle approach taken in Coq which handles the problem. So far, I do not understand it (I need to look further into the paper). And I wonder, why did not they simply apply the let-in representation of terms. II.3. Comparing to Glasgow Haskell ================================== DoCon (written in Haskell) has been tested on computing in the domains like Matrix (Pol [x, y] ((Pol t (Fraction Integer)) / (f))), which have a greater term size. And there are examples in practice that have sense and that have even more levels in the domain construct. And we need to assume that the depth in this tower of constructs is not bounded - similarly as the data item in Agda may have arbitrary many constructor occurrences. Glasgow Haskell compiles fast the above constructs of a great depth (with nested classes and instances). Though, without dependent type, the problem is, probably, easier. Regards, ------ Sergei From martin.stone.davis at gmail.com Mon May 15 05:24:01 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sun, 14 May 2017 20:24:01 -0700 Subject: [Agda] Should adding eta-equality help here? Message-ID: <2ec96ed1-7d9e-f40b-d0c2-05362d2432b4@gmail.com> I wonder if adding eta-equality should help or should even be necessary here. In any case, Agda complains with the following error and I'm unsure whether this is a bug. The error: Sub.super1 /= Sub.super2 when checking that the expression refl has type Sub.super1 fails ? Sub.super2 fails The code: open import Agda.Builtin.Equality record Super : Set? where eta-equality field set : Set record Sub : Set? where eta-equality field super1 : Super super2 : Super super1=2 : super1 ? super2 postulate X : Set works : Sub works .Sub.super1 = record { set = X } works .Sub.super2 .Super.set = X works .Sub.super1=2 = refl fails : Sub fails .Sub.super1 .Super.set = X fails .Sub.super2 .Super.set = X fails .Sub.super1=2 = refl From andreas.abel at ifi.lmu.de Mon May 15 09:40:46 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Mon, 15 May 2017 09:40:46 +0200 Subject: [Agda] Should adding eta-equality help here? In-Reply-To: <2ec96ed1-7d9e-f40b-d0c2-05362d2432b4@gmail.com> References: <2ec96ed1-7d9e-f40b-d0c2-05362d2432b4@gmail.com> Message-ID: <42d47804-77a1-8f24-b60f-60588fd4ea68@ifi.lmu.de> Hi Martin, thanks for reporting. This is a bug in the conversion checker. eta-equality is turned on for your records by default. You do not need to declare it explicitly. Cheers, Andreas On 15.05.2017 05:24, Martin Stone Davis wrote: > I wonder if adding eta-equality should help or should even be necessary > here. In any case, Agda complains with the following error and I'm > unsure whether this is a bug. > > The error: > > Sub.super1 /= Sub.super2 > when checking that the expression refl has type > Sub.super1 fails ? Sub.super2 fails > > The code: > > open import Agda.Builtin.Equality > > record Super : Set? where > eta-equality > field > set : Set > > record Sub : Set? where > eta-equality > field > super1 : Super > super2 : Super > super1=2 : super1 ? super2 > > postulate > X : Set > > works : Sub > works .Sub.super1 = record { set = X } > works .Sub.super2 .Super.set = X > works .Sub.super1=2 = refl > > fails : Sub > fails .Sub.super1 .Super.set = X > fails .Sub.super2 .Super.set = X > fails .Sub.super1=2 = refl > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From bpientka at cs.mcgill.ca Tue May 16 10:38:57 2017 From: bpientka at cs.mcgill.ca (Brigitte Pientka) Date: Tue, 16 May 2017 10:38:57 +0200 Subject: [Agda] PPDP 2017: ** REVISED PAPER DEADLINE 26 May ** Message-ID: <75395368-FD49-47A1-AECD-3F026D0A5D56@cs.mcgill.ca> ======================================================== CALL FOR PAPERS 19th International Symposium on Principles and Practice of Declarative Programming PPDP 2017 Namur, Belgium, October 9-11, 2017 (co-located with LOPSTR'17) http://complogic.cs.mcgill.ca/ppdp2017 ======================================================== REVISED PAPER SUBMISSION DEADLINE: 26 May ======================================================== PPDP 2017 is a forum that brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics from principles to practice, from foundations to applications. Topics of interest include, but are not limited to ** Language Design: domain-specific languages; interoperability; concurrency, parallelism, and distribution; modules; probabilistic languages; reactive languages; database languages; knowledge representation languages; languages with objects; language extensions for tabulation; metaprogramming. ** Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; garbage collection; memory management. ** Foundations: type systems; type classes; dependent types; logical frameworks; monads; resource analysis; cost models; continuations; control; state; effects; semantics. ** Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. ** Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. This year the conference will be co-located with the 27th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2017). IMPORTANT DATES: Paper Submission: 26 May 2017 Paper Rebuttal: 10 July 2017 Notification: 20 July 2017 Final Version: 15 Aug 2017 SUBMISSION CATEGORIES: Submissions can be made in three categories: regular Research Papers, System Descriptions, and Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures and bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submissions of research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 6 pages. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using declarative programming * comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum * curricular issues encountered when using declarative programming in education * real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general * novel use of declarative programming in the classroom * programming pearl that illustrates a nifty new data structure or programming technique. SUBMISSION GUIDELINES: Submissions must be formatted using ACM style files (latest release December 2016) using the instructions at https://www.acm.org/publications/proceedings-template To prepare your submission using LaTex: * Download acmart.zip from https://www.ctan.org/pkg/acmart * Unzip acmart.zip * Run latex acmart.ins to produce an acmart.cls file * Run pdflatex sample-sigconf.tex to check that your installation works correctly * Write your paper using sample-sigconf.tex as a template Proofs of theoretical results that do not fit within the page limit, executables of systems, code of case studies, benchmarks used to evaluate a given system, etc., should be made available, via a reference to a website or in an appendix of the paper. Reviewers will be encouraged to consider this additional material, but are not obliged to. Submissions must be self-contained within the respective page limit; considering the additional material should not be necessary to assess the merits of a submission. At least one author of each accepted submission will be expected to attend and present their paper at the conference. Papers must be submitted via easychair. The submission site is at https://easychair.org/conferences/?conf=ppdp2017 PROCEEDING Accepted papers will be published in the ACM International Conference Proceedings Series. PROGRAM CHAIR Brigitte Pientka (McGill University) PROGRAM COMMITTEE Andreas Abel (Gothenburg University) Nadia Amin (EPFL) Zena M. Ariola (University of Oregon) Kenichi Asai (Ochanomizu University) James Cheney (University of Edinburgh) Mariangiola Dezani-Ciancaglini (University of Torino) Santiago Escobar (Universitat Polit?cnica de Val?ncia) Amy Felty (University of Ottawa) Thom Fr?hwirth (University of Ulm) Patricia Johann (Appalachian State University) Neel Krishnaswami (University of Cambridge) Micha?l Leuschel (Universit?t D?sseldorf) Yanhong Annie Liu (Stony Brook University) Andres Loeh (Well-Typed) Vivek Nigam (Federal University of Paraiba / fortiss) Naoki Nishida (Nagoya University) Catuscia Palamidessi (INRIA) Brigitte Pientka (McGill University) (PC Chair) Ulrich Schoepp (Ludwig Maximilian University) Chung-chieh Shan (Indiana University) Bernardo Toninho (Imperial College London) LOCAL ORGANIZER (joint with LOPSTR): Wim Vanhoof (University of Namur) ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.stone.davis at gmail.com Wed May 17 01:02:00 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Tue, 16 May 2017 16:02:00 -0700 Subject: [Agda] possible unifier bug / explain error messages? Message-ID: <533f1094-0883-3876-aee4-b1ca8bf8ab02@gmail.com> This looks like an Agda bug to me. If it's not, would someone please explain the error message? I'm confused especially (but not only) by the last line, "_1 = .Agda.Primitive.lzero". That should be pretty easy to solve uniquely, no? The code: postulate set : Set prop : set ? Set module _ x y where postulate _ : prop x _ : prop y The error: > Sort _1 [ at *.agda:5,10-11 ] > _2 : Set _1 [ at *.agda:5,10-11 ] > _7 : set [ at *.agda:8,14-15 ] > _8 : set [ at *.agda:8,14-15 ] > > ???? Errors ???????????????????????????????????????????????? > Failed to solve the following constraints: > _7 := (? x y ? x) [blocked on problem 4] > [4] _2 =< set : (Set _1) > _1 = .Agda.Primitive.lzero > > From ulf.norell at gmail.com Wed May 17 09:36:35 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 17 May 2017 09:36:35 +0200 Subject: [Agda] possible unifier bug / explain error messages? In-Reply-To: <533f1094-0883-3876-aee4-b1ca8bf8ab02@gmail.com> References: <533f1094-0883-3876-aee4-b1ca8bf8ab02@gmail.com> Message-ID: The problem is that _1 is frozen. After checking each set of mutually recursive definitions, any left-over metavariables are frozen, preventing them from being solved. In this case that means you can't solve metas in the module telescope using information from the module definitions. It would indeed be nice if this was explained in the error message in some way. / Ulf On Wed, May 17, 2017 at 1:02 AM, Martin Stone Davis < martin.stone.davis at gmail.com> wrote: > This looks like an Agda bug to me. If it's not, would someone please > explain the error message? I'm confused especially (but not only) by the > last line, "_1 = .Agda.Primitive.lzero". That should be pretty easy to > solve uniquely, no? > > The code: > > postulate > set : Set > prop : set ? Set > > module _ x y where > postulate > _ : prop x > _ : prop y > > The error: > > Sort _1 [ at *.agda:5,10-11 ] >> _2 : Set _1 [ at *.agda:5,10-11 ] >> _7 : set [ at *.agda:8,14-15 ] >> _8 : set [ at *.agda:8,14-15 ] >> >> ???? Errors ???????????????????????????????????????????????? >> Failed to solve the following constraints: >> _7 := (? x y ? x) [blocked on problem 4] >> [4] _2 =< set : (Set _1) >> _1 = .Agda.Primitive.lzero >> >> >> _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Thu May 18 09:24:41 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 18 May 2017 09:24:41 +0200 Subject: [Agda] possible unifier bug / explain error messages? In-Reply-To: References: <533f1094-0883-3876-aee4-b1ca8bf8ab02@gmail.com> Message-ID: <8f5858a7-4d2b-370b-6ad3-e59945971562@chalmers.se> One question here is of course when we should freeze the module telescope. Alternatively, it could be frozen only after the module has been checked entirely. The current behavior is not very nice: Agda should at least emit a warning that the frozen metas will never be instantiated in cases like module _ x y where where no interaction metas are involved. On 17.05.2017 09:36, Ulf Norell wrote: > The problem is that _1 is frozen. After checking each set of mutually > recursive > definitions, any left-over metavariables are frozen, preventing them > from being > solved. In this case that means you can't solve metas in the module > telescope > using information from the module definitions. > > It would indeed be nice if this was explained in the error message in > some way. > > / Ulf > > On Wed, May 17, 2017 at 1:02 AM, Martin Stone Davis > > wrote: > > This looks like an Agda bug to me. If it's not, would someone please > explain the error message? I'm confused especially (but not only) by > the last line, "_1 = .Agda.Primitive.lzero". That should be pretty > easy to solve uniquely, no? > > The code: > > postulate > set : Set > prop : set ? Set > > module _ x y where > postulate > _ : prop x > _ : prop y > > The error: > > Sort _1 [ at *.agda:5,10-11 ] > _2 : Set _1 [ at *.agda:5,10-11 ] > _7 : set [ at *.agda:8,14-15 ] > _8 : set [ at *.agda:8,14-15 ] > > ???? Errors ???????????????????????????????????????????????? > Failed to solve the following constraints: > _7 := (? x y ? x) [blocked on problem 4] > [4] _2 =< set : (Set _1) > _1 = .Agda.Primitive.lzero > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Thu May 18 14:57:49 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 18 May 2017 15:57:49 +0300 Subject: [Agda] notes on type check performance In-Reply-To: <1494614609.2400.25.camel@one.mechvel.pereslavl.ru> References: <1494614609.2400.25.camel@one.mechvel.pereslavl.ru> Message-ID: <1495112269.2935.38.camel@one.mechvel.pereslavl.ru> On Fri, 2017-05-12 at 21:43 +0300, Sergei Meshveliani wrote: > [..] > > These are several notes concerning the type check performance. > [..] > The following is about the source of the type check cost which has a > fundamental origin and is common to Agda and Coq. > > [..] > [1] Fran?ois Garillot, Georges Gonthier, Assia Mahboubi, Laurence > Rideau. Packaging Mathematical Structures. > TPHOLs'09. https://hal.inria.fr/inria-00368403v2 > ---------------------------------------------------------------------- > > > The paper [1] writes in introduction: > " > While this unbundling allows for maximal flexibility, it also induces a > proliferation of arguments that is rapidly overwhelming. A typical > algebraic structure, such as a ring, involves half a dozen constants and > even more axioms. Moreover such structures are often nested, e.g., for > the Cayley-Hamilton theorem one needs to consider the ring of > polynomials over the ring of matrices over a general commutative ring. > The size of the terms involved grows as C^n , where C is the number of > separate components of a structure, and n is the structure nesting > depth. For Cayley-Hamilton we would have C = 15 and n = 3, and thus > terms large enough to make theorem proving impractical, given that > algorithms in user-level tactics are more often than not nonlinear. > " > > > I am trying to understand this example, and thus to understand the > nature of this particular source of the exponent cost grow effect. > > It is about the construction of > > Pol (SquareMatrix (R : CommutativeRing)), > > [..] > The paper authors write: > "The size of the terms involved grows as C^n". In my last letter I agree with this estimation. [1] gives above an example of the depth n = 3 for the domain instance composition. When type-checking DoCon-A-0.04.1, there is possible the depth may be about 5 (for example, parametrized module instances compose). Probably this is why it takes so much heap x time. Further project development has to add many instances, but its type-checking will hardly require any essential depth growth (but considering subtle examples may increase it). Now, in the above estimation C^n there is hidden the copying expense estimation C'^n. The whole estimation is something like C^n * C'^n, where C' is the copying coefficient, C' = (average size of a subterm t) * (average number of copies). C' depends on the implementation of the type checker. So that, probably, introducing some sharing representation of a term will reduce the cost many times. Regards, ------ Sergei > II.2. What DoCon-A has with this respect > ======================================== > > * DoCon-0.04.1 has the generic tower from Semigroup and Monoid up to > CommutativeRing, IntegralRing, FactorizationMonoid, FactorizationRing, > UniqueFactorizationRing, Field. > > * FactorizationRing relies on the structure of Multiset and on the > instance of CommutativeMonoid for (Multiset D) for D : DecSetoid and > for the sum operation on multisets. > Various theorems rely on the instance of CommutativeMonoid Nonzero > for multipication on nonzero elements in any R : IntegralRing. > > * There are implemented all the above instances for Integer, except > Field. > And the (FactorizationRing Integer) instance is implemented via > (FactorizationNonoid (Nat \ 0)). > > This concerns _only an ordinary textbook on basic algebra_, a book of > about, say, 200 pages. > > For this particular textbook, the depth of term for the instances > involved is bounded. > The depth in the above example from [1] is 3. > > (1) A similar depth bound in DoCon-A-0.04.1 is somewhat about 5. > > (2) Now, DoCon-A-0.04.1 needs 8 Gb memory and 64 minutes to type-check > on a 3 GHz machine. > > (3) On the other hand, the corresponding definitions and rigorous > constructive proofs take only about 200 pages in a textbook, and a human > checks these proofs by reading this book. A human will check it, > probably, in 20 days. But the type checker processes the text millions > times faster. > > We see that the checker of (3) takes a small resource on this term of > size C^5, while that checker of (2) takes a large resource. > > May be, this inefficiency can be improved by introducing the let-in > representation of terms. > > The paper [1] describes a certain subtle approach taken in Coq which > handles the problem. So far, I do not understand it > (I need to look further into the paper). > And I wonder, why did not they simply apply the let-in representation of > terms. > > > II.3. Comparing to Glasgow Haskell > ================================== > > DoCon (written in Haskell) has been tested on computing in the domains > like > Matrix (Pol [x, y] ((Pol t (Fraction Integer)) / (f))), > > which have a greater term size. > And there are examples in practice that have sense and that have even > more levels in the domain construct. And we need to assume that the > depth in this tower of constructs is not bounded - similarly as the data > item in Agda may have arbitrary many constructor occurrences. > > Glasgow Haskell compiles fast the above constructs of a great depth > (with nested classes and instances). > Though, without dependent type, the problem is, probably, easier. From xu at math.lmu.de Fri May 19 11:02:22 2017 From: xu at math.lmu.de (Chuangjie Xu) Date: Fri, 19 May 2017 11:02:22 +0200 Subject: [Agda] Autumn school "Proof and Computation" Message-ID: <20170519110222.21303uiln5g6pd3y@webmail.mathematik.uni-muenchen.de> {- Apologies for multiple copies -} Autumn school "Proof and Computation" Herrsching, Germany, 23rd to 26th September 2017 http://www.mathematik.uni-muenchen.de/~schwicht/pc17.php An international autumn school "Proof and Computation" will be held from 23rd to 26th September 2017 at Haus der bayerischen Landwirtschaft Herrsching in Herrsching near Munich. Its aim is to bring together young researchers in the field of Foundations of Mathematics, Computer Science and Philosophy. SCOPE -------------------- - Predicative Foundations - Constructive Mathematics and Type Theory - Computation in Higher Types - Extraction of Programs from Proofs - Algorithmic Aspects in Financial Mathematics COURSES -------------------- - Mark Bickford on Constructive Analysis in NuPrl - Laura Crosilla on Foundations of Predicative Mathematics - Hajime Ishihara on Constructive Reverse Mathematics - Ulrich Kohlenbach on Proof Mining - Davide Rinaldi on Constructivising Transfinite Algebra - Andrei Rodin on Foundations of Axiomatic Mathematics - Gregor Svindland on Algorithmic Aspects in Financial Mathematics WORKING GROUPS -------------------- There will be an opportunity to form ad-hoc groups working on specific projects, but also to discuss in more general terms the vision of constructing correct programs from proofs. APPLICATIONS -------------------- Graduate or PhD students and young postdoctoral researches are invited to apply. Applications must be accompanied by a letter of recommendation, preferably from the thesis adviser, and should be sent to Chuangjie Xu (xu at math.lmu.de). DEADLINE for applications: **30th May 2017**. Applicants will be notified by 30th June 2017. FINANCIAL SUPPORT -------------------- The workshop is supported by the Udo Keller Stiftung (Hamburg), the CID (Computing with Infinite Data) programme of the European Commission and a JSPS core-to-core project. Successful applicants will be offered full-board accommodation for the days of the autumn school. There are no funds, however, to reimburse travel or further expenses, which successful applicants will have to cover otherwise. Klaus Mainzer Peter Schuster Helmut Schwichtenberg ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From nad at cse.gu.se Tue May 23 10:22:53 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 23 May 2017 10:22:53 +0200 Subject: [Agda] possible unifier bug / explain error messages? In-Reply-To: <8f5858a7-4d2b-370b-6ad3-e59945971562@chalmers.se> References: <533f1094-0883-3876-aee4-b1ca8bf8ab02@gmail.com> <8f5858a7-4d2b-370b-6ad3-e59945971562@chalmers.se> Message-ID: On 2017-05-18 09:24, Andreas Abel wrote: > One question here is of course when we should freeze the module > telescope. Alternatively, it could be frozen only after the module has > been checked entirely. If I understand things correctly the caching machinery caches things in connection with freezing of metas. Your suggestion would make caching in the current form much less useful. -- /NAD From francois.pottier at inria.fr Wed May 24 11:25:27 2017 From: francois.pottier at inria.fr (=?UTF-8?Q?Fran=c3=a7ois_Pottier?=) Date: Wed, 24 May 2017 11:25:27 +0200 Subject: [Agda] Last call for talk proposals: Higher-Order Programming with Effects, HOPE 2017 Message-ID: One week to go before the HOPE 2017 deadline! Put this time to good effect: submit a talk proposal and come present your research in Oxford on Sep. 3rd. ------------------------------------------------------------------------------ CALL FOR TALK PROPOSALS HOPE 2017 The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects September 3, 2017 Oxford, United Kingdom (the day before ICFP 2017) http://icfp17.sigplan.org/track/hope-2017-papers ------------------------------------------------------------------------------ The HOPE workshop series are intended to bring together researchers interested in the design, semantics, implementation, and verification of higher-order effectful programs. They are informal, consisting of invited talks, contributed talks on work in progress, and open-ended discussion sessions. They are dedicated to John Reynolds, whose work is an inspiration to us all. The 6th ACM SIGPLAN Workshop on Higher-Order Programming with Effects will take place on Sunday, September 3, 2017, that is, the day before ICFP 2017, in Oxford, United Kingdom. # Goals of the Workshop A recurring theme in many papers at ICFP, and in the research of many ICFP attendees, is the interaction of higher-order programming with various kinds of effects: storage effects, I/O, control effects, concurrency, etc. While effects are of critical importance in many applications, they also make code harder to build, maintain, and reason about. Higher-order languages (both functional and object-oriented) provide a variety of abstraction mechanisms to help "tame" or "encapsulate" effects (e.g. monads, ADTs, ownership types, typestate, first-class events, transactions, Hoare Type Theory, session types, substructural and region-based type systems), and a number of different semantic models and verification technologies have been developed in order to codify and exploit the benefits of this encapsulation (e.g. bisimulations, step-indexed Kripke logical relations, higher-order separation logic, game semantics, various modal logics). But there remain many open problems, and the field is highly active. The goal of the HOPE workshop is to bring researchers from a variety of different backgrounds and perspectives together to exchange new and exciting ideas concerning the design, semantics, implementation, and verification of higher-order effectful programs. We want HOPE to be as informal and interactive as possible. The program will thus involve a combination of invited talks, contributed talks about work in progress, and open-ended discussion sessions. There will be no published proceedings, but participants will be invited to submit working documents, talk slides, etc., to be made available online. # Call for Talk Proposals We solicit proposals for contributed talks. We recommend preparing proposals of at most 2 pages, in either plain text or PDF format. However, we will accept longer proposals or submissions to other conferences, under the understanding that PC members are only expected to read the first two pages of such longer submissions. When submitting talk proposals, authors should specify how long a talk the speaker wishes to give. By default, contributed talks will be 30 minutes long, but proposals for shorter or longer talks will also be considered. Speakers may also submit supplementary material (e.g. a full paper, talk slides) if they desire, which PC members are free (but not expected) to read. We are interested in talks on all topics related to the interaction of higher-order programming and computational effects. Talks about work in progress are particularly encouraged. If you have any questions about the relevance of a particular topic, please contact the PC chairs, Fran?ois Pottier (francois.pottier at inria.fr) and Aleks Nanevski (aleks.nanevski at imdea.org). # Important Dates * Deadline for talk proposals: June 1st, 2017 (Thursday) * Notification of acceptance: July 1st, 2017 (Saturday) * Workshop: September 3, 2017 (Sunday) # Submission Link The submission website is https://icfp-hope17.hotcrp.com/ . # Workshop Organization Program Co-Chairs: Fran?ois Pottier (Inria Paris) Aleks Nanevski (IMDEA Software Institute) Program Committee: Edwin Brady University of St Andrews Pierre-?variste Dagand LIP6/CNRS Atsushi Igarashi Kyoto University Robbert Krebbers Delft University of Technology Vivek Nigam Federal University of Para?ba Matija Pretnar University of Ljubljana Azalea Raad Imperial College London Aseem Rastogi Microsoft Research Filip Sieczkowski University of Wroc?aw Niki Vazou University of Maryland From mechvel at botik.ru Wed May 24 21:13:28 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 24 May 2017 22:13:28 +0300 Subject: [Agda] strange mismatch Message-ID: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> Please, what is wrong here? test1 is type-checked, and test2 is not (in Agda 2.6.0-207bde6) : ----------------------------------------------------------------------- open import Relation.Binary.PropositionalEquality as PE using (_?_) module _ {?} (A : Set ?) (zr a : A) where data Expression : Set ? where con : A ? Expression _:+_ : Expression ? Expression ? Expression f : Expression ? Expression ? Expression f (con zr) y = y f x (con zr) = x f x y = x :+ y test1 : f (con zr) (con a) ? con a test1 = PE.refl test2 : f (con a) (con zr) ? con a test2 = PE.refl ------------------------------------------------------------------------ How to fix? Thanks, ------ Sergei From mechvel at botik.ru Wed May 24 21:35:23 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 24 May 2017 22:35:23 +0300 Subject: [Agda] strange mismatch In-Reply-To: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> Message-ID: <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> On Wed, 2017-05-24 at 22:13 +0300, Sergei Meshveliani wrote: > Please, what is wrong here? > > test1 is type-checked, and test2 is not > (in Agda 2.6.0-207bde6) : > ----------------------------------------------------------------------- > open import Relation.Binary.PropositionalEquality as PE using (_?_) > > module _ {?} (A : Set ?) (zr a : A) > where > data Expression : Set ? where > con : A ? Expression > _:+_ : Expression ? Expression ? Expression > > f : Expression ? Expression ? Expression > f (con zr) y = y > f x (con zr) = x > f x y = x :+ y > > test1 : f (con zr) (con a) ? con a > test1 = PE.refl > > test2 : f (con a) (con zr) ? con a > test2 = PE.refl > ------------------------------------------------------------------------ > > How to fix? May be, listing "zr a" in parameters does not imply that a does not match against zr. I am not sure. May be, I have instead to add to Expression the constructors zr : Expression a : Expression, and this will imply that a does not match against zr. Can anybody comment, please? Thanks, ------ Sergei From abela at chalmers.se Wed May 24 23:27:45 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 24 May 2017 23:27:45 +0200 Subject: [Agda] strange mismatch In-Reply-To: <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> Message-ID: Sergei, I think {-# OPTIONS --exact-split #-} will be useful in this case and show you what is going wrong here. Best, Andreas On 24.05.2017 21:35, Sergei Meshveliani wrote: > On Wed, 2017-05-24 at 22:13 +0300, Sergei Meshveliani wrote: >> Please, what is wrong here? >> >> test1 is type-checked, and test2 is not >> (in Agda 2.6.0-207bde6) : > >> ----------------------------------------------------------------------- >> open import Relation.Binary.PropositionalEquality as PE using (_?_) >> >> module _ {?} (A : Set ?) (zr a : A) >> where >> data Expression : Set ? where >> con : A ? Expression >> _:+_ : Expression ? Expression ? Expression >> >> f : Expression ? Expression ? Expression >> f (con zr) y = y >> f x (con zr) = x >> f x y = x :+ y >> >> test1 : f (con zr) (con a) ? con a >> test1 = PE.refl >> >> test2 : f (con a) (con zr) ? con a >> test2 = PE.refl >> ------------------------------------------------------------------------ >> >> How to fix? > > > May be, listing "zr a" in parameters does not imply that a does not > match against zr. > I am not sure. > > May be, I have instead to add to Expression the constructors > zr : Expression > a : Expression, > > and this will imply that a does not match against zr. > > Can anybody comment, please? > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mathieu.montin at enseeiht.fr Wed May 24 23:36:06 2017 From: mathieu.montin at enseeiht.fr (MONTIN Mathieu) Date: Wed, 24 May 2017 23:36:06 +0200 Subject: [Agda] strange mismatch In-Reply-To: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> Message-ID: <46cc42b6da2cd6a80ed473fd0670cab6@inp-toulouse.fr> Hello Sergei, Le mercredi 24 mai 2017 ? 22:13 +0300, Sergei Meshveliani a ?crit : > Please, what is wrong here? You are trying to prove something that does not hold. > test1 is type-checked, and test2 is not > (in Agda 2.6.0-207bde6) : It does not type check because PE.refl has type (x ? x) for any x and you need to provide an element of type (con zr ? con a) while a is not necessarily equal to zr. The way you wrote the function f does not match the expected behaviour. Here is, case by case, the actual behaviour of your function : f? : Expression ? Expression ? Expression f? (con x ) y = y f? (zr? :+ zr?) (con x ) = zr? :+ zr? f? (zr? :+ zr?) (y :+ y?) = (zr? :+ zr?) :+ (y :+ y?) Here is the proof that both functions have the same behaviour : f?f? : ? {x y} ? f x y ? f? x y f?f? {con x } = PE.refl f?f? {x :+ x?} {con x? } = PE.refl f?f? {x :+ x?} {y :+ y?} = PE.refl In your second test, f (con a) (con zr) reduces to (con zr) because you case split on the first argument of f in your definition before case splitting on the second. If f had been defined this way : f : Expression ? Expression ? Expression f x (con zr) = x f (con zr) y = y f x y = x :+ y Then test1 would not typecheck while test2 would. Hope it helped, MM. > ------------------------------------------------------------------- > ---- > open import Relation.Binary.PropositionalEquality as PE using (_?_) > > module _ {?} (A : Set ?) (zr a : A) > where > data Expression : Set ? where > con : A ? Expression > _:+_ : Expression ? Expression ? Expression > > f : Expression ? Expression ? Expression > f (con zr) y = y > f x (con zr) = x > f x y = x :+ y > > test1 : f (con zr) (con a) ? con a > test1 = PE.refl > > test2 : f (con a) (con zr) ? con a > test2 = PE.refl > ------------------------------------------------------------------- > ----- > > How to fix? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From asr at eafit.edu.co Thu May 25 02:41:43 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Wed, 24 May 2017 19:41:43 -0500 Subject: [Agda] strange mismatch In-Reply-To: <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> Message-ID: On 24 May 2017 at 14:35, Sergei Meshveliani wrote: > On Wed, 2017-05-24 at 22:13 +0300, Sergei Meshveliani wrote: >> Please, what is wrong here? >> >> test1 is type-checked, and test2 is not >> (in Agda 2.6.0-207bde6) : > >> ----------------------------------------------------------------------- >> open import Relation.Binary.PropositionalEquality as PE using (_?_) >> >> module _ {?} (A : Set ?) (zr a : A) >> where >> data Expression : Set ? where >> con : A ? Expression >> _:+_ : Expression ? Expression ? Expression >> >> f : Expression ? Expression ? Expression >> f (con zr) y = y >> f x (con zr) = x >> f x y = x :+ y >> >> test1 : f (con zr) (con a) ? con a >> test1 = PE.refl >> >> test2 : f (con a) (con zr) ? con a >> test2 = PE.refl >> ------------------------------------------------------------------------ >> >> How to fix? > > > May be, listing "zr a" in parameters does not imply that a does not > match against zr. > I am not sure. > > May be, I have instead to add to Expression the constructors > zr : Expression > a : Expression, > > and this will imply that a does not match against zr. Note that the `zr` in equations f (con zr) y = y f x (con zr) = x is *different* from the `zr` in the parameters. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mechvel at botik.ru Thu May 25 18:40:02 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 25 May 2017 19:40:02 +0300 Subject: [Agda] strange mismatch In-Reply-To: References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1495730402.2511.9.camel@one.mechvel.pereslavl.ru> On Wed, 2017-05-24 at 19:41 -0500, Andr?s Sicard-Ram?rez wrote: > On 24 May 2017 at 14:35, Sergei Meshveliani wrote: > > On Wed, 2017-05-24 at 22:13 +0300, Sergei Meshveliani wrote: > >> Please, what is wrong here? > >> > >> test1 is type-checked, and test2 is not > >> (in Agda 2.6.0-207bde6) : > > > >> ----------------------------------------------------------------------- > >> open import Relation.Binary.PropositionalEquality as PE using (_?_) > >> > >> module _ {?} (A : Set ?) (zr a : A) > >> where > >> data Expression : Set ? where > >> con : A ? Expression > >> _:+_ : Expression ? Expression ? Expression > >> > >> f : Expression ? Expression ? Expression > >> f (con zr) y = y > >> f x (con zr) = x > >> f x y = x :+ y > >> > >> test1 : f (con zr) (con a) ? con a > >> test1 = PE.refl > >> > >> test2 : f (con a) (con zr) ? con a > >> test2 = PE.refl > >> ------------------------------------------------------------------------ > >> > >> How to fix? > > > > > > May be, listing "zr a" in parameters does not imply that a does not > > match against zr. > > I am not sure. > > > > May be, I have instead to add to Expression the constructors > > zr : Expression > > a : Expression, > > > > and this will imply that a does not match against zr. > > Note that the `zr` in equations > > f (con zr) y = y > f x (con zr) = x > > is *different* from the `zr` in the parameters. > For example, for the equation f (con zr) _ = con zr in the above context we have that zr in the pattern is a variable to be matched, and zr on the right-hand side is the one in the parameters. Right? Thanks to people for explanations, ------ Sergei From asr at eafit.edu.co Fri May 26 08:03:01 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 26 May 2017 01:03:01 -0500 Subject: [Agda] strange mismatch In-Reply-To: <1495730402.2511.9.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> <1495730402.2511.9.camel@one.mechvel.pereslavl.ru> Message-ID: On 25 May 2017 at 11:40, Sergei Meshveliani wrote: > For example, for the equation > > f (con zr) _ = con zr > > in the above context we have that > zr in the pattern is a variable to be matched, > and zr on the right-hand side is the one in the parameters. > Right? No. The `zr` on the RHS is also the variable in the pattern. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mechvel at botik.ru Fri May 26 10:44:06 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 26 May 2017 11:44:06 +0300 Subject: [Agda] strange mismatch In-Reply-To: References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> <1495730402.2511.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1495788246.2415.4.camel@one.mechvel.pereslavl.ru> On Fri, 2017-05-26 at 01:03 -0500, Andr?s Sicard-Ram?rez wrote: > On 25 May 2017 at 11:40, Sergei Meshveliani wrote: > > For example, for the equation > > > > f (con zr) _ = con zr > > > > in the above context we have that > > zr in the pattern is a variable to be matched, > > and zr on the right-hand side is the one in the parameters. > > Right? > > No. The `zr` on the RHS is also the variable in the pattern. > And where this zr will be taken from the parameters? I expect that in this clause: f _ _ = con zr ? ------ Sergei From mechvel at botik.ru Fri May 26 13:49:42 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 26 May 2017 14:49:42 +0300 Subject: [Agda] constructor injectiveness Message-ID: <1495799382.2827.24.camel@one.mechvel.pereslavl.ru> People, I need to program _?d_ below, and do this by introducing con-injective and +injective. Is there possible a simpler expression for _?d_ ? Probably injectiveness of constructors like `con' needs to be somehow in Standard, similarly as PE.cong is in standard (?) Thanks, ------ Sergei ----------------------------------------------------------------------- open import Function using (_?_; case_of_) open import Relation.Nullary using (yes; no) open import Relation.Binary using () renaming (Decidable to Decidable?) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Product using (_?_; _,_; proj?; proj?) open import Data.Nat using (?; _?_) data D : Set where con : ? ? D _+_ : D ? D ? D con-injective : ? {e e'} ? con e ? con e' ? e ? e' con-injective PE.refl = PE.refl +injective : ? {x y z u} ? (x + y) ? (z + u) ? x ? z ? y ? u +injective {x} {y} {.x} {.y} PE.refl = (PE.refl , PE.refl) _?d_ : Decidable? (_?_ {A = D}) (con _) ?d (_ + _) = no ?() (_ + _) ?d (con _) = no ?() (con i) ?d (con j) = case i ? j of \ { (yes i?j) ? yes (PE.cong con i?j) ; (no i?j) ? no (i?j ? con-injective) } (x + y) ?d (z + u) = case (x ?d z , y ?d u) of \ { (yes x?z , yes y?u) ? yes (PE.cong? _+_ x?z y?u) ; (no x?z , _ ) ? no (x?z ? proj? ? +injective) ; (_ , no y?u ) ? no (y?u ? proj? ? +injective) } From asr at eafit.edu.co Fri May 26 14:25:19 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 26 May 2017 07:25:19 -0500 Subject: [Agda] strange mismatch In-Reply-To: <1495788246.2415.4.camel@one.mechvel.pereslavl.ru> References: <1495653208.2712.2.camel@one.mechvel.pereslavl.ru> <1495654523.2866.9.camel@one.mechvel.pereslavl.ru> <1495730402.2511.9.camel@one.mechvel.pereslavl.ru> <1495788246.2415.4.camel@one.mechvel.pereslavl.ru> Message-ID: On 26 May 2017 at 03:44, Sergei Meshveliani wrote: > On Fri, 2017-05-26 at 01:03 -0500, Andr?s Sicard-Ram?rez wrote: >> On 25 May 2017 at 11:40, Sergei Meshveliani wrote: >> > For example, for the equation >> > >> > f (con zr) _ = con zr >> > >> > in the above context we have that >> > zr in the pattern is a variable to be matched, >> > and zr on the right-hand side is the one in the parameters. >> > Right? >> >> No. The `zr` on the RHS is also the variable in the pattern. >> > > And where this zr will be taken from the parameters? > I expect that in this clause: > > f _ _ = con zr > ? Yep. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From abela at chalmers.se Fri May 26 15:23:03 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 26 May 2017 15:23:03 +0200 Subject: [Agda] constructor injectiveness In-Reply-To: <1495799382.2827.24.camel@one.mechvel.pereslavl.ru> References: <1495799382.2827.24.camel@one.mechvel.pereslavl.ru> Message-ID: <2e4fd563-9b67-79f3-c81e-254304dfb5c3@chalmers.se> > Is there possible a simpler expression for _?d_ ? I don't think so. > Probably injectiveness of constructors like `con' needs to be somehow in > Standard, similarly as PE.cong is in standard (?) These injectivity proofs are necessary boilerplate, but could maybe be programmed generically using reflection. On 26.05.2017 13:49, Sergei Meshveliani wrote: > People, > > I need to program _?d_ below, > and do this by introducing con-injective and +injective. > > Is there possible a simpler expression for _?d_ ? > Probably injectiveness of constructors like `con' needs to be somehow in > Standard, similarly as PE.cong is in standard (?) > > Thanks, > > ------ > Sergei > > > ----------------------------------------------------------------------- > open import Function using (_?_; case_of_) > open import Relation.Nullary using (yes; no) > open import Relation.Binary using () renaming (Decidable to Decidable?) > open import Relation.Binary.PropositionalEquality as PE using (_?_) > open import Data.Product using (_?_; _,_; proj?; proj?) > open import Data.Nat using (?; _?_) > > data D : Set where con : ? ? D > _+_ : D ? D ? D > > con-injective : ? {e e'} ? con e ? con e' ? e ? e' > con-injective PE.refl = PE.refl > > +injective : ? {x y z u} ? (x + y) ? (z + u) ? x ? z ? y ? u > +injective {x} {y} {.x} {.y} PE.refl = (PE.refl , PE.refl) > > _?d_ : Decidable? (_?_ {A = D}) > > (con _) ?d (_ + _) = no ?() > (_ + _) ?d (con _) = no ?() > (con i) ?d (con j) = case i ? j > of \ > { (yes i?j) ? yes (PE.cong con i?j) > ; (no i?j) ? no (i?j ? con-injective) > } > (x + y) ?d (z + u) = > case (x ?d z , y ?d u) > of \ > { (yes x?z , yes y?u) ? yes (PE.cong? _+_ x?z y?u) > ; (no x?z , _ ) ? no (x?z ? proj? ? +injective) > ; (_ , no y?u ) ? no (y?u ? proj? ? +injective) > } > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From ulf.norell at gmail.com Fri May 26 16:40:29 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 26 May 2017 16:40:29 +0200 Subject: [Agda] constructor injectiveness In-Reply-To: <2e4fd563-9b67-79f3-c81e-254304dfb5c3@chalmers.se> References: <1495799382.2827.24.camel@one.mechvel.pereslavl.ru> <2e4fd563-9b67-79f3-c81e-254304dfb5c3@chalmers.se> Message-ID: On Fri, May 26, 2017 at 3:23 PM, Andreas Abel wrote: > > Is there possible a simpler expression for _?d_ ? > > I don't think so. > > > Probably injectiveness of constructors like `con' needs to be somehow in > > Standard, similarly as PE.cong is in standard (?) > > These injectivity proofs are necessary boilerplate, but could maybe be > programmed generically using reflection. See for instance https://github.com/UlfNorell/agda-prelude/blob/master/src/Tactic/Deriving/Eq.agda / Ulf > On 26.05.2017 13:49, Sergei Meshveliani wrote: > >> People, >> >> I need to program _?d_ below, >> and do this by introducing con-injective and +injective. >> Is there possible a simpler expression for _?d_ ? >> Probably injectiveness of constructors like `con' needs to be somehow in >> Standard, similarly as PE.cong is in standard (?) >> >> Thanks, >> >> ------ >> Sergei >> >> >> ----------------------------------------------------------------------- >> open import Function using (_?_; case_of_) >> open import Relation.Nullary using (yes; no) >> open import Relation.Binary using () renaming (Decidable to Decidable?) >> open import Relation.Binary.PropositionalEquality as PE using (_?_) >> open import Data.Product using (_?_; _,_; proj?; proj?) >> open import Data.Nat using (?; _?_) >> >> data D : Set where con : ? ? D >> _+_ : D ? D ? D >> >> con-injective : ? {e e'} ? con e ? con e' ? e ? e' >> con-injective PE.refl = PE.refl >> >> +injective : ? {x y z u} ? (x + y) ? (z + u) ? x ? z ? y ? u >> +injective {x} {y} {.x} {.y} PE.refl = (PE.refl , PE.refl) >> >> _?d_ : Decidable? (_?_ {A = D}) >> >> (con _) ?d (_ + _) = no ?() >> (_ + _) ?d (con _) = no ?() >> (con i) ?d (con j) = case i ? j >> of \ >> { (yes i?j) ? yes (PE.cong con i?j) >> ; (no i?j) ? no (i?j ? con-injective) >> } >> (x + y) ?d (z + u) = >> case (x ?d z , y ?d u) >> of \ >> { (yes x?z , yes y?u) ? yes (PE.cong? _+_ x?z y?u) >> ; (no x?z , _ ) ? no (x?z ? proj? ? +injective) >> ; (_ , no y?u ) ? no (y?u ? proj? ? +injective) >> } >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tarmo at cs.ioc.ee Sat May 20 15:42:36 2017 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Sat, 20 May 2017 16:42:36 +0300 Subject: [Agda] EUTYPES summer school in Ohrid, call for applications Message-ID: <20170520164236.459035f3@cs.ioc.ee> COST action CA15123 EUTYPES Summer School on Types for Programming and Verification Ohrid, Macedonia, 10-14 July 2017 https://sites.google.com/view/summerschool2017-eutypes/ CALL FOR APPLICATIONS BACKGROUND Types are pervasive in programming and information technology. A type defines a formal interface between software components, allowing the automatic verification of their connections, and greatly enhancing the robustness and reliability of computations and communications. In rich dependent type theories, the full functional specification of a program can be expressed as a type. Type systems have rapidly evolved over the past years, becoming more sophisticated, capturing new aspects of the behaviour of programs and the dynamics of their execution. The aim of this summer school is to provide advanced training, especially to PhD students and early-career researchers, in all aspects of the theory and practice of type theory and applications. LECTURERS AND COURSES Silvia Ghilezan (University of Novi Sad, Serbia), Aleksy Schubert (Warsaw University, Poland): Untyped, typed lambda calculus, pure type systems Robbert Krebbers (Tehnical University Delft, The Netherlands): The Coq proof assistant for proving and programming Conor McBride (University of Strathclyde): Dependently typed programming, Agda Andrei Paskevich (LRI, France): Program verification in Why3 Thorsten Altenkirch (University of Nottingham, UK): Introduction to homotopy type theory APPLICATION The capacity of the summer school is up to 40 students. 6 nights accommodation costs 228 EUR. A maximum of 30 students (PhD students / early-career researchers) from countries involved in EUTYPES can receive a grant from the COST action to partially cover their costs. To apply for a place in the school and a grant, please fill out the form on the school website; please do so as soon as possible. Application deadline: 2 June 2017. Notification of acceptance and funding: continuously, at the latest by 9 June 2017. VENUE Ohrid is a small town on Lake Ohrid in Macedonia, southwest of Skopje. Ohrid is notable for once having had 365 churches, one for each day of the year, and has been referred to as the Jerusalem of the Balkans. Ohrid and Lake Ohrid are on UNESCO's lists of cultural and natural World Heritage sites. The school will be held in the Congress Centre of Ohrid, which is also the accommodation site. TRAVEL Most participants will have to fly to Skopje and then get to Ohrid by bus. WizzAir operates direct flights to Ohrid from Basel-Mulhouse-Freiburg and London Luton. ORGANIZERS Herman Geuvers, Marija Mihova, Tarmo Uustalu From mechvel at botik.ru Sat May 27 11:51:17 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 27 May 2017 12:51:17 +0300 Subject: [Agda] missed wildcard pattern Message-ID: <1495878677.2645.30.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I have the following question about the Agda language. Consider the program ------------------------------------------------------------------------ open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open import Data.Empty using (?-elim) open import Data.Nat using (?) data Expr : Set where :0 : Expr gen : ? ? Expr _+_ : Expr ? Expr ? Expr -- _*_ : Expr ? Expr ? Expr -- reserve f : Expr ? Expr ? Expr f :0 y = y f x :0 = x f x y = x + y lemma : ? {x y} ? x ? :0 ? y ? :0 ? f x y ? x + y lemma {:0} {_} e?0 _ = ?-elim (e?0 PE.refl) lemma {_} {:0} _ e'?0 = ?-elim (e'?0 PE.refl) lemma {_} {_} _ _ = PE.refl -- I {- II lemma {gen _} {gen _} _ _ = PE.refl lemma {gen _} {_ + _} _ _ = PE.refl lemma {_ + _} {gen _} _ _ = PE.refl lemma {_ + _} {_ + _} _ _ = PE.refl -} --------------------------------------------------------------------------- Agda reports refl in (I) as not sufficient. Why? Each wildcard in (I) intends to denote any x : Expr which top constructor is not :0. And all these cases (II) can be filled automatically by the type checker in place of (I). Am I missing something? May be there is some keyword that switches such an automatic filling? It may well happen that Expr has more binary constructors, for example, _*_ and div. Then the patterns for `lemma' will probably fill more that three pages of text. What is the way out? Thanks, ------ Sergei From Jesper at sikanda.be Sat May 27 12:36:04 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 27 May 2017 12:36:04 +0200 Subject: [Agda] missed wildcard pattern In-Reply-To: <1495878677.2645.30.camel@one.mechvel.pereslavl.ru> References: <1495878677.2645.30.camel@one.mechvel.pereslavl.ru> Message-ID: Hi Sergei, The reason why your first proof `lemma` doesn't work is because the definition of `f` isn't what it looks like. When Agda checks the definition of `f`, it translates the definition to a case tree, which looks something like this: f x y -> case x of | :0 -> y | (x1 + x2) -> case y of | :0 -> (x1 + x2) | (y1 + y2) -> (x1 + x2) + (y1 + y2) (this is not valid Agda syntax, but an attempt at writing down the internal representation of f). So your definition of `f` is to Agda equivalent to the following one: f :0 y = y f (x1 + x2) :0 = x1 + x2 f (x1 + x2) (y1 + y2) = (x1 + x2) + (y1 + y2) Consequently, when you want to prove something about `f`, you have to spell out the same three cases (lemma :0 y, lemma (x1 + x2) :0, and lemma (x1 + x2) (y1 + y2)). Because this is so confusing to most people, I added the --exact-split option to Agda. If you enable this option, Agda will warn you when it has to expand a clause of a definition in the translation to a case tree (such as the second and third clause of your definition of f). I know this is far from perfect, but at least Agda can warn you when a situation like this occurs. On Sat, May 27, 2017 at 11:51 AM, Sergei Meshveliani wrote: > Dear Agda developers, > I have the following question about the Agda language. > Consider the program > > ------------------------------------------------------------------------ > open import Relation.Binary using (Decidable) > open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) > open import Data.Empty using (?-elim) > open import Data.Nat using (?) > > data Expr : Set where :0 : Expr > gen : ? ? Expr > _+_ : Expr ? Expr ? Expr > -- _*_ : Expr ? Expr ? Expr -- reserve > > f : Expr ? Expr ? Expr > f :0 y = y > f x :0 = x > f x y = x + y > > lemma : ? {x y} ? x ? :0 ? y ? :0 ? f x y ? x + y > > lemma {:0} {_} e?0 _ = ?-elim (e?0 PE.refl) > lemma {_} {:0} _ e'?0 = ?-elim (e'?0 PE.refl) > lemma {_} {_} _ _ = PE.refl -- I > > {- II > lemma {gen _} {gen _} _ _ = PE.refl > lemma {gen _} {_ + _} _ _ = PE.refl > lemma {_ + _} {gen _} _ _ = PE.refl > lemma {_ + _} {_ + _} _ _ = PE.refl > -} > ------------------------------------------------------------ > --------------- > > Agda reports refl in (I) as not sufficient. Why? > > Each wildcard in (I) intends to denote any x : Expr which top > constructor is not :0. > And all these cases (II) can be filled automatically by the type checker > in place of (I). > Am I missing something? > May be there is some keyword that switches such an automatic filling? > > It may well happen that Expr has more binary constructors, for > example, _*_ and div. > Then the patterns for `lemma' will probably fill more that three pages > of text. > > What is the way out? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sat May 27 13:25:46 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 27 May 2017 13:25:46 +0200 Subject: [Agda] missed wildcard pattern In-Reply-To: References: <1495878677.2645.30.camel@one.mechvel.pereslavl.ru> Message-ID: Oops, I forgot about the constructor `gen` in my previous mail. My point still stands, though. If the problem of spelling out all the cases really gets out of hand, you can define f using a view type instead: data f-View : Expr ? Expr ? Set where > instance > f0y : {y : Expr} ? f-View :0 y > fx0 : {x : Expr} ? f-View x :0 > fxy : {x y : Expr} ? f-View x y > > f-view : (x y : Expr) ? f-View x y > f-view :0 y = f0y > f-view (gen x) :0 = fx0 > f-view (gen x) (gen y) = fxy > f-view (gen x) (y? + y?) = fxy > f-view (x? + x?) :0 = fx0 > f-view (x? + x?) (gen y) = fxy > f-view (x? + x?) (y? + y?) = fxy > > f : (x y : Expr) ? Expr > f x y with f-view x y > f .:0 y | f0y = y > f x .:0 | fx0 = x > f x y | fxy = x + y > > lemma : ? {x y} ? x ? :0 ? y ? :0 ? f x y ? x + y > lemma {x} {y} p q with f-view x y > lemma {.:0} {y} p q | f0y = ?-elim (p refl) > lemma {x} {.:0} p q | fx0 = ?-elim (q refl) > lemma {x} {y } p q | fxy = refl > This way you only have to spell out all the cases once (in the f-view function). Full code in the attachment. On Sat, May 27, 2017 at 12:36 PM, Jesper Cockx wrote: > Hi Sergei, > > The reason why your first proof `lemma` doesn't work is because the > definition of `f` isn't what it looks like. When Agda checks the definition > of `f`, it translates the definition to a case tree, which looks something > like this: > > f x y -> case x of > | :0 -> y > | (x1 + x2) -> case y of > | :0 -> (x1 + x2) > | (y1 + y2) -> (x1 + x2) + (y1 + y2) > > (this is not valid Agda syntax, but an attempt at writing down the > internal representation of f). So your definition of `f` is to Agda > equivalent to the following one: > > f :0 y = y > f (x1 + x2) :0 = x1 + x2 > f (x1 + x2) (y1 + y2) = (x1 + x2) + (y1 + y2) > > Consequently, when you want to prove something about `f`, you have to > spell out the same three cases (lemma :0 y, lemma (x1 + x2) :0, and lemma > (x1 + x2) (y1 + y2)). > > Because this is so confusing to most people, I added the --exact-split > option to Agda. If you enable this option, Agda will warn you when it has > to expand a clause of a definition in the translation to a case tree (such > as the second and third clause of your definition of f). I know this is far > from perfect, but at least Agda can warn you when a situation like this > occurs. > > On Sat, May 27, 2017 at 11:51 AM, Sergei Meshveliani > wrote: > >> Dear Agda developers, >> I have the following question about the Agda language. >> Consider the program >> >> ------------------------------------------------------------------------ >> open import Relation.Binary using (Decidable) >> open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) >> open import Data.Empty using (?-elim) >> open import Data.Nat using (?) >> >> data Expr : Set where :0 : Expr >> gen : ? ? Expr >> _+_ : Expr ? Expr ? Expr >> -- _*_ : Expr ? Expr ? Expr -- reserve >> >> f : Expr ? Expr ? Expr >> f :0 y = y >> f x :0 = x >> f x y = x + y >> >> lemma : ? {x y} ? x ? :0 ? y ? :0 ? f x y ? x + y >> >> lemma {:0} {_} e?0 _ = ?-elim (e?0 PE.refl) >> lemma {_} {:0} _ e'?0 = ?-elim (e'?0 PE.refl) >> lemma {_} {_} _ _ = PE.refl -- I >> >> {- II >> lemma {gen _} {gen _} _ _ = PE.refl >> lemma {gen _} {_ + _} _ _ = PE.refl >> lemma {_ + _} {gen _} _ _ = PE.refl >> lemma {_ + _} {_ + _} _ _ = PE.refl >> -} >> ------------------------------------------------------------ >> --------------- >> >> Agda reports refl in (I) as not sufficient. Why? >> >> Each wildcard in (I) intends to denote any x : Expr which top >> constructor is not :0. >> And all these cases (II) can be filled automatically by the type checker >> in place of (I). >> Am I missing something? >> May be there is some keyword that switches such an automatic filling? >> >> It may well happen that Expr has more binary constructors, for >> example, _*_ and div. >> Then the patterns for `lemma' will probably fill more that three pages >> of text. >> >> What is the way out? >> >> Thanks, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ViewExample.agda Type: application/octet-stream Size: 1151 bytes Desc: not available URL: From P.Achten at cs.ru.nl Mon May 29 09:09:32 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Mon, 29 May 2017 09:09:32 +0200 Subject: [Agda] Call for participation: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury Message-ID: ----------------------------- C A L L F O R P A R T I C I P A T I O N ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == INVITED SPEAKERS == Conor McBride University of Strathclyde (UK) C?t?lin Hri?cu INRIA Paris (FR) == IMPORTANT DATES == Submission of draft papers: 5 May, 2017 Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == Co-Chairs Meng Wang University of Kent (UK) Scott Owens University of Kent (UK) PC Jeremy Yallop University of Cambridge (UK) Nicolas Wu University of Bristol (UK) Laura Castro University of A Coru?a (ES) Gabriel Scherer Northeastern University (US) Edwin Brady University of St Andrews (UK) Janis Voigtl?nder Radboud University Nijmegen (NL) Peter Achten Radboud University Nijmegen (NL) Tom Schrijvers KU Leuven (BE) Matthew Fluet Rochester Institute of Technology (US) Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario (AG) Patricia Johann Appalachian State University (US) Bruno Oliveira The University of Hong Kong (HK) Rita Loogen Philipps-Universit?t Marburg (GE) David Van Horn University of Marylan (US) Soichiro Hidaka Hosei University (JP) Micha? Pa?ka Chalmers University of Technology (SE) Sandrine Blazy University of Rennes 1 - IRISA (FR) From carette at mcmaster.ca Tue May 30 15:25:53 2017 From: carette at mcmaster.ca (Jacques Carette) Date: Tue, 30 May 2017 09:25:53 -0400 Subject: [Agda] Standard library mailing list? Message-ID: Is there a separate list (or place, such as github issues or ...) to ask design questions about the standard library? As a sample, here is the type of thing I have in mind: - Would it be a good idea to add --without-K to as much of the library as possible? - Yes: then I would start submitting pull requests (on an ad hoc basis) doing this. - No: why not? And where would this rationale be best documented? [I can take care of taking the discussion and adding it to the docs] I have a number of other such things in mind, I just want to make sure such requests are sent to the 'right place' and not viewed as pseudo-spam on this particular list. Jacques From nad at cse.gu.se Tue May 30 15:31:33 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 30 May 2017 15:31:33 +0200 Subject: [Agda] Standard library mailing list? In-Reply-To: References: Message-ID: On 2017-05-30 15:25, Jacques Carette wrote: > Is there a separate list (or place, such as github issues or ...) to > ask design questions about the standard library? I think this list is appropriate for such questions. -- /NAD From ulf.norell at gmail.com Tue May 30 16:17:12 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 30 May 2017 16:17:12 +0200 Subject: [Agda] Standard library mailing list? In-Reply-To: References: Message-ID: More in depth discussion is probably better to carry out on the github issue tracker, since it's a bit more persistent than an email thread. / Ulf On Tue, May 30, 2017 at 3:31 PM, Nils Anders Danielsson wrote: > On 2017-05-30 15:25, Jacques Carette wrote: > >> Is there a separate list (or place, such as github issues or ...) to >> ask design questions about the standard library? >> > > I think this list is appropriate for such questions. > > -- > /NAD > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Fri Jun 2 12:11:55 2017 From: P.Achten at cs.ru.nl (Peter Achten) Date: Fri, 2 Jun 2017 12:11:55 +0200 Subject: [Agda] Call for participation: Trends in Functional Programming, 19-21 june 2017 AND Trends in Functional Programming in Education, 22 june 2017, University of Kent, Canterbury Message-ID: <4f571ae6-6697-430f-62e2-1046f0531e09@cs.ru.nl> ----------------------------- C A L L F O R P A R T I C I P A T I O N ----------------------------- ======== TFP 2017 =========== 18th Symposium on Trends in Functional Programming 19-21 June, 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/events/tfp17/index.html ========= TFPIE 2017 ======== Co-located with TFP, and included in the registration fee, is Workshop on Trends in Functional Programming in Education 22 June 2017 University of Kent, Canterbury https://www.cs.kent.ac.uk/people/staff/sjt/TFPIE2017/ The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below). Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. TFP 2017 will be the main event of a pair of functional programming events. TFP 2017 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on 22 June. The TFP symposium is the heir of the successful series of Scottish Functional Programming Workshops. Previous TFP symposia were held in * Edinburgh (Scotland) in 2003; * Munich (Germany) in 2004; * Tallinn (Estonia) in 2005; * Nottingham (UK) in 2006; * New York (USA) in 2007; * Nijmegen (The Netherlands) in 2008; * Komarno (Slovakia) in 2009; * Oklahoma (USA) in 2010; * Madrid (Spain) in 2011; * St. Andrews (UK) in 2012; * Provo (Utah, USA) in 2013; * Soesterberg (The Netherlands) in 2014; * Inria Sophia-Antipolis (France) in 2015; * and Maryland (USA) in 2016. For further general information about TFP please see the TFP homepage. (http://www.tifp.org/). == SCOPE == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories: Research Articles: leading-edge, previously unpublished research work Position Articles: on what new trends should or should not be Project Articles: descriptions of recently started new projects Evaluation Articles: what lessons can be drawn from a finished project Overview Articles: summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to: Functional programming and multicore/manycore computing Functional programming in the cloud High performance functional computing Extra-functional (behavioural) properties of functional programs Dependently typed functional programming Validation and verification of functional programs Debugging and profiling for functional languages Functional programming in different application areas: security, mobility, telecommunications applications, embedded systems, global computing, grids, etc. Interoperability with imperative programming languages Novel memory management techniques Program analysis and transformation techniques Empirical performance studies Abstract/virtual machines and compilers for functional languages (Embedded) domain specific languages New implementation strategies Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2017 program chairs, Scott Owens and Meng Wang. == BEST PAPER AWARDS == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == PAPER SUBMISSIONS == Acceptance of articles for presentation at the symposium is based on a lightweight peer review process of extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which ALL authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. We use EasyChair for the refereeing process. Papers must be submitted at: https://easychair.org/conferences/?conf=tfp17 Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 == INVITED SPEAKERS == Conor McBride University of Strathclyde (UK) C?t?lin Hri?cu INRIA Paris (FR) Heather Miller Northeastern University (USA) and EPFL (CH) == IMPORTANT DATES == Submission of draft papers: 5 May, 2017 Notification: 12 May, 2017 Registration: 11 June, 2017 TFP Symposium: 19-21 June, 2017 Student papers feedback: 29 June, 2017 Submission for formal review: 2 August, 2017 Notification of acceptance: 3 November, 2017 Camera ready paper: 2 December, 2017 == PROGRAM COMMITTEE == Co-Chairs Meng Wang University of Kent (UK) Scott Owens University of Kent (UK) PC Jeremy Yallop University of Cambridge (UK) Nicolas Wu University of Bristol (UK) Laura Castro University of A Coru?a (ES) Gabriel Scherer Northeastern University (US) Edwin Brady University of St Andrews (UK) Janis Voigtl?nder Radboud University Nijmegen (NL) Peter Achten Radboud University Nijmegen (NL) Tom Schrijvers KU Leuven (BE) Matthew Fluet Rochester Institute of Technology (US) Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario (AG) Patricia Johann Appalachian State University (US) Bruno Oliveira The University of Hong Kong (HK) Rita Loogen Philipps-Universit?t Marburg (GE) David Van Horn University of Marylan (US) Soichiro Hidaka Hosei University (JP) Micha? Pa?ka Chalmers University of Technology (SE) Sandrine Blazy University of Rennes 1 - IRISA (FR) From andrei at inf.unibe.ch Fri Jun 2 17:12:21 2017 From: andrei at inf.unibe.ch (Andrei Chis) Date: Fri, 2 Jun 2017 17:12:21 +0200 Subject: [Agda] 3rd CfP: SLE 2017 (10th ACM SIGPLAN International Conference on Software Language Engineering) Message-ID: ======================================================================== **Call for Papers** **Abstract submission**: Friday 2, Jun 2017 ======================================================================== 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017) 23-24 October 2017, Vancouver, Canada (Co-located with SPLASH 2017) General chair: Benoit Combemale, University of Rennes 1, France Program co-chairs: Marjan Mernik, University of Maribor, Slovenia Bernhard Rumpe, RWTH Aachen University, Germany Artifact evaluation chairs: Tanja Mayerhofer, TU Wien, Austria Laurence Tratt, King's College London, UK Keynote Speaker: Peter D. Mosses, Swansea University, UK (http://cs.swan.ac.uk/~cspdm/) http://conf.researchr.org/track/sle-2017/sle-2017-papers http://www.sleconf.org/2017 Follow us on twitter: https://twitter.com/sleconf ======================================================================== Software Language Engineering (SLE) is the application of systematic, disciplined, and measurable approaches to the development, use, deployment, and maintenance of software languages. The term "software language" is used broadly, and includes: general-purpose programming languages; domain-specific languages (e.g. BPMN, Simulink, Modelica); modeling and metamodeling languages (e.g. SysML and UML); data models and ontologies (e.g. XML-based and OWL-based languages and vocabularies). ### Important Dates Fri 2 Jun 2017 - Abstract Submission Fri 9 Jun 2017 - Paper Submission Fri 4 Aug 2017 - Author Notification Thu 10 Aug 2017 - Artifact Submission Fri 1 Sep 2017 - Artifact Notification Fri 8 Sep 2017 - Camera Ready Deadline Sun 22 Oct - SLE workshops Mon 23 Oct - Tue 24 Oct 2017 - SLE Conference ### Topics of Interest SLE aims to be broad-minded and inclusive about relevance and scope. We solicit high-quality contributions in areas ranging from theoretical and conceptual contributions to tools, techniques, and frameworks in the domain of language engineering. Topics relevant to SLE cover generic aspects of software languages development rather than aspects of engineering a specific language. In particular, SLE is interested in principled engineering approaches and techniques in the following areas: * Language Design and Implementation * Approaches and methodologies for language design * Static semantics (e.g., design rules, well-formedness constraints) * Techniques for behavioral / executable semantics * Generative approaches (incl. code synthesis, compilation) * Meta-languages, meta-tools, language workbenches * Language Validation * Verification and formal methods for languages * Testing techniques for languages * Simulation techniques for languages * Language Integration and Composition * Coordination of heterogeneous languages and tools * Mappings between languages (incl. transformation languages) * Traceability between languages * Deployment of languages to different platforms * Language Maintenance * Software language reuse * Language evolution * Language families and variability * Domain-specific approaches for any aspects of SLE (design, implementation, validation, maintenance) * Empirical evaluation and experience reports of language engineering tools * User studies evaluating usability * Performance benchmarks * Industrial applications ### Types of Submissions * **Research papers**: These should report a substantial research contribution to SLE or successful application of SLE techniques or both. Full paper submissions must not exceed 12 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). * **Tool papers**: Because of SLE's interest in tools, we seek papers that present software tools related to the field of SLE. Selection criteria include originality of the tool, its innovative aspects, and relevance to SLE. Any of the SLE topics of interest are appropriate areas for tool demonstrations. Submissions must provide a tool description of 4 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/), and a demonstration outline including screenshots of up to 6 pages. Tool demonstrations must have the keywords ?Tool Demo? or ?Tool Demonstration? in the title. The 4-page tool description will, if the demonstration is accepted, be published in the proceedings. The 6-page demonstration outline will be used by the program committee only for evaluating the submission. * **Industrial papers**: These should describe real-world application scenarios of SLE in industry, explained in their context with an analysis of the challenges that were overcome and the lessons which the audience can learn from this experience. Industry paper submissions must not exceed 6 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). * **New ideas / vision papers**: New ideas papers should describe new, non-conventional SLE research approaches that depart from standard practice. They are intended to describe well-defined research ideas that are at an early stage of investigation. Vision papers are intended to present new unifying theories about existing SLE research that can lead to the development of new technologies or approaches. New ideas / vision papers must not exceed 4 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). ### Artifact evaluation SLE will for the second year use an evaluation process for assessing the quality of artifacts on which papers are based. The aim of this evaluation process is to foster a culture of experimental reproducibility as well as a higher quality in the research area as a whole. Authors of papers accepted for SLE 2017 will be invited to submit artifacts. Any kind of artifact that is presented in the paper, supplements the paper with further details, or underlies the paper can be submitted. This includes, for instance, tools, grammars, metamodels, models, programs, algorithms, scripts, proofs, datasets, statistical tests, checklists, surveys, interview scripts, visualizations, annotated bibliographies, and tutorials. The submitted artifacts will be reviewed by a dedicated Artifact Evaluation Committee (AEC). Artifacts that live up to the expectations created by the paper will receive a badge of approval from the AEC. The approved artifacts will be invited for inclusion in the electronic conference proceedings published in the ACM Digital Library. This will ensure the permanent and durable storage of the artifacts alongside the published papers fostering the repeatability of experiments, enabling precise comparison with alternative approaches, and helping the dissemination of the author?s ideas in detail. Participating in the artifact evaluation and publishing approved artifacts in the ACM Digital Library is voluntary. However, we strongly encourage authors to consider this possibility as the availability of artifacts will greatly benefit readers of papers and increase the impact of the work. Note that the artifact evaluation cannot affect the acceptance of the paper, because it only happens after the decision about acceptance has been made. ### Publications All submitted papers will be reviewed by at least three members of the program committee. All accepted papers, including tool papers, industrial papers and new ideas / vision papers will be published in ACM Digital Library. Selected accepted papers will be invited to a special issue of the Computer Languages, Systems and Structures (COMLAN) journal. ### Awards * **Distinguished paper**: Award for most notable paper, as determined by the PC chairs based on the recommendations of the program committee. * **Distinguished reviewer**: Award for distinguished reviewer, as determined by the PC chairs using feedback from the authors. * **Distinguished artifact**: Award for the artifact most significantly exceeding expectations, as determined by the AEC chairs based on the recommendations of the artifact evaluation committee. ### Program Committee Marjan Mernik (co-chair), University of Maribor, Slovenia Bernhard Rumpe (co-chair), RWTH Aachen University, Germany Christian Berger, Chalmers, Sweden Mark van den Brand, TU Eindhoven, The Netherlands Ruth Breu, University of Innsbruck, Austria Jordi Cabot, ICREA, Spain Walter Cazzola, University of Milan, Italy Marsha Chechik, University of Toronto, Canada Tony Clark, Middlesex University, UK Tom Dinkelaker, Ericsson, Germany Bernd Fischer, Stellenbosch University, South Africa Sebastian Gerard, CEA, France Jeff Gray, University of Alabama, USA Esther Guerra, Autonomous University of Madrid, Spain Michael Homer, Victoria University of Wellington, New Zealand Ralf L?mmel, University of Koblenz-Landau, Germany Tihamer Levendovszky, Microsoft, USA Gunter Mussbacher, McGill University, Canada Terence Parr, University of San Francisco, USA Jaroslav Porub?n, University of Ko?ice, Slovakia Jan Ringert, Tel Aviv University, Israel Julia Rubin, University of British Columbia, Canada Tony Sloane, Macquarie University, Australia Eugene Syriani, University of Montreal, Canada Emma S?derberg, Google, Denmark Eric Van Wyk, University of Minnesota, USA Jurgen Vinju, CWI, Netherlands Eric Walkingshaw, Oregon State University, USA Andreas Wortmann, RWTH Aachen University, Germany Tian Zhang, Nanjing University, China ### Contact For any question, please contact the organizers via email: sle2017 at inria.fr From mechvel at botik.ru Fri Jun 2 21:16:38 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 02 Jun 2017 22:16:38 +0300 Subject: [Agda] termination with `where' Message-ID: <1496430998.2519.17.camel@one.mechvel.pereslavl.ru> Dear Agda developers, For a certain fragment of f : (u v : Expression) -> foo u v ? foo' u v f (x :+ y) (e :* e') = begin ... ?[ +cong (aux x z) (aux y z) -- (I) ] ... ? where z = e :* e' Agda 2.6.0-207bde6 reports "Termination checking failed ...", and marks yellow the call (aux y z). Replacing (aux y z) with (aux y (e :* e')) satisfies the type checker. Here x, y, e, e' are terms constructed with certain data constructors :0, :1, gen, _:+_, _:*_. It looks strange that the termination checker is not stable under the `where' construct. What people think of this? Regards, ------ Sergei From abela at chalmers.se Fri Jun 2 22:40:47 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 2 Jun 2017 22:40:47 +0200 Subject: [Agda] termination with `where' In-Reply-To: <1496430998.2519.17.camel@one.mechvel.pereslavl.ru> References: <1496430998.2519.17.camel@one.mechvel.pereslavl.ru> Message-ID: <172ff58b-5019-2121-40f5-b45e9b72ed72@chalmers.se> Yes, this is a bit unsatisfactory, but Agda treats a `where` definition as a mutually recursive function, and the termination checker does not unfold `where` definitions. In you case you should be able to use `let` instead, which is just a substitution. ... let z = e :* e' in ... aux x z ... Best, Andreas On 02.06.2017 21:16, Sergei Meshveliani wrote: > Dear Agda developers, > > For a certain fragment of > > f : (u v : Expression) -> foo u v ? foo' u v > f (x :+ y) (e :* e') = > begin > ... ?[ +cong (aux x z) > (aux y z) -- (I) > ] > ... > ? > where z = e :* e' > > Agda 2.6.0-207bde6 reports "Termination checking failed ...", > and marks yellow the call (aux y z). > > Replacing (aux y z) with (aux y (e :* e')) > satisfies the type checker. > Here x, y, e, e' are terms constructed with certain data > constructors :0, :1, gen, _:+_, _:*_. > > It looks strange that the termination checker is not stable under the > `where' construct. > > What people think of this? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Sat Jun 3 17:24:06 2017 From: abela at chalmers.se (Andreas Abel) Date: Sat, 3 Jun 2017 17:24:06 +0200 Subject: [Agda] APLAS 2017: June 13 deadline, 2nd CfP, Asian Symposium on Programming Languages and Systems Message-ID: It is time to write the paper now for APLAS! --Andreas ********************************************************************* APLAS 2017 Second Call for Papers 15th Asian Symposium on Programming Languages and Systems Suzhou, China, November 27-29, 2017 https://www-aplas.github.io/ ********************************************************************* # Important Dates - Abstract deadline: Tuesday, June 13, 2017 - Paper deadline: Friday, June 16, 2017 - Author response: Wednesday-Friday, July 26-28, 2017 - Author notification: Monday, August 14, 2017 - Camera-ready deadline: Friday, September 1, 2017 - Conference: Monday-Wednesday, November 27-29, 2017 All deadline times are AoE. # About APLAS aims to stimulate programming language research by providing a forum for the presentation of latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia but is an international forum that serves the worldwide programming languages community. APLAS is sponsored by the Asian Association for Foundation of Software (AAFS), founded by Asian researchers in cooperation with many researchers from Europe and the USA. Past APLAS symposiums were successfully held in Hanoi ('16), Pohang ('15), Singapore ('14), Melbourne ('13), Kyoto ('12), Kenting ('11), Shanghai ('10), Seoul ('09), Bangalore ('08), Singapore ('07), Sydney ('06), Tsukuba ('05), Taipei ('04), and Beijing ('03) after three informal workshops. Proceedings of the past symposiums were published in Springer's LNCS. # Topics The symposium is devoted to foundational and practical issues broadly spanning the areas of programming languages and systems. Papers are solicited on topics such as - semantics, logics, foundational theory - design of languages, type systems, and foundational calculi - domain-specific languages - compilers, interpreters, abstract machines - program derivation, synthesis, and transformation - program analysis, verification, model-checking - logic, constraint, probabilistic, and quantum programming - software security - concurrency and parallelism - tools and environments for programming and implementation Topics are not limited to those discussed in previous symposiums. Papers identifying future directions of programming and those addressing the rapid changes of the underlying computing platforms are especially welcome. Demonstration of systems and tools in the scope of APLAS are welcome to the System and Tool demonstrations category. Authors concerned about the appropriateness of a topic are welcome to consult with program chair prior to submission. # Submission We solicit submissions in two categories: - **Regular research papers** describing original scientific research results, including system development and case studies. Regular research papers *should not exceed 18 pages* in the Springer LNCS format, including bibliography and figures. This category encompasses both theoretical and implementation (also known as system descriptions) papers. In either case, submissions should clearly identify what has been accomplished and why it is significant. Submissions will be judged on the basis of significance, relevance, correctness, originality, and clarity. System descriptions papers should contain a link to a working system and will be judged on originality, usefulness, and design. In case of lack of space, proofs, experimental results, or any information supporting the technical results of the paper could be provided as an appendix or a link to a web page, but reviewers are not obliged to read them. - **System and tool demonstrations** describing a demonstration of a tool or a system that support theory, program construction, reasoning, or program execution in the scope of APLAS. The main purpose of a tool paper is to display a completed, robust and well-documented tool--highlighting the overall functionality of the tool, the interfaces of the tool, interesting examples and applications of the tool, an assessment of the tool's strengths and weaknesses, and a summary of documentation/support available with the tool. Authors of tool demonstration proposals are expected to present a live demonstration of the tool at the conference. It is highly desirable that the tools are available on the web. System and Tool papers should not exceed 8 pages in the Springer LNCS format, including bibliography and figures. They may include an additional appendix of up to 6 extra pages giving the outline, screenshots, examples, etc. to indicate the content of the proposed live demo. Papers should be submitted electronically via the submission web page https://easychair.org/conferences/?conf=aplas2017 using EasyChair. The acceptable format is PDF. Submitted papers must be unpublished and not submitted for publication elsewhere. Papers must be written in English. The proceedings will be published as a volume in Springer's LNCS series. Accepted papers must be presented at the conference. # Review Process *New for APLAS 2017* ## Lightweight Double-Blind Reviewing Process APLAS 2017 will use a lightweight double-blind reviewing process. Following this process means that reviewers will not see the authors' names or affiliations as they initially review a paper. The authors' names will then be revealed to the reviewers only once their reviews have been submitted. To facilitate this process, submitted papers must adhere to the following: - **Author names and institutions must be omitted** and - References to the authors' own related work should be in the third person (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission, makes the job of reviewing the paper more difficult, or interferes with the process of disseminating new ideas. For example, important background references should *not* be omitted or anonymized, even if they are written by the same authors and share common ideas, techniques, or infrastructure. Authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ## Author Response Period During the author response period, authors will be able to read reviews and respond to them as appropriate. ## Research Integrity The Program Committee reserves the right, up until the time of publication, to reverse a decision of paper acceptance. Reversal is possible if fatal flaws are discovered in the paper, or research integrity is found to have been seriously breached. # Organizers ## General Chair Xinyu Feng (University of Science and Technology of China) ## Program Chair Bor-Yuh Evan Chang (University of Colorado Boulder) ## Program Committee Andreas Abel (Gothenburg University) Aws Albarghouthi (University of Wisconsin-Madison) Sam Blackshear (Facebook) Yu-Fang Chen (Academia Sinica) Yuting Chen (Shanghai Jiao Tong University) Stephen Chong (Harvard University) Vijay D'Silva (Google) Benjamin Delaware (Purdue University) Rayna Dimitrova (MPI-SWS) Cezara Dragoi (INRIA, ENS, CNRS) William Harris (Georgia Institute of Technology) Guoliang Jin (North Carolina State University) Akash Lal (Microsoft Research, India) Vu Le (Microsoft) Akimasa Morihata (University of Tokyo) Sergio Mover (University of Colorado Boulder) Santosh Nagarakatte (Rutgers University) Hakjoo Oh (Korea University) Bruno C. D. S. Oliveira (The University of Hong Kong) Xiaokang Qiu (Purdue University) Arjun Radhakrishna (University of Pennsylvania) Aseem Rastogi (Microsoft Research) Sukyoung Ryu (KAIST) Ilya Sergey (University College London) Makoto Tatsuta (National Institute of Informatics) Tachio Terauchi (JAIST) Bow-Yaw Wang (Academia Sinica) Yingfei Xiong (Peking University) Kwangkeun Yi (Seoul National University) Danfeng Zhang (Pennsylvania State University) Xin Zhang (Georgia institute of Technology) Kenny Zhu (Shanghai Jiao Tong University) ## Local Organization Chair Ming Fu (University of Science and Technology of China) -- Conference Website: https://www-aplas.github.io/ EasyChair: https://easychair.org/conferences/?conf=aplas2017 -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sun Jun 4 14:49:28 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 04 Jun 2017 15:49:28 +0300 Subject: [Agda] 1-infix-2 Message-ID: <1496580568.2795.9.camel@one.mechvel.pereslavl.ru> Can anyone tell, please, is it possible to apply a relation ~ : A ? A ? A ? Set ? as x ~ y z ? I try _~_?_ : ? {?} {A : Set ?} ? A ? A ? A ? Set ? _~_?_ x y z = x ? y ? x ? z But I need the second line to be x ~ y z = x ? y ? x ? z And Agda reports "Missing definition for _~_?_ ". What is a way out? Thanks, ------ Sergei From andreas.abel at ifi.lmu.de Sun Jun 4 14:58:58 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sun, 4 Jun 2017 14:58:58 +0200 Subject: [Agda] 1-infix-2 In-Reply-To: <1496580568.2795.9.camel@one.mechvel.pereslavl.ru> References: <1496580568.2795.9.camel@one.mechvel.pereslavl.ru> Message-ID: On 04.06.2017 14:49, Sergei Meshveliani wrote: > is it possible to apply a relation ~ : A ? A ? A ? Set ? > as > x ~ y z > ? No, that's not possible. > I try > > _~_?_ : ? {?} {A : Set ?} ? A ? A ? A ? Set ? > _~_?_ x y z = x ? y ? x ? z > > But I need the second line to be > x ~ y z = x ? y ? x ? z I don't understand what you are up to here. -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Sun Jun 4 19:00:22 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sun, 4 Jun 2017 20:00:22 +0300 Subject: [Agda] 1-infix-2 In-Reply-To: References: <1496580568.2795.9.camel@one.mechvel.pereslavl.ru> Message-ID: Try adding parentheses : " (x ~ y) z" On Sun, Jun 4, 2017 at 3:58 PM, Andreas Abel wrote: > On 04.06.2017 14:49, Sergei Meshveliani wrote: > >> is it possible to apply a relation ~ : A ? A ? A ? Set ? >> as >> x ~ y z >> ? >> > > No, that's not possible. > > I try >> >> _~_?_ : ? {?} {A : Set ?} ? A ? A ? A ? Set ? >> _~_?_ x y z = x ? y ? x ? z >> >> But I need the second line to be >> x ~ y z = x ? y ? x ? z >> > > I don't understand what you are up to here. > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sun Jun 4 19:45:16 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 04 Jun 2017 20:45:16 +0300 Subject: [Agda] 1-infix-2 In-Reply-To: References: <1496580568.2795.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1496598316.2385.7.camel@one.mechvel.pereslavl.ru> On Sun, 2017-06-04 at 20:00 +0300, Apostolis Xekoukoulotakis wrote: > Try adding parentheses : > > " (x ~ y) Sorry, I recall now of a certain known possibility. For example: _?_nor_ : ? {?} {A : Set ?} ? A ? A ? A ? Set ? x ? y nor z = x ? y ? x ? z That is ? to be replaced with some name. Regards, ------ Sergei > > On Sun, Jun 4, 2017 at 3:58 PM, Andreas Abel > wrote: > On 04.06.2017 14:49, Sergei Meshveliani wrote: > is it possible to apply a relation ~ : A ? A ? A ? > Set ? > as > x ~ y z > ? > > No, that's not possible. > > I try > > _~_?_ : ? {?} {A : Set ?} ? A ? A ? A ? Set ? > _~_?_ x y z = x ? y ? x ? z > > But I need the second line to be > x ~ y z = x ? y ? x ? > z > > I don't understand what you are up to here. > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > From andrei at inf.unibe.ch Mon Jun 5 09:53:36 2017 From: andrei at inf.unibe.ch (Andrei Chis) Date: Mon, 5 Jun 2017 09:53:36 +0200 Subject: [Agda] Deadline Extension - SLE 2017 (10th ACM SIGPLAN International Conference on Software Language Engineering) Message-ID: ======================================================================== **Call for Papers** - **Deadline Extension** **Abstract Submission**: Friday 9, June 2017 **Paper Submission**: Friday 16, June 2017 ======================================================================== 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017) 23-24 October 2017, Vancouver, Canada (Co-located with SPLASH 2017) General chair: Benoit Combemale, University of Rennes 1, France Program co-chairs: Marjan Mernik, University of Maribor, Slovenia Bernhard Rumpe, RWTH Aachen University, Germany Artifact evaluation chairs: Tanja Mayerhofer, TU Wien, Austria Laurence Tratt, King's College London, UK Keynote Speaker: Peter D. Mosses, Swansea University, UK (http://cs.swan.ac.uk/~cspdm/) http://conf.researchr.org/track/sle-2017/sle-2017-papers http://www.sleconf.org/2017 Follow us on twitter: https://twitter.com/sleconf ======================================================================== Software Language Engineering (SLE) is the application of systematic, disciplined, and measurable approaches to the development, use, deployment, and maintenance of software languages. The term "software language" is used broadly, and includes: general-purpose programming languages; domain-specific languages (e.g. BPMN, Simulink, Modelica); modeling and metamodeling languages (e.g. SysML and UML); data models and ontologies (e.g. XML-based and OWL-based languages and vocabularies). ### Important Dates Fri 9 Jun 2017 - Abstract Submission Fri 16 Jun 2017 - Paper Submission Fri 4 Aug 2017 - Author Notification Thu 10 Aug 2017 - Artifact Submission Fri 1 Sep 2017 - Artifact Notification Fri 8 Sep 2017 - Camera Ready Deadline Sun 22 Oct - SLE workshops Mon 23 Oct - Tue 24 Oct 2017 - SLE Conference ### Topics of Interest SLE aims to be broad-minded and inclusive about relevance and scope. We solicit high-quality contributions in areas ranging from theoretical and conceptual contributions to tools, techniques, and frameworks in the domain of language engineering. Topics relevant to SLE cover generic aspects of software languages development rather than aspects of engineering a specific language. In particular, SLE is interested in principled engineering approaches and techniques in the following areas: * Language Design and Implementation * Approaches and methodologies for language design * Static semantics (e.g., design rules, well-formedness constraints) * Techniques for behavioral / executable semantics * Generative approaches (incl. code synthesis, compilation) * Meta-languages, meta-tools, language workbenches * Language Validation * Verification and formal methods for languages * Testing techniques for languages * Simulation techniques for languages * Language Integration and Composition * Coordination of heterogeneous languages and tools * Mappings between languages (incl. transformation languages) * Traceability between languages * Deployment of languages to different platforms * Language Maintenance * Software language reuse * Language evolution * Language families and variability * Domain-specific approaches for any aspects of SLE (design, implementation, validation, maintenance) * Empirical evaluation and experience reports of language engineering tools * User studies evaluating usability * Performance benchmarks * Industrial applications ### Types of Submissions * **Research papers**: These should report a substantial research contribution to SLE or successful application of SLE techniques or both. Full paper submissions must not exceed 12 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). * **Tool papers**: Because of SLE's interest in tools, we seek papers that present software tools related to the field of SLE. Selection criteria include originality of the tool, its innovative aspects, and relevance to SLE. Any of the SLE topics of interest are appropriate areas for tool demonstrations. Submissions must provide a tool description of 4 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/), and a demonstration outline including screenshots of up to 6 pages. Tool demonstrations must have the keywords ?Tool Demo? or ?Tool Demonstration? in the title. The 4-page tool description will, if the demonstration is accepted, be published in the proceedings. The 6-page demonstration outline will be used by the program committee only for evaluating the submission. * **Industrial papers**: These should describe real-world application scenarios of SLE in industry, explained in their context with an analysis of the challenges that were overcome and the lessons which the audience can learn from this experience. Industry paper submissions must not exceed 6 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). * **New ideas / vision papers**: New ideas papers should describe new, non-conventional SLE research approaches that depart from standard practice. They are intended to describe well-defined research ideas that are at an early stage of investigation. Vision papers are intended to present new unifying theories about existing SLE research that can lead to the development of new technologies or approaches. New ideas / vision papers must not exceed 4 pages including bibliography in ACM SIGPLAN acmart conference style (http://www.sigplan.org/Resources/Author/). ### Artifact evaluation SLE will for the second year use an evaluation process for assessing the quality of artifacts on which papers are based. The aim of this evaluation process is to foster a culture of experimental reproducibility as well as a higher quality in the research area as a whole. Authors of papers accepted for SLE 2017 will be invited to submit artifacts. Any kind of artifact that is presented in the paper, supplements the paper with further details, or underlies the paper can be submitted. This includes, for instance, tools, grammars, metamodels, models, programs, algorithms, scripts, proofs, datasets, statistical tests, checklists, surveys, interview scripts, visualizations, annotated bibliographies, and tutorials. The submitted artifacts will be reviewed by a dedicated Artifact Evaluation Committee (AEC). Artifacts that live up to the expectations created by the paper will receive a badge of approval from the AEC. The approved artifacts will be invited for inclusion in the electronic conference proceedings published in the ACM Digital Library. This will ensure the permanent and durable storage of the artifacts alongside the published papers fostering the repeatability of experiments, enabling precise comparison with alternative approaches, and helping the dissemination of the author?s ideas in detail. Participating in the artifact evaluation and publishing approved artifacts in the ACM Digital Library is voluntary. However, we strongly encourage authors to consider this possibility as the availability of artifacts will greatly benefit readers of papers and increase the impact of the work. Note that the artifact evaluation cannot affect the acceptance of the paper, because it only happens after the decision about acceptance has been made. ### Publications All submitted papers will be reviewed by at least three members of the program committee. All accepted papers, including tool papers, industrial papers and new ideas / vision papers will be published in ACM Digital Library. Selected accepted papers will be invited to a special issue of the Computer Languages, Systems and Structures (COMLAN) journal. ### Awards * **Distinguished paper**: Award for most notable paper, as determined by the PC chairs based on the recommendations of the program committee. * **Distinguished reviewer**: Award for distinguished reviewer, as determined by the PC chairs using feedback from the authors. * **Distinguished artifact**: Award for the artifact most significantly exceeding expectations, as determined by the AEC chairs based on the recommendations of the artifact evaluation committee. ### Program Committee Marjan Mernik (co-chair), University of Maribor, Slovenia Bernhard Rumpe (co-chair), RWTH Aachen University, Germany Christian Berger, Chalmers, Sweden Mark van den Brand, TU Eindhoven, The Netherlands Ruth Breu, University of Innsbruck, Austria Jordi Cabot, ICREA, Spain Walter Cazzola, University of Milan, Italy Marsha Chechik, University of Toronto, Canada Tony Clark, Middlesex University, UK Tom Dinkelaker, Ericsson, Germany Bernd Fischer, Stellenbosch University, South Africa Sebastian Gerard, CEA, France Jeff Gray, University of Alabama, USA Esther Guerra, Autonomous University of Madrid, Spain Michael Homer, Victoria University of Wellington, New Zealand Ralf L?mmel, University of Koblenz-Landau, Germany Tihamer Levendovszky, Microsoft, USA Gunter Mussbacher, McGill University, Canada Terence Parr, University of San Francisco, USA Jaroslav Porub?n, University of Ko?ice, Slovakia Jan Ringert, Tel Aviv University, Israel Julia Rubin, University of British Columbia, Canada Tony Sloane, Macquarie University, Australia Eugene Syriani, University of Montreal, Canada Emma S?derberg, Google, Denmark Eric Van Wyk, University of Minnesota, USA Jurgen Vinju, CWI, Netherlands Eric Walkingshaw, Oregon State University, USA Andreas Wortmann, RWTH Aachen University, Germany Tian Zhang, Nanjing University, China ### Contact For any question, please contact the organizers via email: sle2017 at inria.fr From byorgey at gmail.com Wed Jun 7 04:49:14 2017 From: byorgey at gmail.com (Brent Yorgey) Date: Wed, 07 Jun 2017 02:49:14 +0000 Subject: [Agda] Final CFP: Workshop on Type-driven Development (TyDe '17) Message-ID: There's still time to submit an extended abstract! See below. -------------------------------------------------------------------------------- CALL FOR PAPERS 2nd Workshop on Type-Driven Development (TyDe '17) 3 September 2017, Oxford, UK http://tydeworkshop.org/2017 -------------------------------------------------------------------------------- # Goals of the workshop The workshop on Type-Driven Development aims to show how static type information may be used effectively in the development of computer programs. Co-located with ICFP, this workshop brings together leading researchers and practitioners who are using or exploring types as a means of program development. We welcome all contributions, both theoretical and practical, on a range of topics including: - dependently typed programming; - generic programming; - design and implementation of programming languages, exploiting types in novel ways; - exploiting typed data, data dependent data, or type providers; - static and dynamic analyses of typed programs; - tools, IDEs, or testing tools exploiting type information; - pearls, being elegant, instructive examples of types used in the derivation, calculation, or construction of programs. # Invited speaker Andrew Kennedy, Facebook, UK # Program Committee - Nada Amin, EPFL, Switzerland - Ana Bove, Chalmers University of Technology, Sweden - Patricia Johann, Appalachian State University, US - Yukiyoshi Kameyama, University of Tsukuba, Japan - Sam Lindley, The University of Edinburgh, UK (co-chair) - Limin Jia, CMU, US - Assia Mahboubi, INRIA Saclay, France - Liam O?Connor, University of New South Wales, Australia - Nicolas Oury, Jane Street, UK - Jennifer Paykin, University of Pennsylvania, US - Paula Severi, University of Leicester, UK - Tarmo Uustalu, Tallinn University of Technology, Estonia - Jeremy Yallop, University of Cambridge, UK - Brent Yorgey, Hendrix College, US (co-chair) # Proceedings and Copyright We plan to have formal proceedings, published by the ACM. Accepted papers will be included in the ACM Digital Library. Authors must grant ACM publication rights upon acceptance, but may retain copyright if they wish. Authors are encouraged to publish auxiliary material with their paper (source code, test data, and so forth). The proceedings will be freely available for download from the ACM Digital Library from one week before the start of the conference until two weeks after the conference. # Submission details Submissions should fall into one of two categories: - Regular research papers (12 pages) - Extended abstracts (2 pages) The bibliography will not be counted against the page limits for either category. Regular research papers are expected to present novel and interesting research results, and will be included in the formal proceedings. Extended abstracts should report work in progress that the authors would like to present at the workshop. Extended abstracts will be distributed to workshop attendees but will not be published in the formal proceedings. We welcome submissions from PC members (with the exception of the two co-chairs), but these submissions will be held to a higher standard. Submission is handled through HotCRP: https://icfp-tyde17.hotcrp.com/ All submissions should be in portable document format (PDF) and formatted using the ACM SIGPLAN style guidelines: http://www.sigplan.org/Resources/Author/ *Note* that the ACM SIGPLAN style guidelines have changed from previous years! In particular, submissions should use the new ?acmart? format and the two-column ?sigplan? subformat (not to be confused with the one-column ?acmlarge? subformat!). Extended abstracts must be submitted with the label 'Extended abstract' clearly in the title. # Important Dates - Regular paper deadline: Wednesday, 24th May, 2017 - Extended abstract deadline: Wednesday, 7th June, 2017 - Author notification: Wednesday, 28th June, 2017 - Deadline for camera ready version: Saturday, 15th July, 2017 - Workshop: Sunday, 3rd September, 2017 # Travel Support Student attendees with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC program, see its web page: http://www.sigplan.org/PAC/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Wed Jun 7 10:52:52 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 7 Jun 2017 11:52:52 +0300 Subject: [Agda] Type checking times and a solution. Message-ID: Let us say that we have a big agda file and we have a function at the bottom that has holes. Whenever we case split , it takes tens of seconds to do it. Since all the previous functions are complete, one could simply create a new file with the new function and work there. The type checking will be instantaneous. But this method is very tedious. An emacs command that copies the function to another file and performs the typechecking there would be much appreciated. It needs to grab all the imports. It also needs to find the beginning and ending of a function. We could use "empty" lines as the boundaries. If there is code after that function, it is commented out. This seems like an easy solution to me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Jun 7 22:03:01 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 07 Jun 2017 23:03:01 +0300 Subject: [Agda] matching against _::_ ? Message-ID: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> People, I have a function of kind let a = gen 1 b = gen 2 c = gen 3 d = gen 4 e = gen 5 f = gen 6 g = gen 7 in F a b (c d) (H e f g) And in other examples there may be more `gen' values of this kind. Is it possible a shorter expression? For the construct of kind let a ? b ? c ? _ = gen 1 ? gen 2 ? gen 3 ? [] in ... Agda reports "Expected record pattern ...". Why? And with case gen 1 ? gen 2 ? gen 3 ? [] of { (a ? b ? c ? _) ? a + b + c ; _ ? ?? }, I do not see how to eliminate the remaining patterns in a short code. How to make Agda accept that the list gen 1 ? gen 2 ? gen 3 ? [] has at least three members, and to pattern-match accordingly? What may be a way out? Thanks, ------ Sergei From abela at chalmers.se Wed Jun 7 23:01:55 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 7 Jun 2017 23:01:55 +0200 Subject: [Agda] matching against _::_ ? In-Reply-To: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> Message-ID: You can use vectors: open import Data.Nat.Base open import Data.Vec open import Function test : ? test = case 1 ? 2 ? 3 ? [] of ? where (a ? b ? c ? _) ? a + b + c On 07.06.2017 22:03, Sergei Meshveliani wrote: > People, > > I have a function of kind > > let a = gen 1 > b = gen 2 > c = gen 3 > d = gen 4 > e = gen 5 > f = gen 6 > g = gen 7 > in > F a b (c d) (H e f g) > > And in other examples there may be more `gen' values of this kind. > > Is it possible a shorter expression? > > For the construct of kind > > let a ? b ? c ? _ = gen 1 ? gen 2 ? gen 3 ? [] > in ... > > Agda reports "Expected record pattern ...". > Why? > > And with > case gen 1 ? gen 2 ? gen 3 ? [] > of > { (a ? b ? c ? _) ? a + b + c > ; _ ? ?? > }, > > I do not see how to eliminate the remaining patterns in a short code. > > How to make Agda accept that the list gen 1 ? gen 2 ? gen 3 ? [] > has at least three members, and to pattern-match accordingly? > > What may be a way out? > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Thu Jun 8 10:28:26 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 8 Jun 2017 10:28:26 +0200 Subject: [Agda] Caching [Re: Type checking times and a solution.] In-Reply-To: References: Message-ID: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> We are a bit short of emacs-lisp programmers, but if you implement something, we are happy to receive a pull request. What makes Agda slow here is that the file is reloaded after each case split. Ideally, the caching feature of Agda should speed things up in case you only work at the end of the file (not on holes somewhere in the middle where lots of definitions come after that). @Andrea: is it reasonable to expect that the caching feature eliminates the 10s of seconds that Apostolis describes? Best, Andreas On 07.06.2017 10:52, Apostolis Xekoukoulotakis wrote: > Let us say that we have a big agda file and we have a function at the > bottom that has holes. > Whenever we case split , it takes tens of seconds to do it. > > Since all the previous functions are complete, one could simply create a > new file with the new function and work there. The type checking will be > instantaneous. > > But this method is very tedious. An emacs command that copies the > function to another file and performs the typechecking there would be > much appreciated. > > It needs to grab all the imports. It also needs to find the beginning > and ending of a function. > We could use "empty" lines as the boundaries. > > If there is code after that function, it is commented out. > > This seems like an easy solution to me. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Thu Jun 8 10:38:45 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 8 Jun 2017 10:38:45 +0200 Subject: [Agda] Caching [Re: Type checking times and a solution.] In-Reply-To: References: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> Message-ID: <653b7d42-f357-a0a8-0063-6dcbb1df49a9@chalmers.se> So it is off by default? Does {-# OPTIONS --caching #-} work on top of the file? On 08.06.2017 10:37, Andrea Vezzosi wrote: > Yeah, it's worth a try at least, you only need to put --caching as one > of the arguments for agda. > > On Thu, Jun 8, 2017 at 10:28 AM, Andreas Abel wrote: >> We are a bit short of emacs-lisp programmers, but if you implement >> something, we are happy to receive a pull request. >> >> What makes Agda slow here is that the file is reloaded after each case >> split. Ideally, the caching feature of Agda should speed things up in case >> you only work at the end of the file (not on holes somewhere in the middle >> where lots of definitions come after that). >> >> @Andrea: is it reasonable to expect that the caching feature eliminates the >> 10s of seconds that Apostolis describes? >> >> Best, >> Andreas >> >> On 07.06.2017 10:52, Apostolis Xekoukoulotakis wrote: >>> >>> Let us say that we have a big agda file and we have a function at the >>> bottom that has holes. >>> Whenever we case split , it takes tens of seconds to do it. >>> >>> Since all the previous functions are complete, one could simply create a >>> new file with the new function and work there. The type checking will be >>> instantaneous. >>> >>> But this method is very tedious. An emacs command that copies the function >>> to another file and performs the typechecking there would be much >>> appreciated. >>> >>> It needs to grab all the imports. It also needs to find the beginning and >>> ending of a function. >>> We could use "empty" lines as the boundaries. >>> >>> If there is code after that function, it is commented out. >>> >>> This seems like an easy solution to me. >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> >> -- >> Andreas Abel <>< Du bist der geliebte Mensch. >> >> Department of Computer Science and Engineering >> Chalmers and Gothenburg University, Sweden >> >> andreas.abel at gu.se >> http://www.cse.chalmers.se/~abela/ >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From sanzhiyan at gmail.com Thu Jun 8 11:45:24 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Thu, 8 Jun 2017 11:45:24 +0200 Subject: [Agda] Caching [Re: Type checking times and a solution.] In-Reply-To: <653b7d42-f357-a0a8-0063-6dcbb1df49a9@chalmers.se> References: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> <653b7d42-f357-a0a8-0063-6dcbb1df49a9@chalmers.se> Message-ID: Yes, it's off by default, and no it does not work on top of the file. Cheers, Andrea On Thu, Jun 8, 2017 at 10:38 AM, Andreas Abel wrote: > So it is off by default? > > Does {-# OPTIONS --caching #-} work on top of the file? > > > On 08.06.2017 10:37, Andrea Vezzosi wrote: >> >> Yeah, it's worth a try at least, you only need to put --caching as one >> of the arguments for agda. >> >> On Thu, Jun 8, 2017 at 10:28 AM, Andreas Abel wrote: >>> >>> We are a bit short of emacs-lisp programmers, but if you implement >>> something, we are happy to receive a pull request. >>> >>> What makes Agda slow here is that the file is reloaded after each case >>> split. Ideally, the caching feature of Agda should speed things up in >>> case >>> you only work at the end of the file (not on holes somewhere in the >>> middle >>> where lots of definitions come after that). >>> >>> @Andrea: is it reasonable to expect that the caching feature eliminates >>> the >>> 10s of seconds that Apostolis describes? >>> >>> Best, >>> Andreas >>> >>> On 07.06.2017 10:52, Apostolis Xekoukoulotakis wrote: >>>> >>>> >>>> Let us say that we have a big agda file and we have a function at the >>>> bottom that has holes. >>>> Whenever we case split , it takes tens of seconds to do it. >>>> >>>> Since all the previous functions are complete, one could simply create a >>>> new file with the new function and work there. The type checking will be >>>> instantaneous. >>>> >>>> But this method is very tedious. An emacs command that copies the >>>> function >>>> to another file and performs the typechecking there would be much >>>> appreciated. >>>> >>>> It needs to grab all the imports. It also needs to find the beginning >>>> and >>>> ending of a function. >>>> We could use "empty" lines as the boundaries. >>>> >>>> If there is code after that function, it is commented out. >>>> >>>> This seems like an easy solution to me. >>>> >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> >>> >>> -- >>> Andreas Abel <>< Du bist der geliebte Mensch. >>> >>> Department of Computer Science and Engineering >>> Chalmers and Gothenburg University, Sweden >>> >>> andreas.abel at gu.se >>> http://www.cse.chalmers.se/~abela/ >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ From jan.bracker at googlemail.com Thu Jun 8 13:35:25 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Thu, 8 Jun 2017 12:35:25 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function Message-ID: Hello, I have a module that compiles in a reasonable amount of time with some holes in it. If I fill one specific hole using a specific proof from another module and start compilation it does not appear to terminate (I have let it running for 50+ minutes and it just fills and empties my RAM and swap slowly...). Can anyone explain why this happens or how I can get around this issue? The modules with holes can be found here: https://github.com/jbracker/polymonad-proofs/blob/master/src /Theory/Natural/Isomorphism/Examples/FunctorCompositionAssociator.agda On its own this file (with holes) type checks in a reasonable amount of time in emacs and if I call Agda directly, as well: agda -isrc -v 0 +RTS -K40m -RTS src/Theory/Natural/Isomorphism/Examples/ FunctorCompositionAssociator.agda If I try to fill the hole on line 44 with the expression "fca {?C?} {?C?} C" I experience the possibly non-terminating behavior of the type checker. As far as I can see that expression exactly matches the type of that hole and I don't understand why it is not just accepted immediately. As said before I have let Agda work away at the proof for 50+ minutes without finishing type checking. I don't know if this helps at all, but usually when I watch my memory usage during Agda compilations t just stepwise allocates memory up to a point and then finishes. With the hole filled in the compilation allocates and deallocates memory in (2-3 minute) cycles which I have not seen before when running Agda. I have not measured memory usage I just watched the graph of memory usage in my system monitor while it was running. "fca" or "functorCompositionAssociator" is imported from https://github.com/jbracker/polymonad-proofs/blob/master/src /Theory/Natural/Transformation/Examples/FunctorCompositionAssociator.agda This module on its own again compiles within a reasonable amount of time (in emacs and while calling agda directly): agda -isrc -v 0 +RTS -K40m -RTS src/Theory/Natural/Transformation/Examples/ FunctorCompositionAssociator.agda I first encountered this problem using emacs and I have verified that it is actually an Agda and not an emacs issue by calling Agda on the respective files directly before and after I replaced the hole with the expression. I have tested this using Agda 2.5.2 built from the Hackage sources on two different 64-bit Linux machines (Kubuntu 16.04 & 14.04). The machines have 6 / 8 GB of RAM and that is fully used by the compilation together with 2-3 GB of swap. So what is causing this issue and how can I get around it? Best, Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Thu Jun 8 14:24:58 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 08 Jun 2017 15:24:58 +0300 Subject: [Agda] matching against _::_ ? In-Reply-To: References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> Message-ID: <1496924698.21089.18.camel@scico.botik.ru> On Wed, 2017-06-07 at 23:01 +0200, Andreas Abel wrote: > You can use vectors: > > open import Data.Nat.Base > open import Data.Vec > open import Function > > test : ? > test = case 1 ? 2 ? 3 ? [] of ? where > (a ? b ? c ? _) ? a + b + c Thank you. This example works with it. But my real example does not. The two lemmas below differ only in the way in which a' and b' are bound to their values. The former uses the assignment `=', the latter uses matching against a vector. Below []' and _?'_ are the Vec constructors. lemma is type-checked, and lemma' is not. open Ring R ... lemma : a + b ? b + a lemma = let a' = gen 0 b' = gen 1 e = a' :+ b' e' = b' :+ a' en?e'n : nf e ? nf e' en?e'n = PE.refl in value?byNF gens e e' en?e'n lemma' : a + b ? b + a lemma' = case gen 0 ?' gen 1 ?' []' of \ { (a' ?' b' ?' []') ? let e = a' :+ b' e' = b' :+ a' en?e'n : nf e ? nf e' en?e'n = PE.refl in value?byNF gens e e' en?e'n } The report is " a' != b' of type Expression when checking that the expression PE.refl has type nf-comm (a' :+ b') ? nf-comm (b' :+ a') " In lemma', the values for a' and b' occur somehow confused. Can anyone tell, please, what is happening there? Thanks, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Thu Jun 8 15:00:17 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 8 Jun 2017 16:00:17 +0300 Subject: [Agda] Caching [Re: Type checking times and a solution.] In-Reply-To: References: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> <653b7d42-f357-a0a8-0063-6dcbb1df49a9@chalmers.se> Message-ID: Caching definitely helps but it still takes some time to typecheck the current file. >From now on, my workflow will be to have a separate text file where I introduce new functions. When I finish with them, I will put them to the original file. On Thu, Jun 8, 2017 at 12:45 PM, Andrea Vezzosi wrote: > Yes, it's off by default, and no it does not work on top of the file. > > Cheers, > Andrea > > On Thu, Jun 8, 2017 at 10:38 AM, Andreas Abel wrote: > > So it is off by default? > > > > Does {-# OPTIONS --caching #-} work on top of the file? > > > > > > On 08.06.2017 10:37, Andrea Vezzosi wrote: > >> > >> Yeah, it's worth a try at least, you only need to put --caching as one > >> of the arguments for agda. > >> > >> On Thu, Jun 8, 2017 at 10:28 AM, Andreas Abel > wrote: > >>> > >>> We are a bit short of emacs-lisp programmers, but if you implement > >>> something, we are happy to receive a pull request. > >>> > >>> What makes Agda slow here is that the file is reloaded after each case > >>> split. Ideally, the caching feature of Agda should speed things up in > >>> case > >>> you only work at the end of the file (not on holes somewhere in the > >>> middle > >>> where lots of definitions come after that). > >>> > >>> @Andrea: is it reasonable to expect that the caching feature eliminates > >>> the > >>> 10s of seconds that Apostolis describes? > >>> > >>> Best, > >>> Andreas > >>> > >>> On 07.06.2017 10:52, Apostolis Xekoukoulotakis wrote: > >>>> > >>>> > >>>> Let us say that we have a big agda file and we have a function at the > >>>> bottom that has holes. > >>>> Whenever we case split , it takes tens of seconds to do it. > >>>> > >>>> Since all the previous functions are complete, one could simply > create a > >>>> new file with the new function and work there. The type checking will > be > >>>> instantaneous. > >>>> > >>>> But this method is very tedious. An emacs command that copies the > >>>> function > >>>> to another file and performs the typechecking there would be much > >>>> appreciated. > >>>> > >>>> It needs to grab all the imports. It also needs to find the beginning > >>>> and > >>>> ending of a function. > >>>> We could use "empty" lines as the boundaries. > >>>> > >>>> If there is code after that function, it is commented out. > >>>> > >>>> This seems like an easy solution to me. > >>>> > >>>> > >>>> _______________________________________________ > >>>> Agda mailing list > >>>> Agda at lists.chalmers.se > >>>> https://lists.chalmers.se/mailman/listinfo/agda > >>>> > >>> > >>> > >>> -- > >>> Andreas Abel <>< Du bist der geliebte Mensch. > >>> > >>> Department of Computer Science and Engineering > >>> Chalmers and Gothenburg University, Sweden > >>> > >>> andreas.abel at gu.se > >>> http://www.cse.chalmers.se/~abela/ > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > -- > > Andreas Abel <>< Du bist der geliebte Mensch. > > > > Department of Computer Science and Engineering > > Chalmers and Gothenburg University, Sweden > > > > andreas.abel at gu.se > > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodolphe.lepigre at univ-smb.fr Thu Jun 8 15:29:52 2017 From: rodolphe.lepigre at univ-smb.fr (Rodolphe Lepigre) Date: Thu, 8 Jun 2017 15:29:52 +0200 Subject: [Agda] =?utf-8?q?Workshop_on_Termination_and_Circular_Proofs_=28C?= =?utf-8?q?hamb=C3=A9ry=2C_19/07=29?= Message-ID: <20170608132952.GA25821@HPArchRod.localdomain> CALL FOR PARTICIPATION & CONTRIBUTIONS Workshop on Termination and Circular Proofs 19th of July 2017 - Chamb?ry, France https://lama.univ-savoie.fr/~lepigre/termination/ BACKGROUND Termination is a very active research topic, which is essential for the con- struction of proof assistants. Indeed, a circular proof (i.e., a proof that may use its own goal as a premise) is only valid if it is well-founded, and thus terminating in some sense. This aim of this one day workshop is to bringing together researchers from both the termination and the proof assistant communities around a few talks, in the hope of stimulating interactions and fruitful discussions. INVITED SPEAKER Andreas Abel (Gothenburg University / Chalmers) CONTRIBUTED TALKS We solicit contributed talks on topics that should relate (in a broad sense) to termination or/and circular proofs. You should submit a title and a small abstract by email to the organisers (the sooner, the better). REGISTRATION Registration is free of charge, but mandatory on the following web page. It will only take you thirty seconds as we ask very few informations. Note that you will not receive any confirmation email, just check that you appear on the list of participants. https://lama.univ-savoie.fr/~lepigre/termination/ To make our lives easier, please register as early as possible! PRELIMINARY PROGRAM 19th of July 2017: 09:30 - 10:00 Breakfast 10:00 - 11:00 Invited talk (Andreas Abel) 11:00 - 11:30 Coffee break 11:30 - 12:00 Contributed talk 1 12:00 - 12:30 Contributed talk 2 12:30 - 14:30 Lunch 14:30 - 15:00 Contributed talk 3 15:00 - 15:30 Contributed talk 4 15:30 - 16:00 Coffee break 16:00 - 16:30 Contributed talk 5 16:30 - 17:00 Contributed talk 6 ORGANISING COMMITTEE Rodolphe Lepigre (Universit? Savoie Mont Blanc) Christophe Raffalli (Universit? Savoie Mont Blanc) Pierre Hyvernat (Universit? Savoie Mont Blanc) Clovis Eberhart (Universit? Savoie Mont Blanc) Tom Hirschowitz (Universit? Savoie Mont Blanc) CONTACT rodolphe.lepigre at univ-smb.fr From abela at chalmers.se Thu Jun 8 16:01:16 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 8 Jun 2017 16:01:16 +0200 Subject: [Agda] matching against _::_ ? In-Reply-To: <1496924698.21089.18.camel@scico.botik.ru> References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> <1496924698.21089.18.camel@scico.botik.ru> Message-ID: <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> The difference is that for "lemma", Agda knows a' = gen 0 b' = gen 1 but for "lemma'" it does not know this. On 08.06.2017 14:24, Sergei Meshveliani wrote: > On Wed, 2017-06-07 at 23:01 +0200, Andreas Abel wrote: >> You can use vectors: >> >> open import Data.Nat.Base >> open import Data.Vec >> open import Function >> >> test : ? >> test = case 1 ? 2 ? 3 ? [] of ? where >> (a ? b ? c ? _) ? a + b + c > > > Thank you. This example works with it. > > But my real example does not. > The two lemmas below differ only in the way in which a' and b' are > bound to their values. The former uses the assignment `=', the latter > uses matching against a vector. > Below []' and _?'_ are the Vec constructors. > lemma is type-checked, and lemma' is not. > > open Ring R > ... > lemma : a + b ? b + a > lemma = let > a' = gen 0 > b' = gen 1 > e = a' :+ b' > e' = b' :+ a' > > en?e'n : nf e ? nf e' > en?e'n = PE.refl > in > value?byNF gens e e' en?e'n > > lemma' : a + b ? b + a > lemma' = > case gen 0 ?' gen 1 ?' []' > of \ > { (a' ?' b' ?' []') ? > let e = a' :+ b' > e' = b' :+ a' > > en?e'n : nf e ? nf e' > en?e'n = PE.refl > in > value?byNF gens e e' en?e'n > } > > The report is > " > a' != b' of type Expression > when checking that the expression PE.refl has type > nf-comm (a' :+ b') ? nf-comm (b' :+ a') > " > > In lemma', the values for a' and b' occur somehow confused. > > Can anyone tell, please, what is happening there? > > Thanks, > > ------ > Sergei > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From vezzosi at chalmers.se Thu Jun 8 10:37:10 2017 From: vezzosi at chalmers.se (Andrea Vezzosi) Date: Thu, 8 Jun 2017 10:37:10 +0200 Subject: [Agda] Caching [Re: Type checking times and a solution.] In-Reply-To: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> References: <88a9ef9c-e641-0bbd-364b-b651957f74ce@chalmers.se> Message-ID: Yeah, it's worth a try at least, you only need to put --caching as one of the arguments for agda. On Thu, Jun 8, 2017 at 10:28 AM, Andreas Abel wrote: > We are a bit short of emacs-lisp programmers, but if you implement > something, we are happy to receive a pull request. > > What makes Agda slow here is that the file is reloaded after each case > split. Ideally, the caching feature of Agda should speed things up in case > you only work at the end of the file (not on holes somewhere in the middle > where lots of definitions come after that). > > @Andrea: is it reasonable to expect that the caching feature eliminates the > 10s of seconds that Apostolis describes? > > Best, > Andreas > > On 07.06.2017 10:52, Apostolis Xekoukoulotakis wrote: >> >> Let us say that we have a big agda file and we have a function at the >> bottom that has holes. >> Whenever we case split , it takes tens of seconds to do it. >> >> Since all the previous functions are complete, one could simply create a >> new file with the new function and work there. The type checking will be >> instantaneous. >> >> But this method is very tedious. An emacs command that copies the function >> to another file and performs the typechecking there would be much >> appreciated. >> >> It needs to grab all the imports. It also needs to find the beginning and >> ending of a function. >> We could use "empty" lines as the boundaries. >> >> If there is code after that function, it is commented out. >> >> This seems like an easy solution to me. >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Thu Jun 8 18:34:09 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 08 Jun 2017 19:34:09 +0300 Subject: [Agda] matching against _::_ ? In-Reply-To: <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> <1496924698.21089.18.camel@scico.botik.ru> <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> Message-ID: <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> On Thu, 2017-06-08 at 16:01 +0200, Andreas Abel wrote: > The difference is that for "lemma", Agda knows > > a' = gen 0 > b' = gen 1 > > but for "lemma'" it does not know this. Please, consider this example: ------------------------------------------------------------------- open import Relation.Binary.PropositionalEquality using (_?_) open import Data.Nat.Base open import Data.Nat.Properties.Simple using (+-assoc) open import Data.Vec open import Function postulate suc-assoc : (x y z : ?) ? (suc x + suc y) + suc z ? suc x + (suc y + suc z) ? (x + y) + z ? x + (y + z) -- contrived test1 : (a b c : ?) ? (a + b) + c ? a + (b + c) -- contrived test1 a b c = let a' = suc a b' = suc b c' = suc c eq : (a' + b') + c' ? a' + (b' + c') eq = +-assoc a' b' c' in suc-assoc a b c eq test2 : (a b c : ?) ? (a + b) + c ? a + (b + c) test2 a b c = case suc a ? suc b ? suc c ? [] of \ where (a' ? b' ? c' ? []) ? let eq : (a' + b') + c' ? a' + (b' + c') eq = +-assoc a' b' c' in suc-assoc a b c eq ------------------------------------------------------------------- test2 tries to gather many assignments (three assignments in this example) into matching against a vector. But as you write, Agda does not know that a' = suc a, b' = suc b; ... The goal is clear. What may be a way out? Thanks, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Thu Jun 8 21:05:30 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 8 Jun 2017 22:05:30 +0300 Subject: [Agda] When catchall does not help. Message-ID: The contruct function uses catchall. https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2ee08781de09fd246523629/agda/SetLL.agda#L604 Then have a look at the function that proves a property that uses contruct at its type: https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2ee08781de09fd246523629/agda/SetLLProp.agda#L1442 -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Fri Jun 9 10:01:33 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 9 Jun 2017 10:01:33 +0200 Subject: [Agda] matching against _::_ ? In-Reply-To: <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> <1496924698.21089.18.camel@scico.botik.ru> <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> Message-ID: <235c4581-162e-bc84-bfb5-a963e57d34f5@chalmers.se> You can use recursively defined vectors and let: open import Data.Nat.Base open import Data.Nat.Properties.Simple using (+-assoc) open import Data.Product open import Data.Unit open import Function open import Relation.Binary.PropositionalEquality using (_?_) infixr 1 _?_ record V0 : Set where constructor [] record VS (A B : Set) : Set where constructor _?_ field head : A tail : B RVec : (A : Set) (n : ?) ? Set RVec A zero = V0 RVec A (suc n) = VS A (RVec A n) postulate suc-assoc : (x y z : ?) ? (suc x + suc y) + suc z ? suc x + (suc y + suc z) ? (x + y) + z ? x + (y + z) test : (a b c : ?) ? (a + b) + c ? a + (b + c) test a b c = let (a' ? b' ? c' ? []) = RVec _ 3 ? suc a ? suc b ? suc c ? [] eq : (a' + b') + c' ? a' + (b' + c') eq = +-assoc a' b' c' in suc-assoc a b c eq On 08.06.2017 18:34, Sergei Meshveliani wrote: > open import Relation.Binary.PropositionalEquality using (_?_) > open import Data.Nat.Base > open import Data.Nat.Properties.Simple using (+-assoc) > open import Data.Vec > open import Function > > postulate > suc-assoc : (x y z : ?) ? > (suc x + suc y) + suc z ? suc x + (suc y + suc z) ? > (x + y) + z ? x + (y + z) > -- contrived > > test1 : (a b c : ?) ? (a + b) + c ? a + (b + c) -- contrived > test1 a b c = > let a' = suc a > b' = suc b > c' = suc c > > eq : (a' + b') + c' ? a' + (b' + c') > eq = +-assoc a' b' c' > in > suc-assoc a b c eq > > test2 : (a b c : ?) ? (a + b) + c ? a + (b + c) > test2 a b c = > case suc a ? suc b ? suc c ? [] of \ > where > (a' ? b' ? c' ? []) ? > let eq : (a' + b') + c' ? a' + (b' + c') > eq = +-assoc a' b' c' > in > suc-assoc a b c eq -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From sandro.stucki at gmail.com Fri Jun 9 09:49:34 2017 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Fri, 9 Jun 2017 09:49:34 +0200 Subject: [Agda] matching against _::_ ? In-Reply-To: <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> <1496924698.21089.18.camel@scico.botik.ru> <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> Message-ID: On Thu, Jun 8, 2017 at 6:34 PM, Sergei Meshveliani wrote: > On Thu, 2017-06-08 at 16:01 +0200, Andreas Abel wrote: >> The difference is that for "lemma", Agda knows >> >> a' = gen 0 >> b' = gen 1 >> >> but for "lemma'" it does not know this. > > > > Please, consider this example: > > > ------------------------------------------------------------------- > open import Relation.Binary.PropositionalEquality using (_?_) > open import Data.Nat.Base > open import Data.Nat.Properties.Simple using (+-assoc) > open import Data.Vec > open import Function > > postulate > suc-assoc : (x y z : ?) ? > (suc x + suc y) + suc z ? suc x + (suc y + suc z) ? > (x + y) + z ? x + (y + z) > -- contrived > > test1 : (a b c : ?) ? (a + b) + c ? a + (b + c) -- contrived > test1 a b c = > let a' = suc a > b' = suc b > c' = suc c > > eq : (a' + b') + c' ? a' + (b' + c') > eq = +-assoc a' b' c' > in > suc-assoc a b c eq > > test2 : (a b c : ?) ? (a + b) + c ? a + (b + c) > test2 a b c = > case suc a ? suc b ? suc c ? [] of \ > where > (a' ? b' ? c' ? []) ? > let eq : (a' + b') + c' ? a' + (b' + c') > eq = +-assoc a' b' c' > in > suc-assoc a b c eq > ------------------------------------------------------------------- > > test2 tries to gather many assignments > (three assignments in this example) into matching against a vector. > But as you write, Agda does not know that a' = suc a, b' = suc b; ... > > The goal is clear. What may be a way out? I'm not sure I understand your question correctly, but if you're just trying collect multiple let-definitions in one line, using products instead of vectors/lists might help: ------------------------------------------------------------------- -- ... open import Data.Product using (_,_; _,?_) -- ... test2 : (a b c : ?) ? (a + b) + c ? a + (b + c) test2 a b c = let a' , b' , c' = suc a ,? suc b ,? suc c eq : (a' + b') + c' ? a' + (b' + c') eq = +-assoc a' b' c' in suc-assoc a b c eq ------------------------------------------------------------------- You can avoid the use of _,?_ by defining your own (non-dependent) product type. I hope this helps /Sandro > Thanks, > > ------ > Sergei > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Sat Jun 10 15:11:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 10 Jun 2017 16:11:29 +0300 Subject: [Agda] matching against _::_ ? In-Reply-To: References: <1496865781.2781.43.camel@one.mechvel.pereslavl.ru> <1496924698.21089.18.camel@scico.botik.ru> <33b3e70b-e506-ae5c-c497-aace4ef81648@chalmers.se> <1496939649.2627.15.camel@one.mechvel.pereslavl.ru> Message-ID: <1497100289.2654.23.camel@one.mechvel.pereslavl.ru> On Fri, 2017-06-09 at 09:49 +0200, Sandro Stucki wrote: [..] > I'm not sure I understand your question correctly, but if you're just > trying collect multiple let-definitions in one line, using products > instead of vectors/lists might help: > > ------------------------------------------------------------------- > -- ... > open import Data.Product using (_,_; _,?_) > > -- ... > test2 : (a b c : ?) ? (a + b) + c ? a + (b + c) > test2 a b c = > let a' , b' , c' = suc a ,? suc b ,? suc c > > eq : (a' + b') + c' ? a' + (b' + c') > eq = +-assoc a' b' c' > in > suc-assoc a b c eq > ------------------------------------------------------------------- > > You can avoid the use of _,?_ by defining your own (non-dependent) product type. Thanks to Sandro and to Andreas. Now I see a way out. The goal was to write shorter the assignments of kind :a-0 = gen 0, ... :a-n = gen n for certain gen : Nat -> Expr, and n being, say, up to 20. Now, I define module _ {?} (A : Set ?) where Tuple1 : {n : ?} ? Set ? Tuple1 {0} = A Tuple1 {suc n} = A ? (Tuple1 {n}) seqInTuple1 : (? ? A) ? (n : ?) ? Tuple1 {n}, so that, (seqInTuple f n) returns (f 0 , f 1 , ... , f n) : Tuple1 {n}. And apply it as in this example: :g?? , :g?? , :pN , :pD , :p'N , :p'D , :pG , :p'G = seqInTuple1 Expr gen 7 Thanks, ------ Sergei From publicityifl at gmail.com Mon Jun 12 14:37:36 2017 From: publicityifl at gmail.com (publicityifl at gmail.com) Date: Mon, 12 Jun 2017 12:37:36 +0000 Subject: [Agda] 1st CfP: IFL 2017 (29th Symposium on Implementation and Application of Functional Languages) Message-ID: <001a11482c407b3c8f0551c29592@google.com>
Hello,

Please, find below the first call for papers for IFL 2017.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.

best regards,
Jurriaan Hage
Publicity Chair of IFL

---

IFL 2017 - CALL FOR PAPERS
==========================

29th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES
========================================================================

University of Bristol, UK

In cooperation with ACM SIGPLAN

Wednesday 30 August - Friday 1 September, 2017

http://iflconference.org/

Scope
-----

The goal of the IFL symposia is to bring together researchers actively engaged
in the implementation and application of functional and function-based
programming languages. IFL 2017 will be a venue for researchers to present and
discuss new ideas and concepts, work in progress, and publication-ripe results
related to the implementation and application of functional languages and
function-based programming.

Peer-review
-----------

Following the IFL tradition, IFL 2017 will use a post-symposium review process
to produce the formal proceedings. All participants of IFL 2017 are invited to
submit either a draft paper or an extended abstract describing work to be
presented at the symposium. At no time may work submitted to IFL be
simultaneously submitted to other venues; submissions must adhere to ACM
SIGPLAN's republication policy:

http://www.sigplan.org/Resources/Policies/Republication

The submissions will be screened by the program committee chair to make sure
they are within the scope of IFL, and will appear in the draft proceedings
distributed at the symposium. Submissions appearing in the draft proceedings
are not peer-reviewed publications. Hence, publications that appear only in the
draft proceedings are not subject to the ACM SIGPLAN republication policy.
After the symposium, authors will be given the opportunity to incorporate the
feedback from discussions at the symposium and will be invited to submit a
revised full article for the formal review process. From the revised
submissions, the program committee will select papers for the formal
proceedings considering their correctness, novelty, originality, relevance,
significance, and clarity. The formal proceedings will appear in the
International Conference Proceedings Series of the ACM Digital Library.

Important dates
---------------

Mon 31 July???? 2017 : Submission deadline draft papers
Wed? 2 August?? 2017 : Notification of acceptance for presentation
Fri? 4 August?? 2017 : Early registration deadline
Fri 11 August?? 2017 : Late registration deadline
Mon 21 August?? 2017 : Submission deadline for pre-symposium proceedings
Wed 30 August?? 2017 - Fri 1 September 2017 : IFL Symposium
Mon? 4 December 2017 : Submission deadline for post-symposium proceedings
Wed 31 January? 2018 : Notification of acceptance for post-symposium proceedings
Mon 12 March??? 2018 : Camera-ready version for post-symposium proceedings

Submission details
------------------

Prospective authors are encouraged to submit papers or extended abstracts to be
published in the draft proceedings and to present them at the symposium. All
contributions must be written in English. Papers must use the new ACM two
columns conference format, which can be found at:

http://www.acm.org/publications/proceedings-template

For the pre-symposium proceedings we adopt a 'weak' page limit of 12 pages. For
the post-symposium proceedings the page limit of 12 pages is firm.

Authors submit through EasyChair:

https://easychair.org/conferences/?conf=ifl2017

Topics
------

IFL welcomes submissions describing practical and theoretical work as well as
submissions describing applications and tools in the context of functional
programming. If you are not sure whether your work is appropriate for IFL 2017,
please contact the PC chair at nicolas.wu at bristol.ac.uk. Topics of interest include,
but are not limited to:

- language concepts
- type systems, type checking, type inferencing
- compilation techniques
- staged compilation
- run-time function specialization
- run-time code generation
- partial evaluation
- (abstract) interpretation
- metaprogramming
- generic programming
- automatic program generation
- array processing
- concurrent/parallel programming
- concurrent/parallel program execution
- embedded systems
- web applications
- (embedded) domain specific languages
- security
- novel memory management techniques
- run-time profiling performance measurements
- debugging and tracing
- virtual/abstract machine architectures
- validation, verification of functional programs
- tools and programming techniques
- (industrial) applications

Peter Landin Prize
------------------

The Peter Landin Prize is awarded to the best paper presented at the symposium
every year. The honored article is selected by the program committee based on
the submissions received for the formal review process. The prize carries a
cash award equivalent to 150 Euros.

Programme committee
-------------------

Chair: Nicolas Wu, University of Bristol, UK

- Kenichi Asai, Ochanomizu University, Japan
- Sandrine Blazy, University of Rennes 1, France
- Carlos Camarao, Universidade Federal de Minas Gerais, Brazil
- Stephen Dolan, University of Cambridge, UK
- Jurriaan Hage, Utrecht University, Netherlands
- Yukiyoshi Kameyama, University of Tsukuba, Japan
- Benjamin Lerner, Brown University, USA
- Bas Lijnse, Radboud University, Netherlands
- Garrett Morris, University of Kansas, USA
- Miguel Pagano, Universidad Nacional de C??rdoba, Argentina
- Tomas Petricek, Alan Turing Institute, UK
- Maciej Pir??g, University of Wroc??aw, Poland
- Exequiel Rivas, Universidad Nacional de Rosario, Argentina
- Neil Sculthorpe, Nottingham Trent University, UK
- Melinda T??th, E??tv??s Lor??nd University, Hungary
- Phil Trinder, Glasgow University, UK
- Kanae Tsushima, National Institute of Informatics, Japan
- Marcos Viera, Universidad de la Republica, Uruguay
- Meng Wang, University of Kent, UK

Venue
-----

The IFL 2017 will be held in association with the Department of
Computer Science, University of Bristol, UK. Bristol is located in
South West England, and can be easily reached from Bristol Airport.
See the website for more information on the venue.

 

powered by GSM. Free mail merge and email marketing software for Gmail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.bracker at googlemail.com Tue Jun 13 11:44:39 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Tue, 13 Jun 2017 10:44:39 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function Message-ID: Hello, I have got around the issue of the compilation possibly not terminating by simply copying the definition of "fca" and "fca'" into the module with the holes. Now it takes about 40 seconds to compile. Can anybody explain why just importing these definitions from another module causes this horrible increase in compilation time? I always thought separating Agda proofs into several modules was the best way to decrease compilation time. Best, Jan 2017-06-08 12:35 GMT+01:00 Jan Bracker : > Hello, > > I have a module that compiles in a reasonable amount of time with some > holes in it. If I fill one specific hole using a specific proof from > another module and start compilation it does not appear to terminate (I > have let it running for 50+ minutes and it just fills and empties my RAM > and swap slowly...). Can anyone explain why this happens or how I can get > around this issue? > > The modules with holes can be found here: > > https://github.com/jbracker/polymonad-proofs/blob/master/src > /Theory/Natural/Isomorphism/Examples/FunctorCompositionAssociator.agda > > On its own this file (with holes) type checks in a reasonable amount of > time in emacs and if I call Agda directly, as well: > > agda -isrc -v 0 +RTS -K40m -RTS src/Theory/Natural/Isomorphism > /Examples/FunctorCompositionAssociator.agda > > If I try to fill the hole on line 44 with the expression "fca {?C?} {?C?} > C" I experience the possibly non-terminating behavior of the type > checker. As far as I can see that expression exactly matches the type of > that hole and I don't understand why it is not just accepted immediately. > As said before I have let Agda work away at the proof for 50+ minutes > without finishing type checking. > > I don't know if this helps at all, but usually when I watch my memory > usage during Agda compilations t just stepwise allocates memory up to a > point and then finishes. With the hole filled in the compilation allocates > and deallocates memory in (2-3 minute) cycles which I have not seen before > when running Agda. I have not measured memory usage I just watched the > graph of memory usage in my system monitor while it was running. > > "fca" or "functorCompositionAssociator" is imported from > > https://github.com/jbracker/polymonad-proofs/blob/master/src > /Theory/Natural/Transformation/Examples/FunctorCompositionAssociator.agda > > This module on its own again compiles within a reasonable amount of time > (in emacs and while calling agda directly): > > agda -isrc -v 0 +RTS -K40m -RTS src/Theory/Natural/Transformat > ion/Examples/FunctorCompositionAssociator.agda > > I first encountered this problem using emacs and I have verified that it > is actually an Agda and not an emacs issue by calling Agda on the > respective files directly before and after I replaced the hole with the > expression. > > I have tested this using Agda 2.5.2 built from the Hackage sources on two > different 64-bit Linux machines (Kubuntu 16.04 & 14.04). The machines have > 6 / 8 GB of RAM and that is fully used by the compilation together with 2-3 > GB of swap. > > So what is causing this issue and how can I get around it? > > Best, > Jan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue Jun 13 11:47:13 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 13 Jun 2017 11:47:13 +0200 Subject: [Agda] When catchall does not help. In-Reply-To: References: Message-ID: On 2017-06-08 21:05, Apostolis Xekoukoulotakis wrote: > The contruct function uses catchall. > > https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2ee08781de09fd246523629/agda/SetLL.agda#L604 > > Then have a look at the function that proves a property that uses contruct at its type: > > https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2ee08781de09fd246523629/agda/SetLLProp.agda#L1442 As far as I understand the CATCHALL pragma can be used if you have enabled --exact-split, but want to disable this option for a specific clause. When CATCHALL is used some equations may not hold definitionally. -- /NAD From nad at cse.gu.se Tue Jun 13 12:39:41 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 13 Jun 2017 12:39:41 +0200 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: Message-ID: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> On 2017-06-13 11:44, Jan Bracker wrote: > I have got around the issue of the compilation possibly not > terminating by simply copying the definition of "fca" and "fca'" into > the module with the holes. Now it takes about 40 seconds to compile. > > Can anybody explain why just importing these definitions from another > module causes this horrible increase in compilation time? I always > thought separating Agda proofs into several modules was the best way > to decrease compilation time. When you used two modules you had two definitions of lAssoc/rAssoc. I'm guessing that, when you copied the definitions of fca and fca', you arranged things so that they shared the definitions of lAssoc/rAssoc with the type signature "NaturalTransformation lAssoc rAssoc". Agda's convertibility check has a special case for terms that are syntactically identical. My guess is that this special case was triggered in the latter case, but not in the former, and that some reduction was triggered in the former case. (But this is just a guess.) -- /NAD From apostolis.xekoukoulotakis at gmail.com Tue Jun 13 13:09:15 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 13 Jun 2017 14:09:15 +0300 Subject: [Agda] When catchall does not help. In-Reply-To: References: Message-ID: True, the problem is that in some cases, you would like it to hold definitionally. The below example is one such case. gun has the same behavior for all A except a. ``` module test where data A : Set where a b c d e f g h i j : A data B : A ? Set where q : ? {x} ? B x w : B j fun : A ? A fun a = b fun x = j --gun : (x : A) ? B (fun x) --gun a = q --{-# SOMETHING -#} --gun x = w -- gun : (x : A) ? B (fun x) gun a = q gun b = w gun c = w gun d = w gun e = w gun f = w gun g = w gun h = w gun i = w gun j = w ``` On Tue, Jun 13, 2017 at 12:47 PM, Nils Anders Danielsson wrote: > On 2017-06-08 21:05, Apostolis Xekoukoulotakis wrote: > >> The contruct function uses catchall. >> >> https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2e >> e08781de09fd246523629/agda/SetLL.agda#L604 >> >> Then have a look at the function that proves a property that uses >> contruct at its type: >> >> https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2e >> e08781de09fd246523629/agda/SetLLProp.agda#L1442 >> > > As far as I understand the CATCHALL pragma can be used if you have > enabled --exact-split, but want to disable this option for a specific > clause. When CATCHALL is used some equations may not hold > definitionally. > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.bracker at googlemail.com Tue Jun 13 13:20:45 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Tue, 13 Jun 2017 12:20:45 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> Message-ID: Thanks for your reply! Yes, that is the case. The copied versions now share the definition of "lAssoc" and "rAssoc". 2017-06-13 11:39 GMT+01:00 Nils Anders Danielsson : > On 2017-06-13 11:44, Jan Bracker wrote: > >> I have got around the issue of the compilation possibly not >> terminating by simply copying the definition of "fca" and "fca'" into >> the module with the holes. Now it takes about 40 seconds to compile. >> >> Can anybody explain why just importing these definitions from another >> module causes this horrible increase in compilation time? I always >> thought separating Agda proofs into several modules was the best way >> to decrease compilation time. >> > > When you used two modules you had two definitions of lAssoc/rAssoc. I'm > guessing that, when you copied the definitions of fca and fca', you > arranged things so that they shared the definitions of lAssoc/rAssoc > with the type signature "NaturalTransformation lAssoc rAssoc". > > Agda's convertibility check has a special case for terms that are > syntactically identical. My guess is that this special case was > triggered in the latter case, but not in the former, and that some > reduction was triggered in the former case. (But this is just a guess.) > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.bracker at googlemail.com Tue Jun 13 14:41:39 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Tue, 13 Jun 2017 13:41:39 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> Message-ID: Follow up: I had the same issue with another module, but your suspicion got me thinking and as a result I tried removing the module arguments completely and pass in these arguments as functions arguments of the top-level definitions instead and that appears to resolve the issue. I like using module arguments, because they are very useful when all of the definitions work with the same input. But this experience discourages me from using them somewhat, because there apparently seem to be some issues with them in the compiler. Should I file a bug report about this? (If so, where? On GitHub?) For reference: The original versions of the modules that had the described issue: https://github.com/jbracker/polymonad-proofs/blob/d2d678ba008164145e2682a2d6476bde0d3b5abf/src/Theory/Natural/Transformation/Examples/FunctorCompositionAssociator.agda https://github.com/jbracker/polymonad-proofs/blob/d2d678ba008164145e2682a2d6476bde0d3b5abf/src/Theory/Natural/Isomorphism/Examples/FunctorCompositionAssociator.agda The changed version without module arguments that compiles: https://github.com/jbracker/polymonad-proofs/blob/0f5d25a6553026345d0854a463fef40f2ebfb590/src/Theory/Natural/Transformation/Examples/FunctorCompositionAssociator.agda https://github.com/jbracker/polymonad-proofs/blob/0f5d25a6553026345d0854a463fef40f2ebfb590/src/Theory/Natural/Isomorphism/Examples/FunctorCompositionAssociator.agda 2017-06-13 12:20 GMT+01:00 Jan Bracker : > Thanks for your reply! > > Yes, that is the case. The copied versions now share the definition of > "lAssoc" and "rAssoc". > > 2017-06-13 11:39 GMT+01:00 Nils Anders Danielsson : > >> On 2017-06-13 11:44, Jan Bracker wrote: >> >>> I have got around the issue of the compilation possibly not >>> terminating by simply copying the definition of "fca" and "fca'" into >>> the module with the holes. Now it takes about 40 seconds to compile. >>> >>> Can anybody explain why just importing these definitions from another >>> module causes this horrible increase in compilation time? I always >>> thought separating Agda proofs into several modules was the best way >>> to decrease compilation time. >>> >> >> When you used two modules you had two definitions of lAssoc/rAssoc. I'm >> guessing that, when you copied the definitions of fca and fca', you >> arranged things so that they shared the definitions of lAssoc/rAssoc >> with the type signature "NaturalTransformation lAssoc rAssoc". >> >> Agda's convertibility check has a special case for terms that are >> syntactically identical. My guess is that this special case was >> triggered in the latter case, but not in the former, and that some >> reduction was triggered in the former case. (But this is just a guess.) >> >> -- >> /NAD >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Tue Jun 13 18:25:48 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 13 Jun 2017 18:25:48 +0200 Subject: [Agda] When catchall does not help. In-Reply-To: References: Message-ID: The current best practice is (as far as I know) to use a view type: ``` data A : Set where a b c d e f g h i j : A data B : A ? Set where q : ? {x} ? B x w : B j data fun-pattern : A ? Set where fun-a : fun-pattern a fun-other : ? {x} ? fun-pattern x fun-view : ? x ? fun-pattern x fun-view a = fun-a fun-view x = fun-other fun : A ? A fun x with fun-view x fun .a | fun-a = b fun x | fun-other = j gun : (x : A) ? B (fun x) gun x with fun-view x gun .a | fun-a = q gun x | fun-other = w ``` It's still quite a bit of boilerplate, but at least the length doesn't increase with the number of constructors of A. -- Jesper On Tue, Jun 13, 2017 at 1:09 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > True, the problem is that in some cases, you would like it to hold > definitionally. > > The below example is one such case. gun has the same behavior for all A > except a. > > ``` > module test where > > data A : Set where > a b c d e f g h i j : A > > data B : A ? Set where > q : ? {x} ? B x > w : B j > > > fun : A ? A > fun a = b > fun x = j > > > --gun : (x : A) ? B (fun x) > --gun a = q > --{-# SOMETHING -#} > --gun x = w > -- > > gun : (x : A) ? B (fun x) > gun a = q > gun b = w > gun c = w > gun d = w > gun e = w > gun f = w > gun g = w > gun h = w > gun i = w > gun j = w > > ``` > > On Tue, Jun 13, 2017 at 12:47 PM, Nils Anders Danielsson > wrote: > >> On 2017-06-08 21:05, Apostolis Xekoukoulotakis wrote: >> >>> The contruct function uses catchall. >>> >>> https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2e >>> e08781de09fd246523629/agda/SetLL.agda#L604 >>> >>> Then have a look at the function that proves a property that uses >>> contruct at its type: >>> >>> https://github.com/xekoukou/sparrow/blob/d00493afcafc1fb0d2e >>> e08781de09fd246523629/agda/SetLLProp.agda#L1442 >>> >> >> As far as I understand the CATCHALL pragma can be used if you have >> enabled --exact-split, but want to disable this option for a specific >> clause. When CATCHALL is used some equations may not hold >> definitionally. >> >> -- >> /NAD >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaposi.ambrus at gmail.com Fri Jun 16 17:19:21 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Fri, 16 Jun 2017 17:19:21 +0200 Subject: [Agda] rewriting and parameterized modules Message-ID: Hi Agda Developers, I don't understand why the following module doesn't typecheck. The error is ? is not a legal rewrite rule, since the left-hand side f a reduces to f a when checking the pragma REWRITE ? If I remove the X parameters from the m1 and m2 modules, it works. It also works when m1 and m2 are merged. But I'd like to use separate parameterised modules. What is the explanation for this behaviour? Many thanks, Ambrus {-# OPTIONS --rewriting #-} module a where postulate _~_ : {A : Set} ? A ? A ? Set {-# BUILTIN REWRITE _~_ #-} module m1 (X : Set) where postulate A B : Set a : A b : B f : A ? B module m2 (X : Set) where open m1 X postulate ? : f a ~ b {-# REWRITE ? #-} From Jesper at sikanda.be Fri Jun 16 17:47:59 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 16 Jun 2017 17:47:59 +0200 Subject: [Agda] rewriting and parameterized modules In-Reply-To: References: Message-ID: This is a bug in Agda, I've added it to the issue tracker: https://github.com/agda/agda/issues/2606 Working on a fix... -- Jesper On Fri, Jun 16, 2017 at 5:19 PM, Ambrus Kaposi wrote: > Hi Agda Developers, > > I don't understand why the following module doesn't typecheck. The error is > > ? is not a legal rewrite rule, since the left-hand side f a reduces > to f a when checking the pragma REWRITE ? > > If I remove the X parameters from the m1 and m2 modules, it works. It > also works when m1 and m2 are merged. But I'd like to use separate > parameterised modules. > > What is the explanation for this behaviour? > > Many thanks, > Ambrus > > > > > {-# OPTIONS --rewriting #-} > > module a where > > postulate > _~_ : {A : Set} ? A ? A ? Set > > {-# BUILTIN REWRITE _~_ #-} > > module m1 (X : Set) where > > postulate > A B : Set > a : A > b : B > f : A ? B > > module m2 (X : Set) where > > open m1 X > > postulate > ? : f a ~ b > > {-# REWRITE ? #-} > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Fri Jun 16 18:15:32 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 16 Jun 2017 18:15:32 +0200 Subject: [Agda] rewriting and parameterized modules In-Reply-To: References: Message-ID: ... aaaaaaand fixed. Have fun with rewriting. -- Jesper On Fri, Jun 16, 2017 at 5:47 PM, Jesper Cockx wrote: > This is a bug in Agda, I've added it to the issue tracker: > https://github.com/agda/agda/issues/2606 > > Working on a fix... > > -- Jesper > > On Fri, Jun 16, 2017 at 5:19 PM, Ambrus Kaposi > wrote: > >> Hi Agda Developers, >> >> I don't understand why the following module doesn't typecheck. The error >> is >> >> ? is not a legal rewrite rule, since the left-hand side f a reduces >> to f a when checking the pragma REWRITE ? >> >> If I remove the X parameters from the m1 and m2 modules, it works. It >> also works when m1 and m2 are merged. But I'd like to use separate >> parameterised modules. >> >> What is the explanation for this behaviour? >> >> Many thanks, >> Ambrus >> >> >> >> >> {-# OPTIONS --rewriting #-} >> >> module a where >> >> postulate >> _~_ : {A : Set} ? A ? A ? Set >> >> {-# BUILTIN REWRITE _~_ #-} >> >> module m1 (X : Set) where >> >> postulate >> A B : Set >> a : A >> b : B >> f : A ? B >> >> module m2 (X : Set) where >> >> open m1 X >> >> postulate >> ? : f a ~ b >> >> {-# REWRITE ? #-} >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri Jun 16 20:58:10 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 16 Jun 2017 21:58:10 +0300 Subject: [Agda] unstable composition checking Message-ID: <1497639490.3890.17.camel@one.mechvel.pereslavl.ru> Dear Agda developers, I observe the following effect: oppose : (f : T) ? Foo f oppose = ... foo : (f : T) ? Maybe $ Foo f foo = just ? oppose -- \f ? just (oppose f) Its type check takes much of time and more than 15 Gb heap. I have interrupted it. And I suspect that it would end with "unsolved metas". And foo = \f ? just (oppose f) is type-checked fast, in a small heap. Further, replacing in this example Maybe with Dec and just with yes leads to fast type checking for both variants. What might it mean this cost hole for (just ? oppose) ? Regards, ------ Sergei From jurriaanhage at gmail.com Mon Jun 12 14:29:01 2017 From: jurriaanhage at gmail.com (jurriaanhage at gmail.com) Date: Mon, 12 Jun 2017 05:29:01 -0700 Subject: [Agda] 1st Call for Papers IFL 2017 Message-ID: Hello, Please, find below the first call for papers for IFL 2017. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL --- IFL 2017 - CALL FOR PAPERS ========================== 29th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES ======================================================================== University of Bristol, UK In cooperation with ACM SIGPLAN Wednesday 30 August - Friday 1 September, 2017 http://iflconference.org/ Scope ----- The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2017 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Peer-review ----------- Following the IFL tradition, IFL 2017 will use a post-symposium review process to produce the formal proceedings. All participants of IFL 2017 are invited to submit either a draft paper or an extended abstract describing work to be presented at the symposium. At no time may work submitted to IFL be simultaneously submitted to other venues; submissions must adhere to ACM SIGPLAN's republication policy: http://www.sigplan.org/Resources/Policies/Republication The submissions will be screened by the program committee chair to make sure they are within the scope of IFL, and will appear in the draft proceedings distributed at the symposium. Submissions appearing in the draft proceedings are not peer-reviewed publications. Hence, publications that appear only in the draft proceedings are not subject to the ACM SIGPLAN republication policy. After the symposium, authors will be given the opportunity to incorporate the feedback from discussions at the symposium and will be invited to submit a revised full article for the formal review process. From the revised submissions, the program committee will select papers for the formal proceedings considering their correctness, novelty, originality, relevance, significance, and clarity. The formal proceedings will appear in the International Conference Proceedings Series of the ACM Digital Library. Important dates --------------- Mon 31 July 2017 : Submission deadline draft papers Wed 2 August 2017 : Notification of acceptance for presentation Fri 4 August 2017 : Early registration deadline Fri 11 August 2017 : Late registration deadline Mon 21 August 2017 : Submission deadline for pre-symposium proceedings Wed 30 August 2017 - Fri 1 September 2017 : IFL Symposium Mon 4 December 2017 : Submission deadline for post-symposium proceedings Wed 31 January 2018 : Notification of acceptance for post-symposium proceedings Mon 12 March 2018 : Camera-ready version for post-symposium proceedings Submission details ------------------ Prospective authors are encouraged to submit papers or extended abstracts to be published in the draft proceedings and to present them at the symposium. All contributions must be written in English. Papers must use the new ACM two columns conference format, which can be found at: http://www.acm.org/publications/proceedings-template For the pre-symposium proceedings we adopt a 'weak' page limit of 12 pages. For the post-symposium proceedings the page limit of 12 pages is firm. Authors submit through EasyChair: https://easychair.org/conferences/?conf=ifl2017 Topics ------ IFL welcomes submissions describing practical and theoretical work as well as submissions describing applications and tools in the context of functional programming. If you are not sure whether your work is appropriate for IFL 2017, please contact the PC chair at nicolas.wu at bristol.ac.uk. Topics of interest include, but are not limited to: - language concepts - type systems, type checking, type inferencing - compilation techniques - staged compilation - run-time function specialization - run-time code generation - partial evaluation - (abstract) interpretation - metaprogramming - generic programming - automatic program generation - array processing - concurrent/parallel programming - concurrent/parallel program execution - embedded systems - web applications - (embedded) domain specific languages - security - novel memory management techniques - run-time profiling performance measurements - debugging and tracing - virtual/abstract machine architectures - validation, verification of functional programs - tools and programming techniques - (industrial) applications Peter Landin Prize ------------------ The Peter Landin Prize is awarded to the best paper presented at the symposium every year. The honored article is selected by the program committee based on the submissions received for the formal review process. The prize carries a cash award equivalent to 150 Euros. Programme committee ------------------- Chair: Nicolas Wu, University of Bristol, UK - Kenichi Asai, Ochanomizu University, Japan - Sandrine Blazy, University of Rennes 1, France - Carlos Camarao, Universidade Federal de Minas Gerais, Brazil - Stephen Dolan, University of Cambridge, UK - Jurriaan Hage, Utrecht University, Netherlands - Yukiyoshi Kameyama, University of Tsukuba, Japan - Benjamin Lerner, Brown University, USA - Bas Lijnse, Radboud University, Netherlands - Garrett Morris, University of Kansas, USA - Miguel Pagano, Universidad Nacional de C??rdoba, Argentina - Tomas Petricek, Alan Turing Institute, UK - Maciej Pir??g, University of Wroc??aw, Poland - Exequiel Rivas, Universidad Nacional de Rosario, Argentina - Neil Sculthorpe, Nottingham Trent University, UK - Melinda T??th, E??tv??s Lor??nd University, Hungary - Phil Trinder, Glasgow University, UK - Kanae Tsushima, National Institute of Informatics, Japan - Marcos Viera, Universidad de la Republica, Uruguay - Meng Wang, University of Kent, UK Venue ----- The IFL 2017 will be held in association with the Department of Computer Science, University of Bristol, UK. Bristol is located in South West England, and can be easily reached from Bristol Airport. See the website for more information on the venue. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Jun 19 21:24:14 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 19 Jun 2017 22:24:14 +0300 Subject: [Agda] is divMod slow? Message-ID: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> Dear Standard library developers, I test (suc n) mod (suc (suc n)) where mod = Data.Nat.DivMod.mod for n = 123456789. The result is correct (and trivial), but it takes ** 6 seconds ** on a 3 GHz machine. It is written in Data.Nat.DivMod that _mod_ is implemented via Agda.Builtin.Nat.mod-helper. Probably, this means that it relies on something like `mod' of Haskell standard library implemented in GHC. But `mod' of GHC computes this in less than 0.0001 sec (somewhat one machine command for division of two macrodigits). Currently the Nat arithmetic in Agda Standard library is fast because it is via built-ins. But divMod is also of important arithmetic. What about divMod ? For example, arithmetic of rational numbers rely on gcd for Nat, and gcd relies on mod (divMod). What is happening there? Regards, ------ Sergei From ulf.norell at gmail.com Mon Jun 19 22:27:31 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 19 Jun 2017 22:27:31 +0200 Subject: [Agda] is divMod slow? In-Reply-To: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> Message-ID: The divMod implementation of the standard library is indeed horribly slow. If you need fast certified divMod (and gcd) you can check out the implementation in the agda-prelude library [1]. / Ulf [1] https://github.com/UlfNorell/agda-prelude/tree/master/src/Numeric/Nat On Mon, Jun 19, 2017 at 9:24 PM, Sergei Meshveliani wrote: > Dear Standard library developers, > > I test > (suc n) mod (suc (suc n)) > where > mod = Data.Nat.DivMod.mod > > for n = 123456789. > > The result is correct (and trivial), but it takes ** 6 seconds ** > on a 3 GHz machine. > It is written in Data.Nat.DivMod that _mod_ is implemented via > Agda.Builtin.Nat.mod-helper. > > Probably, this means that it relies on something like `mod' of Haskell > standard library implemented in GHC. > But `mod' of GHC computes this in less than 0.0001 sec > (somewhat one machine command for division of two macrodigits). > > Currently the Nat arithmetic in Agda Standard library is fast because it > is via built-ins. But divMod is also of important arithmetic. > What about divMod ? > For example, arithmetic of rational numbers rely on gcd for Nat, and gcd > relies on mod (divMod). > > What is happening there? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Jun 20 11:42:46 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 20 Jun 2017 12:42:46 +0300 Subject: [Agda] is divMod slow? In-Reply-To: References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> On Mon, 2017-06-19 at 22:27 +0200, Ulf Norell wrote: > The divMod implementation of the standard library is indeed horribly > slow. If you need fast certified divMod (and gcd) you can check out > the implementation in the agda-prelude library [1]. > > > / Ulf > > > [1] > https://github.com/UlfNorell/agda-prelude/tree/master/src/Numeric/Nat 1. What is a _regular_ way to download it? to use? Is divMod programmed there as built-in, or as an Agda program loop? 2. Another point. As I understand, the current Standard library implements _+_ and _*_ on Nat simply as built-in, with postulating certain main properties (may be, like this: ? n -> suc-built-in n ? suc n). Right? Is it difficult to apply the same approach to divMod ? So that divMod m (suc n) --> (q , r), where q and r are computed as built-in (say, as in GHC, or as in the gmp library), and the properties of q * (suc n) + r ? m, r < m are postulated ? Can people, please, tell me, how to arrange this? Thanks, ------ Sergei > On Mon, Jun 19, 2017 at 9:24 PM, Sergei Meshveliani > wrote: > Dear Standard library developers, > > I test > (suc n) mod (suc (suc n)) > where > mod = Data.Nat.DivMod.mod > > for n = 123456789. > > The result is correct (and trivial), but it takes ** 6 > seconds ** > on a 3 GHz machine. > It is written in Data.Nat.DivMod that _mod_ is implemented > via > Agda.Builtin.Nat.mod-helper. > > Probably, this means that it relies on something like `mod' of > Haskell > standard library implemented in GHC. > But `mod' of GHC computes this in less than 0.0001 sec > (somewhat one machine command for division of two > macrodigits). > > Currently the Nat arithmetic in Agda Standard library is fast > because it > is via built-ins. But divMod is also of important arithmetic. > What about divMod ? > For example, arithmetic of rational numbers rely on gcd for > Nat, and gcd > relies on mod (divMod). > > What is happening there? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From ulf.norell at gmail.com Tue Jun 20 12:04:05 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 20 Jun 2017 12:04:05 +0200 Subject: [Agda] is divMod slow? In-Reply-To: <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> Message-ID: On Tue, Jun 20, 2017 at 11:42 AM, Sergei Meshveliani wrote: > > 1. What is a _regular_ way to download it? to use? > There are separate branches of the library for the different releases of Agda (the master branch should work with the stable branch of Agda). For instance, if you are using Agda-2.5.2 you should download the compat-2.5.2 branch using the command git clone -b compat-2.5.2 https://github.com/UlfNorell/agda-prelude You should then add the path to agda-prelude.agda-lib to your ~/.agda/libraries file (and optionally add agda-prelude to the defaults file). If you didn't add agda-prelude to the defaults file you need to add a "depend" field to your project agda-lib file. > Is divMod programmed there as built-in, or as an Agda program loop? > It's programmed using the div-helper and mod-helper functions from Agda.Builtin.Nat. These are builtins which have an Agda definition but are evaluated using primitive Haskell functions. See below. > 2. Another point. > As I understand, the current Standard library implements _+_ and _*_ on > Nat simply as built-in, with postulating certain main properties > (may be, like this: ? n -> suc-built-in n ? suc n). > Right? > This is not how it works. _+_ and _*_ have Agda definitions (which you can find in Agda.Builtin.Nat), so all desired properties can be proven without postulates. However, when these functions are applied to closed natural numbers (like 15 or 421783423) they are evaluated using the corresponding primitive Haskell functions instead of the Agda definitions. > Is it difficult to apply the same approach to divMod ? > This is exactly what agda-prelude does (applying the approach I described above, that is). / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Jun 20 12:34:22 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 20 Jun 2017 13:34:22 +0300 Subject: [Agda] is divMod slow? In-Reply-To: References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> On Tue, 2017-06-20 at 12:04 +0200, Ulf Norell wrote: > > > On Tue, Jun 20, 2017 at 11:42 AM, Sergei Meshveliani > wrote: > > 1. What is a _regular_ way to download it? to use? > > There are separate branches of the library for the different releases > of Agda (the master branch should work with the stable branch of > Agda). For instance, if you are using Agda-2.5.2 you should download > the compat-2.5.2 branch using the command > > git clone -b compat-2.5.2 https://github.com/UlfNorell/agda-prelude I use Agda 2.6.0-207bde6, and I recall that, probably, 2.5.2 is not sufficient for my code. Will compat-2.5.2 work under Agda 2.6.0-207bde6 ? And I need gcd on Nat nearly as fast as in GHC on Integer. Or at least, a fast divMod. Thanks, ------ Sergei > You should then add the path to agda-prelude.agda-lib to your > ~/.agda/libraries file (and optionally add agda-prelude to the > defaults file). > > > If you didn't add agda-prelude to the defaults file you need to add a > "depend" field to your project agda-lib file. > > > > Is divMod programmed there as built-in, or as an Agda > program loop? > > > It's programmed using the div-helper and mod-helper functions from > Agda.Builtin.Nat. These are builtins which have an Agda definition but > are evaluated using primitive Haskell functions. See below. > > 2. Another point. > As I understand, the current Standard library implements _+_ > and _*_ on > Nat simply as built-in, with postulating certain main > properties > (may be, like this: ? n -> suc-built-in n ? suc n). > Right? > > > This is not how it works. _+_ and _*_ have Agda definitions (which you > can find in Agda.Builtin.Nat), so all desired properties can be proven > without postulates. However, when these functions are applied to > closed natural numbers (like 15 or 421783423) they are evaluated using > the corresponding primitive Haskell functions instead of the Agda > definitions. > > Is it difficult to apply the same approach to divMod ? > > > This is exactly what agda-prelude does (applying the approach I > described above, that is). > > > / Ulf From J.J.vanWijk at students.uu.nl Tue Jun 20 12:46:56 2017 From: J.J.vanWijk at students.uu.nl (Jorn van Wijk) Date: Tue, 20 Jun 2017 12:46:56 +0200 Subject: [Agda] is divMod slow? In-Reply-To: <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> Message-ID: The divMod implementation of the standard library is also implemented using the div-helper and mod-helper functions from Agda.Builtin.Nat. https://agda.github.io/agda-stdlib/Data.Nat.DivMod.html#4861 This makes me wonder in what way the prelude version differs from the standard library version. Kind regards, Jorn 2017-06-20 12:34 GMT+02:00 Sergei Meshveliani : > On Tue, 2017-06-20 at 12:04 +0200, Ulf Norell wrote: > > > > > > On Tue, Jun 20, 2017 at 11:42 AM, Sergei Meshveliani > > wrote: > > > > 1. What is a _regular_ way to download it? to use? > > > > > There are separate branches of the library for the different releases > > of Agda (the master branch should work with the stable branch of > > Agda). For instance, if you are using Agda-2.5.2 you should download > > the compat-2.5.2 branch using the command > > > > git clone -b compat-2.5.2 https://github.com/UlfNorell/agda-prelude > > > > I use Agda 2.6.0-207bde6, > > and I recall that, probably, 2.5.2 is not sufficient for my code. > > Will compat-2.5.2 work under Agda 2.6.0-207bde6 ? > > And I need gcd on Nat nearly as fast as in GHC on Integer. > Or at least, a fast divMod. > > Thanks, > > ------ > Sergei > > > > > > You should then add the path to agda-prelude.agda-lib to your > > ~/.agda/libraries file (and optionally add agda-prelude to the > > defaults file). > > > > > > If you didn't add agda-prelude to the defaults file you need to add a > > "depend" field to your project agda-lib file. > > > > > > > > Is divMod programmed there as built-in, or as an Agda > > program loop? > > > > > > It's programmed using the div-helper and mod-helper functions from > > Agda.Builtin.Nat. These are builtins which have an Agda definition but > > are evaluated using primitive Haskell functions. See below. > > > > 2. Another point. > > As I understand, the current Standard library implements _+_ > > and _*_ on > > Nat simply as built-in, with postulating certain main > > properties > > (may be, like this: ? n -> suc-built-in n ? suc n). > > Right? > > > > > > This is not how it works. _+_ and _*_ have Agda definitions (which you > > can find in Agda.Builtin.Nat), so all desired properties can be proven > > without postulates. However, when these functions are applied to > > closed natural numbers (like 15 or 421783423) they are evaluated using > > the corresponding primitive Haskell functions instead of the Agda > > definitions. > > > > Is it difficult to apply the same approach to divMod ? > > > > > > This is exactly what agda-prelude does (applying the approach I > > described above, that is). > > > > > > / Ulf > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Tue Jun 20 12:53:31 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 20 Jun 2017 12:53:31 +0200 Subject: [Agda] is divMod slow? In-Reply-To: <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> Message-ID: The master branch should work with Agda 2.6.0 (so you can simply drop "-b compat-2.5.2" from the command). / Ulf On Tue, Jun 20, 2017 at 12:34 PM, Sergei Meshveliani wrote: > On Tue, 2017-06-20 at 12:04 +0200, Ulf Norell wrote: > > > > > > On Tue, Jun 20, 2017 at 11:42 AM, Sergei Meshveliani > > wrote: > > > > 1. What is a _regular_ way to download it? to use? > > > > > There are separate branches of the library for the different releases > > of Agda (the master branch should work with the stable branch of > > Agda). For instance, if you are using Agda-2.5.2 you should download > > the compat-2.5.2 branch using the command > > > > git clone -b compat-2.5.2 https://github.com/UlfNorell/agda-prelude > > > > I use Agda 2.6.0-207bde6, > > and I recall that, probably, 2.5.2 is not sufficient for my code. > > Will compat-2.5.2 work under Agda 2.6.0-207bde6 ? > > And I need gcd on Nat nearly as fast as in GHC on Integer. > Or at least, a fast divMod. > > Thanks, > > ------ > Sergei > > > > > > You should then add the path to agda-prelude.agda-lib to your > > ~/.agda/libraries file (and optionally add agda-prelude to the > > defaults file). > > > > > > If you didn't add agda-prelude to the defaults file you need to add a > > "depend" field to your project agda-lib file. > > > > > > > > Is divMod programmed there as built-in, or as an Agda > > program loop? > > > > > > It's programmed using the div-helper and mod-helper functions from > > Agda.Builtin.Nat. These are builtins which have an Agda definition but > > are evaluated using primitive Haskell functions. See below. > > > > 2. Another point. > > As I understand, the current Standard library implements _+_ > > and _*_ on > > Nat simply as built-in, with postulating certain main > > properties > > (may be, like this: ? n -> suc-built-in n ? suc n). > > Right? > > > > > > This is not how it works. _+_ and _*_ have Agda definitions (which you > > can find in Agda.Builtin.Nat), so all desired properties can be proven > > without postulates. However, when these functions are applied to > > closed natural numbers (like 15 or 421783423) they are evaluated using > > the corresponding primitive Haskell functions instead of the Agda > > definitions. > > > > Is it difficult to apply the same approach to divMod ? > > > > > > This is exactly what agda-prelude does (applying the approach I > > described above, that is). > > > > > > / Ulf > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Tue Jun 20 12:55:11 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 20 Jun 2017 12:55:11 +0200 Subject: [Agda] is divMod slow? In-Reply-To: <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> Message-ID: On Tue, Jun 20, 2017 at 12:34 PM, Sergei Meshveliani wrote: > > And I need gcd on Nat nearly as fast as in GHC on Integer. > Or at least, a fast divMod. > agda-prelude also defines a fast certified gcd (in Numeric.Nat.GCD). / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Jun 20 13:59:12 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 20 Jun 2017 14:59:12 +0300 Subject: [Agda] is divMod slow? In-Reply-To: References: <1497900254.3217.26.camel@one.mechvel.pereslavl.ru> <1497951766.2606.26.camel@one.mechvel.pereslavl.ru> <1497954862.3263.11.camel@one.mechvel.pereslavl.ru> Message-ID: <1497959952.3865.22.camel@one.mechvel.pereslavl.ru> On Tue, 2017-06-20 at 12:53 +0200, Ulf Norell wrote: > > You should then add the path to agda-prelude.agda-lib to > your > > ~/.agda/libraries file (and optionally add agda-prelude to > the > > defaults file). > > > > > > If you didn't add agda-prelude to the defaults file you need > to add a > > "depend" field to your project agda-lib file. > > How must it look the content of ~/.agda/libraries ? (for example). So far I use this: agda -c $agdaLibOpt ... where the system variable $agdaLibOpt is set as "-i . -i /home/mechvel/agda/stLib/apr13-2017/src -i /home/mechvel/agda/UNPrelude/src -i ... " where UNPrelude is agda-prelude by Ulf Norell ("2.5.2-compatible"). Is this sufficient? With this, the following test is not type-checked: ------------------------------------------------------ module UNPreludeTest where open import Foreign.Haskell open import IO.Primitive open import Data.String using (String; toCostring) open import Data.Nat.Show as NatShow open import Numeric.Nat.GCD using (gcd!) -- of U. Norell main : IO Unit main = putStrLn (toCostring str) where str = NatShow.show (gcd! 4 6) ------------------------------------------------------ str = "abc" also is not type-checked here. The report of Agda 2.6.0-207bde6 is ------------------------------ /home/mechvel/doconA/2.00/source/UNPreludeTest.agda:14,33-34 No instance of type (.Agda.Builtin.FromNat.Number .Agda.Builtin.Nat.Nat) was found in scope. when checking that 4 is a valid argument to a function of type ({a : .Agda.Primitive.Level} {A : Set a} {{r : .Agda.Builtin.FromNat.Number A}} (n : .Agda.Builtin.Nat.Nat) {{_ : .Agda.Builtin.FromNat.Number.Constraint r n}} ? A) ------------------------------- Please, how to fix? Thanks, ------ Sergei From andersmortberg at gmail.com Tue Jun 20 17:07:42 2017 From: andersmortberg at gmail.com (Anders Mortberg) Date: Tue, 20 Jun 2017 17:07:42 +0200 Subject: [Agda] 2nd Call for Contributions and Participation: Workshop on HoTT/UF (with FSCD 2017) Message-ID: ========================================================== CALL FOR CONTRIBUTIONS AND PARTICIPATION Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF, at FSCD 2017) ========================================================== ------------------------------------------------------------------------ Workshop on Homotopy Type Theory and Univalent Foundations September 8-9, 2017, Oxford, United Kingdom https://hott-uf.github.io/2017/ Co-located with FSCD 2017 https://www.cs.ox.ac.uk/conferences/fscd2017/ Abstract submission deadline: June 30 ------------------------------------------------------------------------ Homotopy Type Theory is a young area of logic, combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. The goal of this workshop is to bring together researchers interested in all aspects of Homotopy Type Theory/Univalent Foundations: from the study of syntax and semantics of type theory to practical formalization in proof assistants based on univalent type theory. As part of the workshop there will be an introductory tutorial intended to make the invited and contributed talks accessible to non-experts. ============================ # Invited talks/tutorials * Thorsten Altenkirch (University of Nottingham) (tutorial) * Ulrik Buchholtz (Technical University of Darmstadt) * Thierry Coquand (University of Gothenburg): Sheaf models for univalent type theory ================ # Submissions * Abstract submission deadline: June 30 * Author notification: mid July Submissions should consist of a title and a 1-2 pages abstract, in pdf format, via https://easychair.org/conferences/?conf=hottuf17 Considering the broad background of the expected audience, we encourage authors to include information of pedagogical value in their abstract, such as motivation and context of their work. ====================== # Program committee * Benedikt Ahrens (Inria Nantes) * Paolo Capriotti (University of Nottingham) * Simon Huber (University of Gothenburg) * Chris Kapulkin (University of Western Ontario) * Peter LeFanu Lumsdaine (Stockholm University) * Assia Mahboubi (Inria Saclay) * Anders M?rtberg (Inria Sophia-Antipolis) * Paige North (University of Cambridge) * Nicolas Tabareau (Inria Nantes) ================ # Organizers * Benedikt Ahrens (Inria Nantes) * Simon Huber (University of Gothenburg) * Anders M?rtberg (Inria Sophia Antipolis) From nad at cse.gu.se Wed Jun 21 15:10:07 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 21 Jun 2017 15:10:07 +0200 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> Message-ID: <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> On 2017-06-13 14:41, Jan Bracker wrote: > I like using module arguments, because they are very useful when all > of the definitions work with the same input. But this experience > discourages me from using them somewhat, because there apparently seem > to be some issues with them in the compiler. The special case that I mentioned only works when terms (including all inferred implicit arguments) are syntactically identical. This is a brittle condition. > Should I file a bug report about this? If my guesses are correct, then I wouldn't call this a bug. However, I have not verified that they are correct. > (If so, where? On GitHub?) Yes. -- /NAD From nad at cse.gu.se Wed Jun 21 15:12:01 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 21 Jun 2017 15:12:01 +0200 Subject: [Agda] unstable composition checking In-Reply-To: <1497639490.3890.17.camel@one.mechvel.pereslavl.ru> References: <1497639490.3890.17.camel@one.mechvel.pereslavl.ru> Message-ID: <75a06db0-0928-81fc-7a12-6db607d88426@cse.gu.se> On 2017-06-16 20:58, Sergei Meshveliani wrote: > What might it mean this cost hole for (just ? oppose) ? I'm guessing that "just" is overloaded, and that Agda has trouble inferring the implicit arguments of _?_. What happens if you write "Maybe.just" instead? -- /NAD From mechvel at botik.ru Wed Jun 21 22:20:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 21 Jun 2017 23:20:30 +0300 Subject: [Agda] timing for agda-prelude gcd Message-ID: <1498076430.3198.47.camel@one.mechvel.pereslavl.ru> Dear all, Earlier there was discussed in this list the performance of _+_ and _*_ on Nat. I provided a test program. And as I recall, the performance is high: as in the Haskell program for ghc-7.10.2. Now I need fast divMod and gcd for Nat. Standard library is very-very slow at this point. So I try agda-prelude. It shows considerably faster. But it is still slower than GHC. gcd is about 12 times slower, and divMod is about 4000 times slower (?). I wonder: what makes this difference with the performance of _+_ and _*_ ? (mainly for divMod). On practice, I need to find d = gcd m n and then to divide m and n by d. And both need to be fast. gcd looks reasonable (if I do not mistake), but division is via dimMod, it its slows down everything. The code (for Agda-2.5.2 -like and for Haskell) is attached in GCDTest.agda It is small. `main' of Agda reads n from file. `main' of Haskell sets n in the program (I hope it would not compute much at compile-time -- ?). As the loops are long, I hope this does not make a real difference in time. The Haskell code is `made' by ghc -O --make The Agda code includes auxiliary functions that read n and convert to Nat (may be, Standard needs to provide such functions?). After the Agda code, there follows the timing table, then it follows the Haskell code. There is produced a long list rs of results for divMod (for gcd), and it is printed (maximum rs). `maximum' is applied in order to avoid printing large values. Can people, please, try this code and tell, may be I am missing something? The thing needs consideration and verification. Thanks, ------ Sergei -------------- next part -------------- module GCDTest where open import Foreign.Haskell open import IO.Primitive open import Data.String as Str using (String; toCostring; _++_) open import Function using (_$_; _?_; flip; case_of_) open import Relation.Nullary using (yes; no) open import Relation.Nullary.Decidable using (?_?) open import Relation.Unary using (Decidable) open import Relation.Binary.PropositionalEquality using (_?_) open import Data.Product using (_?_; _,_; _,?_; proj?; proj?) open import Data.Char as Char using (Char) open import Data.List using (List; []; _?_; map; foldr; reverse; filter) import Data.Fin as Fin open import Data.Nat using (?; suc; pred; _+_; _*_; _?_; _?_; _??_) open import Data.Nat.Show using () renaming (show to showNat) -- of UNPrelude -- open import Prelude.String open import Prelude.Nat open import Numeric.Nat.DivMod using (rem) renaming (divMod to uDivMod) open import Numeric.Nat.GCD using (gcd!) --**************************************************************************** concatStr : List String ? String concatStr = foldr _++_ "" filterStr : {P : Char ? Set} ? Decidable P ? String ? String filterStr P? = Str.fromList ? filter (?_? ? P?) ? Str.toList isDecimalDigit : Char ? Set isDecimalDigit c = 48 ? n ? n ? 57 where n = Char.toNat c decimalDigit? : Decidable isDecimalDigit decimalDigit? c = let n = Char.toNat c in case ((48 ?? n) ,? (n ?? 57)) of \ { (yes le , yes le') ? yes (le , le') ; (no 48?n , _ ) ? no (48?n ? proj?) ; (_ , no n?57) ? no (n?57 ? proj?) } charToDecDigitNat : Char -> ? charToDecDigitNat c = (Char.toNat c) ? 48 readNat : List Char -> ? -- convert from decimal digit chars readNat = toN ? map charToDecDigitNat ? reverse where toN : List ? -> ? toN [] = 0 toN (j ? js) = j + (10 * (toN js)) stringToNat : String ? ? stringToNat = readNat ? Str.toList max : ? ? List ? ? ? max x [] = x max x (y ? xs) = case x ?? y of \ { (yes _) ? max y xs ; (no _) ? max x xs } natSegment : ? ? ? ? List ? natSegment m n = -- [k | m ? k ? n] segm m (n ? m) where segm : ? ? ? ? List ? segm m 0 = m ? [] segm m (suc cnt) = m ? (segm (suc m) cnt) ------------------------------------------------------------------ remBySuc : ? ? ? ? ? remBySuc m n = rem (uDivMod (suc n) m) testRem : ? ? ? testRem n = max 0 (map (remBySuc n) (natSegment 0 (n ? 2))) testGCD : ? ? ? testGCD n = max 0 (map (gcd! n) (natSegment 1 (pred n))) main : IO Unit main = (readFiniteFile "data.txt") >>= putStrLn ? toCostring ? g where -- n is first read from file data.txt g : String -> String g str = concatStr ("n = " ? showNat n ? ", " ? "testRem = " ? showNat (testRem n) -- chhose -- "testGCD n = " ? showNat (testGCD n) -- here ? [] ) where n = stringToNat $ filterStr decimalDigit? str {- ------------------------------------------ Timing for Agda 2.5.2, 3 GHz machine. n | Time [sec] | ------- testRem ----------------------------- | | | Agda 2.5.2 | ghc-7.10.2 --------------------------------------------- 20000 | 3 (value = 9999) | 0.000 30000 | 9 (value = 14999) | 0.004 40000 | 17 (value = 19999) | 0.004 | | 500000 | | 0.3 ------- testGCD --------------------- | | Agda 2.5.2 | ghc-7.10.2 ------------------------------------- 500000 | 0.8 | 1000000 | 1.7 | 5000000 | 10.7 | 0.8 20000000 | | 3.1 -} -- Haskell code ****************************************************** max' :: Integer -> [Integer] -> Integer -- maximum (x: xs) max' x [] = x max' x (y: xs) = if x < y then max' y xs else max' x xs modTest :: Integer -> Integer modTest n = max' 0 (map (\ k -> mod n (succ k)) ([0 .. (n - 2)] :: [Integer]) ) gcdTest :: Integer -> Integer gcdTest n = max' 0 (map (gcd n) [1 .. (pred n)]) n = 20000000 :: Integer -- edit this main :: IO () main = putStrLn (show (modTest n)) -- gcdTest edit this From ulf.norell at gmail.com Thu Jun 22 07:44:56 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Thu, 22 Jun 2017 07:44:56 +0200 Subject: [Agda] timing for agda-prelude gcd In-Reply-To: <1498076430.3198.47.camel@one.mechvel.pereslavl.ru> References: <1498076430.3198.47.camel@one.mechvel.pereslavl.ru> Message-ID: On Wed, Jun 21, 2017 at 10:20 PM, Sergei Meshveliani wrote: > Dear all, > > Earlier there was discussed in this list the performance of _+_ and _*_ > on Nat. I provided a test program. > And as I recall, the performance is high: as in the Haskell program for > ghc-7.10.2. > > Now I need fast divMod and gcd for Nat. > Standard library is very-very slow at this point. > > So I try agda-prelude. > It shows considerably faster. > But it is still slower than GHC. > gcd is about 12 times slower, > and divMod is about 4000 times slower (?). > divMod isn't slow, the problem is that you are using ?? from the standard library in your implementation of max. If you replace it by ?? from agda-prelude the Agda code is 40% slower than the Haskell code. None of that slowdown is due to divMod, which if you look at the Haskell code generated by the Agda compiler, is actually compiled to calls to Integer rem and quot. The gcd benchmark is around 5 times slower on my machine. I suspect this is because Haskell gcd is heavily optimised, and the Agda implementation pays for carrying around the correctness proofs (which does contain computational content for gcd, and so are not being erased). / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Thu Jun 22 13:50:09 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 22 Jun 2017 14:50:09 +0300 Subject: [Agda] timing for agda-prelude gcd In-Reply-To: References: <1498076430.3198.47.camel@one.mechvel.pereslavl.ru> Message-ID: <1498132209.8490.18.camel@scico.botik.ru> On Thu, 2017-06-22 at 07:44 +0200, Ulf Norell wrote: > > > On Wed, Jun 21, 2017 at 10:20 PM, Sergei Meshveliani > wrote: > Dear all, > > Earlier there was discussed in this list the performance of _ > +_ and _*_ > on Nat. I provided a test program. > And as I recall, the performance is high: as in the Haskell > program for > ghc-7.10.2. > > Now I need fast divMod and gcd for Nat. > Standard library is very-very slow at this point. > > So I try agda-prelude. > It shows considerably faster. > But it is still slower than GHC. > gcd is about 12 times slower, > and divMod is about 4000 times slower (?). > > > divMod isn't slow, the problem is that you are using ?? from the > standard library in > your implementation of max. If you replace it by ?? from agda-prelude > the Agda code > [..] Thank you. I see now that divMod and gcd of agda-prelude are fast enough. I suspected some mistake of mine of this sort in the test. Now, I tried first to replace _??_. This leads to using Bool. Also decimalDigit? c = ... (48 ?? n) ? (n ?? 57) caused a strange report about not finding the Ord instance for something. So, I removed _??_ at all, and replaced max with sum. And now the test is indeed almost as fast as the GHC library. Improving Nat performance by using both Standard library and agda-prelude meets various technical difficulties. A headache. Probably, Standard library needs improvement in implementation of _??_ and divMod. Regards, ------ Sergei From mechvel at botik.ru Fri Jun 23 03:28:55 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 23 Jun 2017 04:28:55 +0300 Subject: [Agda] _<_ of agda-prelude Message-ID: <1498181335.2872.8.camel@one.mechvel.pereslavl.ru> Can anybody, please, show a proof for equivalence of standard _<_ and the one of agda-prelude? I am stuck with the code <'?< : ? m n ? Ord._<_ OrdNat m n ? m < n <'?< 0 (suc _) _ = s?s z?n <'?< _ 0 _ = ? ?'0 : ? n ? ? (Ord._<_ OrdNat n 0) ?'0 n n<'0 = ? Thanks, ------ Sergei From jannis at limperg.de Fri Jun 23 05:35:51 2017 From: jannis at limperg.de (Jannis Limperg) Date: Fri, 23 Jun 2017 05:35:51 +0200 Subject: [Agda] _<_ of agda-prelude In-Reply-To: <1498181335.2872.8.camel@one.mechvel.pereslavl.ru> References: <1498181335.2872.8.camel@one.mechvel.pereslavl.ru> Message-ID: > Can anybody, please, show a proof for equivalence of standard _<_ and > the one of agda-prelude? Below is one proof; there are probably more elegant ones. It uses some standard lemmas which I only redefine because I was too lazy to look up their names. In the future, it would be nice if you could provide a complete template for your problem so that I don't have to muck around with the imports. Cheers, Jannis ---------------------------------------------------------------------- open import Data.Nat using (? ; zero ; suc ; _+_ ; _<_ ; _?_ ; z?n ; s?s) open import Prelude.Ord using () renaming (_<_ to _ References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> Message-ID: I have encountered another case where the compiler appears to go into an infinite loop: I tried to postulate a bunch of things, but for some reason when I add one specific postulate the compiler goes wild with compilation times of 30 or more minutes without terminating. This is the file that causes this problem: https://github.com/jbracker/polymonad-proofs/blob/dd41604d6a1e80e640a1a79c2a754fb39f3abe04/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates.agda The file compiles in under a second, but as soon as you uncomment the "day-triangle-id" postulate the compiler appears to not terminate anymore. I tried moving the postulate to a different module and I also tried to add all of the implicit arguments explicitly so the compiler does not have to work as hard to infer anything, but both did not solve the issue. What really baffles me is that these are postulates. I do not understand why the compiler should ever take any significant amount of time to check them. 2017-06-21 14:10 GMT+01:00 Nils Anders Danielsson : > On 2017-06-13 14:41, Jan Bracker wrote: > >> I like using module arguments, because they are very useful when all >> of the definitions work with the same input. But this experience >> discourages me from using them somewhat, because there apparently seem >> to be some issues with them in the compiler. >> > > The special case that I mentioned only works when terms (including all > inferred implicit arguments) are syntactically identical. This is a > brittle condition. > > Should I file a bug report about this? >> > > If my guesses are correct, then I wouldn't call this a bug. However, I > have not verified that they are correct. > > (If so, where? On GitHub?) >> > > Yes. > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri Jun 23 12:54:57 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 23 Jun 2017 13:54:57 +0300 Subject: [Agda] _<_ of agda-prelude In-Reply-To: References: <1498181335.2872.8.camel@one.mechvel.pereslavl.ru> Message-ID: <1498215297.2568.16.camel@one.mechvel.pereslavl.ru> On Fri, 2017-06-23 at 05:35 +0200, Jannis Limperg wrote: > > Can anybody, please, show a proof for equivalence of standard _<_ and > > the one of agda-prelude? > > Below is one proof; there are probably more elegant ones. It uses some > standard lemmas which I only redefine because I was too lazy to look up > their names. > > In the future, it would be nice if you could provide a complete template > for your problem so that I don't have to muck around with the imports. Jannis, thank you very much. Bringing several library items there makes it the following code: ---------------------------------------------------------------------- open import Relation.Binary using (DecTotalOrder) open import Relation.Binary.PropositionalEquality as PE using (_?_) open import Data.Nat using (suc; _+_ ; _<_ ; _?_; z?n; s?s) open import Data.Nat.Properties using (?-decTotalOrder; ?-step; n?m+n) open import Data.Nat.Properties.Simple using (+-comm) open import Prelude.Nat using (diff) open import Prelude using () renaming (_<_ to _ ---------------------------------------------------------------------- > open import Data.Nat > using (? ; zero ; suc ; _+_ ; _<_ ; _?_ ; z?n ; s?s) > open import Prelude.Ord using () renaming (_<_ to _ open import Prelude.Nat using (diff) > open import Relation.Binary.PropositionalEquality > using (_?_ ; refl ; cong ; sym ; trans) > > > ?-refl : ? {n} ? n ? n > ?-refl {zero} = z?n > ?-refl {suc n} = s?s ?-refl > > > ?-step : ? {n m} ? n ? m ? n ? suc m > ?-step z?n = z?n > ?-step (s?s m?n) = s?s (?-step m?n) > > > ?-+ : ? n m ? n ? m + n > ?-+ n zero = ?-refl > ?-+ n (suc m) = ?-step (?-+ n m) > > > > > +-id-right : ? n ? n ? n + 0 > +-id-right zero = refl > +-id-right (suc n) = cong suc (+-id-right n) > > > +-suc : ? n m ? n + suc m ? suc (n + m) > +-suc zero m = refl > +-suc (suc n) m = cong suc (+-suc n m) > > > ???o : ? {n m} ? n ? m ? n ???o {zero} {m} z?n = diff m (+-id-right _) > ???o {suc n} {suc m} (s?s n?m) with ???o n?m > ... | diff k eq = diff k (cong suc (trans eq (sym (+-suc k n)))) > > > Dear all, Consider the following performance test for rational arithmetic. Call this test call "Harmonic": f n = sum [1/k | k <- [1 .. n]] for n : Nat, 1/k : Rational, sum = foldr _+_ 0 where _+_ = fraction addition test n = let fn = f n in fn - fn Read from file n = 100, 1000, 2000, 100.000 ..., print (test n) and check time. (fn - fn) is applied here in order to avoid printing large values. --------------------------- Haskell code ------- import Data.Ratio ((%)) f :: Integer -> Rational -- :: Ratio Integer f n = sum [1 % k | k <- [1 .. n]] ------------------------------------------------- I compare the three libraries: (GHC) GHC (Glasgow Haskell 7.10.2), (D) DoCon-2.12 written in Haskell, running under GHC, (DA) DoCon-A 2.00-pre written in Agda, running under Agda 2.5.2 -like. (D) and (DA) keep fractions with numerator and denominator mutually coprime, and cancel fractions most eagerly by gcd. (GHC) does not cancel by gcd so eagerly. The performance comparison on Harmonic is: (D) >> (GHC) > (DA). (D) takes n = 200.000 easily, while GHC "hangs" on 20.000 -- for a 3 GHz machine. (GHC) is considerably faster (DA) (DA hangs for long on 4000). The method in (DA) is the same as (D). gcd is almost as fast as GHC.gcd, this has been tested. Division (with remainder) is via dimMod of Agda-prelude, it is fast. And I wonder why (DA) is so slow. (DA) carries all the needed proofs (for coprimality, and such). But I hope, this does not effect performance any essentially. Can anybody provide the code for testing Harmonic for Rational numbers in agda-prelude ? The (DA) test for (Fraction Integer) is like this: ------------------------------------------------------------------------ ... open Fraction.F0 Int1.integralRing-with?? Int1.gcdRing using (Fraction; fraction; fraction-showInst) open Fraction.F1 Int1.integralRing-with?? Int1.gcdRing using (frRingoid) open Ringoid frRingoid using (_-_) open Fraction inv-n : ? ? Fraction -- \n ? 1/(1+n) inv-n n = fraction (+ 1) (+ (suc n)) +suc?+0 f : ? ? Fraction -- sum [1/n | n <- [1 .. n+1]] f n = sum frRingoid (map inv-n (natSegment 0 n)) main : IO Unit main = (readFiniteFile "data.txt") >>= putStrLn ? toCostring ? g where g : String -> String g str = -- n is first read from file data.txt concatStr ("n = " ? showNat n ? ", " ? "num (f n - f n) = " ? showInt (num (fn - fn)) ? "\n\n" ? [] ) where n = stringToNat $ filterStr decimalDigit? str fn = f n ------------------------------------------------------------------------- So far, I do not find the performance bottleneck in (DA). Thanks, ------ Sergei From ulf.norell at gmail.com Sun Jun 25 09:46:28 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Sun, 25 Jun 2017 09:46:28 +0200 Subject: [Agda] summing rationals In-Reply-To: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> Message-ID: The rationals are not very well-developed in agda-prelude. Nevertheless I get unsurprising performance compared to ghc (~2min for n = 20,000 on my machine) with the following benchmark: module Harmonic where open import Prelude open import Numeric.Rational -- sum [ 1/k | k <- [1..n] ] harmonic : Nat ? Rational harmonic 0 = 0 harmonic (suc n) = sum (map (? k ? ratio 1 (suc k) refl) (from 0 to n)) test : Nat ? Rational test n = harmonic n * 0 main : IO ? main = caseM getArgs of ? where (s ? []) ? print (test <$> parseNat s) _ ? pure _ The reason that DoCon performs so well is that it has a more clever implementation of _+_. agda-prelude and GHC implements _+_ as (p :% q) + (p1 :% q1) = (p * q1 + p1 * q) % (q * q1) where a % b = let d = gcd a b in div a d :% div d b DoCon implements _+_ as (p :% q) + (p1 :% q1) = div n dd :% (q' * q1' * div d dd) where d = gcd q q1 q' = div q d q1' = div q1 d n = p * q1' + p1 * q' dd = gcd n d I can't claim to understand why this is so much faster, but it is. / Ulf On Sat, Jun 24, 2017 at 9:06 PM, Sergei Meshveliani wrote: > Dear all, > > Consider the following performance test for rational arithmetic. > Call this test call "Harmonic": > > f n = sum [1/k | k <- [1 .. n]] for n : Nat, 1/k : Rational, > > sum = foldr _+_ 0 where _+_ = fraction addition > > test n = let fn = f n > in fn - fn > > Read from file n = 100, 1000, 2000, 100.000 ..., > > print (test n) and check time. > > (fn - fn) is applied here in order to avoid printing large values. > > > --------------------------- Haskell code ------- > import Data.Ratio ((%)) > > f :: Integer -> Rational -- :: Ratio Integer > f n = > sum [1 % k | k <- [1 .. n]] > ------------------------------------------------- > > > I compare the three libraries: > > (GHC) GHC (Glasgow Haskell 7.10.2), > > (D) DoCon-2.12 written in Haskell, running under GHC, > > (DA) DoCon-A 2.00-pre written in Agda, > running under Agda 2.5.2 -like. > > (D) and (DA) keep fractions with numerator and denominator mutually > coprime, and cancel fractions most eagerly by gcd. > > (GHC) does not cancel by gcd so eagerly. > > The performance comparison on Harmonic is: > > (D) >> (GHC) > (DA). > > (D) takes n = 200.000 easily, while GHC "hangs" on 20.000 > -- for a 3 GHz machine. > > (GHC) is considerably faster (DA) > (DA hangs for long on 4000). > > The method in (DA) is the same as (D). > gcd is almost as fast as GHC.gcd, this has been tested. > Division (with remainder) is via dimMod of Agda-prelude, it is fast. > > And I wonder why (DA) is so slow. > (DA) carries all the needed proofs (for coprimality, and such). > But I hope, this does not effect performance any essentially. > > Can anybody provide the code for testing Harmonic for Rational numbers > in agda-prelude ? > > The (DA) test for (Fraction Integer) is like this: > > ------------------------------------------------------------------------ > ... > open Fraction.F0 Int1.integralRing-with?? Int1.gcdRing using > (Fraction; fraction; fraction-showInst) > open Fraction.F1 Int1.integralRing-with?? Int1.gcdRing using (frRingoid) > open Ringoid frRingoid using (_-_) > open Fraction > > inv-n : ? ? Fraction -- \n ? 1/(1+n) > inv-n n = > fraction (+ 1) (+ (suc n)) +suc?+0 > > f : ? ? Fraction -- sum [1/n | n <- [1 .. n+1]] > f n = > sum frRingoid (map inv-n (natSegment 0 n)) > > main : IO Unit > main = (readFiniteFile "data.txt") >>= putStrLn ? toCostring ? g > where > g : String -> String > g str = > -- n is first read from file data.txt > > concatStr > ("n = " ? showNat n ? ", " ? > "num (f n - f n) = " ? showInt (num (fn - fn)) ? "\n\n" > ? [] > ) > where > n = stringToNat $ filterStr decimalDigit? str > fn = f n > ------------------------------------------------------------------------- > > > So far, I do not find the performance bottleneck in (DA). > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sun Jun 25 13:23:14 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 25 Jun 2017 14:23:14 +0300 Subject: [Agda] summing rationals In-Reply-To: References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> Message-ID: <1498389794.2400.57.camel@one.mechvel.pereslavl.ru> On Sun, 2017-06-25 at 09:46 +0200, Ulf Norell wrote: > The rationals are not very well-developed in agda-prelude. > Nevertheless I get unsurprising performance compared to ghc (~2min for > n = 20,000 on my machine) with the following benchmark: > [..] What is the machine that runs your test? (how much frequency [GHz] has it?). What timing GHC shows on your machine for n = 200,000 for import Data.Ratio ((%)) f :: Integer -> Rational -- :: Ratio Integer f n = sum [1 % k | k <- [1 .. n]] > ghc --make -O Test ? DoCon-A (Agda) has 21 sec for n = 2000, for a 3 GHz personal computer. > The reason that DoCon performs so well is that it has a more clever > implementation of _+_. agda-prelude and GHC implements _+_ as > > > (p :% q) + (p1 :% q1) = (p * q1 + p1 * q) % (q * q1) > where a % b = let d = gcd a b in div a d :% div d b > > DoCon implements _+_ as > > > (p :% q) + (p1 :% q1) = div n dd :% (q' * q1' * div d dd) > where > d = gcd q q1 > q' = div q d > q1' = div q1 d > n = p * q1' + p1 * q' > dd = gcd n d > > > I can't claim to understand why this is so much faster, but it is. > As I recall, I just copied there the method from the old book "The art of computer programming" by D.Knuth. As I understand, the main idea is that for large numbers multiplication causes the result size growth (number of (macro)digits), while divMod and gcd do not. And the sizes of (p * q1), (p1 * q), (q * q1) effect the cost of the further operations applied to obtain the final fraction. Hence it is better to cancel p, p1, q, q1 by the corresponding gcd-s as soon as possible. But for _random_ numbers a naive method of GHC is, probably, faster on average than Knuth's. Because for two random numbers m, n, it often holds gcd m n = 1. But in Harmonic, and in many real mathematical tasks, fractions are often accumulated in the middle of loops, they are "less random". -------------- I do not find, so far, why DoCon-A shows a greater cost order than GHC. May be this is _-fr_ that probably imply _?_ ? May be, _?_ or `pred' is slow, I do not know. Thanks for comments, ------ Sergei > On Sat, Jun 24, 2017 at 9:06 PM, Sergei Meshveliani > wrote: > Dear all, > > Consider the following performance test for rational > arithmetic. > Call this test call "Harmonic": > > f n = sum [1/k | k <- [1 .. n]] for n : Nat, 1/k : > Rational, > > sum = foldr _+_ 0 where _+_ = fraction addition > > test n = let fn = f n > in fn - fn > > Read from file n = 100, 1000, 2000, 100.000 ..., > > print (test n) and check time. > > (fn - fn) is applied here in order to avoid printing large > values. > > > --------------------------- Haskell code ------- > import Data.Ratio ((%)) > > f :: Integer -> Rational -- :: Ratio Integer > f n = > sum [1 % k | k <- [1 .. n]] > ------------------------------------------------- > > > I compare the three libraries: > > (GHC) GHC (Glasgow Haskell 7.10.2), > > (D) DoCon-2.12 written in Haskell, running under GHC, > > (DA) DoCon-A 2.00-pre written in Agda, > running under Agda 2.5.2 -like. > > (D) and (DA) keep fractions with numerator and denominator > mutually > coprime, and cancel fractions most eagerly by gcd. > > (GHC) does not cancel by gcd so eagerly. > > The performance comparison on Harmonic is: > > (D) >> (GHC) > (DA). > > (D) takes n = 200.000 easily, while GHC "hangs" on 20.000 > -- for a 3 GHz machine. > > (GHC) is considerably faster (DA) > (DA hangs for long on 4000). > > The method in (DA) is the same as (D). > gcd is almost as fast as GHC.gcd, this has been tested. > Division (with remainder) is via dimMod of Agda-prelude, it > is fast. > > And I wonder why (DA) is so slow. > (DA) carries all the needed proofs (for coprimality, and > such). > But I hope, this does not effect performance any essentially. > > Can anybody provide the code for testing Harmonic for > Rational numbers > in agda-prelude ? > > The (DA) test for (Fraction Integer) is like this: > > ------------------------------------------------------------------------ > ... > open Fraction.F0 Int1.integralRing-with?? Int1.gcdRing using > (Fraction; fraction; > fraction-showInst) > open Fraction.F1 Int1.integralRing-with?? Int1.gcdRing using > (frRingoid) > open Ringoid frRingoid using (_-_) > open Fraction > > inv-n : ? ? Fraction -- \n ? 1/(1+n) > inv-n n = > fraction (+ 1) (+ (suc n)) +suc?+0 > > f : ? ? Fraction -- sum [1/n | n <- [1 .. n+1]] > f n = > sum frRingoid (map inv-n (natSegment 0 n)) > > main : IO Unit > main = (readFiniteFile "data.txt") >>= putStrLn ? toCostring ? > g > where > g : String -> String > g str = > -- n is first read from file data.txt > > concatStr > ("n = " ? showNat n ? > ", " ? > "num (f n - f n) = " ? showInt (num (fn - fn)) ? "\n > \n" > ? [] > ) > where > n = stringToNat $ filterStr decimalDigit? str > fn = f n > ------------------------------------------------------------------------- > > > So far, I do not find the performance bottleneck in (DA). > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From mechvel at botik.ru Sun Jun 25 16:26:55 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 25 Jun 2017 17:26:55 +0300 Subject: [Agda] summing rationals In-Reply-To: References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> Message-ID: <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> On Sun, 2017-06-25 at 09:46 +0200, Ulf Norell wrote: > The rationals are not very well-developed in agda-prelude. > Nevertheless I get unsurprising performance compared to ghc (~2min for > n = 20,000 on my machine) with the following benchmark: > > > module Harmonic where > > > open import Prelude > open import Numeric.Rational > > > -- sum [ 1/k | k <- [1..n] ] > harmonic : Nat ? Rational > harmonic 0 = 0 > harmonic (suc n) = sum (map (? k ? ratio 1 (suc k) refl) (from 0 to > n)) > > > test : Nat ? Rational > test n = harmonic n * 0 > > > main : IO ? > main = > caseM getArgs of ? where > (s ? []) ? print (test <$> parseNat s) > _ ? pure _ > 1. It appears that final fn - fn in my test costs as much as all the rest. Instead using (_* 0), as in your test, reduces the cost twice (because fn is large). And I suggest to apply the final taking a remainder by 1000: toSmall : Fraction ? ? toSmall f = rem $ divMod (? num f ? + ? denom f ?) 1000 {suc?0} take the remainder by 1000 (my divMod is agda-prelude.divMond with swapped arguments - the classical tradition is that the dividend is first). This is safe for the cost, and it is safe against the rule _ * 0 = 0 which may be possible in some implementations. 2. Further, I have the three versions: _+?_ to add fractions as in GHC (and as in agda-prelude, I expect), n?/d? +fr n?/d? = h *fr (f' + g') where h = (gcd n? n?) / (gcd d? d?) -- where f' and g' are canceled by a certain gcd, and using coprimality for several corresponding pairs, in order to reduce the usage of gcd. _+fr'_ -- as in Knuth and as in DoCon. It finds certain additional intermediate gcd, and relies on a certain additional coprimality. In DoCon (Haskell under GHC) , +fr' is the most efficient. In DoCon-A (Agda), the most efficient is +?. +? now shows 5.5 sec for n = 2000, and 288 sec for 10,000 (3 GHz machine). +fr shows 11.8 sec for n = 2000, and 625 sec for 10,000. +fr' is only 25% faster than _+fr_ (and it must be many times faster). Probably, +? has performance close to agda-prelude. But I need to find of how to fix +fr' in order to make it close to DoCon. Regards, ------ Sergei From i.sergey at ucl.ac.uk Fri Jun 23 10:03:22 2017 From: i.sergey at ucl.ac.uk (Sergey, Ilya) Date: Fri, 23 Jun 2017 08:03:22 +0000 Subject: [Agda] ICFP 2017 Student Research Competition: Call for Submissions Message-ID: <00B1EE22-7F21-42A8-8FC6-F286A404A00B@ucl.ac.uk> ====================================================================== CALL FOR SUBMISSIONS SRC at ICFP 2017 Oxford, United Kingdom 3-9 September 2017 http://icfp17.sigplan.org/track/icfp-2017-Student-Research-Competition Co-located with the International Conference on Functional Programming (ICFP 2017) ====================================================================== Student Research Competition ---------------------------- This year ICFP will host a Student Research Competition where undergraduate and postgraduate students can present posters. The SRC at the ICFP 2017 consists of three rounds: * Extended abstract round: All students are encouraged to submit an extended abstract outlining their research (up to two pages). * Poster session at ICFP 2017: Based on the abstracts, a panel of judges will select the most promising entrants to participate in the poster session which will take place at ICFP. Students who make it to this round will be eligible for some travel support to attend the conference. In the poster session, students will have the opportunity to present their work to the judges, who will select three finalists in each category (graduate/undergraduate) to advance to the next round. * ICFP presentation: The last round will consist of an oral presentation at the ICFP to compete for the final awards in each category and selection of an overall winner who will advance to the ACM SRC Grand Finals. Prizes ------ * The top three graduate and the top three undergraduate winners will receive prizes of $500, $300, and $200, respectively. * All six winners will receive award medals and a two-year complimentary ACM student membership, including a subscription to ACM?s Digital Library. * The names of the winners will be posted on the SRC web site. * The first place winners of the SRC will be invited to participate in the ACM SRC Grand Finals, an on-line round of competitions among the winners of other conference-hosted SRCs. * Grand Finalists and their advisors will be invited to the Annual ACM Awards Banquet for an all-expenses-paid trip, where they will be recognized for their accomplishments along with other prestigious ACM award winners, including the winner of the Turing Award (also known as the Nobel Prize of Computing). * The top three Grand Finalists will receive an additional $500, $300, and $200. All Grand Finalists will receive Grand Finalist certificates. * The ACM, Microsoft Research, and our industrial partners provide financial support for students attending the SRC. You can find more information about this on the ACM website. Eligibility The SRC is open to both undergraduate (not in a PhD program) and graduate students (in a PhD program). Upon submission, entrants must be enrolled as a student at their universities, and are ACM student members. Eligibility ----------- The SRC is open to both undergraduate (not in a PhD programme) and graduate students (in a PhD programme). Upon submission, entrants must be enrolled as a student at their universities, and are ACM student members. Furthermore, there are some constraints on what kind of work may be submitted. Previously published work: Submissions should consist of original work (not yet accepted for publication). If the work is a continuation of previously published work, the submission should focus on the contribution over what has already been published. We encourage students to see this as an opportunity to get early feedback and exposure for the work they plan to submit to the next ICFP or POPL. Collaborative work: Students are encouraged to submit work they have been conducting in collaboration with others, including advisors, internship mentors, or other students. However, submissions are individual, so they must focus on the contributions of the student. Submission Details ------------------ Each submission should include the student author's name, institutional affiliation, e-mail address, and postal address; research advisor's name; ACM student member number; category (undergraduate or graduate); research title; and an extended abstract addressing the following: * Problem and Motivation: Clearly state the problem being addressed and explain the reasons for seeking a solution to this problem. * Background and Related Work: Describe the specialized (but pertinent) background necessary to appreciate the work. Include references to the literature where appropriate, and briefly explain where your work departs from that done by others. * Approach and Uniqueness: Describe your approach in attacking the problem and clearly state how your approach is novel. * Results and Contributions: Clearly show how the results of your work contribute to computer science and explain the significance of those results. The abstract must describe the student?s individual research and must be authored solely by the student. If the work is collaborative with others and/or part of a larger group project, the abstract should make clear what the student?s role was and should focus on that portion of the work. The extended abstract must not be longer than 2 pages in PDF. The reference list does not count towards these limits. To submit an abstract, please register through the EasyChair system (see the link above), and put all information requested above in the PDF that you submit including, including at least three keywords at the submission page. Abstracts submitted after the deadline may be considered at the committee?s discretion, but only after decisions have been made on all abstracts submitted before the deadline. If you have any problems or would like to clarify some concerns, don?t hesitate to contact the competition chair Ilya Sergey (i.sergey at ucl.ac.uk). Please submit your abstract at the EasyChair submission page: https://easychair.org/conferences/?conf=icfp2017src Important Dates --------------- * Deadline for submission: 10 July 2017 * Notification of acceptance: 17 July 2017 Selection Committee ------------------- Chair: Ilya Sergey, University College London William E. Byrd, University of Utah Richard A. Eisenberg, Bryn Mawr College Ekaterina Komendantskaya, Heriot-Watt University Scott Owens, University of Kent From nad at cse.gu.se Mon Jun 26 15:52:15 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 26 Jun 2017 15:52:15 +0200 Subject: [Agda] summing rationals In-Reply-To: <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> Message-ID: <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> On 2017-06-25 16:26, Sergei Meshveliani wrote: > 1. It appears that final fn - fn in my test costs as much as all the > rest. As far as I know Agda transforms "let fn = f n in fn - fn" into "f n - f n". -- /NAD From nad at cse.gu.se Mon Jun 26 16:33:28 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 26 Jun 2017 16:33:28 +0200 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> Message-ID: On 2017-06-23 12:42, Jan Bracker wrote: > What really baffles me is that these are postulates. I do not > understand why the compiler should ever take any significant amount of > time to check them. I think Agda has trouble checking that the last equality type that you give is well-formed. I managed to get the code to type-check by adding a large number of "abstract" annotations to your code (and postulating a single lemma that failed to type-check), see the attached patch. I suggest that you try to make all of your "proofs" abstract. -- /NAD -------------- next part -------------- diff --git a/src/Theory/Category/Examples.agda b/src/Theory/Category/Examples.agda index 0d36f4f..8079942 100644 --- a/src/Theory/Category/Examples.agda +++ b/src/Theory/Category/Examples.agda @@ -134,6 +134,9 @@ catCategory {??} {??} = record ; left-id = left-id ; right-id = right-id } where + + abstract + assoc : {a b c d : Category} {f : Functor a b} {g : Functor b c} {h : Functor c d} ? [ h ]?[ [ g ]?[ f ] ] ? [ [ h ]?[ g ] ]?[ f ] assoc = functor-eq refl refl @@ -141,8 +144,10 @@ catCategory {??} {??} = record right-id : {a b : Category} {f : Functor a b} ? [ Id[ b ] ]?[ f ] ? f right-id = functor-eq refl refl + postulate + left-id : {a b : Category} {f : Functor a b} ? [ f ]?[ Id[ a ] ] ? f - left-id = refl + -- left-id = refl -- Category of functors and natural transformations functorCategory : {C?? C?? D?? D?? : Level} ? Category {C??} {C??} ? Category {D??} {D??} ? Category @@ -151,10 +156,25 @@ functorCategory C D = record ; Hom = NaturalTransformation {C = C} {D} ; _?_ = ? {F} {G} {H} ? ?_????_? {C = C} {D} {F} {G} {H} ; id = ? {F} ? Id? F ? - ; assoc = natural-transformation-eq $ fun-ext $ ? _ ? Category.assoc D - ; left-id = natural-transformation-eq $ fun-ext $ ? _ ? Category.left-id D - ; right-id = natural-transformation-eq $ fun-ext $ ? _ ? Category.right-id D + ; assoc = assoc? + ; left-id = left-id? + ; right-id = right-id? } + where + abstract + + assoc? : {a b c d : Functor C D} {f : NaturalTransformation a b} + {g : NaturalTransformation b c} {h : NaturalTransformation c d} ? + ? h ???? ? g ???? f ? ? ? ? ? h ???? g ? ???? f ? + assoc? = natural-transformation-eq $ fun-ext $ ? _ ? Category.assoc D + + left-id? : {a b : Functor C D} {f : NaturalTransformation a b} ? + ? f ???? Id? a ? ? ? f + left-id? = natural-transformation-eq $ fun-ext $ ? _ ? Category.left-id D + + right-id? : {a b : Functor C D} {f : NaturalTransformation a b} ? + ? Id? b ? ???? f ? ? f + right-id? = natural-transformation-eq $ fun-ext $ ? _ ? Category.right-id D [_,_] = functorCategory diff --git a/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates.agda b/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates.agda index 11f847c..8cd8162 100644 --- a/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates.agda +++ b/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates.agda @@ -42,9 +42,7 @@ postulate dayRightUnitor : {?C? ?C? : Level} ? (?Set : Level) ? {C : Category {?C?} {?C?}} ? (CMon : MonoidalCategory C) ? NaturalIsomorphism ([-, dayUnit {?Set = ?Set} CMon ] (dayConvolution {?Set = ?Set} CMon)) Id[ FunCat C (setCategory {?Set ? ?C? ? ?C?}) ] - {- day-triangle-id : {?C? ?C? : Level} ? (?Set : Level) ? {C : Category {?C?} {?C?}} ? (CMon : MonoidalCategory C) ? (x y : Functor C (setCategory {?Set ? ?C? ? ?C?})) ? F? (dayConvolution {?Set = ?Set} CMon) (iso-? (dayRightUnitor ?Set CMon) x , id (FunCat C (setCategory {?Set ? ?C? ? ?C?})) {y} ) ? ? F? (dayConvolution {?Set = ?Set} CMon) (id (FunCat C (setCategory {?Set ? ?C? ? ?C?})) {x} , iso-? (dayLeftUnitor ?Set CMon) y) ???? iso-? (dayAssociator ?Set CMon) (x ,' dayUnit {?Set = ?Set} CMon ,' y) ? - -} diff --git a/src/Theory/End/Convolution.agda b/src/Theory/End/Convolution.agda index b63e479..9f553f5 100644 --- a/src/Theory/End/Convolution.agda +++ b/src/Theory/End/Convolution.agda @@ -41,6 +41,8 @@ convolutionFunctor {?C?} {?C?} {?Set} {C} CMon (functor F? F? F-id dayF? : {a b : Obj CC?CC} ? Hom CC?CC a b ? Hom Set' (dayF? a) (dayF? b) dayF? {a} {b} ((f? , f?') , (f? , f?')) (homC , Fc , Fc') = (homC ?C (f? ?C? f?')) , F? f? Fc , G? f?' Fc' + abstract + day-id : {a : Obj CC?CC} ? dayF? {a} {a} (id CC?CC) ? id Set' day-id {a} = begin dayF? {a} {a} (id CC?CC) @@ -99,6 +101,8 @@ convolutionTransformation {?C?} {?C?} {?Set} {C} CMon {F} {G} {F'} {G' ? : (x' : Obj CC?CC) ? Hom Set' ([ convolutionFunctor {?Set = ?Set} CMon F G a ]? x') ([ convolutionFunctor {?Set = ?Set} CMon F' G' b ]? x') ? ((c?? , c??) , (c?? , c??)) (f , Fc? , Gc?) = (g ?C f) , nat-? ? c?? Fc? , nat-? ? c?? Gc? + abstract + nat : {x y : Obj CC?CC} {f : Hom CC?CC x y} ? [ convolutionFunctor {?Set = ?Set} CMon F' G' b ]? f ?F ? x ? ? y ?F [ convolutionFunctor {?Set = ?Set} CMon F G a ]? f nat {x} {y} {f} = begin [ convolutionFunctor {?Set = ?Set} CMon F' G' b ]? f ?F ? x @@ -123,7 +127,8 @@ convolutionTransFun : {?C? ?C? ?Set : Level} {C : Category {?C?} { ? NaturalTransformation (convolutionFunctor {?Set = ?Set} CMon F G x) (convolutionFunctor {?Set = ?Set} CMon F' G' x) convolutionTransFun {?C?} {?C?} {?Set} {C} CMon ? ? x = convolutionTransformation {?Set = ?Set} CMon ? ? (Category.id C {x}) -convolution-trans-obj-id : {?C? ?C? ?Set : Level} {C : Category {?C?} {?C?}} (CMon : MonoidalCategory C) - ? (F G : Functor C (setCategory {?Set ? ?C? ? ?C?})) ? (a : Obj C) ? convolutionTransObj {?Set = ?Set} CMon F G (id C {a}) ? Id? convolutionFunctor {?Set = ?Set} CMon F G a ? -convolution-trans-obj-id {?C?} {?C?} {?Set} {C} CMon F G a = natural-transformation-eq $ fun-ext $ ? (c : Obj ((C ?C C) op ?C (C ?C C))) ? fun-ext (? {(f , Fc , Gc) ? cong (? X ? X , Fc , Gc) (right-id C)}) +abstract + convolution-trans-obj-id : {?C? ?C? ?Set : Level} {C : Category {?C?} {?C?}} (CMon : MonoidalCategory C) + ? (F G : Functor C (setCategory {?Set ? ?C? ? ?C?})) ? (a : Obj C) ? convolutionTransObj {?Set = ?Set} CMon F G (id C {a}) ? Id? convolutionFunctor {?Set = ?Set} CMon F G a ? + convolution-trans-obj-id {?C?} {?C?} {?Set} {C} CMon F G a = natural-transformation-eq $ fun-ext $ ? (c : Obj ((C ?C C) op ?C (C ?C C))) ? fun-ext (? {(f , Fc , Gc) ? cong (? X ? X , Fc , Gc) (right-id C)}) diff --git a/src/Theory/End/DayConvolution.agda b/src/Theory/End/DayConvolution.agda index 5cff565..afc6c83 100644 --- a/src/Theory/End/DayConvolution.agda +++ b/src/Theory/End/DayConvolution.agda @@ -67,6 +67,8 @@ dayConvolution {?C?} {?C?} {?Set} {C} CMon = functor day? day? (? d0? : {a b : Obj C} ? Hom C a b ? Hom Set' (Set-co-? ?Set (dayF F G a)) (Set-co-? ?Set (dayF F G b)) d0? {a} {b} f = coendMorph (convolutionTransObj F G f) + abstract + d0-id : {a : Obj C} ? d0? {a} {a} (id C) ? id Set' d0-id {a} = begin coendMorph (convolutionTransObj F G (id C)) @@ -88,6 +90,8 @@ dayConvolution {?C?} {?C?} {?Set} {C} CMon = functor day? day? (? day-? : (x : Obj C) ? Hom Set' (CoEnd.co-? (dayEnd F G x)) (CoEnd.co-? (dayEnd F' G' x)) day-? x = coendMorph (convolutionTransFun ? ? x) + abstract + day-nat : {x y : Obj C} {f : Hom C x y} ? [ day? (F' , G') ]? f ?F day-? x ? day-? y ?F [ day? (F , G) ]? f day-nat {x} {y} {f} = begin [ day? (F' , G') ]? f ?F day-? x @@ -100,6 +104,8 @@ dayConvolution {?C?} {?C?} {?Set} {C} CMon = functor day? day? (? ??? day-? y ?F [ day? (F , G) ]? f ? + abstract + day-id : {a : Obj [C,S]?[C,S]} ? day? {a} {a} (id [C,S]?[C,S] {a}) ? id [ C , Set' ] {day? a} day-id {F , G} = natural-transformation-eq $ fun-ext $ ? (c : Obj C) ? begin coendMorph (convolutionTransFun Id? F ? Id? G ? c) @@ -117,4 +123,3 @@ dayConvolution {?C?} {?C?} {?Set} {C} CMon = functor day? day? (? coendMorph (convolutionTransFun ? ? c) ?F coendMorph (convolutionTransFun ? ? c) ??? nat-? (day? {F' , G'} {F'' , G''} (? , ?) ?[C,S] day? {F , G} {F' , G'} (? , ?)) c ? - diff --git a/src/Theory/End/Properties.agda b/src/Theory/End/Properties.agda index 97f68a7..6e0898a 100644 --- a/src/Theory/End/Properties.agda +++ b/src/Theory/End/Properties.agda @@ -34,6 +34,8 @@ wedgeTransform {?C?} {?C?} {?S} {C} {functor H? H? H-id H-comp} {f f' : (c : Obj C) ? Hom Set' w (H'? (c , c)) f' c = nat-? ? (c , c) ?F f c + abstract + coher' : {c c' : Obj C} (g : Hom C c c') ? H'? (g , id C) ?F f' c' ? H'? (id C , g) ?F f' c coher' {c} {c'} g = begin H'? (g , id C) ?F f' c' @@ -59,6 +61,8 @@ cowedgeTransform {?C?} {?C?} {?S} {C} {functor H? H? H-id H-comp} f' : (c : Obj C) ? Hom Set' (H? (c , c)) w f' c = f c ?F nat-? ? (c , c) + abstract + coher' : {c c' : Obj C} (g : Hom C c c') ? f' c' ?F H? (id C , g) ? f' c ?F H? (g , id C) coher' {c} {c'} g = begin f' c' ?F H? (id C , g) @@ -83,7 +87,9 @@ coendMorph : {?C? ?C? ?S : Level} {C : Category {?C?} {?C?}} ? Hom (setCategory {?C? ? ?C? ? ?S}) (Set-co-? ?S H) (Set-co-? ?S H') coendMorph {?C?} {?C?} {?S} {C} {H} {H'} ? = proj? $ CoEnd.co-universal (setCoEnd ?S H) $ cowedgeTransform {?S = ?S} ? $ CoEnd.co-e $ setCoEnd ?S H' -coend-morph-unique : {?C? ?C? ?S : Level} {C : Category {?C?} {?C?}} +abstract + + coend-morph-unique : {?C? ?C? ?S : Level} {C : Category {?C?} {?C?}} ? {H H' : Functor (C op ?C C) (setCategory {?C? ? ?C? ? ?S})} ? (? : NaturalTransformation H H') ? (f : Hom (setCategory {?C? ? ?C? ? ?S}) (Set-co-? ?S H) (Set-co-? ?S H')) ? f ? coendMorph ? -coend-morph-unique {?C?} {?C?} {?S} {C} {H} {H'} ? = proj? $ proj? $ CoEnd.co-universal (setCoEnd ?S H) $ cowedgeTransform {?S = ?S} ? $ CoEnd.co-e $ setCoEnd ?S H' + coend-morph-unique {?C?} {?C?} {?S} {C} {H} {H'} ? = proj? $ proj? $ CoEnd.co-universal (setCoEnd ?S H) $ cowedgeTransform {?S = ?S} ? $ CoEnd.co-e $ setCoEnd ?S H' diff --git a/src/Theory/Functor/Application.agda b/src/Theory/Functor/Application.agda index eb452c1..c5950ec 100644 --- a/src/Theory/Functor/Application.agda +++ b/src/Theory/Functor/Application.agda @@ -50,6 +50,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? : Level} HomF : {a b : Obj D} ? Hom D a b ? Hom E (ObjF a) (ObjF b) HomF f = F? (id C {x} , f) + abstract + composeF : {a b c : Obj D} {f : Hom D a b} {g : Hom D b c} ? HomF (g ?D f) ? HomF g ?E HomF f composeF {a} {b} {c} {f} {g} = begin @@ -68,6 +70,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? : Level} HomF : {a b : Obj C} ? Hom C a b ? Hom E (ObjF a) (ObjF b) HomF f = F? (f , id D {x}) + abstract + composeF : {a b c : Obj C} {f : Hom C a b} {g : Hom C b c} ? HomF (g ?C f) ? HomF g ?E HomF f composeF {a} {b} {c} {f} {g} = begin diff --git a/src/Theory/Functor/Association.agda b/src/Theory/Functor/Association.agda index ab82738..b8188b4 100644 --- a/src/Theory/Functor/Association.agda +++ b/src/Theory/Functor/Association.agda @@ -58,6 +58,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? ?J? ?J F? : {a b : Obj (C ?C (D ?C E))} ? Hom (C ?C (D ?C E)) a b ? Hom K (F? a) (F? b) F? (c , d?e) = [ C?J?K ]? (c , [ D?E?J ]? d?e) + abstract + idF : {a : Obj (C ?C (D ?C E))} ? F? {a} {a} (id (C ?C (D ?C E))) ? id K idF {a} = begin @@ -72,6 +74,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? ?J? ?J private _?CDE_ = _?_ (C ?C (D ?C E)) + abstract + composeF : {a b c : Obj (C ?C (D ?C E))} {f : Hom (C ?C (D ?C E)) a b} {g : Hom (C ?C (D ?C E)) b c} ? F? (((C ?C (D ?C E)) ? g) f) ? (K ? F? g) (F? f) composeF {f = fC , fDE} {g = gC , gDE} = begin @@ -96,6 +100,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? ?J? ?J F? : {a b : Obj ((C ?C D) ?C E)} ? Hom ((C ?C D) ?C E) a b ? Hom K (F? a) (F? b) F? (c?d , e) = [ J?E?K ]? ([ C?D?J ]? c?d , e) + abstract + idF : {a : Obj ((C ?C D) ?C E)} ? F? {a} {a} (id ((C ?C D) ?C E)) ? id K idF {a} = begin @@ -110,6 +116,8 @@ module BiFunctor {?C? ?C? ?D? ?D? ?E? ?E? ?J? ?J private _?CDE_ = _?_ ((C ?C D) ?C E) + abstract + composeF : {a b c : Obj ((C ?C D) ?C E)} {f : Hom ((C ?C D) ?C E) a b} {g : Hom ((C ?C D) ?C E) b c} ? F? (g ?CDE f) ? (F? g) ?K (F? f) composeF {f = fCD , fE} {g = gCD , gE} = begin @@ -140,4 +148,3 @@ module Associator {?C? ?C? : Level} {C : Category {?C?} {?C?}} w -- (_ ? (_ ? _)) ? _ rightAssociator : Functor (C ?C C) C ? Functor (C ?C C ?C C) C rightAssociator F = [ biAssocFunctorR F F ]?[ assocFunctorR ] - diff --git a/src/Theory/Functor/Composition.agda b/src/Theory/Functor/Composition.agda index ecc2624..b514152 100644 --- a/src/Theory/Functor/Composition.agda +++ b/src/Theory/Functor/Composition.agda @@ -27,6 +27,8 @@ compFunctor {C = C} {D = D} {E = E} F G = record F? : {a b : Obj C} ? Hom C a b ? Hom E (F? a) (F? b) F? f = [ F ]? ( [ G ]? f ) + abstract + id : ? {a : Obj C} ? F? {a = a} (Category.id C) ? Category.id E id = trans (cong (? X ? Functor.F? F X) (Functor.id G)) (Functor.id F) diff --git a/src/Theory/Functor/Examples/HomFunctor.agda b/src/Theory/Functor/Examples/HomFunctor.agda index 9fa8b2b..9e6bde9 100644 --- a/src/Theory/Functor/Examples/HomFunctor.agda +++ b/src/Theory/Functor/Examples/HomFunctor.agda @@ -30,6 +30,8 @@ homFunctor {?C?} {?C?} ?Set {C} a = functor HomF? HomF? id-HomF co HomF? : {x y : Obj C} ? Hom C x y ? Hom SetCat (HomF? x) (HomF? y) HomF? f = ? g ? lift (f ?C lower g) + abstract + id-HomF : {a : Obj C} ? HomF? (id C {a}) ? id SetCat id-HomF {a} = begin HomF? (id C) @@ -50,4 +52,3 @@ homFunctor {?C?} {?C?} ?Set {C} a = functor HomF? HomF? id-HomF co ( ? h ? lift (g ?C (f ?C lower h)) ) ??? (HomF? g) ?Set (HomF? f) ? - diff --git a/src/Theory/Natural/Transformation.agda b/src/Theory/Natural/Transformation.agda index db4a060..065c7de 100644 --- a/src/Theory/Natural/Transformation.agda +++ b/src/Theory/Natural/Transformation.agda @@ -66,6 +66,8 @@ compNaturalTransformationVert {C = C} {D} {F} {G} {H} ? ? = record ? : (a : Category.Obj C) ? Category.Hom D ([ F ]? a) ([ H ]? a) ? a = ?? a ?D ?? a + abstract + natural : {a b : Category.Obj C} {f : Category.Hom C a b} ? ([ H ]? f) ?D (? a) ? (? b) ?D ([ F ]? f) natural {a} {b} {f} = begin From mechvel at botik.ru Mon Jun 26 17:23:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 26 Jun 2017 18:23:26 +0300 Subject: [Agda] summing rationals In-Reply-To: <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> Message-ID: <1498490606.2378.14.camel@one.mechvel.pereslavl.ru> On Mon, 2017-06-26 at 15:52 +0200, Nils Anders Danielsson wrote: > On 2017-06-25 16:26, Sergei Meshveliani wrote: > > 1. It appears that final fn - fn in my test costs as much as all the > > rest. > > As far as I know Agda transforms "let fn = f n in fn - fn" into > "f n - f n". > It is all the same. My comment had the following meaning. As (f n) is a fraction with a very large denominator, and the test prints out (f n) - (f n), then this last subtraction costs much. And its cost even occurs a bit more than the cost of all the rest computation in the test. ------ Sergei From mechvel at scico.botik.ru Tue Jun 27 10:59:09 2017 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 27 Jun 2017 11:59:09 +0300 Subject: [Agda] summing rationals In-Reply-To: <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> Message-ID: Nils Anders Danielsson ????? 26.06.2017 16:52: > On 2017-06-25 16:26, Sergei Meshveliani wrote: >> 1. It appears that final fn - fn in my test costs as much as all the >> rest. > > As far as I know Agda transforms "let fn = f n in fn - fn" into > "f n - f n". I am sorry, I was in a hurry and missed the point. What may be a reason for writing g1 u + g2 u + g3 u -- (I) where u = f x (y * z) instead of g1 (f x (y * z)) + g2 (f x (y * z)) + g3 (f x (y * z)) -- (II) ? Can there be any reason other than readability of the source program? When `making' (II): after applying MAlonzo, it starts GHC -O. And I expect that it will convert (II) into (I) or into "let - in". Will it? Anyway, this optimization is not reliable. So that in a Haskell program (for GHC) it is bettter to write (I) both for readability and for an reliable optimization, to be sure that computing by new the values like u is not repeated. Right? Now, what needs to be the approach with Agda? Agda converts (I) into (II) (does it?). How to write the program so that to be sure that run-time computing the values like u is not repeated? Thanks, ------ Sergei From jan.bracker at googlemail.com Tue Jun 27 17:09:09 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Tue, 27 Jun 2017 16:09:09 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> Message-ID: Thank you, Nils! I was not aware of "abstract" as a language feature. I will keep it in mind and I have made all my equivalence proofs abstract. It still takes a significant amount of time to type check the triangle identity but it eventually type checks now. I tried to add the last postulate I need, but even though I now have marked all of the proofs as abstract the compilation time is again at 30+ minutes with no end in sight: https://github.com/jbracker/polymonad-proofs/blob/ec730f224eedb478cfdfb277c7eea2503dae5771/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates/PentagonId.agda 2017-06-26 15:33 GMT+01:00 Nils Anders Danielsson : > On 2017-06-23 12:42, Jan Bracker wrote: > >> What really baffles me is that these are postulates. I do not >> understand why the compiler should ever take any significant amount of >> time to check them. >> > > I think Agda has trouble checking that the last equality type that you > give is well-formed. > > I managed to get the code to type-check by adding a large number of > "abstract" annotations to your code (and postulating a single lemma that > failed to type-check), see the attached patch. I suggest that you try to > make all of your "proofs" abstract. > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kahl at cas.mcmaster.ca Tue Jun 27 17:24:28 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Tue, 27 Jun 2017 11:24:28 -0400 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> Message-ID: <20170627152428.GA3433@ritchie.cas.mcmaster.ca> On Tue, Jun 27, 2017 at 04:09:09PM +0100, Jan Bracker wrote: > I tried to add the last postulate I need, but even though I now have marked > all of the proofs as abstract the compilation time is again at 30+ minutes > with no end in sight: > > https://github.com/jbracker/polymonad-proofs/blob/ec730f224eedb478cfdfb277c7eea2503dae5771/src/Theory/Category/Monoidal/Examples/FunctorWithDayConvolution/Postulates/PentagonId.agda Have you tried installing a version of Agda with Andrea Vezzosi's patch from https://github.com/agda/agda/issues/1625#issuecomment-132196576 applied? (You also need a separate installation of the standard library, and either work in a separate clone of your repository, or delete all .agdai files before you switch either way. To make this manageable, change the Agda version in the .cabal file before the patched installation; my patched version of 2.5.2 is 2.5.2.0.1. That version number also needs to be changed in: src/agda/src/data/emacs-mode/agda2-mode.el ) Wolfram P.S.: Afterthought: If you are not restricting the heap of Agda by running agda with, e.g., +RTS -M13G -RTS on your 16G machine, then agda may be using a heap that does not fit into your RAM, and swaps without end --- kill it, because it does not make sufficient progress. ``htop'' is your friend. I recommend at most +RTS -M11G -H11G -A256M -S -RTS if you are also using that 16G machine for daily life. From ulf.norell at gmail.com Tue Jun 27 18:08:27 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 27 Jun 2017 18:08:27 +0200 Subject: [Agda] summing rationals In-Reply-To: References: <1498331171.3624.62.camel@one.mechvel.pereslavl.ru> <1498400815.3867.12.camel@one.mechvel.pereslavl.ru> <86d24b50-3618-3163-337f-ecf062db419a@cse.gu.se> Message-ID: Here are a few variants open import Agda.Builtin.Strict case_of_ : {A B : Set} ? A ? (A ? B) ? B case x of f = f x {-# INLINE case_of_ #-} test1 test2 test3 test4 : {A B : Set} ? (B ? A) ? (A ? A ? B) ? B ? B test1 f g x = let u = f x in g u u test2 f g x = case f x of ? u ? g u u test3 f g x = g u u where u = f x test4 f g x = primForce (f x) ? u ? g u u These compile to the following code (in our intermediate language, which maps more or less directly to Haskell): test1 = ? a b c d e ? d (c e) (c e) test2 = ? a b c d e ? let f = c e in d f f u = ? a b c d e ? u' c e u' = ? a b ? a b test3 = ? a b c d e ? d (u' c e) (u' c e) test4 = ? a b c d e ? let f = c e in seq f (d f f) test1 and test3 are pretty much equally bad (ghc will most likely inline u'). test2 is good for run-time performance, but bad for compile-time (due to call-by-name). test4 is good for both run-time and compile-time provided you're ok with being strict in f x If you want to see the intermediate code produced by the compiler you can give the flag -v treeless:20 when compiling. / Ulf On Tue, Jun 27, 2017 at 10:59 AM, wrote: > Nils Anders Danielsson ????? 26.06.2017 16:52: > >> On 2017-06-25 16:26, Sergei Meshveliani wrote: >> >>> 1. It appears that final fn - fn in my test costs as much as all the >>> rest. >>> >> >> As far as I know Agda transforms "let fn = f n in fn - fn" into >> "f n - f n". >> > > > I am sorry, I was in a hurry and missed the point. > > What may be a reason for writing > > g1 u + g2 u + g3 u -- (I) > where > u = f x (y * z) > > instead of > > g1 (f x (y * z)) + g2 (f x (y * z)) + g3 (f x (y * z)) -- (II) > > ? > > Can there be any reason other than readability of the source program? > > When `making' (II): > after applying MAlonzo, it starts GHC -O. > And I expect that it will convert (II) into (I) or into "let - in". > Will it? > > Anyway, this optimization is not reliable. So that in a Haskell program > (for GHC) it is bettter to write (I) both for readability and for an > reliable optimization, to be sure that computing by new the values like u > is not repeated. > > Right? > > Now, what needs to be the approach with Agda? > Agda converts (I) into (II) (does it?). > > How to write the program so that to be sure that run-time computing the > values like u is not repeated? > > Thanks, > > ------ > Sergei > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Jun 28 11:41:04 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 28 Jun 2017 11:41:04 +0200 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> Message-ID: <33b37bea-8aba-5d2d-c26b-b18993026ca9@cse.gu.se> On 2017-06-27 17:09, Jan Bracker wrote: > I tried to add the last postulate I need, but even though I now have > marked all of the proofs as abstract the compilation time is again at > 30+ minutes with no end in sight: Some other things to try: * Use copatterns to define records. * Turn off ?-equality for record types. (I don't know if either of these things will help.) -- /NAD From jan.bracker at googlemail.com Fri Jun 30 15:14:39 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Fri, 30 Jun 2017 14:14:39 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: <33b37bea-8aba-5d2d-c26b-b18993026ca9@cse.gu.se> References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> <33b37bea-8aba-5d2d-c26b-b18993026ca9@cse.gu.se> Message-ID: Hi, and again thank you for the quick help! @Nils: I tried turning off eta equality but that did not change a thing. I did not try using copatterns, because it would have taken me a long time to rewrite everything without being sure if it actually helps or which bit are important to rewrite. @Wolfram: That patch is amazing! I patched it into the 2.5.2 stable release and it compiled the postulates within a matter of seconds. Before the patch it wasn't done after 90+ minutes. Is this going to be included in the release of 2.5.3? I hope it will be. I do feel a bit of a twinge modifying the compiler to make my proofs type check. I hope this does not introduce any inconsistencies or problems? I rechecked all of my code and as far as I can tell none of my work takes longer to compile. If anything it all appears to compile quicker now, though I do not have actual numbers to back this up. I hope I don't hit another performance wall any time soon. Best, Jan 2017-06-28 10:41 GMT+01:00 Nils Anders Danielsson : > On 2017-06-27 17:09, Jan Bracker wrote: > >> I tried to add the last postulate I need, but even though I now have >> marked all of the proofs as abstract the compilation time is again at >> 30+ minutes with no end in sight: >> > > Some other things to try: > > * Use copatterns to define records. > > * Turn off ?-equality for record types. > > (I don't know if either of these things will help.) > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Fri Jun 30 16:27:50 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Fri, 30 Jun 2017 16:27:50 +0200 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> <33b37bea-8aba-5d2d-c26b-b18993026ca9@cse.gu.se> Message-ID: On Fri, Jun 30, 2017 at 3:14 PM, Jan Bracker wrote: > @Wolfram: That patch is amazing! > I patched it into the 2.5.2 stable release and it compiled the postulates > within a matter of seconds. Before the patch it wasn't done after 90+ > minutes. > Is this going to be included in the release of 2.5.3? I hope it will be. > I do feel a bit of a twinge modifying the compiler to make my proofs type > check. I hope this does not introduce any inconsistencies or problems? > I rechecked all of my code and as far as I can tell none of my work takes > longer to compile. If anything it all appears to compile quicker now, though > I do not have actual numbers to back this up. That patch is not planned to be merged, because it's more of an experiment. However if it helps so much it's tempting to try and do a proper job of comparing definitions without reducing them as much. It shouldn't introduce inconsistencies, it might however reject some programs that would otherwise be accepted, because it makes the typechecker heuristically assume things like: if (_A + _B) = (e1 + e2) then _A = e1 and _B = e2. while the program might need different solutions for _A and _B to typecheck. Best, Andrea > I hope I don't hit another performance wall any time soon. > > Best, > Jan > > 2017-06-28 10:41 GMT+01:00 Nils Anders Danielsson : >> >> On 2017-06-27 17:09, Jan Bracker wrote: >>> >>> I tried to add the last postulate I need, but even though I now have >>> marked all of the proofs as abstract the compilation time is again at >>> 30+ minutes with no end in sight: >> >> >> Some other things to try: >> >> * Use copatterns to define records. >> >> * Turn off ?-equality for record types. >> >> (I don't know if either of these things will help.) >> >> -- >> /NAD > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From jan.bracker at googlemail.com Fri Jun 30 16:34:27 2017 From: jan.bracker at googlemail.com (Jan Bracker) Date: Fri, 30 Jun 2017 15:34:27 +0100 Subject: [Agda] Possibly infinite/exponential compilation time by just calling a certain function In-Reply-To: References: <9c2cace8-1a95-89e9-71e5-3a66303b8d72@cse.gu.se> <314030a2-2dd2-70f0-17ef-ad7782fbb01e@cse.gu.se> <33b37bea-8aba-5d2d-c26b-b18993026ca9@cse.gu.se> Message-ID: I would certainly appreciate the effort if this is properly merged into the next stable release! I plan to use some of my proofs in a paper and it would be very disappointing if people needed to use a modified compiler to be able to verify them. 2017-06-30 15:27 GMT+01:00 Andrea Vezzosi : > On Fri, Jun 30, 2017 at 3:14 PM, Jan Bracker > wrote: > > @Wolfram: That patch is amazing! > > I patched it into the 2.5.2 stable release and it compiled the postulates > > within a matter of seconds. Before the patch it wasn't done after 90+ > > minutes. > > Is this going to be included in the release of 2.5.3? I hope it will be. > > I do feel a bit of a twinge modifying the compiler to make my proofs type > > check. I hope this does not introduce any inconsistencies or problems? > > I rechecked all of my code and as far as I can tell none of my work takes > > longer to compile. If anything it all appears to compile quicker now, > though > > I do not have actual numbers to back this up. > > That patch is not planned to be merged, because it's more of an > experiment. However if it helps so much it's tempting to try and do a > proper job of comparing definitions without reducing them as much. > > It shouldn't introduce inconsistencies, it might however reject some > programs that would otherwise be accepted, because it makes the > typechecker heuristically assume things like: > if (_A + _B) = (e1 + e2) then _A = e1 and _B = e2. > > while the program might need different solutions for _A and _B to > typecheck. > > Best, > Andrea > > > > I hope I don't hit another performance wall any time soon. > > > > Best, > > Jan > > > > 2017-06-28 10:41 GMT+01:00 Nils Anders Danielsson : > >> > >> On 2017-06-27 17:09, Jan Bracker wrote: > >>> > >>> I tried to add the last postulate I need, but even though I now have > >>> marked all of the proofs as abstract the compilation time is again at > >>> 30+ minutes with no end in sight: > >> > >> > >> Some other things to try: > >> > >> * Use copatterns to define records. > >> > >> * Turn off ?-equality for record types. > >> > >> (I don't know if either of these things will help.) > >> > >> -- > >> /NAD > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri Jun 30 22:25:42 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 30 Jun 2017 23:25:42 +0300 Subject: [Agda] swap in record ambiguity Message-ID: <1498854342.3356.7.camel@one.mechvel.pereslavl.ru> Can anybody tell, please, how to resolve the following code: ------------------------------------------------------------------ record GCD (a b : ?) : Set where constructor gcd? field proper : ? -- proper gcd divides? : proper ? a divides? : proper ? b greatest : ? {d} ? (d ? a) ? (d ? b) ? (d ? proper) swapGCD : (a b : ?) ? GCD a b ? GCD b a swapGCD a b (gcd? g g?a g?b maxg) = gcd? g g?b g?a maxg' where maxg' : {d : ?} ? (d ? b) ? (d ? a) ? (d ? g) maxg' {d} d?b d?a = maxg {d} d?a d?b ------------------------------------------------------------------ Agada 2.6.0-207bde6 reports ------------------- Failed to solve the following constraints: _974 := (? a b g g?a g?b maxg {.d} ? maxg') [blocked on problem 2107] [2107, 2129, 2132] (_d_973 a b g g?a g?b maxg * x) = (.d * x) : ? [2107, 2117, 2121, 2124] (.d * x) = (_d_973 a b g g?a g?b maxg * x) : ? [2107, 2108, 2112, 2115] (.d * x) = (_d_973 a b g g?a g?b maxg * x) : ? Unsolved metas at the following locations: /home/mechvel/doconA/2.00/source/Int/Nat1.agda:481,53-58 ----------------- where 481 is the line of swapGCD ... = gcd? g g?b g?a maxg' Thanks, ------ Sergei From mechvel at botik.ru Fri Jun 30 22:30:38 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 30 Jun 2017 23:30:38 +0300 Subject: [Agda] swap in record ambiguity In-Reply-To: <1498854342.3356.7.camel@one.mechvel.pereslavl.ru> References: <1498854342.3356.7.camel@one.mechvel.pereslavl.ru> Message-ID: <1498854638.3483.2.camel@one.mechvel.pereslavl.ru> I am sorry, I recall the way out: to set \{d} -> maxg' instead of maxg' On Fri, 2017-06-30 at 23:25 +0300, Sergei Meshveliani wrote: > Can anybody tell, please, > how to resolve the following code: > > ------------------------------------------------------------------ > record GCD (a b : ?) : Set > where > constructor gcd? > field proper : ? -- proper gcd > divides? : proper ? a > divides? : proper ? b > greatest : ? {d} ? (d ? a) ? (d ? b) ? (d ? proper) > > swapGCD : (a b : ?) ? GCD a b ? GCD b a > swapGCD a b (gcd? g g?a g?b maxg) = gcd? g g?b g?a maxg' > where > maxg' : {d : ?} ? (d ? b) ? (d ? a) ? (d ? g) > maxg' {d} d?b d?a = maxg {d} d?a d?b > ------------------------------------------------------------------ > > > Agada 2.6.0-207bde6 reports > > ------------------- > Failed to solve the following constraints: > _974 := (? a b g g?a g?b maxg {.d} ? maxg') > [blocked on problem 2107] > [2107, 2129, 2132] (_d_973 a b g g?a g?b maxg * x) = (.d * x) : ? > [2107, 2117, 2121, 2124] (.d * x) = (_d_973 a b g g?a g?b maxg * x) > : ? > [2107, 2108, 2112, 2115] (.d * x) = (_d_973 a b g g?a g?b maxg * x) > : ? > Unsolved metas at the following locations: > /home/mechvel/doconA/2.00/source/Int/Nat1.agda:481,53-58 > ----------------- > > where 481 is the line of > swapGCD ... = gcd? g g?b g?a maxg' > From frederic.blanqui at inria.fr Mon Jul 3 11:25:09 2017 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Mon, 3 Jul 2017 11:25:09 +0200 Subject: [Agda] PhD offer on Integrating automated provers in proof assistants In-Reply-To: <6f81325a-ee2f-6a98-9f4f-e9f21a99700b@inria.fr> References: <6f81325a-ee2f-6a98-9f4f-e9f21a99700b@inria.fr> Message-ID: Hello, We are offering a PhD position on the integration of automated provers in proof assistants at the Laboratory on Specification and Verification (LSV) of the University Paris Saclay. Deadline for application: 29 October 2017. Deadline for PhD start: 1st January 2018. More details on http://rewriting.gforge.inria.fr/grant.html . Do not hesitate to forward this mail to anyone who might be interested. Best regards, Fr?d?ric Blanqui and Guillaume Burel. From igorzsci at gmail.com Mon Jul 3 15:34:36 2017 From: igorzsci at gmail.com (v0id_NULL) Date: Mon, 3 Jul 2017 23:34:36 +1000 Subject: [Agda] Some proofs by clauses Message-ID: Dear list, Help me please. How can I prove type of p2? module M1 where open import Data.Nat using (?) open import Data.Bool using (Bool; true; false) open import Relation.Binary.PropositionalEquality using (_?_; refl) f : Bool ? Bool ? ? f true x = 1 f y false = 2 f false true = 3 p1 : {x : Bool} ? f true x ? 1 p1 = refl p2 : {y : Bool} ? f y false ? 2 p2 = {!!} p3 : f false true ? 3 p3 = refl -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Mon Jul 3 15:35:46 2017 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 3 Jul 2017 15:35:46 +0200 Subject: [Agda] Some proofs by clauses In-Reply-To: References: Message-ID: I didn't try, but how about pattern match on y, for example in a with-clause? Then the proof should be refl. On 2017-07-03 15:34, v0id_NULL wrote: > Dear list, > > Help me please. How can I prove type of p2? > > module M1 where > > open import Data.Nat using (?) > open import Data.Bool using (Bool; true; false) > open import Relation.Binary.PropositionalEquality using (_?_; refl) > > f : Bool ? Bool ? ? > f true x = 1 > f y false = 2 > f false true = 3 > > p1 : {x : Bool} ? f true x ? 1 > p1 = refl > > p2 : {y : Bool} ? f y false ? 2 > p2 = {!!} > > p3 : f false true ? 3 > p3 = refl > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From jdw74 at cam.ac.uk Mon Jul 3 15:54:19 2017 From: jdw74 at cam.ac.uk (James Wood) Date: Mon, 3 Jul 2017 14:54:19 +0100 Subject: [Agda] Some proofs by clauses In-Reply-To: References: Message-ID: <2cba889b-1688-e244-f4db-1da64c45687e@cam.ac.uk> It is not true. When you consider the case where y = true, we have that f true false = 1 by the definition f true x = 1. f y false = 2 does not hold definitionally because f true x = 1 has precedence. To avoid this kind of definition, you can use the --exact-split option. See http://agda.readthedocs.io/en/latest/language/function-definitions.html#case-trees . James| | On 03/07/17 14:35, Manuel B?renz wrote: > > I didn't try, but how about pattern match on y, for example in a > with-clause? Then the proof should be refl. > > > On 2017-07-03 15:34, v0id_NULL wrote: >> Dear list, >> >> Help me please. How can I prove type of p2? >> >> module M1 where >> >> open import Data.Nat using (?) >> open import Data.Bool using (Bool; true; false) >> open import Relation.Binary.PropositionalEquality using (_?_; refl) >> >> f : Bool ? Bool ? ? >> f true x = 1 >> f y false = 2 >> f false true = 3 >> >> p1 : {x : Bool} ? f true x ? 1 >> p1 = refl >> >> p2 : {y : Bool} ? f y false ? 2 >> p2 = {!!} >> >> p3 : f false true ? 3 >> p3 = refl >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From thiemann at informatik.uni-freiburg.de Tue Jul 4 09:01:57 2017 From: thiemann at informatik.uni-freiburg.de (Peter Thiemann) Date: Tue, 4 Jul 2017 09:01:57 +0200 Subject: [Agda] FLOPS2018: First CFP Message-ID: <7A218067-9D69-4B06-B602-D6298B877FD2@informatik.uni-freiburg.de> FIRST Call For Papers FLOPS 2018: 14th International Symposium on Functional and Logic Programming 9-11 May, 2018, Nagoya, Japan http://www.sqlab.jp/FLOPS2018/ Writing down detailed computational steps is not the only way of programming. The alternative, being used increasingly in practice, is to start by writing down the desired properties of the result. The computational steps are then (semi-)automatically derived from these higher-level specifications. Examples of this declarative style include functional and logic programming, program transformation and re-writing, and extracting programs from proofs of their correctness. FLOPS aims to bring together practitioners, researchers and implementors of the declarative programming, to discuss mutually interesting results and common problems: theoretical advances, their implementations in language systems and tools, and applications of these systems in practice. The scope includes all aspects of the design, semantics, theory, applications, implementations, and teaching of declarative programming. FLOPS specifically aims to promote cross-fertilization between theory and practice and among different styles of declarative programming. Scope FLOPS solicits original papers in all areas of the declarative programming: * functional, logic, functional-logic programming, re-writing systems, formal methods and model checking, program transformations and program refinements, developing programs with the help of theorem provers or SAT/SMT solvers; * foundations, language design, implementation issues (compilation techniques, memory management, run-time systems), applications and case studies. FLOPS promotes cross-fertilization among different styles of declarative programming. Therefore, submissions must be written to be understandable by the wide audience of declarative programmers and researchers. Submission of system descriptions and declarative pearls are especially encouraged. Submissions should fall into one of the following categories: * Regular research papers: they should describe new results and will be judged on originality, correctness, and significance. * System descriptions: they should contain a link to a working system and will be judged on originality, usefulness, and design. * Declarative pearls: new and excellent declarative programs or theories with illustrative applications. System descriptions and declarative pearls must be explicitly marked as such in the title. Submissions must be unpublished and not submitted for publication elsewhere. Work that already appeared in unpublished or informally published workshops proceedings may be submitted. See also ACM SIGPLAN Republication Policy. Proceedings The proceedings will be published by Springer International Publishing in the Lecture Notes in Computer Science (LNCS) series, as a printed volume as well as online in the digital library SpringerLink. Post-proceedings: The authors of 4-7 best papers will be invited to submit the extended version of their FLOPS paper to a special issue of the journal Science of Computer Programming (SCP). Important dates 13 November 2017 (any time zone): Abstract Submission 20 November 2017 (any time zone): Submission deadline 15 January 2018: Author notification 9-11 May 2018: FLOPS Symposium Invited Talks To be announced Submission Submissions must be written in English and can be up to 15 pages long including references, though pearls are typically shorter. The formatting has to conform to Springer's guidelines. Regular research papers should be supported by proofs and/or experimental results. In case of lack of space, this supporting information should be made accessible otherwise (e.g., a link to a Web page, or an appendix). Papers should be submitted electronically at https://easychair.org/conferences/?conf=flops2018 Program Committee Andreas Rossberg Google, Germany Atsushi Ohori Tohoku University, Japan Bruno C. D. S. Oliveira The University of Hong Kong, China Carsten Fuhs Birkbeck, University of London, UK Chung-chieh Shan Indiana University, USA Didier Remy INRIA, France Harald Sondergaard The University of Melbourne, Australia Jacques Garrigue Nagoya University, Japan Jan Midtgaard Technical University of Denmark, Denmark Joachim Breitner University of Pennsylvania, USA John Gallagher Roskilde University, Denmark and IMDEA Software Institute, Spain (co-chair) Jorge A Navas SRI International, USA Kazunori Ueda Waseda University, Japan Kenny Zhuo Ming Lu School of Information Technology, Nanyang Polytechnic, Singapore Mar?a Alpuente Universitat Polit?cnica de Val?ncia, Spain Mar?a Garcia De La Banda Monash University, Australia Martin Sulzmann Karlsruhe University of Applied Sciences, Germany (co-chair) Meng Wang University of Kent, UK Michael Codish Ben-Gurion University of the Negev, Israel Michael Leuschel University of D?sseldorf, Germany Naoki Kobayashi University of Tokyo, Japan Nikolaj Bj?rner Microsoft Research, USA Robert Gl?ck University of Copenhagen, Denmark Samir Genaim Universidad Complutense de Madrid, Spain Siau Cheng Khoo National University of Singapore, Singapore Organizers Martin Sulzmann Karlsruhe University of Applied Sciences (co-chair) John Gallagher Roskilde University and IMDEA Software Institute (co-chair) Makoto Tatsuta National Institute of Informatics, Japan (General Chair) Koji Nakazawa Nagoya University, Japan (Local Chair) From m.escardo at cs.bham.ac.uk Thu Jul 6 00:40:52 2017 From: m.escardo at cs.bham.ac.uk (=?ISO-8859-1?Q?Mart=EDn_H=F6tzel_Escard=F3?=) Date: Wed, 05 Jul 2017 23:40:52 +0100 Subject: [Agda] Proposed notation for universe polymorphism Message-ID: An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Thu Jul 6 13:07:00 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Thu, 6 Jul 2017 13:07:00 +0200 Subject: [Agda] Proposed notation for universe polymorphism In-Reply-To: References: Message-ID: Maybe this could work by having an implicit coercion from Level to "types", then you'd just have to rename Level into Universe to be able to write the second version. On Thu, Jul 6, 2017 at 12:40 AM, Mart?n H?tzel Escard? wrote: > Consider, for example, the Agda type > > (I j : Level) -> Set i -> Set j -> Set(i\/j) > > e.g. for the sum of two types. > > I would like to, alternatively, write this type as follows: > > (U V : Universe) -> U -> V -> U \/ V > > Instead of thinking of universe levels, I am thinking of universes > themselves. > > So then U \/ V is the least universe containing both U and V. > > In particular, this notation works well with for example univalent type > theory as in the HoTT book. > > This should not only make some definitions more concise and readable, but > also mathematically more intuitive. > > There are two pieces of notation missing in this proposal, for the first > universe and for the successor of a universe. > > I would like Agda to allow me to think and write in this way. > > Best, Martin > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From abela at chalmers.se Thu Jul 6 13:18:52 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 6 Jul 2017 12:18:52 +0100 Subject: [Agda] Proposed notation for universe polymorphism In-Reply-To: References: Message-ID: To spin Andrea's idea further, we could make an overloaded "El" which has the internal workings of the following type class (not official Agda): record ToType {a} {A : Set a} (a : A) : Set? where field toType : a ? Set? instance setToType : ?{?} ? ToType (Set ?) setToType .ToType.toType A = A levelToType : ToType Level levelToType .ToType.toType ? = Set ? natToType : ToType Nat natToType .ToType.toType n = Fin n You could then even write foo : (n : Nat) (i : n) -> ... On 06.07.2017 12:07, Andrea Vezzosi wrote: > Maybe this could work by having an implicit coercion from Level to > "types", then you'd just have to rename Level into Universe to be able > to write the second version. > > On Thu, Jul 6, 2017 at 12:40 AM, Mart?n H?tzel Escard? > wrote: >> Consider, for example, the Agda type >> >> (I j : Level) -> Set i -> Set j -> Set(i\/j) >> >> e.g. for the sum of two types. >> >> I would like to, alternatively, write this type as follows: >> >> (U V : Universe) -> U -> V -> U \/ V >> >> Instead of thinking of universe levels, I am thinking of universes >> themselves. >> >> So then U \/ V is the least universe containing both U and V. >> >> In particular, this notation works well with for example univalent type >> theory as in the HoTT book. >> >> This should not only make some definitions more concise and readable, but >> also mathematically more intuitive. >> >> There are two pieces of notation missing in this proposal, for the first >> universe and for the successor of a universe. >> >> I would like Agda to allow me to think and write in this way. >> >> Best, Martin >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From kaposi.ambrus at gmail.com Thu Jul 6 15:18:51 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Thu, 6 Jul 2017 15:18:51 +0200 Subject: [Agda] TYPES 2017 post-proceedings open call for papers Message-ID: Paper submission deadline 23 October 2017 Open call for papers Post-proceedings of the 23rd International Conference on Types for Proofs and Programs TYPES 2017 TYPES is a major forum for the presentation of research on all aspects of type theory and its applications. TYPES 2017 was held between 29 May and 1 June in Budapest, Hungary. The post-proceedings volume will be published in LIPIcs, Leibniz International Proceedings in Informatics, an open-access series of conference proceedings (http://www.dagstuhl.de/en/publications/lipics). Submission to this post-proceedings volume is open to everyone, also to those who did not participate in the conference. We would like to invite all researchers that study and apply type systems to share their results. In particular, we welcome submissions on the following topics: * Foundations of type theory and constructive mathematics; * Homotopy type theory; * Applications of type theory; * Dependently typed programming; * Industrial uses of type theory technology; * Meta-theoretic studies of type systems; * Proof assistants and proof technology; * Automation in computer-assisted reasoning; * Links between type theory and functional programming; * Formalizing mathematics using type theory; * Type theory in linguistics. IMPORTANT DATES * Abstract submission: 16 October 2017 * Paper submission: 23 October 2017 * Author notification: 26 March 2018 DETAILS * Papers have to be formatted with lipics.cls and adhere to the style requirements of LIPIcs. http://www.dagstuhl.de/en/publications/lipics/instructions-for-authors/ * The recommended length of a paper is 15-25 pages. Submissions significantly longer than 25 pages will not be considered. * Papers have to be submitted in pdf through EasyChair: https://easychair.org/conferences/?conf=types2017postproceed * Authors have the option to attach to their submission a zip or tgz file containing code (formalized proofs or programs), but reviewers are not obliged to take those attachments into account and they will not be published. * More information is available on http://types2017.elte.hu/#postproc * In case of questions, please contact one of the editors. EDITORS Andreas Abel andreas.abel at gu.se Gothenburg University, Sweden Fredrik Nordvall Forsberg fredrik.nordvall-forsberg at strath.ac.uk University of Strathclyde, United Kingdom Ambrus Kaposi akaposi at inf.elte.hu E?tv?s Lor?nd University, Hungary From m.escardo at cs.bham.ac.uk Fri Jul 7 00:41:36 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 6 Jul 2017 23:41:36 +0100 Subject: [Agda] Proposed notation for universe polymorphism In-Reply-To: References: Message-ID: (Yes, that's the idea. This is just new proposed notation, not new semantics. M.) On 06/07/17 12:07, sanzhiyan at gmail.com wrote: > Maybe this could work by having an implicit coercion from Level to > "types", then you'd just have to rename Level into Universe to be able > to write the second version. > > On Thu, Jul 6, 2017 at 12:40 AM, Mart?n H?tzel Escard? > wrote: >> Consider, for example, the Agda type >> >> (I j : Level) -> Set i -> Set j -> Set(i\/j) >> >> e.g. for the sum of two types. >> >> I would like to, alternatively, write this type as follows: >> >> (U V : Universe) -> U -> V -> U \/ V >> >> Instead of thinking of universe levels, I am thinking of universes >> themselves. >> >> So then U \/ V is the least universe containing both U and V. >> >> In particular, this notation works well with for example univalent type >> theory as in the HoTT book. >> >> This should not only make some definitions more concise and readable, but >> also mathematically more intuitive. >> >> There are two pieces of notation missing in this proposal, for the first >> universe and for the successor of a universe. >> >> I would like Agda to allow me to think and write in this way. >> >> Best, Martin >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From carter.schonwald at gmail.com Sun Jul 9 18:26:56 2017 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Sun, 9 Jul 2017 12:26:56 -0400 Subject: [Agda] how do I handle absurd with patterns? Message-ID: Hey all, i've a small development (a baby system f), and I find myself with a case that looks like the following (full file attached, key bit inline here) ?SubstFancy : ? { tfv } -> (barrier : Nat) -> TypeF (1 + barrier + tfv ) -> TypeF ( barrier + tfv) -> TypeF (barrier + tfv ) ?SubstFancy bar (v? x) t with compare bar (finToNat x) ?SubstFancy zero (v? zero) t | less lt = {!!} -- this is the case i'm stumped by ?SubstFancy zero (v? (suc x)) t | less lt = {!!} ?SubstFancy (suc bar) (v? x) t | less lt = {!!} ?SubstFancy bar (v? x) t | equal eq = t ?SubstFancy bar (v? x) t | greater gt = {!!} ?SubstFancy bar (?? tar) t = {!!} ?SubstFancy bar (tar ?? tar?) t = {!!} how do i deal with this 0 < 0 case? it seems like it should be absurd, but the syntax doens't quite work, also this is using ulf's agda prelude lib atm, but that shouldn't be relevant to this question. Or is this a bug? :) many thanks -Carter -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleF.agda Type: application/octet-stream Size: 1840 bytes Desc: not available URL: From jannis at limperg.de Sun Jul 9 18:39:25 2017 From: jannis at limperg.de (Jannis Limperg) Date: Sun, 9 Jul 2017 18:39:25 +0200 Subject: [Agda] how do I handle absurd with patterns? In-Reply-To: References: Message-ID: Here's the most direct solution: ?SubstFancy zero (v? zero) t | less (diff _ ()) The second argument to `diff`, which we match with the absurd pattern, is of the form `0 = suc _`. `lt` can't be matched with an absurd pattern directly because there is a possible (type-correct) choice of constructor, `diff`. Of course, you can package this up in a lemma for future reference: n Hey all, > > i've a small development (a baby system f), > and I find myself with a case that looks like the following (full file > attached, key bit inline here) > > > ?SubstFancy : ? { tfv } -> (barrier : Nat) -> TypeF (1 + barrier + > tfv ) -> TypeF ( barrier + tfv) -> TypeF (barrier + tfv ) > ?SubstFancy bar (v? x) t with compare bar (finToNat x) > ?SubstFancy zero (v? zero) t | less lt = {!!} -- this is the case i'm > stumped by > ?SubstFancy zero (v? (suc x)) t | less lt = {!!} > ?SubstFancy (suc bar) (v? x) t | less lt = {!!} > ?SubstFancy bar (v? x) t | equal eq = t > ?SubstFancy bar (v? x) t | greater gt = {!!} > ?SubstFancy bar (?? tar) t = {!!} > ?SubstFancy bar (tar ?? tar?) t = {!!} > > how do i deal with this 0 < 0 case? > it seems like it should be absurd, but the syntax doens't quite work, > > also this is using ulf's agda prelude lib atm, but that shouldn't be > relevant to this question. > > Or is this a bug? :) > > many thanks > -Carter -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 858 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Mon Jul 10 21:30:21 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 10 Jul 2017 22:30:21 +0300 Subject: [Agda] missing import overlap Message-ID: <1499715021.2661.8.camel@one.mechvel.pereslavl.ru> People, I wonder: given open import Relation.Nullary open import Relation.Nullary using (yes; no) Agda does not report an overlap. Needs it? ------ Sergei From mechvel at botik.ru Tue Jul 11 10:48:40 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 11 Jul 2017 11:48:40 +0300 Subject: [Agda] unstable composition checking In-Reply-To: <75a06db0-0928-81fc-7a12-6db607d88426@cse.gu.se> References: <1497639490.3890.17.camel@one.mechvel.pereslavl.ru> <75a06db0-0928-81fc-7a12-6db607d88426@cse.gu.se> Message-ID: <1499762920.2464.18.camel@one.mechvel.pereslavl.ru> On Wed, 2017-06-21 at 15:12 +0200, Nils Anders Danielsson wrote: > On 2017-06-16 20:58, Sergei Meshveliani wrote: > > What might it mean this cost hole for (just ? oppose) ? > > I'm guessing that "just" is overloaded, and that Agda has trouble > inferring the implicit arguments of _?_. What happens if you write > "Maybe.just" instead? Sorry, I have lost the precise example. I find now this one: foo = record{ ... ; invMb = just ? decInv-fr -- (I) -- Maybe.just ? decInv-fr -- (II) -- \f ? just (decInv-fr f) -- (III) ... } (there is a huge environment import). Type checking (II) and (III) succeeds in 40 sec. (I) leads to "unsolved metas", but this report appears within 40 sec. In the lost example it was taking more than 10 minutes (interrupted). > I'm guessing that "just" is overloaded, and that Agda has trouble > inferring the implicit arguments of _?_. But `yes' is also overloaded -- ? And replacing Maybe with Decidable, (just ?) with (yes ?), I had a similar successful example with (yes ?). Thanks, ------ Sergei From Thorsten.Altenkirch at nottingham.ac.uk Tue Jul 11 11:04:19 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 11 Jul 2017 09:04:19 +0000 Subject: [Agda] parameters vs indices Message-ID: Hi, this came up during Conor's Agda course at the Types summer school. It is a bit surprising that the following is accepted data Good : Set ? Set where good : (X : Set) ? Good X This looks like we have a large constructor. However, if we want to cheat Agda complains data Bad : Set ? Set where bad : {X : Set} ? Bad ? Indeed Good is equivalent to Honest which uses a parameter data Honest (X : Set) : Set where honest : Honest X Why don't we force people to be Honest instead of just being Good? Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From effectfully at gmail.com Tue Jul 11 12:02:24 2017 From: effectfully at gmail.com (Roman) Date: Tue, 11 Jul 2017 13:02:24 +0300 Subject: [Agda] parameters vs indices In-Reply-To: References: Message-ID: Hi. > Why don't we force people to be Honest instead of just being Good? No need to force people when you can force indices: https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Forcing.html With forcing some things are smaller than without it, see e.g. this issue: https://github.com/agda/agda/issues/1676 From Thorsten.Altenkirch at nottingham.ac.uk Tue Jul 11 12:26:44 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 11 Jul 2017 10:26:44 +0000 Subject: [Agda] parameters vs indices In-Reply-To: References: Message-ID: Thank you. Now I remember, this actually allows us to write inductive definitions when we were only able to write recursive ones due to size constraints. The example in your 2nd link shows this nicely: data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where [] : All P [] _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) before we were only able to define this by recursion: All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p All' P [] = Lift ? All' P (x ? xs) = P x ? All' P xs which is a bit sad since inductive predicates work often better. I was wondering about the semantics. One way would be to translate forced indices into recursive definitions but aybe there is a more direct way. Thorsten On 11/07/2017, 12:02, "Roman" wrote: >Hi. > >> Why don't we force people to be Honest instead of just being Good? > >No need to force people when you can force indices: >https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Forc >ing.html > >With forcing some things are smaller than without it, see e.g. this >issue: https://github.com/agda/agda/issues/1676 This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From mechvel at botik.ru Tue Jul 11 13:38:35 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 11 Jul 2017 14:38:35 +0300 Subject: [Agda] address in lib pull request Message-ID: <1499773115.3824.9.camel@one.mechvel.pereslavl.ru> Dear library supporters, I commit a pull request for Standard library, and it shows certain expanded commiter address, about which I am not 100% sure. I wonder of whether I need to somehow check this address. Thanks, ------ Sergei From asr at eafit.edu.co Tue Jul 11 14:33:11 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Tue, 11 Jul 2017 07:33:11 -0500 Subject: [Agda] address in lib pull request In-Reply-To: <1499773115.3824.9.camel@one.mechvel.pereslavl.ru> References: <1499773115.3824.9.camel@one.mechvel.pereslavl.ru> Message-ID: On 11 July 2017 at 06:38, Sergei Meshveliani wrote: > > I commit a pull request for Standard library, > and it shows certain expanded commiter address, about which I am not > 100% sure. > Which commit? -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mechvel at botik.ru Tue Jul 11 14:47:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 11 Jul 2017 15:47:26 +0300 Subject: [Agda] address in lib pull request In-Reply-To: References: <1499773115.3824.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1499777246.4284.4.camel@one.mechvel.pereslavl.ru> On Tue, 2017-07-11 at 07:33 -0500, Andr?s Sicard-Ram?rez wrote: > On 11 July 2017 at 06:38, Sergei Meshveliani wrote: > > > > I commit a pull request for Standard library, > > and it shows certain expanded commiter address, about which I am not > > 100% sure. > > > > Which commit? https://github.com/mechvel/agda-stdlib I tried sending email to this my extended address, and the Evolution mailer kept it unsent, I do not know why. ------ Sergei From abela at chalmers.se Tue Jul 11 17:08:29 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 11 Jul 2017 16:08:29 +0100 Subject: [Agda] parameters vs indices In-Reply-To: References: Message-ID: <4068e8cb-3749-19a9-18b8-f4221b96e927@chalmers.se> Hi Thorsten, I think a semantics could be developed in the direction of how Conor and Pierre-Evariste perceive inductive types in https://pages.lip6.fr/Pierre-Evariste.Dagand/stuffs/journal-2013-catorn-jfp/paper.pdf In the definition of the inductive type, they case on pattern indices to determine which constructors should inhabit that particular slice of the inductive family. Cheers, Andreas On 11.07.2017 11:26, Thorsten Altenkirch wrote: > Thank you. Now I remember, this actually allows us to write inductive > definitions when we were only able to write recursive ones due to size > constraints. The example in your 2nd link shows this nicely: > > data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where > [] : All P [] > _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) > > before we were only able to define this by recursion: > > All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p > All' P [] = Lift ? > All' P (x ? xs) = P x ? All' P xs > > > which is a bit sad since inductive predicates work often better. > > I was wondering about the semantics. One way would be to translate forced > indices into recursive definitions but aybe there is a more direct way. > > Thorsten > > > > On 11/07/2017, 12:02, "Roman" wrote: > >> Hi. >> >>> Why don't we force people to be Honest instead of just being Good? >> >> No need to force people when you can force indices: >> https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Forc >> ing.html >> >> With forcing some things are smaller than without it, see e.g. this >> issue: https://github.com/agda/agda/issues/1676 > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From grewe at st.informatik.tu-darmstadt.de Tue Jul 11 23:17:45 2017 From: grewe at st.informatik.tu-darmstadt.de (Sylvia Grewe) Date: Tue, 11 Jul 2017 23:17:45 +0200 Subject: [Agda] 2018: 2nd Call for Papers Message-ID: ------------------------------------------------------------------------------------ 2018 : The Art, Science, and Engineering of Programming Mon 9 - Thu 12 April 2018 Nice, France http://2018.programming-conference.org/ In 2017, we started a new conference and journal focused on everything to do with programming, including the experience of programming, called for short. The first edition of was a great success (seehttp://twitter.com/programmingconffor testimonies). Paper submissions and publications are handled by the journal. Accepted papers must be presented at the conference. ******************************************************** CALL FOR PAPERS ******************************************************** 2018 accept scholarly papers including essays that advance the knowledge of programming. Almost anything about programming is in scope, but in each case there should be a clear relevance to the act and experience of programming. PAPER SUBMISSIONS: August 1 2017 (Research Papers Second Submission Deadline) December 1 2017 (Research Papers Third Submission Deadline) We accept submissions covering several areas of expertise. These areas include, but are not limited to: ? General-purpose programming ? Distributed systems programming ? Parallel and multi-core programming ? Graphics and GPU programming ? Security programming ? User interface programming ? Database programming ? Visual and live programming ? Data mining and machine learning programming ? Interpreters, virtual machines and compilers ? Modularity and separation of concerns ? Model-based development ? Metaprogramming and reflection ? Testing and debugging ? Program verification ? Programming education ? Programming environments ? Social coding ******************************************************** IMPORTANT DATES ******************************************************** Research paper submissions: August 1 2017 (Research Papers Second Submission Deadline) December 1 2017 (Research Papers Third Submission Deadline) Research paper first notification (for second submission deadline): October 1 2017 Research paper final notification (for second submission deadline): November 7 2017 Research paper first notification (for third submission deadline): February 1 2018 Research paper final notification (for third submission deadline): March 7 2018 Workshop Proposals: October 1 2017 All important dates can also be found athttp://programming-journal.org/timeline/ ******************************************************** ORGANIZATION ******************************************************** General Chair: Manuel Serrano, INRIA France Local Organizing Chair: Tamara Rezk, INRIA France Organizing Committee: Stefan Marr (workshops), Johannes Kepler University Linz Jennifer B. Sartor (workshops), Software Languages Lab, Vrije Universiteit Brussel Belgium Philipp Haller (student research competition), KTH Royal Institute of Technology, Sweden Tobias Pape (web technology), HPI - University of Potsdam Sylvia Grewe (publicity), Technische Universit?t Darmstadt Germany Program Committee: Guido Salvaneschi (program chair), Technische Universit?t Darmstadt, Germany Davide Ancona, University of Genova, Italy Alberto Bacchelli, Delft University of Technology, Netherlands Shigeru Chiba, University of Tokyo, Japan Yvonne Coady, University of Victoria, Canada Susan Eisenbach, Imperial College London, UK Patrick Eugster, TU Darmstadt, Germany and Purdue University, United States Antonio Filieri, Imperial College London, UK Matthew Flatt, University of Utah, United States Lidia Fuentes, Universidad de M?laga, Spain Richard P. Gabriel, Dream Songs, Inc. & HPI, California Jeremy Gibbons, University of Oxford, UK Yossi Gil, Israel Institute of Technology Elisa Gonzalez Boix, Vrije Universiteit Brussel, Belgium Phlipp Haller, KTH Royal Institute of Technology, Sweden Matthew Hammer, University of Colorado, Boulder, United States Felienne Hermans, Delft University of Technology, Netherlands Robert Hirschfeld, Hasso Plattner Institute (HPI), Germany Roberto Ierusalimschy, Pontifical Catholic University of Rio de Janeiro, Brazil Jun Kato, National Institute of Advanced Industrial Science and Technology, Japan J?rg Kienzle, McGill University, Canada Neelakantan R. Krishnaswami, University of Cambridge, UK Ralf L?mmel, University of Koblenz-Landau, Germany Hidehiko Masuhara, Tokyo Institute of Technology, Japan Mira Mezini, Technische Universit?t Darmstadt, Germany Emerson Murphy-Hill, North Carolina State University, United States Mario S?dholt, IMT Atlantique, Nantes, France Sam Tobin-Hochstadt, Indiana University, United States Eelco Visser, Delft University of Technology, Netherlands Tijs van der Storm, CWI & University of Groningen, Netherlands ******************************************************** 2018 is kindly supported by: ACM In-Cooperation SIGPLAN (In-cooperation) SIGSOFT (In-cooperation) INRIA France AOSA ******************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Jul 12 09:42:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 12 Jul 2017 10:42:29 +0300 Subject: [Agda] StrictLex in library Message-ID: <1499845349.2770.11.camel@one.mechvel.pereslavl.ru> People, I look into Relation.Binary.List.StrictLex of Standard library (of April 13, 2017) and see that it is for (List A) for A : Set. What is the reason for restricting A to Set of the level zero ? I need an implementation for StrictTotalOrder for List A, where A has StrictTotalOrder for _<_, and A : Set a, a : Level. Need I to modify Relation.Binary.List.StrictLex by replacing Set with (Set a) ? Can anyone advise, please? ------ Sergei From mechvel at botik.ru Wed Jul 12 10:16:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 12 Jul 2017 11:16:26 +0300 Subject: [Agda] StrictLex in library In-Reply-To: <1499845349.2770.11.camel@one.mechvel.pereslavl.ru> References: <1499845349.2770.11.camel@one.mechvel.pereslavl.ru> Message-ID: <1499847386.3030.4.camel@one.mechvel.pereslavl.ru> I recall that currently, I need only A = Nat, A = Bit. So that zero : Level occurs sufficient. Anyway, an arbitrary level is generally desirable. On Wed, 2017-07-12 at 10:42 +0300, Sergei Meshveliani wrote: > People, > > I look into Relation.Binary.List.StrictLex > > of Standard library (of April 13, 2017) > > and see that it is for (List A) for A : Set. > > What is the reason for restricting A to Set of the level zero ? > > I need an implementation for StrictTotalOrder for List A, where > A has StrictTotalOrder for _<_, and A : Set a, a : Level. > > Need I to modify Relation.Binary.List.StrictLex > by replacing Set with (Set a) ? > > Can anyone advise, please? > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Wed Jul 12 10:17:34 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 12 Jul 2017 09:17:34 +0100 Subject: [Agda] missing import overlap In-Reply-To: <1499715021.2661.8.camel@one.mechvel.pereslavl.ru> References: <1499715021.2661.8.camel@one.mechvel.pereslavl.ru> Message-ID: No, that's fine. You could say that the second import statement is redundant, but there is no overlap. Haskell is also fine with it: > import Control.Monad.Writer > import Control.Monad.Writer On 10.07.2017 20:30, Sergei Meshveliani wrote: > People, > I wonder: given > > open import Relation.Nullary > open import Relation.Nullary using (yes; no) > > Agda does not report an overlap. Needs it? -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From andreas.abel at ifi.lmu.de Wed Jul 12 10:19:14 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 12 Jul 2017 09:19:14 +0100 Subject: [Agda] StrictLex in library In-Reply-To: <1499847386.3030.4.camel@one.mechvel.pereslavl.ru> References: <1499845349.2770.11.camel@one.mechvel.pereslavl.ru> <1499847386.3030.4.camel@one.mechvel.pereslavl.ru> Message-ID: Since we now have maintainer (thumbs up to Matthew!), you are welcome to submit a pull request to the standard library. On 12.07.2017 09:16, Sergei Meshveliani wrote: > I recall that currently, I need only A = Nat, A = Bit. > So that zero : Level occurs sufficient. > > Anyway, an arbitrary level is generally desirable. > > > On Wed, 2017-07-12 at 10:42 +0300, Sergei Meshveliani wrote: >> People, >> >> I look into Relation.Binary.List.StrictLex >> >> of Standard library (of April 13, 2017) >> >> and see that it is for (List A) for A : Set. >> >> What is the reason for restricting A to Set of the level zero ? >> >> I need an implementation for StrictTotalOrder for List A, where >> A has StrictTotalOrder for _<_, and A : Set a, a : Level. >> >> Need I to modify Relation.Binary.List.StrictLex >> by replacing Set with (Set a) ? >> >> Can anyone advise, please? -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From henning at basold.eu Wed Jul 12 13:18:43 2017 From: henning at basold.eu (Henning Basold) Date: Wed, 12 Jul 2017 13:18:43 +0200 Subject: [Agda] parameters vs indices In-Reply-To: References: Message-ID: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> Hi Thorsten, Concerning the difference between parameters and indices: there are none in the presence of an equality type in the following sense. Note that in the case of indices the codomain of a constructor of a dependent inductive type is given by the type that we are constructing plus a substitution applied to it. This can equivalently be achieved by using parameters, equality constraints and identity substitutions. The All-example becomes then data All {a p} {A : Set a} (P : A ? Set p) (u : List A) : Set p where [] : u = [] ? All P u _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? u = x ? xs ? All P u So even without indices one can still use inductively defined predicates over other types and there is no need to resort to large elimination. Though it is clear that the index-based definition is much nicer to work with, since it does not require the elimination of identity proofs. I hate to advertise my work, but you may find a description of inductive and coinductive dependent types that only uses _indices_ in http://dx.doi.org/10.4204/EPTCS.191.3 (category theoretical approach) and in http://dx.doi.org/10.1145/2933575.2934514 (syntactic theory). Last year at TYPES'16 I also talked about how this can be turned into a theory, in which the identity is not constructible as an inductive type, that is based purely on parameters. This allows the axiomatisation of the identity type ? la observational type theory. To make such a theory conveniently usable, one would have to provide a front-end that allows us to still write inductive types like All and translates them into types with equality constraints, as I showed above. This is, however, all fairly uncharted territory, yet. My apologies for this shameless self-advertisement... Cheers, Henning On 11/07/17 12:26, Thorsten Altenkirch wrote: > Thank you. Now I remember, this actually allows us to write inductive > definitions when we were only able to write recursive ones due to size > constraints. The example in your 2nd link shows this nicely: > > data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where > [] : All P [] > _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) > > before we were only able to define this by recursion: > > All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p > All' P [] = Lift ? > All' P (x ? xs) = P x ? All' P xs > > > which is a bit sad since inductive predicates work often better. > > I was wondering about the semantics. One way would be to translate forced > indices into recursive definitions but aybe there is a more direct way. > > Thorsten > > > > On 11/07/2017, 12:02, "Roman" wrote: > >> Hi. >> >>> Why don't we force people to be Honest instead of just being Good? >> >> No need to force people when you can force indices: >> https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Forc >> ing.html >> >> With forcing some things are smaller than without it, see e.g. this >> issue: https://github.com/agda/agda/issues/1676 > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Jul 12 14:14:32 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 12 Jul 2017 12:14:32 +0000 Subject: [Agda] parameters vs indices In-Reply-To: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> References: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> Message-ID: Hi Henning, this is a good point. What you are doing is using the left Kan extension to reduce indexed datatypes to parametrized ones. Cheers, Thirsten On 12/07/2017, 13:18, "Agda on behalf of Henning Basold" wrote: >Hi Thorsten, > >Concerning the difference between parameters and indices: there are none >in the presence of an equality type in the following sense. Note that in >the case of indices the codomain of a constructor of a dependent >inductive type is given by the type that we are constructing plus a >substitution applied to it. This can equivalently be achieved by using >parameters, equality constraints and identity substitutions. The >All-example becomes then > >data All {a p} {A : Set a} (P : A ? Set p) (u : List A) : Set p where > [] : u = [] ? All P u > _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? u = x ? xs ? All P u > >So even without indices one can still use inductively defined predicates >over other types and there is no need to resort to large elimination. >Though it is clear that the index-based definition is much nicer to work >with, since it does not require the elimination of identity proofs. > >I hate to advertise my work, but you may find a description of inductive >and coinductive dependent types that only uses _indices_ in >http://dx.doi.org/10.4204/EPTCS.191.3 (category theoretical approach) >and in http://dx.doi.org/10.1145/2933575.2934514 (syntactic theory). >Last year at TYPES'16 I also talked about how this can be turned into a >theory, in which the identity is not constructible as an inductive type, >that is based purely on parameters. This allows the axiomatisation of >the identity type ? la observational type theory. To make such a theory >conveniently usable, one would have to provide a front-end that allows >us to still write inductive types like All and translates them into >types with equality constraints, as I showed above. This is, however, >all fairly uncharted territory, yet. > >My apologies for this shameless self-advertisement... > >Cheers, >Henning > >On 11/07/17 12:26, Thorsten Altenkirch wrote: >> Thank you. Now I remember, this actually allows us to write inductive >> definitions when we were only able to write recursive ones due to size >> constraints. The example in your 2nd link shows this nicely: >> >> data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where >> [] : All P [] >> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) >> >> before we were only able to define this by recursion: >> >> All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p >> All' P [] = Lift ? >> All' P (x ? xs) = P x ? All' P xs >> >> >> which is a bit sad since inductive predicates work often better. >> >> I was wondering about the semantics. One way would be to translate >>forced >> indices into recursive definitions but aybe there is a more direct way. >> >> Thorsten >> >> >> >> On 11/07/2017, 12:02, "Roman" wrote: >> >>> Hi. >>> >>>> Why don't we force people to be Honest instead of just being Good? >>> >>> No need to force people when you can force indices: >>> >>>https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Fo >>>rc >>> ing.html >>> >>> With forcing some things are smaller than without it, see e.g. this >>> issue: https://github.com/agda/agda/issues/1676 >> >> >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please send it back to me, and immediately delete it. >> >> Please do not use, copy or disclose the information contained in this >> message or in any attachment. Any views or opinions expressed by the >> author of this email do not necessarily reflect the views of the >> University of Nottingham. >> >> This message has been checked for viruses but the contents of an >> attachment may still contain software viruses which could damage your >> computer system, you are advised to perform your own checks. Email >> communications with the University of Nottingham may be monitored as >> permitted by UK legislation. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From henning at basold.eu Wed Jul 12 14:21:05 2017 From: henning at basold.eu (Henning Basold) Date: Wed, 12 Jul 2017 14:21:05 +0200 Subject: [Agda] parameters vs indices In-Reply-To: References: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> Message-ID: <7c29e5a9-7e0c-6e5b-ec85-3be6c53b4dba@basold.eu> Hi Thorsten, Interesting point! I haven't thought about using Kan extensions here. Would you be so kind to briefly hint at the categories and functors involved? Or is there even a reference for that? Another view on this arises by using that dependent coproducts are left adjoint to substitutions. This allows one to reduce dependent inductive types with indices to initial algebras, see Thm. 4.1 in http://dx.doi.org/10.4204/EPTCS.191.3 Cheers, Henning On 12/07/17 14:14, Thorsten Altenkirch wrote: > Hi Henning, > > this is a good point. What you are doing is using the left Kan extension > to reduce indexed datatypes to parametrized ones. > > Cheers, > Thirsten > > On 12/07/2017, 13:18, "Agda on behalf of Henning Basold" > wrote: > >> Hi Thorsten, >> >> Concerning the difference between parameters and indices: there are none >> in the presence of an equality type in the following sense. Note that in >> the case of indices the codomain of a constructor of a dependent >> inductive type is given by the type that we are constructing plus a >> substitution applied to it. This can equivalently be achieved by using >> parameters, equality constraints and identity substitutions. The >> All-example becomes then >> >> data All {a p} {A : Set a} (P : A ? Set p) (u : List A) : Set p where >> [] : u = [] ? All P u >> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? u = x ? xs ? All P u >> >> So even without indices one can still use inductively defined predicates >> over other types and there is no need to resort to large elimination. >> Though it is clear that the index-based definition is much nicer to work >> with, since it does not require the elimination of identity proofs. >> >> I hate to advertise my work, but you may find a description of inductive >> and coinductive dependent types that only uses _indices_ in >> http://dx.doi.org/10.4204/EPTCS.191.3 (category theoretical approach) >> and in http://dx.doi.org/10.1145/2933575.2934514 (syntactic theory). >> Last year at TYPES'16 I also talked about how this can be turned into a >> theory, in which the identity is not constructible as an inductive type, >> that is based purely on parameters. This allows the axiomatisation of >> the identity type ? la observational type theory. To make such a theory >> conveniently usable, one would have to provide a front-end that allows >> us to still write inductive types like All and translates them into >> types with equality constraints, as I showed above. This is, however, >> all fairly uncharted territory, yet. >> >> My apologies for this shameless self-advertisement... >> >> Cheers, >> Henning >> >> On 11/07/17 12:26, Thorsten Altenkirch wrote: >>> Thank you. Now I remember, this actually allows us to write inductive >>> definitions when we were only able to write recursive ones due to size >>> constraints. The example in your 2nd link shows this nicely: >>> >>> data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where >>> [] : All P [] >>> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) >>> >>> before we were only able to define this by recursion: >>> >>> All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p >>> All' P [] = Lift ? >>> All' P (x ? xs) = P x ? All' P xs >>> >>> >>> which is a bit sad since inductive predicates work often better. >>> >>> I was wondering about the semantics. One way would be to translate >>> forced >>> indices into recursive definitions but aybe there is a more direct way. >>> >>> Thorsten >>> >>> >>> >>> On 11/07/2017, 12:02, "Roman" wrote: >>> >>>> Hi. >>>> >>>>> Why don't we force people to be Honest instead of just being Good? >>>> >>>> No need to force people when you can force indices: >>>> >>>> https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking-Fo >>>> rc >>>> ing.html >>>> >>>> With forcing some things are smaller than without it, see e.g. this >>>> issue: https://github.com/agda/agda/issues/1676 >>> >>> >>> >>> >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please send it back to me, and immediately delete it. >>> >>> Please do not use, copy or disclose the information contained in this >>> message or in any attachment. Any views or opinions expressed by the >>> author of this email do not necessarily reflect the views of the >>> University of Nottingham. >>> >>> This message has been checked for viruses but the contents of an >>> attachment may still contain software viruses which could damage your >>> computer system, you are advised to perform your own checks. Email >>> communications with the University of Nottingham may be monitored as >>> permitted by UK legislation. >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Jul 12 15:35:24 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 12 Jul 2017 13:35:24 +0000 Subject: [Agda] parameters vs indices In-Reply-To: <7c29e5a9-7e0c-6e5b-ec85-3be6c53b4dba@basold.eu> References: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> <7c29e5a9-7e0c-6e5b-ec85-3be6c53b4dba@basold.eu> Message-ID: Hi Henning, I was just observing that this is what you were doing. In this case the category is the index type of the family hence a discrete category. In general if we have P : I -> Set, Q : J -> Set, f : I -> J then Pi i:I . P i -> Q (f i) = Pi j:J . Lan_f P j -> Q j where Lan_f P j = Sigma i:I . f i = j x P i is the left Kan extension of P along f. After some currying you get exactly the constructor form you are looking for. Indeed we observed a while ago that using left Kan extensions you can bring constructors in universal form (you can find this in our paper on indexed containers) but I didn't realize that this was relevant for our current discussion. Thorsten On 12/07/2017, 14:21, "Henning Basold" wrote: >Hi Thorsten, > >Interesting point! I haven't thought about using Kan extensions here. >Would you be so kind to briefly hint at the categories and functors >involved? Or is there even a reference for that? > >Another view on this arises by using that dependent coproducts are left >adjoint to substitutions. This allows one to reduce dependent inductive >types with indices to initial algebras, see Thm. 4.1 in >http://dx.doi.org/10.4204/EPTCS.191.3 > >Cheers, >Henning > >On 12/07/17 14:14, Thorsten Altenkirch wrote: >> Hi Henning, >> >> this is a good point. What you are doing is using the left Kan extension >> to reduce indexed datatypes to parametrized ones. >> >> Cheers, >> Thirsten >> >> On 12/07/2017, 13:18, "Agda on behalf of Henning Basold" >> wrote: >> >>> Hi Thorsten, >>> >>> Concerning the difference between parameters and indices: there are >>>none >>> in the presence of an equality type in the following sense. Note that >>>in >>> the case of indices the codomain of a constructor of a dependent >>> inductive type is given by the type that we are constructing plus a >>> substitution applied to it. This can equivalently be achieved by using >>> parameters, equality constraints and identity substitutions. The >>> All-example becomes then >>> >>> data All {a p} {A : Set a} (P : A ? Set p) (u : List A) : Set p where >>> [] : u = [] ? All P u >>> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? u = x ? xs ? All P u >>> >>> So even without indices one can still use inductively defined >>>predicates >>> over other types and there is no need to resort to large elimination. >>> Though it is clear that the index-based definition is much nicer to >>>work >>> with, since it does not require the elimination of identity proofs. >>> >>> I hate to advertise my work, but you may find a description of >>>inductive >>> and coinductive dependent types that only uses _indices_ in >>> http://dx.doi.org/10.4204/EPTCS.191.3 (category theoretical approach) >>> and in http://dx.doi.org/10.1145/2933575.2934514 (syntactic theory). >>> Last year at TYPES'16 I also talked about how this can be turned into a >>> theory, in which the identity is not constructible as an inductive >>>type, >>> that is based purely on parameters. This allows the axiomatisation of >>> the identity type ? la observational type theory. To make such a theory >>> conveniently usable, one would have to provide a front-end that allows >>> us to still write inductive types like All and translates them into >>> types with equality constraints, as I showed above. This is, however, >>> all fairly uncharted territory, yet. >>> >>> My apologies for this shameless self-advertisement... >>> >>> Cheers, >>> Henning >>> >>> On 11/07/17 12:26, Thorsten Altenkirch wrote: >>>> Thank you. Now I remember, this actually allows us to write inductive >>>> definitions when we were only able to write recursive ones due to size >>>> constraints. The example in your 2nd link shows this nicely: >>>> >>>> data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where >>>> [] : All P [] >>>> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) >>>> >>>> before we were only able to define this by recursion: >>>> >>>> All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p >>>> All' P [] = Lift ? >>>> All' P (x ? xs) = P x ? All' P xs >>>> >>>> >>>> which is a bit sad since inductive predicates work often better. >>>> >>>> I was wondering about the semantics. One way would be to translate >>>> forced >>>> indices into recursive definitions but aybe there is a more direct >>>>way. >>>> >>>> Thorsten >>>> >>>> >>>> >>>> On 11/07/2017, 12:02, "Roman" wrote: >>>> >>>>> Hi. >>>>> >>>>>> Why don't we force people to be Honest instead of just being Good? >>>>> >>>>> No need to force people when you can force indices: >>>>> >>>>> >>>>>https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking- >>>>>Fo >>>>> rc >>>>> ing.html >>>>> >>>>> With forcing some things are smaller than without it, see e.g. this >>>>> issue: https://github.com/agda/agda/issues/1676 >>>> >>>> >>>> >>>> >>>> >>>> This message and any attachment are intended solely for the addressee >>>> and may contain confidential information. If you have received this >>>> message in error, please send it back to me, and immediately delete >>>>it. >>>> >>>> Please do not use, copy or disclose the information contained in this >>>> message or in any attachment. Any views or opinions expressed by the >>>> author of this email do not necessarily reflect the views of the >>>> University of Nottingham. >>>> >>>> This message has been checked for viruses but the contents of an >>>> attachment may still contain software viruses which could damage your >>>> computer system, you are advised to perform your own checks. Email >>>> communications with the University of Nottingham may be monitored as >>>> permitted by UK legislation. >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> >> >> >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please send it back to me, and immediately delete it. >> >> Please do not use, copy or disclose the information contained in this >> message or in any attachment. Any views or opinions expressed by the >> author of this email do not necessarily reflect the views of the >> University of Nottingham. >> >> This message has been checked for viruses but the contents of an >> attachment may still contain software viruses which could damage your >> computer system, you are advised to perform your own checks. Email >> communications with the University of Nottingham may be monitored as >> permitted by UK legislation. >> > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From henning at basold.eu Wed Jul 12 16:07:42 2017 From: henning at basold.eu (Henning Basold) Date: Wed, 12 Jul 2017 16:07:42 +0200 Subject: [Agda] parameters vs indices In-Reply-To: References: <8cb1d116-6af3-e9ca-5e3a-594b3609a3a6@basold.eu> <7c29e5a9-7e0c-6e5b-ec85-3be6c53b4dba@basold.eu> Message-ID: <261d9d35-bfbd-fdd4-ece4-d6fd8f698247@basold.eu> Hi Thorsten, Thank you for the clarification! I actually was not aware that this was already in your indexed container paper. Time to go back and read it again ;) Henning On 12/07/17 15:35, Thorsten Altenkirch wrote: > Hi Henning, > > I was just observing that this is what you were doing. In this case the > category is the index type of the family hence a discrete category. In > general if we have P : I -> Set, Q : J -> Set, f : I -> J then > > Pi i:I . P i -> Q (f i) = Pi j:J . Lan_f P j -> Q j > > where Lan_f P j = Sigma i:I . f i = j x P i is the left Kan extension of P > along f. After some currying you get exactly the constructor form you are > looking for. Indeed we observed a while ago that using left Kan extensions > you can bring constructors in universal form (you can find this in our > paper on indexed containers) but I didn't realize that this was relevant > for our current discussion. > > > Thorsten > > On 12/07/2017, 14:21, "Henning Basold" wrote: > >> Hi Thorsten, >> >> Interesting point! I haven't thought about using Kan extensions here. >> Would you be so kind to briefly hint at the categories and functors >> involved? Or is there even a reference for that? >> >> Another view on this arises by using that dependent coproducts are left >> adjoint to substitutions. This allows one to reduce dependent inductive >> types with indices to initial algebras, see Thm. 4.1 in >> http://dx.doi.org/10.4204/EPTCS.191.3 >> >> Cheers, >> Henning >> >> On 12/07/17 14:14, Thorsten Altenkirch wrote: >>> Hi Henning, >>> >>> this is a good point. What you are doing is using the left Kan extension >>> to reduce indexed datatypes to parametrized ones. >>> >>> Cheers, >>> Thirsten >>> >>> On 12/07/2017, 13:18, "Agda on behalf of Henning Basold" >>> wrote: >>> >>>> Hi Thorsten, >>>> >>>> Concerning the difference between parameters and indices: there are >>>> none >>>> in the presence of an equality type in the following sense. Note that >>>> in >>>> the case of indices the codomain of a constructor of a dependent >>>> inductive type is given by the type that we are constructing plus a >>>> substitution applied to it. This can equivalently be achieved by using >>>> parameters, equality constraints and identity substitutions. The >>>> All-example becomes then >>>> >>>> data All {a p} {A : Set a} (P : A ? Set p) (u : List A) : Set p where >>>> [] : u = [] ? All P u >>>> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? u = x ? xs ? All P u >>>> >>>> So even without indices one can still use inductively defined >>>> predicates >>>> over other types and there is no need to resort to large elimination. >>>> Though it is clear that the index-based definition is much nicer to >>>> work >>>> with, since it does not require the elimination of identity proofs. >>>> >>>> I hate to advertise my work, but you may find a description of >>>> inductive >>>> and coinductive dependent types that only uses _indices_ in >>>> http://dx.doi.org/10.4204/EPTCS.191.3 (category theoretical approach) >>>> and in http://dx.doi.org/10.1145/2933575.2934514 (syntactic theory). >>>> Last year at TYPES'16 I also talked about how this can be turned into a >>>> theory, in which the identity is not constructible as an inductive >>>> type, >>>> that is based purely on parameters. This allows the axiomatisation of >>>> the identity type ? la observational type theory. To make such a theory >>>> conveniently usable, one would have to provide a front-end that allows >>>> us to still write inductive types like All and translates them into >>>> types with equality constraints, as I showed above. This is, however, >>>> all fairly uncharted territory, yet. >>>> >>>> My apologies for this shameless self-advertisement... >>>> >>>> Cheers, >>>> Henning >>>> >>>> On 11/07/17 12:26, Thorsten Altenkirch wrote: >>>>> Thank you. Now I remember, this actually allows us to write inductive >>>>> definitions when we were only able to write recursive ones due to size >>>>> constraints. The example in your 2nd link shows this nicely: >>>>> >>>>> data All {a p} {A : Set a} (P : A ? Set p) : List A ? Set p where >>>>> [] : All P [] >>>>> _?_ : ? {x xs} (px : P x) (pxs : All P xs) ? All P (x ? xs) >>>>> >>>>> before we were only able to define this by recursion: >>>>> >>>>> All' : ? {a p}{A : Set a} (P : A ? Set p) ? List A ? Set p >>>>> All' P [] = Lift ? >>>>> All' P (x ? xs) = P x ? All' P xs >>>>> >>>>> >>>>> which is a bit sad since inductive predicates work often better. >>>>> >>>>> I was wondering about the semantics. One way would be to translate >>>>> forced >>>>> indices into recursive definitions but aybe there is a more direct >>>>> way. >>>>> >>>>> Thorsten >>>>> >>>>> >>>>> >>>>> On 11/07/2017, 12:02, "Roman" wrote: >>>>> >>>>>> Hi. >>>>>> >>>>>>> Why don't we force people to be Honest instead of just being Good? >>>>>> >>>>>> No need to force people when you can force indices: >>>>>> >>>>>> >>>>>> https://hackage.haskell.org/package/Agda-2.5.2/docs/Agda-TypeChecking- >>>>>> Fo >>>>>> rc >>>>>> ing.html >>>>>> >>>>>> With forcing some things are smaller than without it, see e.g. this >>>>>> issue: https://github.com/agda/agda/issues/1676 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> This message and any attachment are intended solely for the addressee >>>>> and may contain confidential information. If you have received this >>>>> message in error, please send it back to me, and immediately delete >>>>> it. >>>>> >>>>> Please do not use, copy or disclose the information contained in this >>>>> message or in any attachment. Any views or opinions expressed by the >>>>> author of this email do not necessarily reflect the views of the >>>>> University of Nottingham. >>>>> >>>>> This message has been checked for viruses but the contents of an >>>>> attachment may still contain software viruses which could damage your >>>>> computer system, you are advised to perform your own checks. Email >>>>> communications with the University of Nottingham may be monitored as >>>>> permitted by UK legislation. >>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>> >>> >>> >>> >>> >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please send it back to me, and immediately delete it. >>> >>> Please do not use, copy or disclose the information contained in this >>> message or in any attachment. Any views or opinions expressed by the >>> author of this email do not necessarily reflect the views of the >>> University of Nottingham. >>> >>> This message has been checked for viruses but the contents of an >>> attachment may still contain software viruses which could damage your >>> computer system, you are advised to perform your own checks. Email >>> communications with the University of Nottingham may be monitored as >>> permitted by UK legislation. >>> >> > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please send it back to me, and immediately delete it. > > Please do not use, copy or disclose the information contained in this > message or in any attachment. Any views or opinions expressed by the > author of this email do not necessarily reflect the views of the > University of Nottingham. > > This message has been checked for viruses but the contents of an > attachment may still contain software viruses which could damage your > computer system, you are advised to perform your own checks. Email > communications with the University of Nottingham may be monitored as > permitted by UK legislation. > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Thu Jul 13 20:00:42 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 13 Jul 2017 21:00:42 +0300 Subject: [Agda] updating pull request Message-ID: <1499968842.2373.29.camel@one.mechvel.pereslavl.ru> Dear library maintainers, I have a pull request for Standard library on https://github.com/mechvel/agda-stdlib Changed are CHANGELOG.md and five .agda files. Now I need to update these 6 files with certain improvements, and it is desirable to update them in-place. I have edited these files on my machine in the clone folder ~/agda/stLib/stdlib-clone/ -- this place correponds by git to https://github.com/mechvel/agda-stdlib I skip the "git clone ..." command, because it has been done once. Now I command > make test > git add CHANGELOG.md > etc, adding 5 further files > git commit # On branch master # Your branch and 'origin/master' have diverged, # and have 2 and 1 different commit(s) each, respectively. # # Untracked files: ... nothing added to commit but untracked files present (use "git add" to track) > git push origin master Username: ... Password: ... ----------------------- To https://github.com/mechvel/agda-stdlib ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/mechvel/agda-stdlib' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. ----------------- > git pull reports of merge conflicts for 6 files. Please, how to fix? Thanks, ------ Sergei From publicityifl at gmail.com Thu Jul 13 22:13:48 2017 From: publicityifl at gmail.com (publicityifl at gmail.com) Date: Thu, 13 Jul 2017 20:13:48 +0000 Subject: [Agda] 2nd CfP: IFL 2017 (29th Symposium on Implementation and Application of Functional Languages) Message-ID: <94eb2c14a2220caa1a0554389230@google.com>
Hello,

Please, find below the second call for papers for IFL 2017.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.

best regards,
Jurriaan Hage
Publicity Chair of IFL

---

IFL 2017 - CALL FOR PAPERS
==========================

29th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES
========================================================================

University of Bristol, UK

In cooperation with ACM SIGPLAN

Wednesday 30 August - Friday 1 September, 2017

http://iflconference.org/

Scope
-----

The goal of the IFL symposia is to bring together researchers actively engaged
in the implementation and application of functional and function-based
programming languages. IFL 2017 will be a venue for researchers to present and
discuss new ideas and concepts, work in progress, and publication-ripe results
related to the implementation and application of functional languages and
function-based programming.

Peer-review
-----------

Following the IFL tradition, IFL 2017 will use a post-symposium review process
to produce the formal proceedings. All participants of IFL 2017 are invited to
submit either a draft paper or an extended abstract describing work to be
presented at the symposium. At no time may work submitted to IFL be
simultaneously submitted to other venues; submissions must adhere to ACM
SIGPLAN's republication policy:

http://www.sigplan.org/Resources/Policies/Republication

The submissions will be screened by the program committee chair to make sure
they are within the scope of IFL, and will appear in the draft proceedings
distributed at the symposium. Submissions appearing in the draft proceedings
are not peer-reviewed publications. Hence, publications that appear only in the
draft proceedings are not subject to the ACM SIGPLAN republication policy.
After the symposium, authors will be given the opportunity to incorporate the
feedback from discussions at the symposium and will be invited to submit a
revised full article for the formal review process. From the revised
submissions, the program committee will select papers for the formal
proceedings considering their correctness, novelty, originality, relevance,
significance, and clarity. The formal proceedings will appear in the
International Conference Proceedings Series of the ACM Digital Library.

Important dates
---------------

Mon 31 July???? 2017 : Submission deadline draft papers
Wed? 2 August?? 2017 : Notification of acceptance for presentation
Fri? 4 August?? 2017 : Early registration deadline
Fri 11 August?? 2017 : Late registration deadline
Mon 21 August?? 2017 : Submission deadline for pre-symposium proceedings
Wed 30 August?? 2017 - Fri 1 September 2017 : IFL Symposium
Mon? 4 December 2017 : Submission deadline for post-symposium proceedings
Wed 31 January? 2018 : Notification of acceptance for post-symposium proceedings
Mon 12 March??? 2018 : Camera-ready version for post-symposium proceedings

Submission details
------------------

Prospective authors are encouraged to submit papers or extended abstracts to be
published in the draft proceedings and to present them at the symposium. All
contributions must be written in English. Papers must use the new ACM two
columns conference format, which can be found at:

http://www.acm.org/publications/proceedings-template

For the pre-symposium proceedings we adopt a 'weak' page limit of 12 pages. For
the post-symposium proceedings the page limit of 12 pages is firm.

Authors submit through EasyChair:

https://easychair.org/conferences/?conf=ifl2017

Topics
------

IFL welcomes submissions describing practical and theoretical work as well as
submissions describing applications and tools in the context of functional
programming. If you are not sure whether your work is appropriate for IFL 2017,
please contact the PC chair at nicolas.wu at bristol.ac.uk. Topics of interest include,
but are not limited to:

- language concepts
- type systems, type checking, type inferencing
- compilation techniques
- staged compilation
- run-time function specialization
- run-time code generation
- partial evaluation
- (abstract) interpretation
- metaprogramming
- generic programming
- automatic program generation
- array processing
- concurrent/parallel programming
- concurrent/parallel program execution
- embedded systems
- web applications
- (embedded) domain specific languages
- security
- novel memory management techniques
- run-time profiling performance measurements
- debugging and tracing
- virtual/abstract machine architectures
- validation, verification of functional programs
- tools and programming techniques
- (industrial) applications

Peter Landin Prize
------------------

The Peter Landin Prize is awarded to the best paper presented at the symposium
every year. The honored article is selected by the program committee based on
the submissions received for the formal review process. The prize carries a
cash award equivalent to 150 Euros.

Programme committee
-------------------

Chair: Nicolas Wu, University of Bristol, UK

- Kenichi Asai, Ochanomizu University, Japan
- Sandrine Blazy, University of Rennes 1, France
- Carlos Camarao, Universidade Federal de Minas Gerais, Brazil
- Stephen Dolan, University of Cambridge, UK
- Jurriaan Hage, Utrecht University, Netherlands
- Yukiyoshi Kameyama, University of Tsukuba, Japan
- Benjamin Lerner, Brown University, USA
- Bas Lijnse, Radboud University, Netherlands
- Garrett Morris, University of Kansas, USA
- Miguel Pagano, Universidad Nacional de C??rdoba, Argentina
- Tomas Petricek, Alan Turing Institute, UK
- Maciej Pir??g, University of Wroclaw, Poland
- Exequiel Rivas, Universidad Nacional de Rosario, Argentina
- Neil Sculthorpe, Nottingham Trent University, UK
- Melinda Toth, Eotvos Lorand University, Hungary
- Phil Trinder, Glasgow University, UK
- Kanae Tsushima, National Institute of Informatics, Japan
- Marcos Viera, Universidad de la Republica, Uruguay
- Meng Wang, University of Kent, UK

Venue
-----

The IFL 2017 will be held in association with the Department of
Computer Science, University of Bristol, UK. Bristol is located in
South West England, and can be easily reached from Bristol Airport.
See the website for more information on the venue.

 

powered by GSM. Free mail merge and email marketing software for Gmail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.tabareau at inria.fr Wed Jul 12 14:36:23 2017 From: nicolas.tabareau at inria.fr (nicolas tabareau) Date: Wed, 12 Jul 2017 14:36:23 +0200 Subject: [Agda] Postdoc positions available for ERC "CoqHoTT" Message-ID: I am pleased to announce the availability of 1 or 2 postdoc positions for the project "CoqHoTT: Coq for Homotopy Type Theory", funded by an ERC Starting Grant. Expected start: between October 2017 and March 2018. This 5-year project concerns the development of a new generation of proof assistants based on the fascinating connection between homotopy theory and type theory. The different axes of the project are described at http://coqhott.gforge.inria.fr/ I am seeking exceptional candidates who are interested (and who preferably have a proven track record) in one or more of the following topics: - Homotopy Type Theory - Interactive Theorem Proving in Coq, Agda or Lean - Development of (part of) a proof assistant, or its extensions. Successful applicants will join the Inria Gallinette Team, led by me, at Inria, Nantes. The financial conditions of the post-doc are standard Inria conditions. Previous postdocs in the project have included Pierre-Marie P?drot, Benedikt Ahrens (ending in september 2017) and Eric Finster (still in the project). *Application deadline*: Sept 15. If you are interested in joining the CoqHoTT team and want to learn more about the project, please contact me directly at nicolas.tabareau at inria.fr. To apply for a postdoc position, please send me a CV, research statement, and list of references. For further information, see the project web page at: http://coqhott.gforge.inria.fr/ Best regards, Nicolas Tabareau -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Tue Jul 18 07:10:14 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 18 Jul 2017 08:10:14 +0300 Subject: [Agda] =?utf-8?q?=E2=8A=A5-elim_and_proof_duplication=2E_Is_there?= =?utf-8?q?_another_way=3F?= Message-ID: Consider this example : ``` module test where open import Data.Empty open import Relation.Binary.PropositionalEquality open import Relation.Nullary data A : Set where a1 a2 : A data B : A ? Set where b1 : B a1 data C : ?{a} ? B a ? Set where c : ?{a} ? {b : B a} ? C b fun : ? (B a2) fun () gun : (a : A) ? (b : B a) ? C b gun a1 b = c gun a2 b = ?-elim (fun b) run : (a : A) ? (b : B a) ? gun a b ? c run a1 b = refl run a2 b = ?-elim (fun b) ``` For the run function, I have to provide the same proof that I gave in the gun function. If the proof is big, then it becomes cumbersome and it increases the complexity of the code. Is there a way to not do that? Keep in mind that in this example, we could avoid ?-elim, we could simply case split on b. I am referring to the cases where we cannot avoid ?-elim. -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity at googlemail.com Tue Jul 18 23:33:35 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Tue, 18 Jul 2017 14:33:35 -0700 Subject: [Agda] Call for Participation: ICFP 2017 Message-ID: <596e7eaf2404d_602d3fdee4455be8674ae@landin.local.mail> [ Early registration ends 4 August. ] ===================================================================== Call for Participation ICFP 2017 22nd ACM SIGPLAN International Conference on Functional Programming and affiliated events September 3 - September 9, 2017 Oxford, UK http://icfp17.sigplan.org/ ===================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. A full week dedicated to functional programming: ICFP, 2 co-hosted conferences, 1 co-hosted symposium, workshops, tutorials, programming contest results, student research competition, and mentoring workshop * Overview and affiliated events: http://icfp17.sigplan.org/home * Program: http://icfp17.sigplan.org/program/program-icfp-2017 * Accepted papers: http://icfp17.sigplan.org/track/icfp-2017-papers * Registration is available via: https://regmaster4.com/2017conf/ICFP17/register.php Early registration is due 4 August, 2016. * Programming contest, 4-7 August, 2016: http://2017.icfpcontest.org * Student Research Competition: http://icfp17.sigplan.org/track/icfp-2017-Student-Research-Competition * Follow @icfp_conference on twitter for the latest news: http://twitter.com/icfp_conference There are several events affiliated with ICFP: Sunday, September 3 Workshop on Higher-order Programming with Effects Workshop on Type-Driven Development Scheme and Functional Programming Workshop Programming Languages Mentoring Workshop ICFP Tutorials Monday, September 4 ? Wednesday, September 6 ICFP FSCD - Days 1-3 Thursday, September 7 Haskell Symposium ? Day 1 ML Family Workshop Workshop on Functional High-Performance Computing Commercial Users of Functional Programming ? Day 1 FSCD - Day 4 Friday, September 8 Haskell Symposium ? Day 2 OCaml Workshop Erlang Workshop Commercial Users of Functional Programming ? Day 2 Saturday, September 9 Commercial Users of Functional Programming ? Day 3 Haskell Implementors Workshop Functional Art, Music, Modeling and Design Conference Organizers: General Chair: Jeremy Gibbons (University of Oxford, UK) Program Chair: Mark Jones (Portland State University, USA) Artifact Evaluation Co-Chair: Matthew Flatt (University of Utah, USA) Artifact Evaluation Co-Chair: Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Ryan Trinkle (Obsidian Systems LLC, USA) PLMW Co-Chair: Neelakantan R. Krishnawami (University of Cambridge, UK) PLMW Co-Chair: Dan Licata (Wesleyan University, USA) PLMW Co-Chair: Brigitte Pientka (McGill University, Canada) Programming Contest Organiser: Sam Lindley (University of Edinburgh, UK) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Student Volunteer Co-Captain: Yosuke Fukuda (Kyoto University, Japan) Student Volunteer Co-Captain: Yuki Nishida (Kyoto University, Japan) Student Volunteer Co-Captain: Jakub Zalewski (University of Edinburgh, UK) Video Chair: Jose Calderon (Galois, Inc., USA) Workshops Co-Chair: Andres L?h (Well-Typed LLP, UK) Workshops Co-Chair: David Christiansen (Indiana University, USA) Sponsors and industrial partners: Platinum partners Ahrefs Jane Street Capital Gold partners Bloomberg X Silver partners Galois Oracle Bronze partners Obsidian Systems Portland State University Well-Typed From kovacsahun at hotmail.com Wed Jul 19 16:12:41 2017 From: kovacsahun at hotmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 19 Jul 2017 16:12:41 +0200 Subject: [Agda] Why does unification work here? Message-ID: Hi, I don't understand why type inference is able to fill the "_" in the example below: {-# OPTIONS --type-in-type #-} Eq : ? {A} ? A ? A ? Set Eq {A} x y = (P : A ? Set) ? P x ? P y trans : ? A x y z ? Eq {A} x y ? Eq y z ? Eq x z trans A x y z p q P px = q P (p _ px) My understanding is that first we get a new "? [A, x, y, z, p, q, P, px]" meta for the underscore, then attempt to solve "? [A, x, y, z, p, q, P, px] x = P x", which is non-linear in "x", so it should fail. It doesn't actually fail in Agda 2.5.2. It works in Coq, but there is a reference to "tail removal" of equations in page 8 of here which justifies it. Also, there is a similar situation in Agda which has similar non-linearity but doesn't get inferred, as I would expect. foo : (A : Set) (x : A) ? ((P : A ? Set) ? P x) ? (P : A ? Set) ? P x foo A x f P = f _ Thanks, Andr?s Kov?cs -------------- next part -------------- An HTML attachment was scrubbed... URL: From kovacsahun at hotmail.com Wed Jul 19 16:12:41 2017 From: kovacsahun at hotmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 19 Jul 2017 16:12:41 +0200 Subject: [Agda] Why does unification work here? Message-ID: Hi, I don't understand why type inference is able to fill the "_" in the example below: {-# OPTIONS --type-in-type #-} Eq : ? {A} ? A ? A ? Set Eq {A} x y = (P : A ? Set) ? P x ? P y trans : ? A x y z ? Eq {A} x y ? Eq y z ? Eq x z trans A x y z p q P px = q P (p _ px) My understanding is that first we get a new "? [A, x, y, z, p, q, P, px]" meta for the underscore, then attempt to solve "? [A, x, y, z, p, q, P, px] x = P x", which is non-linear in "x", so it should fail. It doesn't actually fail in Agda 2.5.2. It works in Coq, but there is a reference to "tail removal" of equations in page 8 of here which justifies it. Also, there is a similar situation in Agda which has similar non-linearity but doesn't get inferred, as I would expect. foo : (A : Set) (x : A) ? ((P : A ? Set) ? P x) ? (P : A ? Set) ? P x foo A x f P = f _ Thanks, Andr?s Kov?cs -------------- next part -------------- An HTML attachment was scrubbed... URL: From calderon at fing.edu.uy Wed Jul 19 17:23:48 2017 From: calderon at fing.edu.uy (Guillermo Calderon) Date: Wed, 19 Jul 2017 12:23:48 -0300 Subject: [Agda] =?utf-8?q?=E2=8A=A5-elim_and_proof_duplication=2E_Is_there?= =?utf-8?q?_another_way=3F?= In-Reply-To: References: Message-ID: Hi, You can define a higher order function like this: ``` from-a1 : ?{S : (a : A)? B a ? Set} ? (B a1 ? S a1 b1) ? (a : A) ? (b : B a) ? S a b from-a1 f a1 b1 = f b1 from-a1 _ a2 b = ?-elim (fun b) ``` Then, you define run and gun this way: ``` gun : (a : A) ? (b : B a) ? C b gun = from-a1 ? _ ? c run : (a : A) ? (b : B a) ? gun a b ? c run = from-a1 ? _ ? refl ``` By the way, for this minimal example, there is a better solution: run : (a : A) ? (b : B a) ? gun a b ? c run .a1 b1 = refl ---------- Guillermo On 18/07/17 02:10, Apostolis Xekoukoulotakis wrote: > Consider this example : > > ``` > module test where > > open import Data.Empty > open import Relation.Binary.PropositionalEquality > open import Relation.Nullary > > > data A : Set where > a1 a2 : A > > data B : A ? Set where > b1 : B a1 > > data C : ?{a} ? B a ? Set where > c : ?{a} ? {b : B a} ? C b > > fun : ? (B a2) > fun () > > > gun : (a : A) ? (b : B a) ? C b > gun a1 b = c > gun a2 b = ?-elim (fun b) > > > run : (a : A) ? (b : B a) ? gun a b ? c > run a1 b = refl > run a2 b = ?-elim (fun b) > ``` > > For the run function, I have to provide the same proof that I gave in > the gun function. > If the proof is big, then it becomes cumbersome and it increases the > complexity of the code. > > Is there a way to not do that? > > Keep in mind that in this example, we could avoid ?-elim, we could > simply case split on b. I am referring to the cases where we cannot > avoid ?-elim. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From abela at chalmers.se Wed Jul 19 18:24:19 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 19 Jul 2017 18:24:19 +0200 Subject: [Agda] Why does unification work here? In-Reply-To: References: Message-ID: <4f3b36e0-19ce-04d4-e1c0-f2aa3779a88e@chalmers.se> Hi Andr?s, On 19.07.2017 16:12, Andr?s Kov?cs wrote: > I don't understand why type inference is able to fill the "_" in the > example below: > > {-# OPTIONS --type-in-type #-} > > Eq : ? {A} ? A ? A ? Set > Eq {A} x y = (P : A ? Set) ? P x ? P y > > trans : ? A x y z ? Eq {A} x y ? Eq y z ? Eq x z > trans A x y z p q P px = q P (p _ px) > > My understanding is that first we get a new "? [A, x, y, z, p, q, P, > px]" meta for the underscore, That's correct. > then attempt to solve "? [A, x, y, z, p, q, P, px] x = P x", > which is non-linear in "x", so it should fail. It > doesn't actually fail in Agda 2.5.2. Mmh, let's see. We have q P (p alpha px) : P z thus, we get the ascribed type p alpha px : P y (1) at the same time, we get the inferred types p alpha : alpha x -> alpha y px : P x (2) This will give us two constraints alpha y = P y (from 1) alpha x = P x (from 2) As you observe correctly, the second constraint does not allow us to solve for alpha, because of non-linearity, but the first does (validating the second constraint). > Also, there is a similar situation in Agda which has similar > non-linearity but doesn't get inferred, as I would expect. > > foo : (A : Set) (x : A) ? ((P : A ? Set) ? P x) ? (P : A ? Set) ? P x > foo A x f P = f _ Here, we only get the non-linear constraint, thus, Agda is stuck. Best, Andreas -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From kovacsahun at hotmail.com Wed Jul 19 19:47:53 2017 From: kovacsahun at hotmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 19 Jul 2017 19:47:53 +0200 Subject: [Agda] Why does unification work here? In-Reply-To: <4f3b36e0-19ce-04d4-e1c0-f2aa3779a88e@chalmers.se> References: <4f3b36e0-19ce-04d4-e1c0-f2aa3779a88e@chalmers.se> Message-ID: > > alpha y = P y (from 1) > alpha x = P x (from 2) Aren't these both non-linear, respectively in "y" and "x"? I think it works because we prune the left side of one equation and postpone it, which makes the second equation linear, and then solve the postponed one. 2017-07-19 18:24 GMT+02:00 Andreas Abel : > Hi Andr?s, > On 19.07.2017 16:12, Andr?s Kov?cs wrote: > >> I don't understand why type inference is able to fill the "_" in the >> example below: >> >> {-# OPTIONS --type-in-type #-} >> >> Eq : ? {A} ? A ? A ? Set >> Eq {A} x y = (P : A ? Set) ? P x ? P y >> >> trans : ? A x y z ? Eq {A} x y ? Eq y z ? Eq x z >> trans A x y z p q P px = q P (p _ px) >> >> My understanding is that first we get a new "? [A, x, y, z, p, q, P, px]" >> meta for the underscore, >> > > That's correct. > > then attempt to solve "? [A, x, y, z, p, q, P, px] x = P x", > which is >> non-linear in "x", so it should fail. It >> doesn't actually fail in Agda 2.5.2. >> > > Mmh, let's see. We have > > q P (p alpha px) : P z > > thus, we get the ascribed type > > p alpha px : P y (1) > > at the same time, we get the inferred types > > p alpha : alpha x -> alpha y > px : P x (2) > > This will give us two constraints > > alpha y = P y (from 1) > alpha x = P x (from 2) > > As you observe correctly, the second constraint does not allow us to solve > for alpha, because of non-linearity, but the first does (validating the > second constraint). > > Also, there is a similar situation in Agda which has similar non-linearity >> but doesn't get inferred, as I would expect. >> >> foo : (A : Set) (x : A) ? ((P : A ? Set) ? P x) ? (P : A ? Set) ? P x >> foo A x f P = f _ >> > > Here, we only get the non-linear constraint, thus, Agda is stuck. > > Best, > Andreas > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vassena at chalmers.se Wed Jul 19 21:08:43 2017 From: vassena at chalmers.se (Marco Vassena) Date: Wed, 19 Jul 2017 19:08:43 +0000 Subject: [Agda] Fixpoint in Agda Message-ID: Hello, Does Agda currently support fixpoint computations? I am particularly interested in computing the least fixpoint via Ascending Chain Condition (ACC), for the purpose of verified program analysis. Could you point me to existing work, if there is any? Best, Marco Vassena From abela at chalmers.se Wed Jul 19 23:02:14 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 19 Jul 2017 23:02:14 +0200 Subject: [Agda] Why does unification work here? In-Reply-To: References: <4f3b36e0-19ce-04d4-e1c0-f2aa3779a88e@chalmers.se> Message-ID: <446a4bf4-7a05-e30b-0367-35896e791714@chalmers.se> On 19.07.2017 19:47, Andr?s Kov?cs wrote: > alpha y = P y (from 1) > alpha x = P x (from 2) > > Aren't these both non-linear, respectively in "y" and "x"? I think it > works because we prune the left side of one equation and postpone it, > which makes the second equation linear, and then solve the postponed one. Indeed, you are right. We can prune away all the context dependencies from alpha, and end up with *literally* these two equations, which are trivial. You can watch Agda pruning with {-# OPTIONS -v tc.meta.kill:100 #-} attempting kills m' = _1 xs = [P, x] vs = [A, x, y, z, p, q, P, px, x] kills = [True,False,True,True,True,True,False,True,False] after kill analysis metavar = _P_1 kills = [True,False,True,True,True,True,False,True,False] kills' = [ru(False),ru(False),ru(True),ru(True),ru(True),ru(True),ru(False),ru(True),ru(False)] oldType = ((A? : Set) (x? y? z? : A?) (p? : Eq A? x? y?) (q? : Eq A? y? z?) (P? : A? ? Set) (px? : P? x?) ? A? ? Set) newType = ((A? : Set) ? A? ? (A? ? Set) ? A? ? Set) actual killing new meta: _2 kills : [ru(False),ru(False),ru(True),ru(True),ru(True),ru(True),ru(False),ru(True),ru(False)] inst : _1 := (_P_2 @8 A q px) That prunes away "y" amongst other context dependencies, making the constraint alpha[...] y = P y linear. I implemented this "if-you-cannot-solve-at-least-try-to-prune" sometimes in 2011, it goes beyond what is described in Andreas Abel, Brigitte Pientka: Higher-Order Dynamic Pattern Unification for Dependent Types and Records. TLCA 2011: 10-26 Thanks for bringing up a nice application for this technique. Best, Andreas > 2017-07-19 18:24 GMT+02:00 Andreas Abel >: > > Hi Andr?s, > On 19.07.2017 16:12, Andr?s Kov?cs wrote: > > I don't understand why type inference is able to fill the "_" in > the example below: > > {-# OPTIONS --type-in-type #-} > > Eq : ? {A} ? A ? A ? Set > Eq {A} x y = (P : A ? Set) ? P x ? P y > > trans : ? A x y z ? Eq {A} x y ? Eq y z ? Eq x z > trans A x y z p q P px = q P (p _ px) > > My understanding is that first we get a new "? [A, x, y, z, p, > q, P, px]" meta for the underscore, > > > That's correct. > > then attempt to solve "? [A, x, y, z, p, q, P, px] x = P x", > > which is non-linear in "x", so it should fail. It > doesn't actually fail in Agda 2.5.2. > > > Mmh, let's see. We have > > q P (p alpha px) : P z > > thus, we get the ascribed type > > p alpha px : P y (1) > > at the same time, we get the inferred types > > p alpha : alpha x -> alpha y > px : P x (2) > > This will give us two constraints > > alpha y = P y (from 1) > alpha x = P x (from 2) > > As you observe correctly, the second constraint does not allow us to > solve for alpha, because of non-linearity, but the first does > (validating the second constraint). > > Also, there is a similar situation in Agda which has similar > non-linearity but doesn't get inferred, as I would expect. > > foo : (A : Set) (x : A) ? ((P : A ? Set) ? P x) ? (P : A ? Set) > ? P x > foo A x f P = f _ > > > Here, we only get the non-linear constraint, thus, Agda is stuck. > > Best, > Andreas > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Thu Jul 20 10:27:10 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 20 Jul 2017 11:27:10 +0300 Subject: [Agda] =?utf-8?q?=E2=8A=A5-elim_and_proof_duplication=2E_Is_there?= =?utf-8?q?_another_way=3F?= In-Reply-To: References: Message-ID: This is a nice trick. I am concerned about two things though. We cannot use this technique selectively to specific functions, because we do not know a priori whether we will create a function like 'run'. Doing this for all functions that use '?-elim' might be possible if it didn't make the code difficult to read/ didn't take too much time to implement. My function has 21 cases with '?-elim' and many other cases. I could create a 'view' type of the input that does not result into '?-elim', and then perform your trick. That would work.I am still unsure whether it is worth it. On Wed, Jul 19, 2017 at 6:23 PM, Guillermo Calderon wrote: > > Hi, > > You can define a higher order function like this: > > ``` > from-a1 : ?{S : (a : A)? B a ? Set} > ? (B a1 ? S a1 b1) > ? (a : A) ? (b : B a) ? S a b > from-a1 f a1 b1 = f b1 > from-a1 _ a2 b = ?-elim (fun b) > ``` > > Then, you define run and gun this way: > > ``` > gun : (a : A) ? (b : B a) ? C b > gun = from-a1 ? _ ? c > > run : (a : A) ? (b : B a) ? gun a b ? c > run = from-a1 ? _ ? refl > ``` > > By the way, for this minimal example, there is a better solution: > > run : (a : A) ? (b : B a) ? gun a b ? c > run .a1 b1 = refl > > ---------- > Guillermo > > > > On 18/07/17 02:10, Apostolis Xekoukoulotakis wrote: > >> Consider this example : >> >> ``` >> module test where >> >> open import Data.Empty >> open import Relation.Binary.PropositionalEquality >> open import Relation.Nullary >> >> >> data A : Set where >> a1 a2 : A >> >> data B : A ? Set where >> b1 : B a1 >> >> data C : ?{a} ? B a ? Set where >> c : ?{a} ? {b : B a} ? C b >> >> fun : ? (B a2) >> fun () >> >> >> gun : (a : A) ? (b : B a) ? C b >> gun a1 b = c >> gun a2 b = ?-elim (fun b) >> >> >> run : (a : A) ? (b : B a) ? gun a b ? c >> run a1 b = refl >> run a2 b = ?-elim (fun b) >> ``` >> >> For the run function, I have to provide the same proof that I gave in >> the gun function. >> If the proof is big, then it becomes cumbersome and it increases the >> complexity of the code. >> >> Is there a way to not do that? >> >> Keep in mind that in this example, we could avoid ?-elim, we could >> simply case split on b. I am referring to the cases where we cannot >> avoid ?-elim. >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jannis at limperg.de Thu Jul 20 17:11:37 2017 From: jannis at limperg.de (Jannis Limperg) Date: Thu, 20 Jul 2017 11:11:37 -0400 Subject: [Agda] Fixpoint in Agda In-Reply-To: References: Message-ID: <5f97d30e-f419-7b08-5d71-44b5e0aa9ea9@limperg.de> > I am particularly interested in computing the least fixpoint via Ascending Chain Condition (ACC), > for the purpose of verified program analysis. The standard technique for encoding non-structural fixpoints in type theory uses a descending chains condition: You'll define a well-founded ordering (that is, a relation < such that there is no infinite descending chain x1 > x2 > ...) and prove your functions decreasing on that ordering <. This is formalised in Agda's standard library, specifically Induction.WellFounded [1]. Unfortunately, it's a little hard to see what's going on there due to some of the abstractions used. If you can read Coq, you can take a look at its version [2], which is more direct but otherwise works exactly the same way. Searching for 'well-founded induction/recursion' will point you towards more resources. Cheers, Jannis [1] https://github.com/agda/agda-stdlib/blob/master/src/Induction/WellFounded.agda [2] https://coq.inria.fr/library/Coq.Init.Wf.html From igorzsci at gmail.com Mon Jul 24 10:32:48 2017 From: igorzsci at gmail.com (v0id_NULL) Date: Mon, 24 Jul 2017 18:32:48 +1000 Subject: [Agda] Some problems with K-S basis Message-ID: Dear list, Help me, please. I try to deal with combinatory logic via Agda, but I have some problems with defining of K-combinator. If I define K and S combinators like this K : {a b : _} ? {A : Set a} ? {B : Set b} ? A ? B ? A K x _ = x S : {a b c : _} ? {A : Set a} ? {B : Set b} ? {C : Set c} ? (A ? B ? C) ? (A ? B) ? A ? C S x y z = x z (y z) this leads to that Agda can not solve some constrains in this definition of I-combinator I : {? : _} ? {A : Set ?} ? A ? A I = S K K Agda needs in prompt of this implicit argument I = S K (K {_} {_} {_} {?}) but I don't know how to do this, because it doesn't matter (the second explicit argument of K is discarded by definition). But if I define K-combinaor like this K : {a : _} ? {A : Set a} ? A ? {b : _} ? {B : Set b} ? B ? A K x _ = x this leads to that Agda fails to type-check this definition of I-combinator I : {? : _} ? {A : Set ?} ? A ? A I = S K K with report containing: "...because this would result in an invalid use of Set?..." How I must to define S-K basis, enough right to define complex combinators with applicative by like (K K), (S (K S) K) and so on? Generaly, tell me, please, is it good idea to implement something like combinatory logic via Agda? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Jul 24 13:22:41 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 24 Jul 2017 14:22:41 +0300 Subject: [Agda] Some problems with K-S basis In-Reply-To: References: Message-ID: <1500895361.2838.47.camel@one.mechvel.pereslavl.ru> On Mon, 2017-07-24 at 18:32 +1000, v0id_NULL wrote: > Dear list, > Help me, please. I try to deal with combinatory logic via Agda, but I > have some problems with defining of K-combinator. If I define K and S > combinators like this > > > K : {a b : _} ? {A : Set a} ? {B : Set b} ? A ? B ? A > K x _ = x > > > S : {a b c : _} ? {A : Set a} ? {B : Set b} ? {C : Set c} ? (A ? B ? > C) ? (A ? B) ? A ? C > S x y z = x z (y z) > > > this leads to that Agda can not solve some constrains in this > definition of I-combinator > > > I : {? : _} ? {A : Set ?} ? A ? A > I = S K K > I am not sure, but I suspect that if we represent the combinators as Agda functions of types like (A ? B ? A), (A ? B ? C) ? (A ? B) ? A ? C), and such, this will mean that Agda is required to assign correct types to the algorithms representing combinators. But is this at all possible? Can Agda correctly assign a type to the Y combinator, if combinators are expressed as the above functions? Can anybody, please, make it clear? I see the following safe construct: ----------------------------------------------------- open import Function using (case_of_) open import Relation.Binary using (Rel) open import Data.Maybe using (Maybe; just; nothing) data KS-term : Set where K : KS-term S : KS-term app : KS-term ? KS-term ? KS-term -- application I : KS-term -- I combinator I = app (app S K) K step : KS-term ? Maybe KS-term -- one step of evaluation step (app (app K x) _) = just x step (app (app (app S x) y) z) = just (app (app x z) (app y z)) step t = nothing -- t is in normal form -------------------------------------------------------------------- (I do not recall now, are the K-S things correctly written?). {- this must not terminate, for some arguments: evaluate : KS-term ? KS-term evaluate t = case step t of \ { nothing ? t ; (just u) ? evaluate u } -} > Generaly, tell me, please, is it good idea to implement something like > combinatory logic via Agda? > Also it is possible to express in Agda the equivalence relation _=ks_ for (s t : KS-term). t =ks u when there are given the sequences steps1 and steps2 of steps like `step' above, such that applying steps1 to t yields the same term as applying steps2 to u. And may be, a step needs to be applied to a subterm, not necessarily at top. In this model, one could develop some prover that would solve equivalence of functional programs (in untyped model, though) for easy examples, and would fail in complex cases. How to bring there typed combinators, typed lambdas, I do not know. May be, people can explain. Also, may be, there also exist some Agda libraries for combinatory logic? How to bring there typed combinators, typed lambdas, I do not know. May be, people can explain. Anyway, the main thing here is to formulate clearly for oneself: what is the goal of the project. ------ Sergei From guillaume.allais at ens-lyon.org Mon Jul 24 13:32:32 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Mon, 24 Jul 2017 13:32:32 +0200 Subject: [Agda] Some problems with K-S basis In-Reply-To: <1500895361.2838.47.camel@one.mechvel.pereslavl.ru> References: <1500895361.2838.47.camel@one.mechvel.pereslavl.ru> Message-ID: <907e44f9-8ba0-156d-2991-1ee909df628c@ens-lyon.org> > How to bring there typed combinators, typed lambdas, I do not know. > May be, people can explain. Dybjer and Coquand have a really nice paper about normalisation by evaluation for pure typed combinatory logic: http://www.cse.chalmers.se/~peterd/papers/GlueingTypes93.pdf On 24/07/17 13:22, Sergei Meshveliani wrote: > On Mon, 2017-07-24 at 18:32 +1000, v0id_NULL wrote: >> Dear list, >> Help me, please. I try to deal with combinatory logic via Agda, but I >> have some problems with defining of K-combinator. If I define K and S >> combinators like this >> >> >> K : {a b : _} ? {A : Set a} ? {B : Set b} ? A ? B ? A >> K x _ = x >> >> >> S : {a b c : _} ? {A : Set a} ? {B : Set b} ? {C : Set c} ? (A ? B ? >> C) ? (A ? B) ? A ? C >> S x y z = x z (y z) >> >> >> this leads to that Agda can not solve some constrains in this >> definition of I-combinator >> >> >> I : {? : _} ? {A : Set ?} ? A ? A >> I = S K K >> > > I am not sure, > but I suspect that if we represent the combinators as Agda functions of > types like (A ? B ? A), (A ? B ? C) ? (A ? B) ? A ? C), > and such, this will mean that Agda is required to assign correct types > to the algorithms representing combinators. > But is this at all possible? > Can Agda correctly assign a type to the Y combinator, if combinators are > expressed as the above functions? > > Can anybody, please, make it clear? > > I see the following safe construct: > > ----------------------------------------------------- > open import Function using (case_of_) > open import Relation.Binary using (Rel) > open import Data.Maybe using (Maybe; just; nothing) > > data KS-term : Set > where > K : KS-term > S : KS-term > app : KS-term ? KS-term ? KS-term -- application > > I : KS-term -- I combinator > I = app (app S K) K > > step : KS-term ? Maybe KS-term -- one step of evaluation > > step (app (app K x) _) = just x > step (app (app (app S x) y) z) = just (app (app x z) (app y z)) > step t = nothing > -- t is in normal form > -------------------------------------------------------------------- > > (I do not recall now, are the K-S things correctly written?). > > > {- this must not terminate, for some arguments: > > evaluate : KS-term ? KS-term > evaluate t = case step t of \ { nothing ? t > ; (just u) ? evaluate u } > -} > > >> Generaly, tell me, please, is it good idea to implement something like >> combinatory logic via Agda? >> > > Also it is possible to express in Agda the equivalence relation _=ks_ > for (s t : KS-term). > t =ks u when there are given the sequences steps1 and steps2 of steps > like `step' above, such that applying steps1 to t yields the same term > as applying steps2 to u. And may be, a step needs to be applied to a > subterm, not necessarily at top. > > In this model, one could develop some prover that would solve > equivalence of functional programs (in untyped model, though) for easy > examples, and would fail in complex cases. > > How to bring there typed combinators, typed lambdas, I do not know. > May be, people can explain. > > Also, may be, there also exist some Agda libraries for combinatory > logic? > > How to bring there typed combinators, typed lambdas, I do not know. > May be, people can explain. > > Anyway, the main thing here is to formulate clearly for oneself: > what is the goal of the project. > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From igorzsci at gmail.com Tue Jul 25 04:51:35 2017 From: igorzsci at gmail.com (v0id_NULL) Date: Tue, 25 Jul 2017 12:51:35 +1000 Subject: [Agda] Some problems with K-S basis In-Reply-To: <1500895361.2838.47.camel@one.mechvel.pereslavl.ru> References: <1500895361.2838.47.camel@one.mechvel.pereslavl.ru> Message-ID: > Anyway, the main thing here is to formulate clearly for oneself: > what is the goal of the project. I want to experience function-level programming (point-free style) via Agda. So I chose direct way of defining combinators in Agda instead of to define the grammar and semantics of combinatory logic. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Tue Jul 25 10:30:53 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 25 Jul 2017 10:30:53 +0200 Subject: [Agda] Some problems with K-S basis In-Reply-To: References: Message-ID: <41db3440-4021-f8e3-ed06-20ce4571a980@chalmers.se> Agda does not infer non-unique values for hidden arguments, even if they do not matter. Since the second argument of K is unused, its type can sometimes not be inferred, and you have to give it manually. For instance, this works (but there are infinitely many other solutions). I : {? : _} ? {A : Set ?} ? A ? A I {A = A} = S K (K {B = A}) Best, Andreas On 24.07.2017 10:32, v0id_NULL wrote: > Dear list, > Help me, please. I try to deal with combinatory logic via Agda, but I > have some problems with defining of K-combinator. If I define K and S > combinators like this > > K : {a b : _} ? {A : Set a} ? {B : Set b} ? A ? B ? A > K x _ = x > > S : {a b c : _} ? {A : Set a} ? {B : Set b} ? {C : Set c} ? (A ? B ? C) > ? (A ? B) ? A ? C > S x y z = x z (y z) > > this leads to that Agda can not solve some constrains in this definition > of I-combinator > > I : {? : _} ? {A : Set ?} ? A ? A > I = S K K > > Agda needs in prompt of this implicit argument > I = S K (K {_} {_} {_} {?}) > but I don't know how to do this, because it doesn't matter (the second > explicit argument of K is discarded by definition). > > But if I define K-combinaor like this > > K : {a : _} ? {A : Set a} ? A ? {b : _} ? {B : Set b} ? B ? A > K x _ = x > > this leads to that Agda fails to type-check this definition of I-combinator > > I : {? : _} ? {A : Set ?} ? A ? A > I = S K K > > with report containing: "...because this would result in an invalid use > of Set?..." > > How I must to define S-K basis, enough right to define complex > combinators with applicative by like (K K), (S (K S) K) and so on? > > Generaly, tell me, please, is it good idea to implement something like > combinatory logic via Agda? > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Fri Jul 28 12:13:47 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 28 Jul 2017 13:13:47 +0300 Subject: [Agda] divmod-unique of Agda prelude Message-ID: <1501236827.2844.14.camel@one.mechvel.pereslavl.ru> People, I try to accompany divmod-unique of Agda prelude with a certain congruence: DivMod-cong : ? {a a' b b'} ? a ? a' ? b ? b' ? (d : DivMod a b ) ? (d' : DivMod a' b') ? quot d ? quot d' ? rem d ? rem d' 1) Has Agda prelude something close to it? 2) I wonder: how to fix the below implementation? Agda reports that eq is not of the declared type (and I think that it is). Regards, ------ Sergei -------------------------------------------------------------------- open import Function using (_$_) open import Relation.Binary.PropositionalEquality as PE using (_?_; _?_) open import Data.Product using (_?_) open import Data.Nat using (?; suc; _+_ ; _*_) open PE.?-Reasoning renaming (_??_?_ to _?[_]_; begin_ to ?begin_; _? to _?end) open import Prelude using (NonZero) renaming (_<_ to _<'_) open import Numeric.Nat.DivMod using (DivMod; quot; rem; rem-less; quot-rem-sound; divmod-unique) open DivMod DivMod-cong : ? {a a' b b'} ? a ? a' ? b ? b' ? (d : DivMod a b ) ? (d' : DivMod a' b') ? quot d ? quot d' ? rem d ? rem d' DivMod-cong {a} {a'} {b} {b'} a?a' b?b' d d' = eq where q' = quot d'; r' = rem d' r'<'b' = rem-less d'; q'b'+r'?a' = quot-rem-sound d' r'<'b : r' <' b r'<'b = PE.subst (r' <'_) (PE.sym b?b') r'<'b' q'b+r'?a : q' * b + r' ? a q'b+r'?a = ?begin q' * b + r' ?[ PE.cong (\x ? q' * x + r') b?b' ] q' * b' + r' ?[ q'b'+r'?a' ] a' ?[ PE.sym a?a' ] a ?end d'' : DivMod a b d'' = qr q' r' r'<'b q'b+r'?a eq : quot d ? quot d'' ? rem d ? rem d'' eq = divmod-unique {a} {b} d d'' --------------------------------------------------------------------- From simonhu at chalmers.se Fri Jul 28 14:50:32 2017 From: simonhu at chalmers.se (Simon Huber) Date: Fri, 28 Jul 2017 14:50:32 +0200 Subject: [Agda] Call for Participation: Workshop on HoTT/UF (with FSCD 2017) Message-ID: ========================================================== CALL FOR PARTICIPATION Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF, at FSCD 2017) September 8-9, 2017, Oxford, United Kingdom https://hott-uf.github.io/2017/ ========================================================== Contents: 1. Invited talks 2. Contributed talks now on the website 3. Post-proceedings with MSCS 1. Invited talks/tutorials ========================== * Thorsten Altenkirch (University of Nottingham): Na?ve Type Theory (tutorial) * Ulrik Buchholtz (Technical University of Darmstadt): Formalizing type theory in type theory using nominal techniques * Thierry Coquand (University of Gothenburg): Sheaf models for univalent type theory 2. Contributed talks ==================== Titles and abstracts for the contributed talks are now available on the website: https://hott-uf.github.io/2017/ 3. Post-proceedings with MSCS ============================= The publication of post-proceedings of the HoTT/UF'17 workshop is being planned, as a special issue of *Mathematical Structures in Computer Science* (CUP). Submission to the post-proceedings will be open to all, with a submission deadline in late spring 2018. More details will be announced in due course. From ulf.norell at gmail.com Fri Jul 28 15:05:07 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 28 Jul 2017 15:05:07 +0200 Subject: [Agda] divmod-unique of Agda prelude In-Reply-To: <1501236827.2844.14.camel@one.mechvel.pereslavl.ru> References: <1501236827.2844.14.camel@one.mechvel.pereslavl.ru> Message-ID: On Fri, Jul 28, 2017 at 12:13 PM, Sergei Meshveliani wrote: > People, > > I try to accompany divmod-unique of Agda prelude with a certain > congruence: > > DivMod-cong : ? {a a' b b'} ? a ? a' ? b ? b' ? (d : DivMod a b ) ? > (d' : DivMod a' b') ? > quot d ? quot d' ? rem d ? rem d' > > > 1) Has Agda prelude something close to it? > Yes, divmod-unique (which you are actually using in your proof). Simply match on the equality proofs and you can apply it: DivMod-cong' : ? {a a' b b'} ? a ? a' ? b ? b' ? (d : DivMod a b ) ? (d' : DivMod a' b') ? quot d ? quot d' ? rem d ? rem d' DivMod-cong' refl refl d d' = divmod-unique d d' > 2) I wonder: how to fix the below implementation? > Agda reports that eq is not of the declared type > (and I think that it is). > The problem is that the type of eq is using the product from agda-prelude and you are expecting the one from the standard library. You should have no trouble converting between them. / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From ziman at functor.sk Fri Jul 28 23:24:35 2017 From: ziman at functor.sk (Matus Tejiscak) Date: Fri, 28 Jul 2017 22:24:35 +0100 Subject: [Agda] Irrelevance and resurrection in type signatures Message-ID: <20170728212433.4jgjisoroo557wdw@localhost> Dear all, I have the following program. > open import Data.Nat > > data Vec (A : Set) : ? ? Set where > Nil : Vec A zero > Cons : (n : ?) ? (x : A) ? (xs : Vec A n) ? Vec A (suc n) > > vlen : ? {A} ? .(n : ?) ? Vec A n ? ? > vlen .(zero) Nil = zero > vlen .(suc n) (Cons n x xs) = suc (vlen n xs) Agda complains in the type signature of `vlen` that `n` is declared irrelevant so it cannot be used in the expression `Vec A n`. PDF page 12 of http://www2.tcs.ifi.lmu.de/~abel/talkFoSSaCS11.pdf mentions that "Could not reconcile this with typed equality and large eliminations." Could anyone shed some light on what the problem is there (and why does ICC* not suffer from it)? Why cannot we resurrect the context in type signatures? Thanks! Matus From abela at chalmers.se Sat Jul 29 02:32:59 2017 From: abela at chalmers.se (Andreas Abel) Date: Sat, 29 Jul 2017 02:32:59 +0200 Subject: [Agda] Irrelevance and resurrection in type signatures In-Reply-To: <20170728212433.4jgjisoroo557wdw@localhost> References: <20170728212433.4jgjisoroo557wdw@localhost> Message-ID: Hi Matus, ICC* is based on untyped equality rather than Agda's typed equality of Martin-L?f Type Theory. In particular, ICC* does not have eta-equality for record types like Agda, which is type-directed. In the particular case, Vec A n is not a large elimination of n, thus, your example is probably ok. Agda has the undocumented and slightly buggy ..-modality to mark indices in types which are not large eliminations. This makes your example go through: {-# OPTIONS --experimental-irrelevance #-} open import Data.Nat data Vec (A : Set) : ..(n : ?) ? Set where Nil : Vec A zero Cons : (n : ?) ? (x : A) ? (xs : Vec A n) ? Vec A (suc n) vlen : ? {A} ? .(n : ?) ? Vec A n ? ? vlen .(zero) Nil = zero vlen .(suc n) (Cons n x xs) = suc (vlen n xs) Alternatively, .. can be used as "run-time irrelevance": open import Data.Nat data Vec (A : Set) : (n : ?) ? Set where Nil : Vec A zero Cons : (n : ?) ? (x : A) ? (xs : Vec A n) ? Vec A (suc n) vlen : ? {A} ? ..(n : ?) ? Vec A n ? ? vlen .(zero) Nil = zero vlen .(suc n) (Cons n x xs) = suc (vlen n xs) Both lead to the erasure of parameter n in vlen at runtime. Cheers, Andreas On 28.07.2017 23:24, Matus Tejiscak wrote: > Dear all, > > I have the following program. > >> open import Data.Nat >> >> data Vec (A : Set) : ? ? Set where >> Nil : Vec A zero >> Cons : (n : ?) ? (x : A) ? (xs : Vec A n) ? Vec A (suc n) >> >> vlen : ? {A} ? .(n : ?) ? Vec A n ? ? >> vlen .(zero) Nil = zero >> vlen .(suc n) (Cons n x xs) = suc (vlen n xs) > > Agda complains in the type signature of `vlen` that `n` is declared irrelevant > so it cannot be used in the expression `Vec A n`. > > PDF page 12 of http://www2.tcs.ifi.lmu.de/~abel/talkFoSSaCS11.pdf mentions > that "Could not reconcile this with typed equality and large eliminations." > > Could anyone shed some light on what the problem is there (and why does ICC* > not suffer from it)? Why cannot we resurrect the context in type signatures? > > Thanks! > Matus > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From andreas.nuyts at cs.kuleuven.be Tue Aug 1 14:20:13 2017 From: andreas.nuyts at cs.kuleuven.be (Andreas Nuyts) Date: Tue, 1 Aug 2017 14:20:13 +0200 Subject: [Agda] Instance fields Message-ID: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> Hi, In a record type declaration, there are two ways in which we can make a field 'instance': either by using the `instance` keyword, or by wrapping the name in `{{...}}`. I know that the latter makes the field an instance argument of the constructor, and the former does not. But are they otherwise different, and if so, how? The docs have an example about making a sub-typeclass: http://agda.readthedocs.io/en/v2.5.2/language/record-types.html#instance-fields but I would expect this to work equally well by using the `instance` keyword instead of `{{...}}`. Best, Andreas From martin.stone.davis at gmail.com Tue Aug 1 20:18:11 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Tue, 1 Aug 2017 11:18:11 -0700 Subject: [Agda] Instance fields In-Reply-To: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> References: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> Message-ID: <5fb4917c-30a0-4e44-1dda-32984d88b633@gmail.com> record R : Set where field instance fooI : Foo field {{fooF}} : Foo For code outside of R, both R.fooI and R.fooF are of type R -> Foo, but only R.fooI is subject to instance search. When you're writing code inside the record R, fooF is also subject to instance search because there it's an instance argument. I should mention that, in practice, there are some caveats having to do with eta-expansion, as the code below demonstrates. it : ? {a} {A : Set a} {{x : A}} ? A it {{x}} = x record Foo : Set where no-eta-equality record RNEEI : Set where no-eta-equality field instance fooI : Foo -- if "instance" is removed, then bar1 fails (because there are no instances) field {{fooR}} : Foo record REEI : Set where field fooI : Foo -- if "instance" is added, then bar2 fails (because there are too many instances) field {{fooR}} : Foo bar1 : {{_ : RNEEI}} ? Foo bar1 = it -- works because RNEEI.fooI is subject to instance search bar2 : {{_ : REEI}} ? Foo bar2 = it -- works because REEI.fooR is an instance argument made available by eta-expansion On 08/01/2017 05:20 AM, Andreas Nuyts wrote: > Hi, > > In a record type declaration, there are two ways in which we can make > a field 'instance': either by using the `instance` keyword, or by > wrapping the name in `{{...}}`. > I know that the latter makes the field an instance argument of the > constructor, and the former does not. But are they otherwise > different, and if so, how? > > The docs have an example about making a sub-typeclass: > http://agda.readthedocs.io/en/v2.5.2/language/record-types.html#instance-fields > but I would expect this to work equally well by using the `instance` > keyword instead of `{{...}}`. > > Best, > Andreas > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From ulf.norell at gmail.com Tue Aug 1 20:23:57 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 1 Aug 2017 20:23:57 +0200 Subject: [Agda] Instance fields In-Reply-To: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> References: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> Message-ID: Using the `instance` keyword declares the projection function an instance. That's almost never what you want. You can use it to model super classes, but it's much less efficient than using `{{...}}`. Suppose you have instance EqA : Eq Bla EqA = ... OrdA : Ord Bla OrdA = ... with a super class `instance` field `Ord.super : Ord A -> Eq A`. Now you have two possible instances for `Eq A`: `EqA` and `Ord.super OrdA`. They are definitionally equal but instance search still needs to go through the trouble of finding and comparing them. This leads to at least quadratic (possibly exponential?) slowdowns in the depth of the super class hierarchy. You get the same problem when you open a record with `instance` fields: the original projection and the specialised field are both (definitionally equal) instances. / Ulf On Tue, Aug 1, 2017 at 2:20 PM, Andreas Nuyts wrote: > Hi, > > In a record type declaration, there are two ways in which we can make a > field 'instance': either by using the `instance` keyword, or by wrapping > the name in `{{...}}`. > I know that the latter makes the field an instance argument of the > constructor, and the former does not. But are they otherwise different, and > if so, how? > > The docs have an example about making a sub-typeclass: > http://agda.readthedocs.io/en/v2.5.2/language/record-types.h > tml#instance-fields > but I would expect this to work equally well by using the `instance` > keyword instead of `{{...}}`. > > Best, > Andreas > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.stone.davis at gmail.com Tue Aug 1 20:42:58 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Tue, 1 Aug 2017 11:42:58 -0700 Subject: [Agda] Instance fields In-Reply-To: References: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> Message-ID: > ... That's almost never what you want. ... Is it *ever* what you want? I haven't yet found a use case where I didn't instead prefer `{{...}}`. On 08/01/2017 11:23 AM, Ulf Norell wrote: > Using the `instance` keyword declares the projection function an > instance. That's almost never what you want. You can use it to model > super classes, but it's much less efficient than using `{{...}}`. > Suppose you have > > instance > EqA : Eq Bla > EqA = ... > > OrdA : Ord Bla > OrdA = ... > > with a super class `instance` field `Ord.super : Ord A -> Eq A`. Now > you have two possible instances for `Eq A`: `EqA` and `Ord.super > OrdA`. They are definitionally equal but instance search still needs > to go through the trouble of finding and comparing them. This leads to > at least quadratic (possibly exponential?) slowdowns in the depth of > the super class hierarchy. > > You get the same problem when you open a record with `instance` > fields: the original projection and the specialised field are both > (definitionally equal) instances. > > / Ulf > > On Tue, Aug 1, 2017 at 2:20 PM, Andreas Nuyts > > > wrote: > > Hi, > > In a record type declaration, there are two ways in which we can > make a field 'instance': either by using the `instance` keyword, > or by wrapping the name in `{{...}}`. > I know that the latter makes the field an instance argument of the > constructor, and the former does not. But are they otherwise > different, and if so, how? > > The docs have an example about making a sub-typeclass: > http://agda.readthedocs.io/en/v2.5.2/language/record-types.html#instance-fields > > but I would expect this to work equally well by using the > `instance` keyword instead of `{{...}}`. > > Best, > Andreas > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From pepm.workshop at gmail.com Wed Aug 2 01:50:43 2017 From: pepm.workshop at gmail.com (PEPM Workshop) Date: Wed, 2 Aug 2017 08:50:43 +0900 Subject: [Agda] PEPM 2018 Call for Papers Message-ID: -- CALL FOR PAPERS -- ACM SIGPLAN Workshop on PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM) 2018 =============================================================================== * Website : http://popl18.sigplan.org/track/PEPM-2018 * Time : 8th ? 9th January 2018 * Place : Los Angeles, CA, US (co-located with POPL 2018) The ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM), which has a history going back to 1991 and has co-located with POPL every year since 2006, originates in the discoveries of practically useful automated techniques for evaluating programs with only partial input. Over the years, the scope of PEPM has expanded to include a variety of research areas centred around the theme of semantics-based program manipulation ? the systematic exploitation of treating programs not only as subject to black-box execution, but also as data structures that can be generated, analysed, and transformed while establishing or maintaining important semantic properties. Scope ----- In addition to the traditional PEPM topics (see below), PEPM 2018 welcomes submissions in new domains, in particular: * Semantics based and machine-learning based program synthesis and program optimisation. * Modelling, analysis, and transformation techniques for distributed and concurrent protocols and programs, such as session types, linear types, and contract specifications. More generally, topics of interest for PEPM 2018 include, but are not limited to: * Program and model manipulation techniques such as: supercompilation, partial evaluation, fusion, on-the-fly program adaptation, active libraries, program inversion, slicing, symbolic execution, refactoring, decompilation, and obfuscation. * Techniques that treat programs/models as data objects including metaprogramming, generative programming, embedded domain-specific languages, program synthesis by sketching and inductive programming, staged computation, and model-driven program generation and transformation. * Program analysis techniques that are used to drive program/model manipulation such as: abstract interpretation, termination checking, binding-time analysis, constraint solving, type systems, automated testing and test case generation. * Application of the above techniques including case studies of program manipulation in real-world (industrial, open-source) projects and software development processes, descriptions of robust tools capable of effectively handling realistic applications, benchmarking. Examples of application domains include legacy program understanding and transformation, DSL implementations, visual languages and end-user programming, scientific computing, middleware frameworks and infrastructure needed for distributed and web-based applications, embedded and resource-limited computation, and security. This list of categories is not exhaustive, and we encourage submissions describing new theories and applications related to semantics-based program manipulation in general. If you have a question as to whether a potential submission is within the scope of the workshop, please contact the programme co-chairs, Fritz Henglein (http://www.diku.dk/~henglein/) and Josh Ko (https://josh-hs-ko.github.io). Submission categories and guidelines ------------------------------------ Two kinds of submissions will be accepted: Regular Research Papers and Short Papers. * Regular Research Papers should describe new results, and will be judged on originality, correctness, significance, and clarity. Regular research papers must not exceed 12 pages (excluding bibliography). * Short Papers may include tool demonstrations and presentations of exciting if not fully polished research, and of interesting academic, industrial, and open-source applications that are new or unfamiliar. Short papers must not exceed 6 pages (excluding bibliography). Both kinds of submissions should be typeset using the two-column ?sigplan? sub-format of the new ?acmart? format available at: http://sigplan.org/Resources/Author/ and submitted electronically via HotCRP: https://pepm18.hotcrp.com/ PEPM 2018 will employ lightweight double-blind reviewing according to the rules of POPL 2018. Quoting from POPL 2018?s call for papers: ?submitted papers must adhere to two rules: 1. author names and institutions must be omitted, and 2. references to authors? own related work should be in the third person (e.g., not ?We build on our previous work ...? but rather ?We build on the work of ...?). The purpose of this process is to help the PC and external reviewers come to an initial judgment about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult. In particular, important background references should not be omitted or anonymized. In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas.? See POPL 2018?s Submission and Reviewing FAQ page for more information: http://popl18.sigplan.org/track/POPL-2018-papers#Submission-and-Reviewing-FAQ Submissions are welcome from PC members (except the two co-chairs) provided that there are non-PC co-authors. Accepted papers will appear in formal proceedings published by ACM, and be included in the ACM Digital Library. Authors of short papers, however, can ask for their papers to be left out of the formal proceedings. At least one author of each accepted contribution must attend the workshop and present the work. In the case of tool demonstration papers, a live demonstration of the described tool is expected. Suggested topics, evaluation criteria, and writing guidelines for both research tool demonstration papers will be made available on the PEPM 2018 web site. Student participants with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses and other support. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC programme, see its web page. Important dates --------------- * Paper submission deadline : Friday 6th October 2017 (AoE) (firm) * Author notification : Saturday 4th November 2017 * Workshop : Monday 8th ? Tuesday 9th January 2018 The proceedings will be published 2 weeks pre-conference. AUTHORS TAKE NOTE: The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to two weeks prior to the first day of your conference. The official publication date affects the deadline for any patent filings related to published work. (For those rare conferences whose proceedings are published in the ACM Digital Library after the conference is over, the official publication date remains the first day of the conference.) Best paper award ---------------- PEPM 2018 continues the tradition of a Best Paper award. The winner will be announced at the workshop. Programme committee ------------------- Nada Amin (EPFL) Shigeru Chiba (University of Tokyo) Ezgi ?i?ek (Max Planck Institute for Software Systems) Olivier Danvy (Yale-NUS College) Ronald Garcia (University of British Columbia) Simon Gay (University of Glasgow) Andy Gill (X, the Moonshot Factory) Fritz Henglein (co-chair) (University of Copenhagen) Anastasia Izmaylova (IMC Financial Markets) Johan Jeuring (Utrecht University) Gabriele Keller (University of New South Wales) Oleg Kiselyov (Tohoku University) Hsiang-Shang Ko (co-chair) (National Institute of Informatics) Ralf L?mmel (University of Koblenz-Landau) Julia Lawall (Inria) Simon Peyton Jones (Microsoft Research Cambridge) Frank Pfenning (Carnegie Mellon University) Sriram Rajamani (Microsoft Research India) Norman Ramsey (Tufts University) Thomas Reps (University of Wisconsin-Madison) Sergei Romanenko (Keldysh Institute of Applied Mathematics) Tiark Rompf (Purdue University) Wolfram Schulte (Facebook) Peter Sestoft (IT University of Copenhagen) Harald S?ndergaard (University of Melbourne) Kohei Suenaga (Kyoto University) Martin Vechev (ETH Zurich) Marcos Viera (University of the Republic) Nobuko Yoshida (Imperial College London) From mechvel at botik.ru Wed Aug 2 20:37:54 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 02 Aug 2017 21:37:54 +0300 Subject: [Agda] copyrights Message-ID: <1501699074.3968.35.camel@one.mechvel.pereslavl.ru> Dear Agda team, I am going to release DoCon-A-2.00, and have a question about copyrights. DoCon-A-2.00 is written in (1) Agda, and uses functions from (2) Agda Standard library, and (3) Agda Prelude. But it does not include any files from (1), nor from (2), nor from (3). Does DoCon-A-2.00 need to "include the above copyright notice and this permission notice in all copies or substantial portions of the Software" (as it is required in the condition parts of the licenses of (1), (2), (3)) ? I am looking into the licenses of (1), (2), (3), at the fragments like ---------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ---------------- This text is difficult for me to percept. It is written there "granted ... the rights to use ...". And DoCon-A-2.00 does use (1), (2), (3). So, I think, that DoCon-A-2.00 needs to retain the copies of the copyrights of (1), (2), (3). Please, correct me, if I am wrong. Thanks, ------ Sergei From andreas.nuyts at cs.kuleuven.be Thu Aug 3 13:41:08 2017 From: andreas.nuyts at cs.kuleuven.be (Andreas Nuyts) Date: Thu, 3 Aug 2017 13:41:08 +0200 Subject: [Agda] Instance fields Message-ID: Thanks. A little experiment shows that `bar2` works regardless of whether its argument is explicit, implicit or instance. So I conclude that declaring a field `{{foo}}` of a record type R does two things: * It makes the corresponding argument to the constructor, implicit; * Whenever an argument of type R is in the context, its `foo` field becomes available for instance search upon eta-expansion. Andreas On 02-08-17 01:50, agda-request at lists.chalmers.se wrote: > Date: Tue, 1 Aug 2017 11:18:11 -0700 > From: Martin Stone Davis > To:agda at lists.chalmers.se > Subject: Re: [Agda] Instance fields > Message-ID:<5fb4917c-30a0-4e44-1dda-32984d88b633 at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > record R : Set where > field instance fooI : Foo > field {{fooF}} : Foo > > For code outside of R, both R.fooI and R.fooF are of type R -> Foo, but > only R.fooI is subject to instance search. When you're writing code > inside the record R, fooF is also subject to instance search because > there it's an instance argument. I should mention that, in practice, > there are some caveats having to do with eta-expansion, as the code > below demonstrates. > > > it : ? {a} {A : Set a} {{x : A}} ? A > it {{x}} = x > > record Foo : Set where > no-eta-equality > > record RNEEI : Set where > no-eta-equality > field instance fooI : Foo -- if "instance" is removed, then bar1 > fails (because there are no instances) > field {{fooR}} : Foo > > record REEI : Set where > field fooI : Foo -- if "instance" is added, then bar2 fails (because > there are too many instances) > field {{fooR}} : Foo > > bar1 : {{_ : RNEEI}} ? Foo > bar1 = it -- works because RNEEI.fooI is subject to instance search > > bar2 : {{_ : REEI}} ? Foo > bar2 = it -- works because REEI.fooR is an instance argument made > available by eta-expansion -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Aug 3 15:38:52 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 3 Aug 2017 15:38:52 +0200 Subject: [Agda] copyrights In-Reply-To: <1501699074.3968.35.camel@one.mechvel.pereslavl.ru> References: <1501699074.3968.35.camel@one.mechvel.pereslavl.ru> Message-ID: Dear Sergei, I'm not 100% sure about this, but I think you only have to include the copyright notice if you include (parts of) the Agda code or the Agda standard library. So in your situation, you wouldn't have to include the notice. Best, Jesper On Wed, Aug 2, 2017 at 8:37 PM, Sergei Meshveliani wrote: > Dear Agda team, > > I am going to release DoCon-A-2.00, and have a question about > copyrights. > > DoCon-A-2.00 is written in (1) Agda, > and uses functions from (2) Agda Standard library, > and (3) Agda Prelude. > > But it does not include any files from (1), nor from (2), > nor from (3). > > Does DoCon-A-2.00 need to > "include the above copyright notice and this permission notice in all > copies or substantial portions of the Software" > (as it is required in the condition parts of the licenses of (1), (2), > (3)) > ? > > I am looking into the licenses of (1), (2), (3), at the fragments like > > ---------------- > Permission is hereby granted, free of charge, to any person obtaining > a copy of this software and associated documentation files (the > "Software"), > to deal in the Software without restriction, including without > limitation the rights to use, copy, modify, merge, publish, > distribute, sublicense, and/or sell copies of the Software, and to > permit persons to whom the Software is furnished to do so, subject to > the following conditions: > > The above copyright notice and this permission notice shall be > included in all copies or substantial portions of the Software. > ---------------- > > This text is difficult for me to percept. > It is written there "granted ... the rights to use ...". > And DoCon-A-2.00 does use (1), (2), (3). > > So, I think, that DoCon-A-2.00 needs to retain the copies of the > copyrights of (1), (2), (3). > > Please, correct me, if I am wrong. > > Thanks, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 33dbqnxpy7if at gmail.com Sun Aug 6 18:23:25 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Sun, 6 Aug 2017 18:23:25 +0200 Subject: [Agda] Bezonas helpon ! Message-ID: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> Dear All, I need help to finish these lemmas. They have the same meaning, I am right? All helpers are welcome! Estimata ?iuj, Mi bezonas helpon por da?rigi ci-tiuj pruvojn! ?u ili havas je la saman signifon! ?u mi pravas? ?iuj helpantoj estas bonvenaj! Sincere. -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl) max : List? ? ? ? max l = foldr? _?_ l private max? : max [ 2 ] ? 2 max? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl proof? : (xs : List? ?) ? All (_?_ (max xs)) (toList xs) proof? (s ? l) = {! !} open Any.Membership-? using (_?_) proof? : (xs : List? ?) ? (? {x} ? x ? (toList xs) ? (_?_ (max xs)) x) proof? (s ? l) = {! !} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From publicityifl at gmail.com Mon Aug 7 20:35:15 2017 From: publicityifl at gmail.com (publicityifl at gmail.com) Date: Mon, 07 Aug 2017 18:35:15 +0000 Subject: [Agda] Extended deadline: IFL 2017 (29th Symposium on Implementation and Application of Functional Languages) Message-ID: <001a1146f698a2d7f905562e1b92@google.com>
Hello,

Please, find below the third call for papers for IFL 2017. Note that some
of the deadlines have been extended. Details are given below.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.

best regards,
Jurriaan Hage
Publicity Chair of IFL

---

IFL 2017 - CALL FOR PAPERS: DEADLINES EXTENDED
==============================================

29th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES
=======================================================================

University of Bristol, UK

In cooperation with ACM SIGPLAN

Wednesday 30 August - Friday 1 September, 2017

http://iflconference.org/

Scope
-----

The goal of the IFL symposia is to bring together researchers actively engaged
in the implementation and application of functional and function-based
programming languages. IFL 2017 will be a venue for researchers to present and
discuss new ideas and concepts, work in progress, and publication-ripe results
related to the implementation and application of functional languages and
function-based programming.

Peer-review
-----------

Following the IFL tradition, IFL 2017 will use a post-symposium review process
to produce the formal proceedings. All participants of IFL 2017 are invited to
submit either a draft paper or an extended abstract describing work to be
presented at the symposium. At no time may work submitted to IFL be
simultaneously submitted to other venues; submissions must adhere to ACM

SIGPLAN's republication policy:

http://www.sigplan.org/Resources/Policies/Republication

The submissions will be screened by the program committee chair to make sure
they are within the scope of IFL, and will appear in the draft proceedings
distributed at the symposium. Submissions appearing in the draft proceedings
are not peer-reviewed publications. Hence, publications that appear only in the
draft proceedings are not subject to the ACM SIGPLAN republication policy.

After the symposium, authors will be given the opportunity to incorporate the
feedback from discussions at the symposium and will be invited to submit a
revised full article for the formal review process. From the revised
submissions, the program committee will select papers for the formal
proceedings considering their correctness, novelty, originality, relevance,
significance, and clarity. The formal proceedings will appear in the
International Conference Proceedings Series of the ACM Digital Library.

Important dates
---------------

Note that the original deadlines for submission and registration have
been extended.

|????????????????????? |?????????????????????????????????????????????????????????? |
| ----------------------| -----------------------------------------------------------|
| Thu 17 August?? 2017 | Submission deadline draft papers????????????????????????? |
| Fri 18 August?? 2017 | Notification of acceptance for presentation?????????????? |
| Mon 21 August?? 2017 | Early registration deadline?????????????????????????????? |
| Mon 21 August?? 2017 | Submission deadline for pre-symposium proceedings???????? |
| Fri 25 August?? 2017 | Late registration deadline??????????????????????????????? |
| Wed 30 August?? 2017 - Fri 1 September 2017 | IFL Symposium????????????????????? |
| Mon? 4 December 2017 | Submission deadline for post-symposium proceedings??????? |
| Wed 31 January? 2018 | Notification of acceptance for post-symposium proceedings |
| Mon 12 March??? 2018 | Camera-ready version for post-symposium proceedings?????? |

Submission details
------------------

Prospective authors are encouraged to submit papers or extended abstracts to be
published in the draft proceedings and to present them at the symposium. All
contributions must be written in English. Papers must use the new ACM two
columns conference format, which can be found at:

http://www.acm.org/publications/proceedings-template

For the pre-symposium proceedings we adopt a 'weak' page limit of 12 pages. For
the post-symposium proceedings the page limit of 12 pages is firm.

Authors submit through EasyChair:

https://easychair.org/conferences/?conf=ifl2017

Topics
------

IFL welcomes submissions describing practical and theoretical work as well as
submissions describing applications and tools in the context of functional
programming. If you are not sure whether your work is appropriate for IFL 2017,
please contact the PC chair at nicolas.wu at bristol.ac.uk. Topics of interest include, but are not limited to:

- language concepts
- type systems, type checking, type inferencing
- compilation techniques
- staged compilation
- run-time function specialization
- run-time code generation
- partial evaluation
- (abstract) interpretation
- metaprogramming
- generic programming
- automatic program generation
- array processing
- concurrent/parallel programming
- concurrent/parallel program execution
- embedded systems
- web applications
- (embedded) domain specific languages
- security
- novel memory management techniques
- run-time profiling performance measurements
- debugging and tracing
- virtual/abstract machine architectures
- validation, verification of functional programs
- tools and programming techniques
- (industrial) applications

Peter Landin Prize
------------------

The Peter Landin Prize is awarded to the best paper presented at the symposium
every year. The honored article is selected by the program committee based on
the submissions received for the formal review process. The prize carries a
cash award equivalent to 150 Euros.


Programme committee
-------------------

Chair: Nicolas Wu, University of Bristol, UK

- Kenichi Asai, Ochanomizu University, Japan
- Sandrine Blazy, University of Rennes 1, France
- Carlos Camarao, Universidade Federal de Minas Gerais, Brazil
- Stephen Dolan, University of Cambridge, UK
- Jurriaan Hage, Utrecht University, Netherlands
- Yukiyoshi Kameyama, University of Tsukuba, Japan
- Benjamin Lerner, Brown University, USA
- Bas Lijnse, Radboud University, Netherlands
- Garrett Morris, University of Kansas, USA
- Miguel Pagano, Universidad Nacional de C??rdoba, Argentina
- Tomas Petricek, Alan Turing Institute, UK
- Maciej Pir??g, University of Wroclaw, Poland
- Exequiel Rivas, Universidad Nacional de Rosario, Argentina
- Neil Sculthorpe, Nottingham Trent University, UK
- Melinda Toth, Eotvos Lorand University, Hungary
- Phil Trinder, Glasgow University, UK
- Kanae Tsushima, National Institute of Informatics, Japan
- Marcos Viera, Universidad de la Republica, Uruguay
- Meng Wang, University of Kent, UK

Venue
-----

The IFL 2017 will be held in association with the Department of
Computer Science, University of Bristol, UK. Bristol is located in
South West England, and can be easily reached from Bristol Airport.

See the website for more information on the venue.

 

powered by GSM. Free mail merge and email marketing software for Gmail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Fri Aug 11 13:24:06 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 11 Aug 2017 14:24:06 +0300 Subject: [Agda] email list reference Message-ID: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> I am looking at http://wiki.portal.chalmers.se/agda/pmwiki.php and do not find there a reference to the Agda e-mail list archive. Where, please, to find it? Thanks, ------ Sergei From guillaume.allais at ens-lyon.org Fri Aug 11 13:56:59 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Fri, 11 Aug 2017 13:56:59 +0200 Subject: [Agda] email list reference In-Reply-To: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> Message-ID: Hi Sergei, I have added two links with working archives in Community and removed Gmane (it shut down a little while ago). http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community However there seems to be a problem with mailman at Chalmers, both https://lists.chalmers.se/mailman/listinfo/agda and https://lists.chalmers.se/mailman/listinfo/agda-dev are down Cheers, -- gallais On 11/08/17 13:24, Sergei Meshveliani wrote: > I am looking at http://wiki.portal.chalmers.se/agda/pmwiki.php > > and do not find there a reference to the Agda e-mail list archive. > > Where, please, to find it? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Fri Aug 11 18:38:12 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 11 Aug 2017 19:38:12 +0300 Subject: [Agda] email list reference In-Reply-To: References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> Message-ID: <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: > Hi Sergei, > > I have added two links with working archives in Community and > removed Gmane (it shut down a little while ago). > > http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community > > However there seems to be a problem with mailman at Chalmers, both > https://lists.chalmers.se/mailman/listinfo/agda > and https://lists.chalmers.se/mailman/listinfo/agda-dev > are down > At the main page http://wiki.portal.chalmers.se/agda/pmwiki.php I see now the buttons Main Download ... Report a bug Why not add there a reference to Community, email archive, etc.? Thanks, ------ Sergei > > I am looking at http://wiki.portal.chalmers.se/agda/pmwiki.php > > > > and do not find there a reference to the Agda e-mail list archive. > > > > Where, please, to find it? > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From apostolis.xekoukoulotakis at gmail.com Fri Aug 11 20:59:41 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 11 Aug 2017 21:59:41 +0300 Subject: [Agda] email list reference In-Reply-To: <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> Message-ID: This link though works : https://lists.chalmers.se/pipermail/agda/2017/thread.html So only those pages are inaccessible. On Fri, Aug 11, 2017 at 7:38 PM, Sergei Meshveliani wrote: > On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: > > Hi Sergei, > > > > I have added two links with working archives in Community and > > removed Gmane (it shut down a little while ago). > > > > http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community > > > > However there seems to be a problem with mailman at Chalmers, both > > https://lists.chalmers.se/mailman/listinfo/agda > > and https://lists.chalmers.se/mailman/listinfo/agda-dev > > are down > > > > At the main page http://wiki.portal.chalmers.se/agda/pmwiki.php > I see now the buttons > Main > Download > ... > Report a bug > > > Why not add there a reference to Community, email archive, etc.? > > Thanks, > > ------ > Sergei > > > > I am looking at http://wiki.portal.chalmers.se/agda/pmwiki.php > > > > > > and do not find there a reference to the Agda e-mail list archive. > > > > > > Where, please, to find it? > > > > > > Thanks, > > > > > > ------ > > > Sergei > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sat Aug 12 09:47:52 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 12 Aug 2017 10:47:52 +0300 Subject: [Agda] email list reference In-Reply-To: References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> Message-ID: <1502524072.2437.12.camel@one.mechvel.pereslavl.ru> On Fri, 2017-08-11 at 21:59 +0300, Apostolis Xekoukoulotakis wrote: > This link though works : > https://lists.chalmers.se/pipermail/agda/2017/thread.html > > > So only those pages are inaccessible. You and Guillaume give certain special web addresses pointing to email archive. Thank you, I have bookmarked it. But people who want to know about Agda do not know of these addresses. They type to browser "Agda homepage", and see the main page, and no pointer to Community or to email list or archive. Then, they type to browser "Agda mailing list", and the browser finds wrong things (earlier this latter worked, but now it does not). Regards, ------ Sergei > > On Fri, Aug 11, 2017 at 7:38 PM, Sergei Meshveliani > wrote: > On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: > > Hi Sergei, > > > > I have added two links with working archives in Community > and > > removed Gmane (it shut down a little while ago). > > > > > http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community > > > > However there seems to be a problem with mailman at > Chalmers, both > > https://lists.chalmers.se/mailman/listinfo/agda > > and https://lists.chalmers.se/mailman/listinfo/agda-dev > > are down > > > > At the main page > http://wiki.portal.chalmers.se/agda/pmwiki.php > I see now the buttons > Main > Download > ... > Report a bug > > > Why not add there a reference to Community, email archive, > etc.? > > Thanks, > > ------ > Sergei > > > > I am looking at > http://wiki.portal.chalmers.se/agda/pmwiki.php > > > > > > and do not find there a reference to the Agda e-mail list > archive. > > > > > > Where, please, to find it? > > > > > > Thanks, > > > > > > ------ > > > Sergei > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > From guillaume.allais at ens-lyon.org Sun Aug 13 12:35:44 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Sun, 13 Aug 2017 12:35:44 +0200 Subject: [Agda] email list reference In-Reply-To: <1502524072.2437.12.camel@one.mechvel.pereslavl.ru> References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> <1502524072.2437.12.camel@one.mechvel.pereslavl.ru> Message-ID: <7a358b08-cdf4-fb80-f49f-e86b9b79b9e0@ens-lyon.org> There is a link to the Community page on the main one under the "Getting Started" section. On 12/08/17 09:47, Sergei Meshveliani wrote: > On Fri, 2017-08-11 at 21:59 +0300, Apostolis Xekoukoulotakis wrote: >> This link though works : >> https://lists.chalmers.se/pipermail/agda/2017/thread.html >> >> >> So only those pages are inaccessible. > > > You and Guillaume give certain special web addresses pointing to email > archive. > Thank you, I have bookmarked it. > > But people who want to know about Agda do not know of these addresses. > They type to browser "Agda homepage", and see the main page, > and no pointer to Community or to email list or archive. > Then, they type to browser "Agda mailing list", and the browser finds > wrong things (earlier this latter worked, but now it does not). > > Regards, > > ------ > Sergei > > >> >> On Fri, Aug 11, 2017 at 7:38 PM, Sergei Meshveliani >> wrote: >> On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: >> > Hi Sergei, >> > >> > I have added two links with working archives in Community >> and >> > removed Gmane (it shut down a little while ago). >> > >> > >> http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community >> > >> > However there seems to be a problem with mailman at >> Chalmers, both >> > https://lists.chalmers.se/mailman/listinfo/agda >> > and https://lists.chalmers.se/mailman/listinfo/agda-dev >> > are down >> > >> >> At the main page >> http://wiki.portal.chalmers.se/agda/pmwiki.php >> I see now the buttons >> Main >> Download >> ... >> Report a bug >> >> >> Why not add there a reference to Community, email archive, >> etc.? >> >> Thanks, >> >> ------ >> Sergei >> >> > > I am looking at >> http://wiki.portal.chalmers.se/agda/pmwiki.php >> > > >> > > and do not find there a reference to the Agda e-mail list >> archive. >> > > >> > > Where, please, to find it? >> > > >> > > Thanks, >> > > >> > > ------ >> > > Sergei >> > > >> > > _______________________________________________ >> > > Agda mailing list >> > > Agda at lists.chalmers.se >> > > https://lists.chalmers.se/mailman/listinfo/agda >> > > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Sun Aug 13 13:27:53 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 13 Aug 2017 14:27:53 +0300 Subject: [Agda] email list reference In-Reply-To: <7a358b08-cdf4-fb80-f49f-e86b9b79b9e0@ens-lyon.org> References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> <1502524072.2437.12.camel@one.mechvel.pereslavl.ru> <7a358b08-cdf4-fb80-f49f-e86b9b79b9e0@ens-lyon.org> Message-ID: <1502623673.2868.2.camel@one.mechvel.pereslavl.ru> I see now, it is somewhat down the page. Sorry. ------ Sergei On Sun, 2017-08-13 at 12:35 +0200, G. Allais wrote: > There is a link to the Community page on the main one under the > "Getting Started" section. > > On 12/08/17 09:47, Sergei Meshveliani wrote: > > On Fri, 2017-08-11 at 21:59 +0300, Apostolis Xekoukoulotakis wrote: > >> This link though works : > >> https://lists.chalmers.se/pipermail/agda/2017/thread.html > >> > >> > >> So only those pages are inaccessible. > > > > > > You and Guillaume give certain special web addresses pointing to email > > archive. > > Thank you, I have bookmarked it. > > > > But people who want to know about Agda do not know of these addresses. > > They type to browser "Agda homepage", and see the main page, > > and no pointer to Community or to email list or archive. > > Then, they type to browser "Agda mailing list", and the browser finds > > wrong things (earlier this latter worked, but now it does not). > > > > Regards, > > > > ------ > > Sergei > > > > > >> > >> On Fri, Aug 11, 2017 at 7:38 PM, Sergei Meshveliani > >> wrote: > >> On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: > >> > Hi Sergei, > >> > > >> > I have added two links with working archives in Community > >> and > >> > removed Gmane (it shut down a little while ago). > >> > > >> > > >> http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community > >> > > >> > However there seems to be a problem with mailman at > >> Chalmers, both > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > and https://lists.chalmers.se/mailman/listinfo/agda-dev > >> > are down > >> > > >> > >> At the main page > >> http://wiki.portal.chalmers.se/agda/pmwiki.php > >> I see now the buttons > >> Main > >> Download > >> ... > >> Report a bug > >> > >> > >> Why not add there a reference to Community, email archive, > >> etc.? > >> > >> Thanks, > >> > >> ------ > >> Sergei > >> > >> > > I am looking at > >> http://wiki.portal.chalmers.se/agda/pmwiki.php > >> > > > >> > > and do not find there a reference to the Agda e-mail list > >> archive. > >> > > > >> > > Where, please, to find it? > >> > > > >> > > Thanks, > >> > > > >> > > ------ > >> > > Sergei > >> > > > >> > > _______________________________________________ > >> > > Agda mailing list > >> > > Agda at lists.chalmers.se > >> > > https://lists.chalmers.se/mailman/listinfo/agda > >> > > > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > >> > >> > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.allais at ens-lyon.org Mon Aug 14 14:54:01 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Mon, 14 Aug 2017 14:54:01 +0200 Subject: [Agda] email list reference In-Reply-To: <1502623673.2868.2.camel@one.mechvel.pereslavl.ru> References: <1502450646.3178.4.camel@one.mechvel.pereslavl.ru> <1502469492.2477.5.camel@one.mechvel.pereslavl.ru> <1502524072.2437.12.camel@one.mechvel.pereslavl.ru> <7a358b08-cdf4-fb80-f49f-e86b9b79b9e0@ens-lyon.org> <1502623673.2868.2.camel@one.mechvel.pereslavl.ru> Message-ID: Good point. I have added a link to "Community" to the side bar as you suggested. Cheers, On 13/08/17 13:27, Sergei Meshveliani wrote: > I see now, it is somewhat down the page. Sorry. > > ------ > Sergei > > > On Sun, 2017-08-13 at 12:35 +0200, G. Allais wrote: >> There is a link to the Community page on the main one under the >> "Getting Started" section. >> >> On 12/08/17 09:47, Sergei Meshveliani wrote: >>> On Fri, 2017-08-11 at 21:59 +0300, Apostolis Xekoukoulotakis wrote: >>>> This link though works : >>>> https://lists.chalmers.se/pipermail/agda/2017/thread.html >>>> >>>> >>>> So only those pages are inaccessible. >>> >>> >>> You and Guillaume give certain special web addresses pointing to email >>> archive. >>> Thank you, I have bookmarked it. >>> >>> But people who want to know about Agda do not know of these addresses. >>> They type to browser "Agda homepage", and see the main page, >>> and no pointer to Community or to email list or archive. >>> Then, they type to browser "Agda mailing list", and the browser finds >>> wrong things (earlier this latter worked, but now it does not). >>> >>> Regards, >>> >>> ------ >>> Sergei >>> >>> >>>> >>>> On Fri, Aug 11, 2017 at 7:38 PM, Sergei Meshveliani >>>> wrote: >>>> On Fri, 2017-08-11 at 13:56 +0200, G. Allais wrote: >>>> > Hi Sergei, >>>> > >>>> > I have added two links with working archives in Community >>>> and >>>> > removed Gmane (it shut down a little while ago). >>>> > >>>> > >>>> http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Community >>>> > >>>> > However there seems to be a problem with mailman at >>>> Chalmers, both >>>> > https://lists.chalmers.se/mailman/listinfo/agda >>>> > and https://lists.chalmers.se/mailman/listinfo/agda-dev >>>> > are down >>>> > >>>> >>>> At the main page >>>> http://wiki.portal.chalmers.se/agda/pmwiki.php >>>> I see now the buttons >>>> Main >>>> Download >>>> ... >>>> Report a bug >>>> >>>> >>>> Why not add there a reference to Community, email archive, >>>> etc.? >>>> >>>> Thanks, >>>> >>>> ------ >>>> Sergei >>>> >>>> > > I am looking at >>>> http://wiki.portal.chalmers.se/agda/pmwiki.php >>>> > > >>>> > > and do not find there a reference to the Agda e-mail list >>>> archive. >>>> > > >>>> > > Where, please, to find it? >>>> > > >>>> > > Thanks, >>>> > > >>>> > > ------ >>>> > > Sergei >>>> > > >>>> > > _______________________________________________ >>>> > > Agda mailing list >>>> > > Agda at lists.chalmers.se >>>> > > https://lists.chalmers.se/mailman/listinfo/agda >>>> > > >>>> > >>>> > _______________________________________________ >>>> > Agda mailing list >>>> > Agda at lists.chalmers.se >>>> > https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >>>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Mon Aug 14 14:46:57 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 14 Aug 2017 15:46:57 +0300 Subject: [Agda] installing/using 2.6.0-207bde6 Message-ID: <1502714817.4151.37.camel@scico.botik.ru> Dear Agda developers, please, help me with installing/using Agda 2.6.0-207bde6. The story is as follows. 1. I used the Development Agda of April 2017, which says that it is 2.6.0-207bde6. And it worked with the Development Standard library downloaded in the same day as the above Agda. And my DoCon-A library worked there. 2. Then I added some functions, it has become DoCon-A-2.00-pre (a candidate), and added there import of `compare' and DivMod of Agda Prelude. This caused the necessity to add import Prelude.String import Prelude.Nat to many files in the application. Anyway it worked. 3. Now I try to release DoCon-A-2.00. I write in install.txt Installation for Agda 2.6.0-207bde6, MAlonzo, Linux ==================================================== 1. Download this Agda version by running the commands > git clone https://github.com/agda/agda.git > cd agda > git checkout 207bde6 Install Agda following its instruction README.md. 2. Download and install the corresponding Standard library version by running the commands > cd agda > git submodule init Submodule 'std-lib' (https://github.com/agda/agda-stdlib) registered for path ... > git submodule update Cloning into std-lib... ... Submodule path 'std-lib': checked out ... 3. Download and install Agda Prelude (non-standard, 2-3 items used from it). 4. Then, installing DoCon-A is by ... ... * Command > cd docon-A/source > agda -c $agdaLibOpt +RTS -K90m -M7300m -RTS $agdaGHC_opt TypeCheckAll.agda ================================================================ Now I follow this instructions (install Agda and Standard library by new). And give an easier command of agda $agdaLibOpt +RTS -K90m -M7G -RTS Structures2.agda (type check a certain module in a certain initial part of application). And it fails with /home/mechvel/agda/agda/std-lib/src/Data/Integer/Addition/Properties.agda:30,29-30 No instance of type .Agda.Builtin.FromNat.Number Data.Nat.Base.? was found in scope. when checking that 0 is a valid argument to a function of type ({a : .Agda.Primitive.Level} {A : Set a} {{r : .Agda.Builtin.FromNat.Number A}} (n : Data.Nat.Base.?) {{_ : .Agda.Builtin.FromNat.Number.Constraint r n}} ? A) Probably this means that "import Prelude.Nat" needs to be added to the corresponding module. But this time the corresponding module is not in the application, but it is in the source of Standard library (?) Please, what may this mean? How does this occur that the application worked earlier, and now does not? How to fix? DoCon-A-2.00-pre is on http://www.botik.ru/pub/local/Mechveliani/docon-A/2.00-pre/ The Agda version is of development, and Agda Prelude is used. This makes the installation instruction so complex, that I fail to make it work for myself. Can you look into this install.txt and try to install, and advise? Thanks, ------ Sergei From ulf.norell at gmail.com Mon Aug 14 16:41:29 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 14 Aug 2017 16:41:29 +0200 Subject: [Agda] installing/using 2.6.0-207bde6 In-Reply-To: <1502714817.4151.37.camel@scico.botik.ru> References: <1502714817.4151.37.camel@scico.botik.ru> Message-ID: On Mon, Aug 14, 2017 at 2:46 PM, Sergei Meshveliani wrote: > > and added there import of `compare' and DivMod of Agda Prelude. > > This caused the necessity to add > import Prelude.String > import Prelude.Nat > > to many files in the application. > This problem was fixed in issue #2641 [1] (commit 64cc2b3 ). You should no longer need the imports of the Prelude modules. / Ulf [1] https://github.com/agda/agda/issues/2641 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Aug 14 17:32:26 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 14 Aug 2017 18:32:26 +0300 Subject: [Agda] installing/using 2.6.0-207bde6 In-Reply-To: References: <1502714817.4151.37.camel@scico.botik.ru> Message-ID: <1502724746.2460.8.camel@one.mechvel.pereslavl.ru> On Mon, 2017-08-14 at 16:41 +0200, Ulf Norell wrote: > > > On Mon, Aug 14, 2017 at 2:46 PM, Sergei Meshveliani > wrote: > > and added there import of `compare' and DivMod of Agda > Prelude. > > This caused the necessity to add > import Prelude.String > import Prelude.Nat > > to many files in the application. > > > This problem was fixed in issue #2641 [1] (commit 64cc2b3). You should > no longer need the imports of the Prelude modules. > > > / Ulf > > > [1] https://github.com/agda/agda/issues/2641 My install.txt needs to explain plainly: where to take this needed (improved) Agda Prelude version (for Agda 2.6.0-207bde6). Is it by git clone https://github.com/UlfNorell/agda-prelude ? Thanks, ------ Sergei From 33dbqnxpy7if at gmail.com Mon Aug 14 18:33:59 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Mon, 14 Aug 2017 18:33:59 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> Message-ID: Saluton, neniu bonvolas helpi min? Hi, nobody wants to help me? On 2017-08-06 18:23, Serge Leblanc wrote: > Dear All, > I need help to finish these lemmas. > They have the same meaning, I am right? > All helpers are welcome! > > Estimata ?iuj, > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! > ?u ili havas je la saman signifon! ?u mi pravas? > ?iuj helpantoj estas bonvenaj! > > Sincere. > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_; z?n; s?s) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl) max : List? ? ? ? max l = foldr? _?_ l private max? : max [ 2 ] ? 2 max? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl open import Data.List using (List; []) proof? : (xs : List? ?) ? All (_?_ (max xs)) (toList xs) proof? (s ? []) = {! !} proof? (s ? l) = {! !} open Any.Membership-? using (_?_) proof? : (xs : List? ?) ? (? {x} ? x ? (toList xs) ? (_?_ (max xs)) x) proof? (s ? l) = {! !} {- lookup : ? {a p} {A : Set a} {P : A ? Set p} {xs : List A} ? All P xs ? (? {x : A} ? x ? xs ? P x) tabulate : ? {a p} {A : Set a} {P : A ? Set p} {xs} ? (? {x} ? x ? xs ? P x) ? All P xs -} open import Function using (id ; _?_) iso? : ? {a p} {A : Set a} {P : A ? Set p} {xs} ? All P xs ? All P xs iso? = tabulate ? lookup proof? : ? {a p} {A : Set a} {P : A ? Set p} ? tabulate ? lookup ? id proof? = {! !} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From Jesper at sikanda.be Mon Aug 14 18:47:36 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 14 Aug 2017 18:47:36 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> Message-ID: Maybe you can explain what approaches you have already tried and why you got stuck? I think people would be more inclined to help that way. To get you started on proof1, here's a hint: since you are proving something about the functions foldr? and _?_, you can take a look at their definitions and follow the same structure for your proof. For example, since foldr? is defined in terms of the helper function foldr, you probably also need to define a helper lemma that proves a similar statement about foldr. Best regards, Jesper 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com>: > Saluton, neniu bonvolas helpi min? > > Hi, nobody wants to help me? > > On 2017-08-06 18:23, Serge Leblanc wrote: > > Dear All, > I need help to finish these lemmas. > They have the same meaning, I am right? > All helpers are welcome! > > Estimata ?iuj, > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! > ?u ili havas je la saman signifon! ?u mi pravas? > ?iuj helpantoj estas bonvenaj! > > Sincere. > -- > Serge Leblanc > ------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > > -- > Serge Leblanc > ------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Mon Aug 14 20:55:06 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 14 Aug 2017 20:55:06 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> Message-ID: The fact that foldr? is using a private recursive helper function will likely make it impossible to prove your theorem. / Ulf On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx wrote: > Maybe you can explain what approaches you have already tried and why you > got stuck? I think people would be more inclined to help that way. > > To get you started on proof1, here's a hint: since you are proving > something about the functions foldr? and _?_, you can take a look at their > definitions and follow the same structure for your proof. For example, > since foldr? is defined in terms of the helper function foldr, you probably > also need to define a helper lemma that proves a similar statement about > foldr. > > Best regards, > Jesper > > 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com>: > >> Saluton, neniu bonvolas helpi min? >> >> Hi, nobody wants to help me? >> >> On 2017-08-06 18:23, Serge Leblanc wrote: >> >> Dear All, >> I need help to finish these lemmas. >> They have the same meaning, I am right? >> All helpers are welcome! >> >> Estimata ?iuj, >> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >> ?u ili havas je la saman signifon! ?u mi pravas? >> ?iuj helpantoj estas bonvenaj! >> >> Sincere. >> -- >> Serge Leblanc >> ------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> >> >> -- >> Serge Leblanc >> ------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Tue Aug 15 13:20:57 2017 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Tue, 15 Aug 2017 13:20:57 +0200 Subject: [Agda] installing/using 2.6.0-207bde6 In-Reply-To: <1502724746.2460.8.camel@one.mechvel.pereslavl.ru> References: <1502714817.4151.37.camel@scico.botik.ru> <1502724746.2460.8.camel@one.mechvel.pereslavl.ru> Message-ID: <75a13c59-5654-6079-09c7-a5d1428ac9ac@ens-lyon.org> Hi Sergey, The problem does not lie with Ulf's Prelude or Agda's standard library but rather with Agda itself. You need to upgrade to (at least) the commit Ulf is pointing at. Alternatively you could wait a bit and port your library to the next stable version which is about to be released. The installation instructions for your users will then be a lot simpler (basically: cabal install Agda-2.5.3). Cheers, -- gallais On 14/08/17 17:32, Sergei Meshveliani wrote: > On Mon, 2017-08-14 at 16:41 +0200, Ulf Norell wrote: >> >> >> On Mon, Aug 14, 2017 at 2:46 PM, Sergei Meshveliani >> wrote: >> >> and added there import of `compare' and DivMod of Agda >> Prelude. >> >> This caused the necessity to add >> import Prelude.String >> import Prelude.Nat >> >> to many files in the application. >> >> >> This problem was fixed in issue #2641 [1] (commit 64cc2b3). You should >> no longer need the imports of the Prelude modules. >> >> >> / Ulf >> >> >> [1] https://github.com/agda/agda/issues/2641 > > > My install.txt needs to explain plainly: > where to take this needed (improved) Agda Prelude version > (for Agda 2.6.0-207bde6). > > Is it by > git clone https://github.com/UlfNorell/agda-prelude > ? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Tue Aug 15 19:20:45 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 15 Aug 2017 20:20:45 +0300 Subject: [Agda] installing/using 2.6.0-207bde6 In-Reply-To: <75a13c59-5654-6079-09c7-a5d1428ac9ac@ens-lyon.org> References: <1502714817.4151.37.camel@scico.botik.ru> <1502724746.2460.8.camel@one.mechvel.pereslavl.ru> <75a13c59-5654-6079-09c7-a5d1428ac9ac@ens-lyon.org> Message-ID: <1502817645.2913.22.camel@one.mechvel.pereslavl.ru> On Tue, 2017-08-15 at 13:20 +0200, G. Allais wrote: > Hi Sergey, > > The problem does not lie with Ulf's Prelude or Agda's standard > library but rather with Agda itself. You need to upgrade to > (at least) the commit Ulf is pointing at. I understood this from Ulf's reply. Thank you, and Ulf. I have installed the current Development Agda (2.6.0-c9e11c1). And it dos not type-check a certain module which is type-checked by Agda of April 13, 2017. Now I am reducing the example, it may occur a bug. > Alternatively you could wait a bit and port your library to the > next stable version which is about to be released. The installation > instructions for your users will then be a lot simpler (basically: > cabal install Agda-2.5.3). I need to submit a certain paper before August 20, and it is desirable to set there a reference to an working program. The paper is so, that it is much better to refer to an working program. I think of doing so: to release DoCon-A-2.00 for this purpose, so far, and then, to release DoCon-A-2.01 after the stable Agda appears. If I am not in time with 2.00, then I would refer to the program as somewhat "to hopefully appear at this
within several days". The subtle point is that it _did work_ under Agda of April 13, 2017, but I cannot instruct in install.txt of how the used can reproduce my situation in which it worked. This was a surprise for me. Regards, ------ Sergei > Cheers, > -- > gallais > > On 14/08/17 17:32, Sergei Meshveliani wrote: > > On Mon, 2017-08-14 at 16:41 +0200, Ulf Norell wrote: > >> > >> > >> On Mon, Aug 14, 2017 at 2:46 PM, Sergei Meshveliani > >> wrote: > >> > >> and added there import of `compare' and DivMod of Agda > >> Prelude. > >> > >> This caused the necessity to add > >> import Prelude.String > >> import Prelude.Nat > >> > >> to many files in the application. > >> > >> > >> This problem was fixed in issue #2641 [1] (commit 64cc2b3). You should > >> no longer need the imports of the Prelude modules. > >> > >> > >> / Ulf > >> > >> > >> [1] https://github.com/agda/agda/issues/2641 > > > > > > My install.txt needs to explain plainly: > > where to take this needed (improved) Agda Prelude version > > (for Agda 2.6.0-207bde6). > > > > Is it by > > git clone https://github.com/UlfNorell/agda-prelude > > ? > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From 33dbqnxpy7if at gmail.com Wed Aug 16 22:23:09 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Wed, 16 Aug 2017 22:23:09 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> Message-ID: <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> Thank you for your help. Why Agda refuses the following structurally decreasing function? foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? c (n ? []) = n foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed for the following functions: foldl? Problematic calls: foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) On 2017-08-14 20:55, Ulf Norell wrote: > The fact that foldr? is using a private recursive helper function will > likely make it impossible to prove your theorem. > > / Ulf > > On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx > wrote: > > Maybe you can explain what approaches you have already tried and > why you got stuck? I think people would be more inclined to help > that way. > > To get you started on proof1, here's a hint: since you are proving > something about the functions foldr? and _?_, you can take a look > at their definitions and follow the same structure for your proof. > For example, since foldr? is defined in terms of the helper > function foldr, you probably also need to define a helper lemma > that proves a similar statement about foldr. > > Best regards, > Jesper > > 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com > >: > > Saluton, neniu bonvolas helpi min? > > Hi, nobody wants to help me? > > > On 2017-08-06 18:23, Serge Leblanc wrote: >> Dear All, >> I need help to finish these lemmas. >> They have the same meaning, I am right? >> All helpers are welcome! >> >> Estimata ?iuj, >> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >> ?u ili havas je la saman signifon! ?u mi pravas? >> ?iuj helpantoj estas bonvenaj! >> >> Sincere. >> -- >> Serge Leblanc >> ------------------------------------------------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From mechvel at botik.ru Wed Aug 16 22:53:55 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 16 Aug 2017 23:53:55 +0300 Subject: [Agda] Bezonas helpon ! In-Reply-To: <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> Message-ID: <1502916835.4258.5.camel@one.mechvel.pereslavl.ru> I would try to call agda --termination-depth=2 Foo.agda Maybe, this will help Agda to see that (x ? xs) is less than (n ? (x ? xs)). ------ Sergei On Wed, 2017-08-16 at 22:23 +0200, Serge Leblanc wrote: > Thank you for your help. > > Why Agda refuses the following structurally decreasing function? > > > foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > foldl? c (n ? []) = n > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed > for the following functions: foldl? Problematic calls: foldl? c (c n x > ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) > > On 2017-08-14 20:55, Ulf Norell wrote: > > > The fact that foldr? is using a private recursive helper function > > will likely make it impossible to prove your theorem. > > > > > > / Ulf > > > > On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx > > wrote: > > Maybe you can explain what approaches you have already tried > > and why you got stuck? I think people would be more inclined > > to help that way. > > > > > > To get you started on proof1, here's a hint: since you are > > proving something about the functions foldr? and _?_, you > > can take a look at their definitions and follow the same > > structure for your proof. For example, since foldr? is > > defined in terms of the helper function foldr, you probably > > also need to define a helper lemma that proves a similar > > statement about foldr. > > > > > > Best regards, > > > > Jesper > > > > > > 2017-08-14 18:33 GMT+02:00 Serge Leblanc > > <33dbqnxpy7if at gmail.com>: > > > > Saluton, neniu bonvolas helpi min? > > > > > > Hi, nobody wants to help me? > > > > > > > > On 2017-08-06 18:23, Serge Leblanc wrote: > > > > > Dear All, > > > I need help to finish these lemmas. > > > They have the same meaning, I am right? > > > All helpers are welcome! > > > > > > Estimata ?iuj, > > > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! > > > ?u ili havas je la saman signifon! ?u mi pravas? > > > ?iuj helpantoj estas bonvenaj! > > > > > > Sincere. > > > -- > > > Serge Leblanc > > > __________________________________________________ > > > gpg --search-keys 0x67B17A3F > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C > > > F631 67B1 7A3F > > > > -- > > Serge Leblanc > > ____________________________________________________ > > gpg --search-keys 0x67B17A3F > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C > > F631 67B1 7A3F > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > -- > Serge Leblanc > ______________________________________________________________________ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From abela at chalmers.se Wed Aug 16 22:54:45 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 16 Aug 2017 22:54:45 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> Message-ID: <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> The function is structurally recursive on the /length/ of the list, not on the list itself. You can expose the length by 1. using vectors instead of lists, or 2. using sized lists (sized types). Alternatively, you can just define an auxiliary function first which takes the first element of List+ as separate argument. Then the recursion on the list goes through. Best, Andreas On 16.08.2017 22:23, Serge Leblanc wrote: > Thank you for your help. > > Why Agda refuses the following structurally decreasing function? > > foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > foldl? c (n ? []) = n > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed for > the following functions: foldl? Problematic calls: foldl? c (c n x ? xs) > (at /home/serge/agda/Maximal.agda:49,27-33) > > On 2017-08-14 20:55, Ulf Norell wrote: >> The fact that foldr? is using a private recursive helper function will >> likely make it impossible to prove your theorem. >> >> / Ulf >> >> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx > > wrote: >> >> Maybe you can explain what approaches you have already tried and >> why you got stuck? I think people would be more inclined to help >> that way. >> >> To get you started on proof1, here's a hint: since you are proving >> something about the functions foldr? and _?_, you can take a look >> at their definitions and follow the same structure for your proof. >> For example, since foldr? is defined in terms of the helper >> function foldr, you probably also need to define a helper lemma >> that proves a similar statement about foldr. >> >> Best regards, >> Jesper >> >> 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com >> >: >> >> Saluton, neniu bonvolas helpi min? >> >> Hi, nobody wants to help me? >> >> >> On 2017-08-06 18:23, Serge Leblanc wrote: >>> Dear All, >>> I need help to finish these lemmas. >>> They have the same meaning, I am right? >>> All helpers are welcome! >>> >>> Estimata ?iuj, >>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>> ?u ili havas je la saman signifon! ?u mi pravas? >>> ?iuj helpantoj estas bonvenaj! >>> >>> Sincere. >>> -- >>> Serge Leblanc >>> ------------------------------------------------------------------------ >>> gpg --search-keys 0x67B17A3F >>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> >> -- >> Serge Leblanc >> ------------------------------------------------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> > > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From asr at eafit.edu.co Thu Aug 17 10:04:13 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 17 Aug 2017 03:04:13 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 Message-ID: Dear all, The Agda Team is very pleased to announce the first release candidate of Agda 2.5.3. We plan to release 2.5.3 in one week. Installation ======= This RC can be installed using the following instruction: $ cabal install http://hackage.haskell.org/package/Agda-2.5.2.20170816/candidate/Agda-2.5.2.20170816.tar.gz GHC supported versions =============== This RC has been tested with: * GHC 7.8.4, 7.10.3 and 8.0.2 on Linux, Mac OS and Windows * GHC 8.2.1 on Linux and Mac OS Standard library ========== For the time being, you can use the master branch of the standard library which is compatible with this RC. This master branch is available at https://github.com/agda/agda-stdlib/ What is new, fixed issues and incompatibilities ============================ http://hackage.haskell.org/package/Agda-2.5.2.20170816/candidate/changelog Enjoy the RC and please test as much as possible. -- Andr?s, on behalf of the Agda Team La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From 33dbqnxpy7if at gmail.com Thu Aug 17 11:08:34 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Thu, 17 Aug 2017 11:08:34 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <1502916835.4258.5.camel@one.mechvel.pereslavl.ru> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <1502916835.4258.5.camel@one.mechvel.pereslavl.ru> Message-ID: <2326f9f2-40af-bf97-37eb-4f8bb91364eb@gmail.com> Beda?rinde, tio maltrafas. Agda ne vidas la malkreskanton de la listo malgra? la ampleksa ordono e? ?is 15 ! Unfortunately this fails, Agda doesn't see the descent of the list despite the command even up to 15 ! Sincere, On 2017-08-16 22:53, Sergei Meshveliani wrote: > I would try to call > agda --termination-depth=2 Foo.agda > > Maybe, this will help Agda to see that (x ? xs) is less than > (n ? (x ? xs)). > > ------ > Sergei > > > On Wed, 2017-08-16 at 22:23 +0200, Serge Leblanc wrote: >> Thank you for your help. >> >> Why Agda refuses the following structurally decreasing function? >> >> >> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >> foldl? c (n ? []) = n >> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >> >> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed >> for the following functions: foldl? Problematic calls: foldl? c (c n x >> ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >> >> On 2017-08-14 20:55, Ulf Norell wrote: >> >>> The fact that foldr? is using a private recursive helper function >>> will likely make it impossible to prove your theorem. >>> >>> >>> / Ulf >>> >>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>> wrote: >>> Maybe you can explain what approaches you have already tried >>> and why you got stuck? I think people would be more inclined >>> to help that way. >>> >>> >>> To get you started on proof1, here's a hint: since you are >>> proving something about the functions foldr? and _?_, you >>> can take a look at their definitions and follow the same >>> structure for your proof. For example, since foldr? is >>> defined in terms of the helper function foldr, you probably >>> also need to define a helper lemma that proves a similar >>> statement about foldr. >>> >>> >>> Best regards, >>> >>> Jesper >>> >>> >>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc >>> <33dbqnxpy7if at gmail.com>: >>> >>> Saluton, neniu bonvolas helpi min? >>> >>> >>> Hi, nobody wants to help me? >>> >>> >>> >>> On 2017-08-06 18:23, Serge Leblanc wrote: >>> >>> > Dear All, >>> > I need help to finish these lemmas. >>> > They have the same meaning, I am right? >>> > All helpers are welcome! >>> > >>> > Estimata ?iuj, >>> > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>> > ?u ili havas je la saman signifon! ?u mi pravas? >>> > ?iuj helpantoj estas bonvenaj! >>> > >>> > Sincere. >>> > -- >>> > Serge Leblanc >>> > __________________________________________________ >>> > gpg --search-keys 0x67B17A3F >>> > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C >>> > F631 67B1 7A3F >>> >>> -- >>> Serge Leblanc >>> ____________________________________________________ >>> gpg --search-keys 0x67B17A3F >>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C >>> F631 67B1 7A3F >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >> -- >> Serge Leblanc >> ______________________________________________________________________ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From 33dbqnxpy7if at gmail.com Thu Aug 17 12:18:32 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Thu, 17 Aug 2017 12:18:32 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> Message-ID: <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> Sinceran dankon Andreas. I don't understand that the following function (foldr?) is well accepted while foldl? is not? Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la funkciofoldl? maltrafas? foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr? c (n ? []) = n foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? c (n ? []) = n foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) Termination checking failed for the following functions: foldl? I also remarked that Agda rejects that: Mi anka? remarkis ke agda malakceptas tion: foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr? c (n ? []) = n foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) where open import Function using (id) Termination checking failed for the following functions:foldr? Andreas,unfortunately I really don't understand your explanation of the /length/ of the list! Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la grandeco de la listo! On 2017-08-16 22:54, Andreas Abel wrote: > The function is structurally recursive on the /length/ of the list, > not on the list itself. You can expose the length by > > 1. using vectors instead of lists, or > 2. using sized lists (sized types). > > Alternatively, you can just define an auxiliary function first which > takes the first element of List+ as separate argument. Then the > recursion on the list goes through. > > Best, > Andreas > > On 16.08.2017 22:23, Serge Leblanc wrote: >> Thank you for your help. >> >> Why Agda refuses the following structurally decreasing function? >> >> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >> foldl? c (n ? []) = n >> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >> >> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed >> for the following functions: foldl? Problematic calls: foldl? c (c n >> x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >> >> On 2017-08-14 20:55, Ulf Norell wrote: >>> The fact that foldr? is using a private recursive helper function >>> will likely make it impossible to prove your theorem. >>> >>> / Ulf >>> >>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >> > wrote: >>> >>> Maybe you can explain what approaches you have already tried and >>> why you got stuck? I think people would be more inclined to help >>> that way. >>> >>> To get you started on proof1, here's a hint: since you are proving >>> something about the functions foldr? and _?_, you can take a look >>> at their definitions and follow the same structure for your proof. >>> For example, since foldr? is defined in terms of the helper >>> function foldr, you probably also need to define a helper lemma >>> that proves a similar statement about foldr. >>> >>> Best regards, >>> Jesper >>> >>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com >>> >: >>> >>> Saluton, neniu bonvolas helpi min? >>> >>> Hi, nobody wants to help me? >>> >>> >>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>> Dear All, >>>> I need help to finish these lemmas. >>>> They have the same meaning, I am right? >>>> All helpers are welcome! >>>> >>>> Estimata ?iuj, >>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>> ?iuj helpantoj estas bonvenaj! >>>> >>>> Sincere. >>>> -- Serge Leblanc >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> gpg --search-keys 0x67B17A3F >>>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 >>>> 7A3F >>> >>> -- Serge Leblanc >>> >>> ------------------------------------------------------------------------ >>> >>> gpg --search-keys 0x67B17A3F >>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >> >> -- >> Serge Leblanc >> ------------------------------------------------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From asr at eafit.edu.co Thu Aug 17 17:54:28 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 17 Aug 2017 10:54:28 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 In-Reply-To: References: Message-ID: Dear all, If you want to test the release candidate with GHC 8.2.1 on Windows, please to change build-depends: Win32 >= 2.2 && < 2.4 to build-depends: Win32 >= 2.2 && < 2.6 in the Agda.cabal file. Best, On 17 August 2017 at 03:04, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the first release candidate of Agda > 2.5.3. We plan to release 2.5.3 in one week. > > > Installation > ======= > > This RC can be installed using the following instruction: > > $ cabal install > http://hackage.haskell.org/package/Agda-2.5.2.20170816/candidate/Agda-2.5.2.20170816.tar.gz > > > GHC supported versions > =============== > > This RC has been tested with: > > * GHC 7.8.4, 7.10.3 and 8.0.2 on Linux, Mac OS and Windows > > * GHC 8.2.1 on Linux and Mac OS > > > Standard library > ========== > > For the time being, you can use the master branch of the standard > library which is compatible with > this RC. This master branch is available at > > https://github.com/agda/agda-stdlib/ > > > What is new, fixed issues and incompatibilities > ============================ > > http://hackage.haskell.org/package/Agda-2.5.2.20170816/candidate/changelog > > > Enjoy the RC and please test as much as possible. > > -- > Andr?s, on behalf of the Agda Team -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mechvel at botik.ru Thu Aug 17 20:02:44 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 17 Aug 2017 21:02:44 +0300 Subject: [Agda] Bezonas helpon ! In-Reply-To: <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> Message-ID: <1502992964.2545.16.camel@one.mechvel.pereslavl.ru> On Thu, 2017-08-17 at 12:18 +0200, Serge Leblanc wrote: > [..] > Andreas, unfortunately I really don't understand your explanation of > the /length/ of the list! Concerning using (length xs) in addition to xs : List C: as to me, I sometimes I use (length xs) as a counter that helps to prove termination for some functions on List C. For example, Agda did not see termination in my merge sorting. So I use the counter (cnt): -------------------------------------------------------------------- sort : (xs : List C) ? SortRes xs sort xs = aux xs (length xs) (?n-refl PE.refl) where aux : (xs : List C) ? (cnt : ?) ? length xs ?n cnt ? SortRes xs -- The counter cnt is used for termination proof. aux [] _ _ = sortRes [] nil (=ms-refl {?}) aux (x ? []) _ _ = sortRes (x ? []) (single x) (=ms-refl {singleMS (x , 1)}) aux (_ ? _ ? zs) 0 2+|zs|?0 = ?-elim $ ??? 2+|zs|?0 2+|zs|>0 where 2+|zs|>0 : 2 + (length zs) >n 0 2+|zs|>0 = suc>0 aux (x ? y ? zs) (suc cnt) |x:y:zs|?scnt = let (sortRes lList ord-lList toMS-ls=ms=toMS-lList) = aux ls cnt |ls|?cnt ... ... in sortRes ys ord-ys =ms= -------------------------------------------------------------------- The counter steps from (suc cnt) to cnt, and it always holds (length currentList) ? (length currentList). This helps Agda to see termination. For some reason (unknown to me) Agda easier sees termination when the argument is built by the suc constructor rather than _?_. ------ Sergei > > On 16.08.2017 22:23, Serge Leblanc wrote: > > > Thank you for your help. > > > > > > Why Agda refuses the following structurally decreasing function? > > > > > > foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > > > foldl? c (n ? []) = n > > > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > > > > > /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking > > > failed for the following functions: foldl? Problematic calls: > > > foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) > > > > > > On 2017-08-14 20:55, Ulf Norell wrote: > > > > The fact that foldr? is using a private recursive helper > > > > function will likely make it impossible to prove your theorem. > > > > > > > > / Ulf > > > > > > > > On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx > > > > wrote: > > > > > > > > Maybe you can explain what approaches you have already tried > > > > and > > > > why you got stuck? I think people would be more inclined to > > > > help > > > > that way. > > > > > > > > To get you started on proof1, here's a hint: since you are > > > > proving > > > > something about the functions foldr? and _?_, you can take a > > > > look > > > > at their definitions and follow the same structure for your > > > > proof. > > > > For example, since foldr? is defined in terms of the helper > > > > function foldr, you probably also need to define a helper > > > > lemma > > > > that proves a similar statement about foldr. > > > > > > > > Best regards, > > > > Jesper > > > > > > > > 2017-08-14 18:33 GMT+02:00 Serge Leblanc > > > > <33dbqnxpy7if at gmail.com > > > > >: > > > > > > > > Saluton, neniu bonvolas helpi min? > > > > > > > > Hi, nobody wants to help me? > > > > > > > > > > > > On 2017-08-06 18:23, Serge Leblanc wrote: > > > > > Dear All, > > > > > I need help to finish these lemmas. > > > > > They have the same meaning, I am right? > > > > > All helpers are welcome! > > > > > > > > > > Estimata ?iuj, > > > > > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! > > > > > ?u ili havas je la saman signifon! ?u mi pravas? > > > > > ?iuj helpantoj estas bonvenaj! > > > > > > > > > > Sincere. > > > > > -- Serge Leblanc > > > > > > > > > > ------------------------------------------------------------------------ > > > > > gpg --search-keys 0x67B17A3F > > > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 > > > > > 67B1 7A3F > > > > > > > > -- Serge Leblanc > > > > > > > > ------------------------------------------------------------------------ > > > > gpg --search-keys 0x67B17A3F > > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 > > > > 67B1 7A3F > > > > > > > > _______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > > > > > > -- > > > Serge Leblanc > > > ------------------------------------------------------------------------ > > > gpg --search-keys 0x67B17A3F > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > > > > > > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > -- > Serge Leblanc > ______________________________________________________________________ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Thu Aug 17 20:05:07 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 17 Aug 2017 21:05:07 +0300 Subject: [Agda] Bezonas helpon ! In-Reply-To: <1502992964.2545.16.camel@one.mechvel.pereslavl.ru> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <1502992964.2545.16.camel@one.mechvel.pereslavl.ru> Message-ID: <1502993107.2545.18.camel@one.mechvel.pereslavl.ru> On Thu, 2017-08-17 at 21:02 +0300, Sergei Meshveliani wrote: > On Thu, 2017-08-17 at 12:18 +0200, Serge Leblanc wrote: > > > [..] > > Andreas, unfortunately I really don't understand your explanation of > > the /length/ of the list! > > > Concerning using (length xs) in addition to xs : List C: > > as to me, I sometimes I use (length xs) as a counter that helps to > prove termination for some functions on List C. > For example, Agda did not see termination in my merge sorting. So I use > the counter (cnt): > > -------------------------------------------------------------------- > sort : (xs : List C) ? SortRes xs > sort xs = > aux xs (length xs) (?n-refl PE.refl) > where > aux : (xs : List C) ? (cnt : ?) ? length xs ?n cnt ? SortRes xs > > -- The counter cnt is used for termination proof. > > aux [] _ _ = sortRes [] nil (=ms-refl {?}) > aux (x ? []) _ _ = sortRes (x ? []) (single x) > (=ms-refl {singleMS (x , 1)}) > > aux (_ ? _ ? zs) 0 2+|zs|?0 = ?-elim $ ??? 2+|zs|?0 2+|zs|>0 > where > 2+|zs|>0 : 2 + (length zs) >n 0 > 2+|zs|>0 = suc>0 > > aux (x ? y ? zs) (suc cnt) |x:y:zs|?scnt = > let > (sortRes lList ord-lList toMS-ls=ms=toMS-lList) = > aux ls cnt |ls|?cnt > ... > ... > in > sortRes ys ord-ys =ms= > -------------------------------------------------------------------- > > The counter steps from (suc cnt) to cnt, and it always holds > (length currentList) ? (length currentList). Improvement: (length currentList) ? current-cnt. > This helps Agda to see termination. > > For some reason (unknown to me) Agda easier sees termination when the > argument is built by the suc constructor rather than _?_. > > ------ > Sergei > > > > > On 16.08.2017 22:23, Serge Leblanc wrote: > > > > Thank you for your help. > > > > > > > > Why Agda refuses the following structurally decreasing function? > > > > > > > > foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > > > > foldl? c (n ? []) = n > > > > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > > > > > > > /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking > > > > failed for the following functions: foldl? Problematic calls: > > > > foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) > > > > > > > > On 2017-08-14 20:55, Ulf Norell wrote: > > > > > The fact that foldr? is using a private recursive helper > > > > > function will likely make it impossible to prove your theorem. > > > > > > > > > > / Ulf > > > > > > > > > > On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx > > > > > wrote: > > > > > > > > > > Maybe you can explain what approaches you have already tried > > > > > and > > > > > why you got stuck? I think people would be more inclined to > > > > > help > > > > > that way. > > > > > > > > > > To get you started on proof1, here's a hint: since you are > > > > > proving > > > > > something about the functions foldr? and _?_, you can take a > > > > > look > > > > > at their definitions and follow the same structure for your > > > > > proof. > > > > > For example, since foldr? is defined in terms of the helper > > > > > function foldr, you probably also need to define a helper > > > > > lemma > > > > > that proves a similar statement about foldr. > > > > > > > > > > Best regards, > > > > > Jesper > > > > > > > > > > 2017-08-14 18:33 GMT+02:00 Serge Leblanc > > > > > <33dbqnxpy7if at gmail.com > > > > > >: > > > > > > > > > > Saluton, neniu bonvolas helpi min? > > > > > > > > > > Hi, nobody wants to help me? > > > > > > > > > > > > > > > On 2017-08-06 18:23, Serge Leblanc wrote: > > > > > > Dear All, > > > > > > I need help to finish these lemmas. > > > > > > They have the same meaning, I am right? > > > > > > All helpers are welcome! > > > > > > > > > > > > Estimata ?iuj, > > > > > > Mi bezonas helpon por da?rigi ci-tiuj pruvojn! > > > > > > ?u ili havas je la saman signifon! ?u mi pravas? > > > > > > ?iuj helpantoj estas bonvenaj! > > > > > > > > > > > > Sincere. > > > > > > -- Serge Leblanc > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > gpg --search-keys 0x67B17A3F > > > > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 > > > > > > 67B1 7A3F > > > > > > > > > > -- Serge Leblanc > > > > > > > > > > ------------------------------------------------------------------------ > > > > > gpg --search-keys 0x67B17A3F > > > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 > > > > > 67B1 7A3F > > > > > > > > > > _______________________________________________ > > > > > Agda mailing list > > > > > Agda at lists.chalmers.se > > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Agda mailing list > > > > > Agda at lists.chalmers.se > > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Serge Leblanc > > > > ------------------------------------------------------------------------ > > > > gpg --search-keys 0x67B17A3F > > > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > > > > > > > > > > > _______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > > > > > > -- > > Serge Leblanc > > ______________________________________________________________________ > > gpg --search-keys 0x67B17A3F > > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Fri Aug 18 11:02:11 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 18 Aug 2017 12:02:11 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 In-Reply-To: References: Message-ID: <1503046931.2436.4.camel@one.mechvel.pereslavl.ru> On Thu, 2017-08-17 at 03:04 -0500, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the first release candidate of Agda > 2.5.3. We plan to release 2.5.3 in one week. > > [..] This looks like a typo in CHANGELOG.md : _+-mono_ ? *-mono-? _*-mono_ ? +-mono-? ------ Sergei From mechvel at botik.ru Fri Aug 18 11:11:47 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 18 Aug 2017 12:11:47 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 In-Reply-To: <1503046931.2436.4.camel@one.mechvel.pereslavl.ru> References: <1503046931.2436.4.camel@one.mechvel.pereslavl.ru> Message-ID: <1503047507.2597.0.camel@one.mechvel.pereslavl.ru> This is for the library, though (I copied it there). On Fri, 2017-08-18 at 12:02 +0300, Sergei Meshveliani wrote: > On Thu, 2017-08-17 at 03:04 -0500, Andr?s Sicard-Ram?rez wrote: > > Dear all, > > > > The Agda Team is very pleased to announce the first release candidate of Agda > > 2.5.3. We plan to release 2.5.3 in one week. > > > > [..] > > > This looks like a typo in CHANGELOG.md : > > _+-mono_ ? *-mono-? > _*-mono_ ? +-mono-? > > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From abela at chalmers.se Fri Aug 18 13:15:57 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 18 Aug 2017 13:15:57 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> Message-ID: <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> Dear Serge, > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) For the structural ordering (<), Agda sees that (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) The latter holds since xs is a subterm of x :: xs. > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) This does not work since c n x is not a subterm of n or x. > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) Since Agda does not reduce call arguments during structural comparison, this fails, as id n is not the same as n (syntactically). > Andreas,unfortunately I really don't understand your explanation of the > /length/ of the list! My explanation was probably wrong. On 17.08.2017 12:18, Serge Leblanc wrote: > Sinceran dankon Andreas. > > I don't understand that the following function (foldr?) is well accepted > while foldl? is not? > Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la > funkciofoldl? maltrafas? > > foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > foldr? c (n ? []) = n > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) > > foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > foldl? c (n ? []) = n > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > Termination checking failed for the following functions: foldl? > > I also remarked that Agda rejects that: > Mi anka? remarkis ke agda malakceptas tion: > > foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A > foldr? c (n ? []) = n > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) > where > open import Function using (id) > > Termination checking failed for the following functions:foldr? > > Andreas,unfortunately I really don't understand your explanation of the > /length/ of the list! > Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la grandeco > de la listo! > > > On 2017-08-16 22:54, Andreas Abel wrote: >> The function is structurally recursive on the /length/ of the list, >> not on the list itself. You can expose the length by >> >> 1. using vectors instead of lists, or >> 2. using sized lists (sized types). >> >> Alternatively, you can just define an auxiliary function first which >> takes the first element of List+ as separate argument. Then the >> recursion on the list goes through. >> >> Best, >> Andreas >> >> On 16.08.2017 22:23, Serge Leblanc wrote: >>> Thank you for your help. >>> >>> Why Agda refuses the following structurally decreasing function? >>> >>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>> foldl? c (n ? []) = n >>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>> >>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking failed >>> for the following functions: foldl? Problematic calls: foldl? c (c n >>> x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>> >>> On 2017-08-14 20:55, Ulf Norell wrote: >>>> The fact that foldr? is using a private recursive helper function >>>> will likely make it impossible to prove your theorem. >>>> >>>> / Ulf >>>> >>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>> > wrote: >>>> >>>> Maybe you can explain what approaches you have already tried and >>>> why you got stuck? I think people would be more inclined to help >>>> that way. >>>> >>>> To get you started on proof1, here's a hint: since you are proving >>>> something about the functions foldr? and _?_, you can take a look >>>> at their definitions and follow the same structure for your proof. >>>> For example, since foldr? is defined in terms of the helper >>>> function foldr, you probably also need to define a helper lemma >>>> that proves a similar statement about foldr. >>>> >>>> Best regards, >>>> Jesper >>>> >>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com >>>> >: >>>> >>>> Saluton, neniu bonvolas helpi min? >>>> >>>> Hi, nobody wants to help me? >>>> >>>> >>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>> Dear All, >>>>> I need help to finish these lemmas. >>>>> They have the same meaning, I am right? >>>>> All helpers are welcome! >>>>> >>>>> Estimata ?iuj, >>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>> ?iuj helpantoj estas bonvenaj! >>>>> >>>>> Sincere. >>>>> -- Serge Leblanc -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Fri Aug 18 22:28:47 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 18 Aug 2017 23:28:47 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 In-Reply-To: References: Message-ID: <1503088127.4335.3.camel@one.mechvel.pereslavl.ru> On Thu, 2017-08-17 at 03:04 -0500, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the first release candidate of Agda > 2.5.3. We plan to release 2.5.3 in one week. > > > Installation > ======= > > This RC can be installed using the following instruction: > > $ cabal install > http://hackage.haskell.org/package/Agda-2.5.2.20170816/candidate/Agda-2.5.2.20170816.tar.gz > [..] I have tested it on the DoCon-A 2.00 library under ghc-7.10.2, MAlonzo, Debian Linux. It works. ------ Sergei From asr at eafit.edu.co Fri Aug 18 23:20:45 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 18 Aug 2017 16:20:45 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 release candidate 1 In-Reply-To: <1503088127.4335.3.camel@one.mechvel.pereslavl.ru> References: <1503088127.4335.3.camel@one.mechvel.pereslavl.ru> Message-ID: Sergei, On 18 August 2017 at 15:28, Sergei Meshveliani wrote: > I have tested it on the DoCon-A 2.00 library under ghc-7.10.2, MAlonzo, > Debian Linux. > It works. Thanks for your feedback! Best, -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From martin.stone.davis at gmail.com Sat Aug 19 16:41:58 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sat, 19 Aug 2017 07:41:58 -0700 Subject: [Agda] guidelines for reporting internal errors Message-ID: How much does it help the Agda developers to have a small test case when given a report about an internal error? A lot or a little? I recently submitted an issue reporting an internal error and linked to a fairly complex 300-line program. I spent considerable time reducing the program even that far and could have gone further, but I found myself running out of steam, unsure if my efforts were worth it. My question here is not about that issue specifically but in general aimed towards answering how I should go about reporting an internal error. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Sat Aug 19 18:34:33 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Sat, 19 Aug 2017 18:34:33 +0200 Subject: [Agda] guidelines for reporting internal errors In-Reply-To: References: Message-ID: It does help a lot. Any nontrivial internal error is almost impossible to debug without a small test case. If you don't reduce the test case we have to do it, so anything you can do is much appreciated. / Ulf On Sat, Aug 19, 2017 at 4:41 PM, Martin Stone Davis < martin.stone.davis at gmail.com> wrote: > How much does it help the Agda developers to have a small test case when > given a report about an internal error? A lot or a little? > > I recently submitted an issue > reporting an internal error and linked to a fairly complex 300-line > program. I spent considerable time reducing the program even that far and > could have gone further, but I found myself running out of steam, unsure if > my efforts were worth it. My question here is not about that issue > specifically but in general aimed towards answering how I should go about > reporting an internal error. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sun Aug 20 15:22:23 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 20 Aug 2017 16:22:23 +0300 Subject: [Agda] type check cost Message-ID: <1503235343.3491.9.camel@one.mechvel.pereslavl.ru> Dear Agda developers, Please, investigate the possibility to reduce the type check cost for Agda programs. Example of application ---------------------- The library DoCon-A-0.04.1 needs the minimum of 8 Gb heap to type-check at a single command, and for -M8G, the time is 60 minutes for a 3 GHz machine. DoCon-A-2.00 needs the minimum of 11 Gb, and it takes 70 minutes. DoCon-A-2.00 adds several methods. But there is only one of them that may pretend to complicate type-checking. This is a proof for an optimized method for fraction addition. There is a hierarchy of parametrized modules. The method does not bring any new structures or new parametrized module, but it uses several instances of existing modules. In both programs, the longest type-check place is the module Int.Integer2 (1/5 of all the time). This is because it uses certain instances of almost all the generic structures and imports certain instances of all parametric modules implemented in the DoCon-A library. Now, each step in developing the library will probably increase the memory requirement on somewhat 1/4. On the other hand, DoCon-A-2.00 supports only about 1/100 of the methods in the DoCon library written in Haskell in 1990-ies (but it contains many definitions and proofs which are not in DoCon). This is not my personal problem ------------------------------- I expect that anyone who tries to implement any essential generic mathematical library in Agda will be stopped by this barrier. Main problem ------------ Probably, this is an internal type representation that does not really use sharing, so that large subterms are copied many times. I also have a specific question ------------------------------- I wrote earlier of the example, when type-checking (s , t) costs infinitely much, while adding the type declaration for this pair makes it cost small. And I expect that in the first variant the result is going to be "unsolved metas". DoCon-A-2.00 takes 70 minutes to type-check for the -M11G option. May it happen so that adding a type declaration somewhere in a lucky place will reduces the cost essentially? Regards, ------ Sergei From mechvel at botik.ru Sun Aug 20 19:37:15 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 20 Aug 2017 20:37:15 +0300 Subject: [Agda] type check cost Message-ID: <1503250635.2603.30.camel@one.mechvel.pereslavl.ru> I wrote > Now, each step in developing the library will probably increase the > memory requirement on somewhat 1/4. > > On the other hand, DoCon-A-2.00 supports only about 1/100 of the > methods in the DoCon library written in Haskell in 1990-ies > (but it contains many definitions and proofs which are not in DoCon). > [..] > I expect that anyone who tries to implement any essential generic > mathematical library in Agda will be stopped by this barrier. As it is written in a certain paper cited in this list, Coq has a similar problem. I had a look into this paper, and confirm the following fundamental estimation. If abstract domain definitions in some application library have N abstract operations, then the number of different _instances_ of this operations has the order of N^d (for the worst case), where d is the depth of the domain construction used in this application. On the other hand: (1) very large mathematical algorithm libraries are accompanied by books and papers that contain proofs, formal/complete or not so formal/complete. And these proofs are somewhat read and verified by human, in a real time. (2) The above paper writes that Coq handles the problem by a certain specific technology (so far I do not understand -- how, may be I would need to read and to try once more). I explain this effect so that the cost is a * (N^(b*d)), and in the areas (1) and (2) there are discovered approaches that reduce the constants a and b. And I suspect, that Agda implementation can reach this in a simpler way, by bringing some sharing to the internal type term representation. Regards, ------ Sergei From 33dbqnxpy7if at gmail.com Mon Aug 21 08:07:34 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Mon, 21 Aug 2017 08:07:34 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> Message-ID: Thank you very much, Andreas, I understand more. Now I have tried to proveproof?. Surely, I miss because the proposition P contains 'xs'. Does anyone have a suggestion? Intuitively, I need an induction with 'm?m?n'. proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (h ? []) = {! []!} proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} Thank you for your help! Koran dankon, Andreas, mi plibone komprenas. Nun, mi provis plenumi la pruvon proof?. Ver?ajne, mi malsukcesas pro la propozicio P enhavas 'xs'. ?u iu havas sugeston ? Intuicie, mi bezonos indukton kun 'm?m?n'. proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (h ? []) = {! []!} proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} Anta?an dankon pro via venonta helpo ! Sincere, On 201i7-08-18 13:15, Andreas Abel wrote: > Dear Serge, > > > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) > > For the structural ord\ering (<), Agda sees that > > (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) > > The latter holds since xs is a subterm of x :: xs. > > > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) > > This does not work since c n x is not a subterm of n or x. > > > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) > > Since Agda does not reduce call arguments during structural > comparison, this fails, as > > id n is not the same as n > > (syntactically). > > > Andreas,unfortunately I really don't understand your explanation of the > > /length/ of the list! > > My explanation was probably wrong. > > On 17.08.2017 12:18, Serge Leblanc wrote: >> Sinceran dankon Andreas. >> >> I don't understand that the following function (foldr?) is well >> accepted while foldl? is not? >> Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la >> funkciofoldl? maltrafas? >> >> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >> foldr? c (n ? []) = n >> foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >> >> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >> foldl? c (n ? []) = n >> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >> >> Termination checking failed for the following functions: foldl? >> >> I also remarked that Agda rejects that: >> Mi anka? remarkis ke agda malakceptas tion: >> >> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >> foldr? c (n ? []) = n >> foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >> where >> open import Function using (id) >> >> Termination checking failed for the following functions:foldr? >> >> Andreas,unfortunately I really don't understand your explanation of >> the /length/ of the list! >> Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la >> grandeco de la listo! >> >> >> On 2017-08-16 22:54, Andreas Abel wrote: >>> The function is structurally recursive on the /length/ of the list, >>> not on the list itself. You can expose the length by >>> >>> 1. using vectors instead of lists, or >>> 2. using sized lists (sized types). >>> >>> Alternatively, you can just define an auxiliary function first which >>> takes the first element of List+ as separate argument. Then the >>> recursion on the list goes through. >>> >>> Best, >>> Andreas >>> >>> On 16.08.2017 22:23, Serge Leblanc wrote: >>>> Thank you for your help. >>>> >>>> Why Agda refuses the following structurally decreasing function? >>>> >>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>> foldl? c (n ? []) = n >>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>> >>>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking >>>> failed for the following functions: foldl? Problematic calls: >>>> foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>>> >>>> On 2017-08-14 20:55, Ulf Norell wrote: >>>>> The fact that foldr? is using a private recursive helper function >>>>> will likely make it impossible to prove your theorem. >>>>> >>>>> / Ulf >>>>> >>>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>>> > wrote: >>>>> >>>>> Maybe you can explain what approaches you have already tried and >>>>> why you got stuck? I think people would be more inclined to help >>>>> that way. >>>>> >>>>> To get you started on proof1, here's a hint: since you are >>>>> proving >>>>> something about the functions foldr? and _?_, you can take a look >>>>> at their definitions and follow the same structure for your >>>>> proof. >>>>> For example, since foldr? is defined in terms of the helper >>>>> function foldr, you probably also need to define a helper lemma >>>>> that proves a similar statement about foldr. >>>>> >>>>> Best regards, >>>>> Jesper >>>>> >>>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com >>>>> >: >>>>> >>>>> Saluton, neniu bonvolas helpi min? >>>>> >>>>> Hi, nobody wants to help me? >>>>> >>>>> >>>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>>> Dear All, >>>>>> I need help to finish these lemmas. >>>>>> They have the same meaning, I am right? >>>>>> All helpers are welcome! >>>>>> >>>>>> Estimata ?iuj, >>>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>>> ?iuj helpantoj estas bonvenaj! >>>>>> >>>>>> Sincere. >>>>>> -- Serge Leblanc > -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_; z?n; s?s) open import Data.Nat.Properties public using (m?m?n) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; sym ) open import Relation.Binary open DecTotalOrder Data.Nat.decTotalOrder using () renaming (refl to ?-refl) open import Data.List using (List; []; _?_; _++_) --open import Function using (id) foldr : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr {A = A} c (n ? l) = foldr? n l where foldr? : A ? List A ? A foldr? n [] = n foldr? n (x ? xs) = c n (foldr? x xs) foldl : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl {A = A} c (n ? l) = foldl? n l where foldl? : A ? List A ? A foldl? n [] = n foldl? n (x ? xs) = foldl? (c n x) xs foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? f (h ? t) = Data.List.foldl f h t max : List? ? ? ? max l = foldl _?_ l max? : List? ? ? ? max? l = foldr _?_ l max? : List? ? ? ? max? (h ? t) = Data.List.foldl _?_ h t private max? : max [ 2 ] ? 2 max? = refl max?? : max? [ 2 ] ? 2 max?? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl max?? : max? (4 ?? 5 ?? [ 6 ]) ? 6 max?? = refl module Examples (_?_ : ? ? ? ? ?) (a b c : ?) where left? : foldl _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl left? : foldl? _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl right? : foldr _?_ (a ?? b ?? [ c ]) ? (a ? (b ? c)) right? = refl ?-right-identity : ? n ? n ? 0 ? n ?-right-identity zero = refl ?-right-identity (suc n) = refl ?-comm : ? x y ? x ? y ? y ? x ?-comm zero y = sym (?-right-identity y) ?-comm (suc x) zero = refl ?-comm (suc x) (suc y) = cong suc (?-comm x y) ?-asso : ? x y z ? x ? (y ? z) ? (x ? y) ? z ?-asso zero _ _ = refl ?-asso (suc x) zero _ = refl ?-asso (suc x) (suc y) zero = refl ?-asso (suc x) (suc y) (suc z) = cong suc (?-asso x y z) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; cong?) open PropEq.?-Reasoning -- renaming (_??_?_ to _?[_]_) private abstract lemma? : ? x? x? xs ? Data.List.foldl _?_ x? (x? ? xs) ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? xs = refl lemma? : ? x? x? xs ? x? ? Data.List.foldl _?_ x? xs ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? [] = refl lemma? x? x? (h ? t) = begin x? ? Data.List.foldl _?_ (x? ? h) t ?? lemma? x? (x? ? h) t ? Data.List.foldl _?_ (x? ? (x? ? h)) t ?? cong (? s ? Data.List.foldl _?_ s t) (?-asso x? x? h) ? Data.List.foldl _?_ (x? ? x? ? h) t ? lemma? : ? x xs ? x ? max? xs ? max? (x ?? xs) lemma? x (h ? t) = lemma? x h t ++? : ? {a p} {A : Set a} {P : A ? Set p} {xs ys : List A} ? All P xs ? All P ys ? All P (xs ++ ys) ++? [] pys = pys ++? (px ? pxs) pys = px ? ++? pxs pys proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (h ? []) = {! []!} proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From nad at cse.gu.se Tue Aug 22 13:14:31 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 22 Aug 2017 13:14:31 +0200 Subject: [Agda] Instance fields In-Reply-To: References: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> Message-ID: <3966288d-41e6-f7fe-a2c0-b7a0a07933c5@cse.gu.se> On 2017-08-01 20:42, Martin Stone Davis wrote: > Is it *ever* what you want? I haven't yet found a use case where I > didn't instead prefer `{{...}}`. The builtin unit type is defined in the following way: record ? : Set where instance constructor tt However, if there are only a tiny number of examples like this, then it is perhaps better to remove this feature (to avoid confusion and mistakes), and instead provide the instance above manually: instance tt-instance : ? tt-instance = tt -- /NAD From nad at cse.gu.se Tue Aug 22 13:23:26 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 22 Aug 2017 13:23:26 +0200 Subject: [Agda] guidelines for reporting internal errors In-Reply-To: References: Message-ID: On 2017-08-19 16:41, Martin Stone Davis wrote: > I spent considerable time reducing the program [...] It would be nice with a tool that did some of this work for us. There is a tool like that for Coq: https://people.csail.mit.edu/jgross/personal-website/papers/2015-coq-bug-minimizer.pdf https://github.com/JasonGross/coq-tools#coq-bug-minimizer -- /NAD From nad at cse.gu.se Tue Aug 22 13:26:51 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 22 Aug 2017 13:26:51 +0200 Subject: [Agda] type check cost In-Reply-To: <1503235343.3491.9.camel@one.mechvel.pereslavl.ru> References: <1503235343.3491.9.camel@one.mechvel.pereslavl.ru> Message-ID: <55f3377a-a94a-12e2-b238-567c3ff8a886@cse.gu.se> On 2017-08-20 15:22, Sergei Meshveliani wrote: > I wrote earlier of the example, when type-checking (s , t) costs > infinitely much, while adding the type declaration for this pair makes > it cost small. And I expect that in the first variant the result is > going to be "unsolved metas". I wonder if it would be useful to emit a warning when there are long-lived (in some sense) metas that have not been frozen. -- /NAD From mechvel at botik.ru Tue Aug 22 14:43:56 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 22 Aug 2017 15:43:56 +0300 Subject: [Agda] type check cost In-Reply-To: <55f3377a-a94a-12e2-b238-567c3ff8a886@cse.gu.se> References: <1503235343.3491.9.camel@one.mechvel.pereslavl.ru> <55f3377a-a94a-12e2-b238-567c3ff8a886@cse.gu.se> Message-ID: <1503405836.28472.19.camel@scico.botik.ru> On Tue, 2017-08-22 at 13:26 +0200, Nils Anders Danielsson wrote: > On 2017-08-20 15:22, Sergei Meshveliani wrote: > > I wrote earlier of the example, when type-checking (s , t) costs > > infinitely much, while adding the type declaration for this pair makes > > it cost small. And I expect that in the first variant the result is > > going to be "unsolved metas". > > I wonder if it would be useful to emit a warning when there are > long-lived (in some sense) metas that have not been frozen. > I recall of the possibility of type checking under emacs. emacs will mark by color the place at which the type checker hangs for long. What may this mean? 1) It it loops forever, then this is a bug in the type checker. Right? But what if the user program contains a function for a proof that is declared TERMINATING, and which does not in fact terminate -- ? 2) The outcome may occur "unsolved metas". 3) In can end with, say, "Error: foo is not of type Foo." ? 4) This may end with success after 50 hours, why not? If I see that emacs shows me the point in a program at which the type checker thinks more than 30 minutes, then may be, it has sense to try to declare more types around this place in the program, I wonder. Regards, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Tue Aug 22 14:58:05 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 22 Aug 2017 15:58:05 +0300 Subject: [Agda] Typechecking with multiple concurrent agda processes. Message-ID: Hello, I made a simple tool in javascript that creates a graph of agda files based on their imports. Then it spawns multiple agda processes and concurrently typechecks them. It is not efficient in any way. Still with 10 processes, I can reduce the time of compiling everything from HoTT-agda (in the theorem folder) from 17 min to 10 min. Hope it helps. https://github.com/xekoukou/agda-mt -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Tue Aug 22 15:52:39 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Tue, 22 Aug 2017 08:52:39 -0500 Subject: [Agda] Typechecking with multiple concurrent agda processes. In-Reply-To: References: Message-ID: On 22 August 2017 at 07:58, Apostolis Xekoukoulotakis wrote: > It is not efficient in any way. Still with 10 processes, I can reduce the > time of compiling everything from HoTT-agda (in the theorem folder) from 17 > min to 10 min. I couldn't find the theorem folder. Best, -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From martin.stone.davis at gmail.com Tue Aug 22 17:26:48 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Tue, 22 Aug 2017 08:26:48 -0700 Subject: [Agda] Instance fields In-Reply-To: <3966288d-41e6-f7fe-a2c0-b7a0a07933c5@cse.gu.se> References: <0678a8a5-d22b-1879-4d12-ba0745dde8b5@cs.kuleuven.be> <3966288d-41e6-f7fe-a2c0-b7a0a07933c5@cse.gu.se> Message-ID: <12df13ff-52e1-f61a-3690-7b1dc783d16a@gmail.com> I've found record constructor instances to be useful. My question here is whether `field instance foo` or `field instance {{foo}}` should ever to be preferred over `field {{foo}}`. On 08/22/2017 04:14 AM, Nils Anders Danielsson wrote: > On 2017-08-01 20:42, Martin Stone Davis wrote: >> Is it *ever* what you want? I haven't yet found a use case where I >> didn't instead prefer `{{...}}`. > > The builtin unit type is defined in the following way: > > record ? : Set where > instance constructor tt > > However, if there are only a tiny number of examples like this, then it > is perhaps better to remove this feature (to avoid confusion and > mistakes), and instead provide the instance above manually: > > instance > tt-instance : ? > tt-instance = tt > From abela at chalmers.se Tue Aug 22 17:53:25 2017 From: abela at chalmers.se (Andreas Abel) Date: Tue, 22 Aug 2017 17:53:25 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> Message-ID: <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> It might be sufficient to prove max (x :: xs) >= max xs and use this in your induction hypothesis (with transitivity of >=). Cheers, Andreas On 21.08.2017 08:07, Serge Leblanc wrote: > Thank you very much, Andreas, I understand more. > > Now I have tried to proveproof?. Surely, I miss because the proposition > P contains 'xs'. Does anyone have a suggestion? Intuitively, I need an > induction with 'm?m?n'. > > proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) > proof? (h ? []) = {! []!} > proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} > > Thank you for your help! > > Koran dankon, Andreas, mi plibone komprenas. > > Nun, mi provis plenumi la pruvon proof?. Ver?ajne, mi malsukcesas pro la > propozicio P enhavas 'xs'. > ?u iu havas sugeston ? Intuicie, mi bezonos indukton kun 'm?m?n'. > > > proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) > proof? (h ? []) = {! []!} > proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} > > Anta?an dankon pro via venonta helpo ! > > Sincere, > > > On 201i7-08-18 13:15, Andreas Abel wrote: >> Dear Serge, >> >> > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >> >> For the structural ord\ering (<), Agda sees that >> >> (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) >> >> The latter holds since xs is a subterm of x :: xs. >> >> > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >> >> This does not work since c n x is not a subterm of n or x. >> >> > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >> >> Since Agda does not reduce call arguments during structural >> comparison, this fails, as >> >> id n is not the same as n >> >> (syntactically). >> >> > Andreas,unfortunately I really don't understand your explanation of the >> > /length/ of the list! >> >> My explanation was probably wrong. >> >> On 17.08.2017 12:18, Serge Leblanc wrote: >>> Sinceran dankon Andreas. >>> >>> I don't understand that the following function (foldr?) is well >>> accepted while foldl? is not? >>> Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la >>> funkciofoldl? maltrafas? >>> >>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>> foldr? c (n ? []) = n >>> foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>> >>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>> foldl? c (n ? []) = n >>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>> >>> Termination checking failed for the following functions: foldl? >>> >>> I also remarked that Agda rejects that: >>> Mi anka? remarkis ke agda malakceptas tion: >>> >>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>> foldr? c (n ? []) = n >>> foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>> where >>> open import Function using (id) >>> >>> Termination checking failed for the following functions:foldr? >>> >>> Andreas,unfortunately I really don't understand your explanation of >>> the /length/ of the list! >>> Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la >>> grandeco de la listo! >>> >>> >>> On 2017-08-16 22:54, Andreas Abel wrote: >>>> The function is structurally recursive on the /length/ of the list, >>>> not on the list itself. You can expose the length by >>>> >>>> 1. using vectors instead of lists, or >>>> 2. using sized lists (sized types). >>>> >>>> Alternatively, you can just define an auxiliary function first which >>>> takes the first element of List+ as separate argument. Then the >>>> recursion on the list goes through. >>>> >>>> Best, >>>> Andreas >>>> >>>> On 16.08.2017 22:23, Serge Leblanc wrote: >>>>> Thank you for your help. >>>>> >>>>> Why Agda refuses the following structurally decreasing function? >>>>> >>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>> foldl? c (n ? []) = n >>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>> >>>>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking >>>>> failed for the following functions: foldl? Problematic calls: >>>>> foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>>>> >>>>> On 2017-08-14 20:55, Ulf Norell wrote: >>>>>> The fact that foldr? is using a private recursive helper function >>>>>> will likely make it impossible to prove your theorem. >>>>>> >>>>>> / Ulf >>>>>> >>>>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>>>> > wrote: >>>>>> >>>>>> Maybe you can explain what approaches you have already tried and >>>>>> why you got stuck? I think people would be more inclined to help >>>>>> that way. >>>>>> >>>>>> To get you started on proof1, here's a hint: since you are >>>>>> proving >>>>>> something about the functions foldr? and _?_, you can take a look >>>>>> at their definitions and follow the same structure for your >>>>>> proof. >>>>>> For example, since foldr? is defined in terms of the helper >>>>>> function foldr, you probably also need to define a helper lemma >>>>>> that proves a similar statement about foldr. >>>>>> >>>>>> Best regards, >>>>>> Jesper >>>>>> >>>>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc <33dbqnxpy7if at gmail.com >>>>>> >: >>>>>> >>>>>> Saluton, neniu bonvolas helpi min? >>>>>> >>>>>> Hi, nobody wants to help me? >>>>>> >>>>>> >>>>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>>>> Dear All, >>>>>>> I need help to finish these lemmas. >>>>>>> They have the same meaning, I am right? >>>>>>> All helpers are welcome! >>>>>>> >>>>>>> Estimata ?iuj, >>>>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>>>> ?iuj helpantoj estas bonvenaj! >>>>>>> >>>>>>> Sincere. >>>>>>> -- Serge Leblanc >> > > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Wed Aug 23 11:24:00 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 23 Aug 2017 12:24:00 +0300 Subject: [Agda] Typechecking with multiple concurrent agda processes. In-Reply-To: References: Message-ID: My priv. response to ASR : > https://github.com/HoTT/HoTT-Agda/tree/master/theorems > > You need to put all three indices into a single Everything.agda file. I think that it would be better if each agda process was kept alive and was given files to typecheck when available. If I enabled caching, then the cost of deserialization would be low. Thus I could call agda with this command : ``` agda --interaction --caching ``` The problem is that I do not know the commands. Is there documentation somewhere? The only command I need, is to typecheck the next file. On Tue, Aug 22, 2017 at 4:52 PM, Andr?s Sicard-Ram?rez wrote: > On 22 August 2017 at 07:58, Apostolis Xekoukoulotakis > wrote: > > It is not efficient in any way. Still with 10 processes, I can reduce the > > time of compiling everything from HoTT-agda (in the theorem folder) from > 17 > > min to 10 min. > > I couldn't find the theorem folder. > > Best, > > -- > Andr?s > La informaci?n contenida en este correo electr?nico est? dirigida > ?nicamente a su destinatario y puede contener informaci?n confidencial, > material privilegiado o informaci?n protegida por derecho de autor. Est? > prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, > difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este > mensaje por error, por favor contacte al remitente y elim?nelo. La > informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por > lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje > contenga. The information contained in this email is addressed to its > recipient only and may contain confidential information, privileged > material or information protected by copyright. Its prohibited any copy, > use, improper retention, modification, dissemination, distribution or total > or partial reproduction. If you receive this message by error, please > contact the sender and delete it. The information contained herein is the > sole responsibility of the sender therefore Universidad EAFIT is not > responsible for what the message contains. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Wed Aug 23 19:58:20 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 23 Aug 2017 20:58:20 +0300 Subject: [Agda] Typechecking with multiple concurrent agda processes. In-Reply-To: References: Message-ID: Now, with caching enabled and some small changes to the files typechecked, I get this : ``` real 7m5.636s user 18m29.676s sys 0m15.526s ``` with 4 processes. With a single agda process, I get : ``` real 14m20.085s user 14m15.585s sys 0m3.967s ``` On Wed, Aug 23, 2017 at 12:24 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > My priv. response to ASR : > > > https://github.com/HoTT/HoTT-Agda/tree/master/theorems > > > > > You need to put all three indices into a single Everything.agda file. > > I think that it would be better if each agda process was kept alive and > was given files to typecheck when available. If I enabled caching, then the > cost of deserialization would be low. > Thus I could call agda with this command : > > ``` > agda --interaction --caching > ``` > > The problem is that I do not know the commands. Is there documentation > somewhere? The only command I need, is to typecheck the next file. > > On Tue, Aug 22, 2017 at 4:52 PM, Andr?s Sicard-Ram?rez > wrote: > >> On 22 August 2017 at 07:58, Apostolis Xekoukoulotakis >> wrote: >> > It is not efficient in any way. Still with 10 processes, I can reduce >> the >> > time of compiling everything from HoTT-agda (in the theorem folder) >> from 17 >> > min to 10 min. >> >> I couldn't find the theorem folder. >> >> Best, >> >> -- >> Andr?s >> La informaci?n contenida en este correo electr?nico est? dirigida >> ?nicamente a su destinatario y puede contener informaci?n confidencial, >> material privilegiado o informaci?n protegida por derecho de autor. Est? >> prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, >> difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este >> mensaje por error, por favor contacte al remitente y elim?nelo. La >> informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por >> lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje >> contenga. The information contained in this email is addressed to its >> recipient only and may contain confidential information, privileged >> material or information protected by copyright. Its prohibited any copy, >> use, improper retention, modification, dissemination, distribution or total >> or partial reproduction. If you receive this message by error, please >> contact the sender and delete it. The information contained herein is the >> sole responsibility of the sender therefore Universidad EAFIT is not >> responsible for what the message contains. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.stone.davis at gmail.com Fri Aug 25 03:49:28 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Thu, 24 Aug 2017 18:49:28 -0700 Subject: [Agda] discovering verbosity options Message-ID: Is there a list of verbosity options? E.g. "treeless.opt.aspat", "tc.size.solve", etc. Preferably with some sort of description? If not, what verbosity options would be useful in analyzing Agda's approach to constraint solving and instance resolution? I.e., the sort of thing that might be useful in creating small test cases for issues like #2713 or #2709 . -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Fri Aug 25 06:59:12 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 25 Aug 2017 06:59:12 +0200 Subject: [Agda] discovering verbosity options In-Reply-To: References: Message-ID: You can get a list of verbosity options using `git grep reportS src/`. When debugging constraint solving I typically run `-v tc:80` and pipe the output to a file. The output contains balanced curly braces which lets you skip over uninteresting parts. / Ulf On Fri, Aug 25, 2017 at 3:49 AM, Martin Stone Davis < martin.stone.davis at gmail.com> wrote: > Is there a list of verbosity options? E.g. "treeless.opt.aspat", > "tc.size.solve", etc. Preferably with some sort of description? > > If not, what verbosity options would be useful in analyzing Agda's > approach to constraint solving and instance resolution? I.e., the sort of > thing that might be useful in creating small test cases for issues like > #2713 or #2709 > . > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marioxcc.MT at yandex.com Sun Aug 27 21:48:48 2017 From: marioxcc.MT at yandex.com (=?UTF-8?Q?Mario_Castel=c3=a1n_Castro?=) Date: Sun, 27 Aug 2017 14:48:48 -0500 Subject: [Agda] Request of suggestion of learning material for Agda Message-ID: Hello. I want to learn computer programming and proof formalization in Agda. I am aware that there are *several* tutorials listed in . Listing several tutorials adds the difficulty of choosing among them. Obviously I do not want to read from an obsolete tutorial, but since it is necessary to *already* know the current Agda to tell whether a tutorial is current, I am instead writing to the members of this mailing list to ask for a specific suggestion. A suggestion to read a book or manual instead of tutorial is also welcome. In case it makes any difference, I want to mention that I am familiar with classical propositional and first order logic, and to a lesser degree, ZF set theory and HOL4. I do not have any experience with dependent types. I am willing to read a book about type theory in parallel with Agda-specific material if this is required. Regards. -- Do not eat animals, respect them as you respect people. https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From 33dbqnxpy7if at gmail.com Sun Aug 27 22:15:48 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Sun, 27 Aug 2017 22:15:48 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> Message-ID: <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> I fail to make the proof. I don't understand how built the All structure. Can someone show me? Mi malsukcesas fari la pruvon. Mi tute ne komprenas kiel oni konstruas la structuron All. ?u iu povas montri al mi? Sinceran dankon ! On 2017-08-22 17:53, Andreas Abel wrote: > It might be sufficient to prove > > max (x :: xs) >= max xs > > and use this in your induction hypothesis (with transitivity of >=). > > Cheers, > Andreas > > On 21.08.2017 08:07, Serge Leblanc wrote: >> Thank you very much, Andreas, I understand more. >> >> Now I have tried to proveproof?. Surely, I miss because the >> proposition P contains 'xs'. Does anyone have a suggestion? >> Intuitively, I need an induction with 'm?m?n'. >> >> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >> proof? (h ? []) = {! []!} >> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >> >> Thank you for your help! >> >> Koran dankon, Andreas, mi plibone komprenas. >> >> Nun, mi provis plenumi la pruvon proof?. Ver?ajne, mi malsukcesas pro >> la propozicio P enhavas 'xs'. >> ?u iu havas sugeston ? Intuicie, mi bezonos indukton kun 'm?m?n'. >> >> >> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >> proof? (h ? []) = {! []!} >> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >> >> Anta?an dankon pro via venonta helpo ! >> >> Sincere, >> >> >> On 201i7-08-18 13:15, Andreas Abel wrote: >>> Dear Serge, >>> >>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>> >>> For the structural ord\ering (<), Agda sees that >>> >>> (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) >>> >>> The latter holds since xs is a subterm of x :: xs. >>> >>> > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>> >>> This does not work since c n x is not a subterm of n or x. >>> >>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>> >>> Since Agda does not reduce call arguments during structural >>> comparison, this fails, as >>> >>> id n is not the same as n >>> >>> (syntactically). >>> >>> > Andreas,unfortunately I really don't understand your explanation >>> of the >>> > /length/ of the list! >>> >>> My explanation was probably wrong. >>> >>> On 17.08.2017 12:18, Serge Leblanc wrote: >>>> Sinceran dankon Andreas. >>>> >>>> I don't understand that the following function (foldr?) is well >>>> accepted while foldl? is not? >>>> Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la >>>> funkciofoldl? maltrafas? >>>> >>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>> foldr? c (n ? []) = n >>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>>> >>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>> foldl? c (n ? []) = n >>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>> >>>> Termination checking failed for the following functions: foldl? >>>> >>>> I also remarked that Agda rejects that: >>>> Mi anka? remarkis ke agda malakceptas tion: >>>> >>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>> foldr? c (n ? []) = n >>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>>> where >>>> open import Function using (id) >>>> >>>> Termination checking failed for the following functions:foldr? >>>> >>>> Andreas,unfortunately I really don't understand your explanation of >>>> the /length/ of the list! >>>> Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la >>>> grandeco de la listo! >>>> >>>> >>>> On 2017-08-16 22:54, Andreas Abel wrote: >>>>> The function is structurally recursive on the /length/ of the >>>>> list, not on the list itself. You can expose the length by >>>>> >>>>> 1. using vectors instead of lists, or >>>>> 2. using sized lists (sized types). >>>>> >>>>> Alternatively, you can just define an auxiliary function first >>>>> which takes the first element of List+ as separate argument. Then >>>>> the recursion on the list goes through. >>>>> >>>>> Best, >>>>> Andreas >>>>> >>>>> On 16.08.2017 22:23, Serge Leblanc wrote: >>>>>> Thank you for your help. >>>>>> >>>>>> Why Agda refuses the following structurally decreasing function? >>>>>> >>>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>> foldl? c (n ? []) = n >>>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>>> >>>>>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking >>>>>> failed for the following functions: foldl? Problematic calls: >>>>>> foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>>>>> >>>>>> On 2017-08-14 20:55, Ulf Norell wrote: >>>>>>> The fact that foldr? is using a private recursive helper >>>>>>> function will likely make it impossible to prove your theorem. >>>>>>> >>>>>>> / Ulf >>>>>>> >>>>>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>>>>> > wrote: >>>>>>> >>>>>>> Maybe you can explain what approaches you have already tried >>>>>>> and >>>>>>> why you got stuck? I think people would be more inclined to >>>>>>> help >>>>>>> that way. >>>>>>> >>>>>>> To get you started on proof1, here's a hint: since you are >>>>>>> proving >>>>>>> something about the functions foldr? and _?_, you can take a >>>>>>> look >>>>>>> at their definitions and follow the same structure for your >>>>>>> proof. >>>>>>> For example, since foldr? is defined in terms of the helper >>>>>>> function foldr, you probably also need to define a helper lemma >>>>>>> that proves a similar statement about foldr. >>>>>>> >>>>>>> Best regards, >>>>>>> Jesper >>>>>>> >>>>>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc >>>>>>> <33dbqnxpy7if at gmail.com >>>>>>> >: >>>>>>> >>>>>>> Saluton, neniu bonvolas helpi min? >>>>>>> >>>>>>> Hi, nobody wants to help me? >>>>>>> >>>>>>> >>>>>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>>>>> Dear All, >>>>>>>> I need help to finish these lemmas. >>>>>>>> They have the same meaning, I am right? >>>>>>>> All helpers are welcome! >>>>>>>> >>>>>>>> Estimata ?iuj, >>>>>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>>>>> ?iuj helpantoj estas bonvenaj! >>>>>>>> >>>>>>>> Sincere. >>>>>>>> -- Serge Leblanc >>> >> >> -- >> Serge Leblanc >> ------------------------------------------------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_; z?n; s?s) open import Data.Nat.Properties public using (m?m?n) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; sym ) open import Relation.Binary open DecTotalOrder Data.Nat.decTotalOrder using () renaming (refl to ?-refl) open import Data.List using (List; []; _?_; _++_) --open import Function using (id) foldr : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr {A = A} c (n ? l) = foldr? n l where foldr? : A ? List A ? A foldr? n [] = n foldr? n (x ? xs) = c n (foldr? x xs) foldl : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl {A = A} c (n ? l) = foldl? n l where foldl? : A ? List A ? A foldl? n [] = n foldl? n (x ? xs) = foldl? (c n x) xs foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? f (h ? t) = Data.List.foldl f h t max : List? ? ? ? max l = foldl _?_ l max? : List? ? ? ? max? l = foldr _?_ l max? : List? ? ? ? max? (h ? t) = Data.List.foldl _?_ h t private max? : max [ 2 ] ? 2 max? = refl max?? : max? [ 2 ] ? 2 max?? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl max?? : max? (4 ?? 5 ?? [ 6 ]) ? 6 max?? = refl module Examples (_?_ : ? ? ? ? ?) (a b c : ?) where left? : foldl _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl left? : foldl? _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl right? : foldr _?_ (a ?? b ?? [ c ]) ? (a ? (b ? c)) right? = refl ?-right-identity : ? n ? n ? 0 ? n ?-right-identity zero = refl ?-right-identity (suc n) = refl ?-comm : ? x y ? x ? y ? y ? x ?-comm zero y = sym (?-right-identity y) ?-comm (suc x) zero = refl ?-comm (suc x) (suc y) = cong suc (?-comm x y) ?-asso : ? x y z ? x ? (y ? z) ? (x ? y) ? z ?-asso zero _ _ = refl ?-asso (suc x) zero _ = refl ?-asso (suc x) (suc y) zero = refl ?-asso (suc x) (suc y) (suc z) = cong suc (?-asso x y z) --open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; cong?) --open PropEq.?-Reasoning -- renaming (_??_?_ to _?[_]_) private abstract lemma? : ? x? x? xs ? Data.List.foldl _?_ x? (x? ? xs) ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? xs = refl lemma? : ? x? x? xs ? x? ? Data.List.foldl _?_ x? xs ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? [] = refl lemma? x? x? (h ? t) = begin x? ? Data.List.foldl _?_ (x? ? h) t ?? lemma? x? (x? ? h) t ? Data.List.foldl _?_ (x? ? (x? ? h)) t ?? cong (? s ? Data.List.foldl _?_ s t) (?-asso x? x? h) ? Data.List.foldl _?_ (x? ? x? ? h) t ? where open PropEq.?-Reasoning {- lemma? : ? x xs ? x ? max? xs ? max? (x ?? xs) lemma? x (h ? t) = lemma? x h t lemma? : ? xs x ? max? (x ?? xs) ? max? xs lemma? (h ? t) x = begin Data.List.foldl _?_ h t ?? m?m?n (Data.List.foldl _?_ h t) x ? Data.List.foldl _?_ h t ? x ?? ?-comm (Data.List.foldl _?_ h t) x ? x ? Data.List.foldl _?_ h t ?? lemma? x h t ? Data.List.foldl _?_ (x ? h) t ? where open Data.Nat.?-Reasoning -} lemma? : ? x xs ? max? (x ?? xs) ? x lemma? x (h ? t) = begin x ?? m?m?n x (Data.List.foldl _?_ h t) ? x ? Data.List.foldl _?_ h t ?? lemma? x h t ? Data.List.foldl _?_ (x ? h) t ? where open Data.Nat.?-Reasoning ?-trans : ? {i j k} ? i ? j ? j ? k ? i ? k ?-trans z?n _ = z?n ?-trans (s?s i?j) (s?s j?k) = s?s (?-trans i?j j?k) proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (h ? []) = {! [] !} proof? (h ? (x ? xs)) = {! lemma? x (h ? xs) ? proof? (h ? xs) !} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From marioxcc.MT at yandex.com Sun Aug 27 22:20:33 2017 From: marioxcc.MT at yandex.com (=?UTF-8?Q?Mario_Castel=c3=a1n_Castro?=) Date: Sun, 27 Aug 2017 15:20:33 -0500 Subject: [Agda] Bezonas helpon ! In-Reply-To: <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> Message-ID: On 27/08/17 15:15, Serge Leblanc wrote: > Mi malsukcesas fari la pruvon. Mi tute ne komprenas kiel oni konstruas > la structuron All. ?u iu povas montri al mi? What language is this? It looks a bit like Esperanto. -- Do not eat animals, respect them as you respect people. https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From harley.eades at gmail.com Mon Aug 28 00:27:07 2017 From: harley.eades at gmail.com (Harley D. Eades III) Date: Sun, 27 Aug 2017 18:27:07 -0400 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: References: Message-ID: <2B67F1E2-3D93-4D7D-AD13-8D9F6470957A@gmail.com> Hi, Mario. A very nice starting point might be the following book by Aaron Stump: https://www.amazon.com/Verified-Functional-Programming-Agda-Books/dp/1970001240 It has been used in the undergraduate programming languages course at the University of Iowa several times. Best, Harley > On Aug 27, 2017, at 3:48 PM, Mario Castel?n Castro wrote: > > Hello. > > I want to learn computer programming and proof formalization in Agda. I > am aware that there are *several* tutorials listed in > . > Listing several tutorials adds the difficulty of choosing among them. > > Obviously I do not want to read from an obsolete tutorial, but since it > is necessary to *already* know the current Agda to tell whether a > tutorial is current, I am instead writing to the members of this mailing > list to ask for a specific suggestion. A suggestion to read a book or > manual instead of tutorial is also welcome. > > In case it makes any difference, I want to mention that I am familiar > with classical propositional and first order logic, and to a lesser > degree, ZF set theory and HOL4. I do not have any experience with > dependent types. > > I am willing to read a book about type theory in parallel with > Agda-specific material if this is required. > > Regards. > > -- > Do not eat animals, respect them as you respect people. > https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Message signed with OpenPGP using GPGMail URL: From leo at halfaya.org Mon Aug 28 01:44:53 2017 From: leo at halfaya.org (John Leo) Date: Sun, 27 Aug 2017 16:44:53 -0700 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: <2B67F1E2-3D93-4D7D-AD13-8D9F6470957A@gmail.com> References: <2B67F1E2-3D93-4D7D-AD13-8D9F6470957A@gmail.com> Message-ID: My recommended sources for learning type theory, Agda, and related topics: https://github.com/halfaya/BayHac/blob/master/references.md Stump's book is like an easier version of Software Foundations, using Agda. Since it is so expensive and SF is free, I recommend going through the latter and trying to solve the exercises in Agda. This requires some amount of sophistication with Agda already. It is a very worthwhile exercise, both for learning Agda and comparing it to Coq. John On Sun, Aug 27, 2017 at 3:27 PM, Harley D. Eades III wrote: > Hi, Mario. > > A very nice starting point might be the following book by Aaron Stump: > > https://www.amazon.com/Verified-Functional-Programming-Agda-Books/dp/ > 1970001240 > > It has been used in the undergraduate programming languages course at the > University of Iowa several times. > > Best, > Harley > > > On Aug 27, 2017, at 3:48 PM, Mario Castel?n Castro < > marioxcc.MT at yandex.com> wrote: > > > > Hello. > > > > I want to learn computer programming and proof formalization in Agda. I > > am aware that there are *several* tutorials listed in > > . > > Listing several tutorials adds the difficulty of choosing among them. > > > > Obviously I do not want to read from an obsolete tutorial, but since it > > is necessary to *already* know the current Agda to tell whether a > > tutorial is current, I am instead writing to the members of this mailing > > list to ask for a specific suggestion. A suggestion to read a book or > > manual instead of tutorial is also welcome. > > > > In case it makes any difference, I want to mention that I am familiar > > with classical propositional and first order logic, and to a lesser > > degree, ZF set theory and HOL4. I do not have any experience with > > dependent types. > > > > I am willing to read a book about type theory in parallel with > > Agda-specific material if this is required. > > > > Regards. > > > > -- > > Do not eat animals, respect them as you respect people. > > https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron-stump at uiowa.edu Mon Aug 28 03:23:47 2017 From: aaron-stump at uiowa.edu (Aaron Stump) Date: Sun, 27 Aug 2017 20:23:47 -0500 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: References: <2B67F1E2-3D93-4D7D-AD13-8D9F6470957A@gmail.com> Message-ID: Hi, all. Sorry if the price of my book is high -- I have no input or control of that, as it is all determined by the publisher. One good thing is that many universities subscribe to ACM Books as part of their subscription to the ACM Digital Library, and then the book is free to read online through that subscription (I believe the same is true if you have your own subscription to the ACM DL). Students in my class get the book completely free (electronic version) that way. Best, Aaron On Sun, Aug 27, 2017 at 6:44 PM, John Leo wrote: > My recommended sources for learning type theory, Agda, and related topics: > https://github.com/halfaya/BayHac/blob/master/references.md > > Stump's book is like an easier version of Software Foundations, using > Agda. Since it is so expensive and SF is free, I recommend going through > the latter and trying to solve the exercises in Agda. This requires some > amount of sophistication with Agda already. It is a very worthwhile > exercise, both for learning Agda and comparing it to Coq. > > John > > On Sun, Aug 27, 2017 at 3:27 PM, Harley D. Eades III < > harley.eades at gmail.com> wrote: > >> Hi, Mario. >> >> A very nice starting point might be the following book by Aaron Stump: >> >> https://www.amazon.com/Verified-Functional-Programming-Agda- >> Books/dp/1970001240 >> >> It has been used in the undergraduate programming languages course at the >> University of Iowa several times. >> >> Best, >> Harley >> >> > On Aug 27, 2017, at 3:48 PM, Mario Castel?n Castro < >> marioxcc.MT at yandex.com> wrote: >> > >> > Hello. >> > >> > I want to learn computer programming and proof formalization in Agda. I >> > am aware that there are *several* tutorials listed in >> > . >> > Listing several tutorials adds the difficulty of choosing among them. >> > >> > Obviously I do not want to read from an obsolete tutorial, but since it >> > is necessary to *already* know the current Agda to tell whether a >> > tutorial is current, I am instead writing to the members of this mailing >> > list to ask for a specific suggestion. A suggestion to read a book or >> > manual instead of tutorial is also welcome. >> > >> > In case it makes any difference, I want to mention that I am familiar >> > with classical propositional and first order logic, and to a lesser >> > degree, ZF set theory and HOL4. I do not have any experience with >> > dependent types. >> > >> > I am willing to read a book about type theory in parallel with >> > Agda-specific material if this is required. >> > >> > Regards. >> > >> > -- >> > Do not eat animals, respect them as you respect people. >> > https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marioxcc.MT at yandex.com Mon Aug 28 15:28:22 2017 From: marioxcc.MT at yandex.com (=?UTF-8?Q?Mario_Castel=c3=a1n_Castro?=) Date: Mon, 28 Aug 2017 08:28:22 -0500 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: References: <2B67F1E2-3D93-4D7D-AD13-8D9F6470957A@gmail.com> Message-ID: <275c2137-bfce-61af-6724-fc2daec56e47@yandex.com> Thanks everybody for the replies. > Stump's book is like an easier version of Software Foundations, using > Agda. Since it is so expensive and SF is free, I recommend going through > the latter and trying to solve the exercises in Agda. I do not see how this approach would work because learning the mathematical background is not enough, I also have to learn the syntax and how to use the interface of the software. A book about a different language will obviously not cover that for Agda. ----- Regards. -- Do not eat animals, respect them as you respect people. https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From m.escardo at cs.bham.ac.uk Mon Aug 28 22:24:35 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 28 Aug 2017 21:24:35 +0100 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: References: Message-ID: <1ffa6b2f-0e41-8d99-4408-dbf6b30345ef@cs.bham.ac.uk> On 27/08/17 20:48, marioxcc.MT at yandex.com wrote: > Hello. > > I want to learn computer programming and proof formalization in Agda. I > am aware that there are *several* tutorials listed in > . > Listing several tutorials adds the difficulty of choosing among them. "Dependent types at work" by Bove and Dybjer is an excellent starting point. http://www.cse.chalmers.se/~peterd/papers/DependentTypesAtWork.pdf Martin > > Obviously I do not want to read from an obsolete tutorial, but since it > is necessary to *already* know the current Agda to tell whether a > tutorial is current, I am instead writing to the members of this mailing > list to ask for a specific suggestion. A suggestion to read a book or > manual instead of tutorial is also welcome. > > In case it makes any difference, I want to mention that I am familiar > with classical propositional and first order logic, and to a lesser > degree, ZF set theory and HOL4. I do not have any experience with > dependent types. > > I am willing to read a book about type theory in parallel with > Agda-specific material if this is required. > > Regards. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From marioxcc.MT at yandex.com Wed Aug 30 18:26:25 2017 From: marioxcc.MT at yandex.com (=?UTF-8?Q?Mario_Castel=c3=a1n_Castro?=) Date: Wed, 30 Aug 2017 11:26:25 -0500 Subject: [Agda] Request of suggestion of learning material for Agda In-Reply-To: <1ffa6b2f-0e41-8d99-4408-dbf6b30345ef@cs.bham.ac.uk> References: <1ffa6b2f-0e41-8d99-4408-dbf6b30345ef@cs.bham.ac.uk> Message-ID: <057a1823-64fe-4691-c0f0-b03e305cb18e@yandex.com> On 28/08/17 15:24, Martin Escardo wrote: > "Dependent types at work" by Bove and Dybjer is an excellent starting > point. > > http://www.cse.chalmers.se/~peterd/papers/DependentTypesAtWork.pdf Thanks you. -- Do not eat animals; respect them as you respect people. https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From 33dbqnxpy7if at gmail.com Thu Aug 31 01:29:38 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Thu, 31 Aug 2017 01:29:38 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> Message-ID: <1c6f2182-5c1c-4de0-18d3-8a5b2af34938@gmail.com> Does somone have an example of uses All? ?u iu havas ekzemplon de 'All' uzado? Thank you very much! Sinceran dankon! On 2017-08-27 22:15, Serge Leblanc wrote: > > I fail to make the proof. I don't understand how built the All > structure. Can someone show me? > > Mi malsukcesas fari la pruvon. Mi tute ne komprenas kiel oni konstruas > la structuron All. ?u iu povas montri al mi? > > Sinceran dankon ! > > > On 2017-08-22 17:53, Andreas Abel wrote: >> It might be sufficient to prove >> >> max (x :: xs) >= max xs >> >> and use this in your induction hypothesis (with transitivity of >=). >> >> Cheers, >> Andreas >> >> On 21.08.2017 08:07, Serge Leblanc wrote: >>> Thank you very much, Andreas, I understand more. >>> >>> Now I have tried to proveproof?. Surely, I miss because the >>> proposition P contains 'xs'. Does anyone have a suggestion? >>> Intuitively, I need an induction with 'm?m?n'. >>> >>> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >>> proof? (h ? []) = {! []!} >>> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >>> >>> Thank you for your help! >>> >>> Koran dankon, Andreas, mi plibone komprenas. >>> >>> Nun, mi provis plenumi la pruvon proof?. Ver?ajne, mi malsukcesas >>> pro la propozicio P enhavas 'xs'. >>> ?u iu havas sugeston ? Intuicie, mi bezonos indukton kun 'm?m?n'. >>> >>> >>> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >>> proof? (h ? []) = {! []!} >>> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >>> >>> Anta?an dankon pro via venonta helpo ! >>> >>> Sincere, >>> >>> >>> On 201i7-08-18 13:15, Andreas Abel wrote: >>>> Dear Serge, >>>> >>>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>>> >>>> For the structural ord\ering (<), Agda sees that >>>> >>>> (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) >>>> >>>> The latter holds since xs is a subterm of x :: xs. >>>> >>>> > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>> >>>> This does not work since c n x is not a subterm of n or x. >>>> >>>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>>> >>>> Since Agda does not reduce call arguments during structural >>>> comparison, this fails, as >>>> >>>> id n is not the same as n >>>> >>>> (syntactically). >>>> >>>> > Andreas,unfortunately I really don't understand your explanation >>>> of the >>>> > /length/ of the list! >>>> >>>> My explanation was probably wrong. >>>> >>>> On 17.08.2017 12:18, Serge Leblanc wrote: >>>>> Sinceran dankon Andreas. >>>>> >>>>> I don't understand that the following function (foldr?) is well >>>>> accepted while foldl? is not? >>>>> Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la >>>>> funkciofoldl? maltrafas? >>>>> >>>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>> foldr? c (n ? []) = n >>>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>>>> >>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>> foldl? c (n ? []) = n >>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>> >>>>> Termination checking failed for the following functions: foldl? >>>>> >>>>> I also remarked that Agda rejects that: >>>>> Mi anka? remarkis ke agda malakceptas tion: >>>>> >>>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>> foldr? c (n ? []) = n >>>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>>>> where >>>>> open import Function using (id) >>>>> >>>>> Termination checking failed for the following functions:foldr? >>>>> >>>>> Andreas,unfortunately I really don't understand your explanation >>>>> of the /length/ of the list! >>>>> Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la >>>>> grandeco de la listo! >>>>> >>>>> >>>>> On 2017-08-16 22:54, Andreas Abel wrote: >>>>>> The function is structurally recursive on the /length/ of the >>>>>> list, not on the list itself. You can expose the length by >>>>>> >>>>>> 1. using vectors instead of lists, or >>>>>> 2. using sized lists (sized types). >>>>>> >>>>>> Alternatively, you can just define an auxiliary function first >>>>>> which takes the first element of List+ as separate argument. Then >>>>>> the recursion on the list goes through. >>>>>> >>>>>> Best, >>>>>> Andreas >>>>>> >>>>>> On 16.08.2017 22:23, Serge Leblanc wrote: >>>>>>> Thank you for your help. >>>>>>> >>>>>>> Why Agda refuses the following structurally decreasing function? >>>>>>> >>>>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>>> foldl? c (n ? []) = n >>>>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>>>> >>>>>>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking >>>>>>> failed for the following functions: foldl? Problematic calls: >>>>>>> foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>>>>>> >>>>>>> On 2017-08-14 20:55, Ulf Norell wrote: >>>>>>>> The fact that foldr? is using a private recursive helper >>>>>>>> function will likely make it impossible to prove your theorem. >>>>>>>> >>>>>>>> / Ulf >>>>>>>> >>>>>>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>>>>>>> > wrote: >>>>>>>> >>>>>>>> Maybe you can explain what approaches you have already >>>>>>>> tried and >>>>>>>> why you got stuck? I think people would be more inclined to >>>>>>>> help >>>>>>>> that way. >>>>>>>> >>>>>>>> To get you started on proof1, here's a hint: since you are >>>>>>>> proving >>>>>>>> something about the functions foldr? and _?_, you can take >>>>>>>> a look >>>>>>>> at their definitions and follow the same structure for your >>>>>>>> proof. >>>>>>>> For example, since foldr? is defined in terms of the helper >>>>>>>> function foldr, you probably also need to define a helper >>>>>>>> lemma >>>>>>>> that proves a similar statement about foldr. >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Jesper >>>>>>>> >>>>>>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc >>>>>>>> <33dbqnxpy7if at gmail.com >>>>>>>> >: >>>>>>>> >>>>>>>> Saluton, neniu bonvolas helpi min? >>>>>>>> >>>>>>>> Hi, nobody wants to help me? >>>>>>>> >>>>>>>> >>>>>>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>>>>>> Dear All, >>>>>>>>> I need help to finish these lemmas. >>>>>>>>> They have the same meaning, I am right? >>>>>>>>> All helpers are welcome! >>>>>>>>> >>>>>>>>> Estimata ?iuj, >>>>>>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>>>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>>>>>> ?iuj helpantoj estas bonvenaj! >>>>>>>>> >>>>>>>>> Sincere. >>>>>>>>> -- Serge Leblanc >>>> >>> >>> -- >>> Serge Leblanc >>> ------------------------------------------------------------------------ >>> >>> gpg --search-keys 0x67B17A3F >>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >> > > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_; z?n; s?s) open import Data.Nat.Properties public using (m?m?n) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; sym ) open import Relation.Binary open DecTotalOrder Data.Nat.decTotalOrder using () renaming (refl to ?-refl) open import Data.List using (List; []; _?_; _++_) --open import Function using (id) foldr : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr {A = A} c (n ? l) = foldr? n l where foldr? : A ? List A ? A foldr? n [] = n foldr? n (x ? xs) = c n (foldr? x xs) foldl : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl {A = A} c (n ? l) = foldl? n l where foldl? : A ? List A ? A foldl? n [] = n foldl? n (x ? xs) = foldl? (c n x) xs foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? f (h ? t) = Data.List.foldl f h t max : List? ? ? ? max l = foldl _?_ l max? : List? ? ? ? max? l = foldr _?_ l max? : List? ? ? ? max? (h ? t) = Data.List.foldl _?_ h t private max? : max [ 2 ] ? 2 max? = refl max?? : max? [ 2 ] ? 2 max?? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl max?? : max? (4 ?? 5 ?? [ 6 ]) ? 6 max?? = refl module Examples (_?_ : ? ? ? ? ?) (a b c : ?) where left? : foldl _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl left? : foldl? _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl right? : foldr _?_ (a ?? b ?? [ c ]) ? (a ? (b ? c)) right? = refl ?-right-identity : ? n ? n ? 0 ? n ?-right-identity zero = refl ?-right-identity (suc n) = refl ?-comm : ? x y ? x ? y ? y ? x ?-comm zero y = sym (?-right-identity y) ?-comm (suc x) zero = refl ?-comm (suc x) (suc y) = cong suc (?-comm x y) ?-asso : ? x y z ? x ? (y ? z) ? (x ? y) ? z ?-asso zero _ _ = refl ?-asso (suc x) zero _ = refl ?-asso (suc x) (suc y) zero = refl ?-asso (suc x) (suc y) (suc z) = cong suc (?-asso x y z) --open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; cong?) --open PropEq.?-Reasoning -- renaming (_??_?_ to _?[_]_) private abstract lemma? : ? x? x? xs ? Data.List.foldl _?_ x? (x? ? xs) ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? xs = refl lemma? : ? x? x? xs ? x? ? Data.List.foldl _?_ x? xs ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? [] = refl lemma? x? x? (h ? t) = begin x? ? Data.List.foldl _?_ (x? ? h) t ?? lemma? x? (x? ? h) t ? Data.List.foldl _?_ (x? ? (x? ? h)) t ?? cong (? s ? Data.List.foldl _?_ s t) (?-asso x? x? h) ? Data.List.foldl _?_ (x? ? x? ? h) t ? where open PropEq.?-Reasoning {- lemma? : ? x xs ? x ? max? xs ? max? (x ?? xs) lemma? x (h ? t) = lemma? x h t lemma? : ? xs x ? max? (x ?? xs) ? max? xs lemma? (h ? t) x = begin Data.List.foldl _?_ h t ?? m?m?n (Data.List.foldl _?_ h t) x ? Data.List.foldl _?_ h t ? x ?? ?-comm (Data.List.foldl _?_ h t) x ? x ? Data.List.foldl _?_ h t ?? lemma? x h t ? Data.List.foldl _?_ (x ? h) t ? where open Data.Nat.?-Reasoning -} lemma? : ? xs x ? max? (x ?? xs) ? x lemma? (h ? t) x = begin x ?? m?m?n x (Data.List.foldl _?_ h t) ? x ? Data.List.foldl _?_ h t ?? lemma? x h t ? Data.List.foldl _?_ (x ? h) t ? where open Data.Nat.?-Reasoning ?-trans : ? {i j k} ? i ? j ? j ? k ? i ? k ?-trans z?n _ = z?n ?-trans (s?s i?j) (s?s j?k) = s?s (?-trans i?j j?k) proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (h ? []) = {! [] !} proof? (h ? (x ? xs)) = {! lemma? (h ? xs) ? proof? (h ? xs) !} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From m.escardo at cs.bham.ac.uk Sat Sep 2 09:37:37 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Sat, 2 Sep 2017 08:37:37 +0100 Subject: [Agda] School and workshop on univalent mathematics, 11-15 Dec, Birmingham (UK) Message-ID: <7deb8398-ec14-65d2-6621-4cd7b191a498@cs.bham.ac.uk> We are pleased to announce the School and Workshop on Univalent Mathematics to be held at the University of Birmingham (UK), December 11-15, 2017. Overview ---------- Univalent Type Theory is an emerging field of mathematics that studies a fruitful relationship between homotopy theory and (dependent) type theory. This relation plays a crucial role in Voevodsky's program of Univalent Foundations, a new approach to foundations of mathematics, based on ideas from homotopy theory, such as the Univalence Principle. The UniMath library is a large repository of computer-checked mathematics, developed from the univalent viewpoint. The workshop will give many young researchers an opportunity to familiarize themselves with the UniMath library and become contributors. Format ---------- During the school/workshop, the participants will be working either individually or in small groups, mentored by experienced UniMath developers. The problems will be designed to be of practical importance in the development of the UniMath library as well as of pedagogical value to participants. Application and funding ---------- For information on how to participate, please visit https://unimath.github.io/bham2017/. The deadline to apply is October 15, 2017. Financial support is available to cover participants' travel and lodging expenses. Mentors ---------- Benedikt Ahrens (University of Birmingham) Mart?n Escard? (University of Birmingham) Daniel Grayson (University of Illinois Urbana-Champaign) Joseph Helfer (Stanford University) Kuen-Bang Hou (Favonia) (Institute for Advanced Study, Princeton) Chris Kapulkin (University of Western Ontario) Peter Lumsdaine (Stockholm University) Ralph Matthes (CNRS, University Toulouse) Vladimir Voevodsky (Institute for Advanced Study, Princeton) Matthew Weaver (Princeton University) Organisers ---------- Benedikt Ahrens Mart?n Escard? Achim Jung Chris Kapulkin Vladimir Voevodsky For any questions, contact Benedikt Ahrens (benedikt.ahrens at gmx.net) or Chris Kapulkin (kkapulki at uwo.ca). From andreas.abel at ifi.lmu.de Sat Sep 2 19:25:37 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 2 Sep 2017 19:25:37 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <1c6f2182-5c1c-4de0-18d3-8a5b2af34938@gmail.com> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> <1c6f2182-5c1c-4de0-18d3-8a5b2af34938@gmail.com> Message-ID: <880c5cfb-d07f-908c-1b3e-f392a7c35245@ifi.lmu.de> Serge, something of type All P (x1 :: x2 :: x3 :: []) should be a list of proofs p1 :: p2 :: p3 :: [] where p1 : P x1 p2 : P x2 p3 : P x3 Best, Andreas On 31.08.2017 01:29, Serge Leblanc wrote: > Does somone have an example of uses All? > ?u iu havas ekzemplon de 'All' uzado? > > Thank you very much! > Sinceran dankon! > > > On 2017-08-27 22:15, Serge Leblanc wrote: >> >> I fail to make the proof. I don't understand how built the All >> structure. Can someone show me? >> >> Mi malsukcesas fari la pruvon. Mi tute ne komprenas kiel oni konstruas >> la structuron All. ?u iu povas montri al mi? >> >> Sinceran dankon ! >> >> >> On 2017-08-22 17:53, Andreas Abel wrote: >>> It might be sufficient to prove >>> >>> max (x :: xs) >= max xs >>> >>> and use this in your induction hypothesis (with transitivity of >=). >>> >>> Cheers, >>> Andreas >>> >>> On 21.08.2017 08:07, Serge Leblanc wrote: >>>> Thank you very much, Andreas, I understand more. >>>> >>>> Now I have tried to proveproof?. Surely, I miss because the >>>> proposition P contains 'xs'. Does anyone have a suggestion? >>>> Intuitively, I need an induction with 'm?m?n'. >>>> >>>> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >>>> proof? (h ? []) = {! []!} >>>> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >>>> >>>> Thank you for your help! >>>> >>>> Koran dankon, Andreas, mi plibone komprenas. >>>> >>>> Nun, mi provis plenumi la pruvon proof?. Ver?ajne, mi malsukcesas >>>> pro la propozicio P enhavas 'xs'. >>>> ?u iu havas sugeston ? Intuicie, mi bezonos indukton kun 'm?m?n'. >>>> >>>> >>>> proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) >>>> proof? (h ? []) = {! []!} >>>> proof? (h ? (x ? xs)) = {! (proof? (x ? xs))!} >>>> >>>> Anta?an dankon pro via venonta helpo ! >>>> >>>> Sincere, >>>> >>>> >>>> On 201i7-08-18 13:15, Andreas Abel wrote: >>>>> Dear Serge, >>>>> >>>>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>>>> >>>>> For the structural ord\ering (<), Agda sees that >>>>> >>>>> (n :: xs) < (n :: (x :: xs)) iff xs < (x :: xs) >>>>> >>>>> The latter holds since xs is a subterm of x :: xs. >>>>> >>>>> > foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>> >>>>> This does not work since c n x is not a subterm of n or x. >>>>> >>>>> > foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>>>> >>>>> Since Agda does not reduce call arguments during structural >>>>> comparison, this fails, as >>>>> >>>>> id n is not the same as n >>>>> >>>>> (syntactically). >>>>> >>>>> > Andreas,unfortunately I really don't understand your explanation >>>>> of the >>>>> > /length/ of the list! >>>>> >>>>> My explanation was probably wrong. >>>>> >>>>> On 17.08.2017 12:18, Serge Leblanc wrote: >>>>>> Sinceran dankon Andreas. >>>>>> >>>>>> I don't understand that the following function (foldr?) is well >>>>>> accepted while foldl? is not? >>>>>> Mi ne komprenas kial la sekva funkcio (foldr?) trafas kvankam la >>>>>> funkciofoldl? maltrafas? >>>>>> >>>>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>> foldr? c (n ? []) = n >>>>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (n ? xs)) >>>>>> >>>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>> foldl? c (n ? []) = n >>>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>>> >>>>>> Termination checking failed for the following functions: foldl? >>>>>> >>>>>> I also remarked that Agda rejects that: >>>>>> Mi anka? remarkis ke agda malakceptas tion: >>>>>> >>>>>> foldr? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>> foldr? c (n ? []) = n >>>>>> foldr? c (n ? (x ? xs)) = c x (foldr? c (*id* n ? xs)) >>>>>> where >>>>>> open import Function using (id) >>>>>> >>>>>> Termination checking failed for the following functions:foldr? >>>>>> >>>>>> Andreas,unfortunately I really don't understand your explanation >>>>>> of the /length/ of the list! >>>>>> Andreas, beda?rinde mi vere ne komprenis vian klarigon pri la >>>>>> grandeco de la listo! >>>>>> >>>>>> >>>>>> On 2017-08-16 22:54, Andreas Abel wrote: >>>>>>> The function is structurally recursive on the /length/ of the >>>>>>> list, not on the list itself. You can expose the length by >>>>>>> >>>>>>> 1. using vectors instead of lists, or >>>>>>> 2. using sized lists (sized types). >>>>>>> >>>>>>> Alternatively, you can just define an auxiliary function first >>>>>>> which takes the first element of List+ as separate argument. Then >>>>>>> the recursion on the list goes through. >>>>>>> >>>>>>> Best, >>>>>>> Andreas >>>>>>> >>>>>>> On 16.08.2017 22:23, Serge Leblanc wrote: >>>>>>>> Thank you for your help. >>>>>>>> >>>>>>>> Why Agda refuses the following structurally decreasing function? >>>>>>>> >>>>>>>> foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A >>>>>>>> foldl? c (n ? []) = n >>>>>>>> foldl? c (n ? (x ? xs)) = foldl? c (c n x ? xs) >>>>>>>> >>>>>>>> /home/serge/agda/Maximal.agda:47,1-49,50 Termination checking >>>>>>>> failed for the following functions: foldl? Problematic calls: >>>>>>>> foldl? c (c n x ? xs) (at /home/serge/agda/Maximal.agda:49,27-33) >>>>>>>> >>>>>>>> On 2017-08-14 20:55, Ulf Norell wrote: >>>>>>>>> The fact that foldr? is using a private recursive helper >>>>>>>>> function will likely make it impossible to prove your theorem. >>>>>>>>> >>>>>>>>> / Ulf >>>>>>>>> >>>>>>>>> On Mon, Aug 14, 2017 at 6:47 PM, Jesper Cockx >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> Maybe you can explain what approaches you have already >>>>>>>>> tried and >>>>>>>>> why you got stuck? I think people would be more inclined to >>>>>>>>> help >>>>>>>>> that way. >>>>>>>>> >>>>>>>>> To get you started on proof1, here's a hint: since you are >>>>>>>>> proving >>>>>>>>> something about the functions foldr? and _?_, you can take >>>>>>>>> a look >>>>>>>>> at their definitions and follow the same structure for your >>>>>>>>> proof. >>>>>>>>> For example, since foldr? is defined in terms of the helper >>>>>>>>> function foldr, you probably also need to define a helper >>>>>>>>> lemma >>>>>>>>> that proves a similar statement about foldr. >>>>>>>>> >>>>>>>>> Best regards, >>>>>>>>> Jesper >>>>>>>>> >>>>>>>>> 2017-08-14 18:33 GMT+02:00 Serge Leblanc >>>>>>>>> <33dbqnxpy7if at gmail.com >>>>>>>>> >: >>>>>>>>> >>>>>>>>> Saluton, neniu bonvolas helpi min? >>>>>>>>> >>>>>>>>> Hi, nobody wants to help me? >>>>>>>>> >>>>>>>>> >>>>>>>>> On 2017-08-06 18:23, Serge Leblanc wrote: >>>>>>>>>> Dear All, >>>>>>>>>> I need help to finish these lemmas. >>>>>>>>>> They have the same meaning, I am right? >>>>>>>>>> All helpers are welcome! >>>>>>>>>> >>>>>>>>>> Estimata ?iuj, >>>>>>>>>> Mi bezonas helpon por da?rigi ci-tiuj pruvojn! >>>>>>>>>> ?u ili havas je la saman signifon! ?u mi pravas? >>>>>>>>>> ?iuj helpantoj estas bonvenaj! >>>>>>>>>> >>>>>>>>>> Sincere. >>>>>>>>>> -- Serge Leblanc >>>>> >>>> >>>> -- >>>> Serge Leblanc >>>> ------------------------------------------------------------------------ >>>> >>>> gpg --search-keys 0x67B17A3F >>>> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F >>> >> >> -- >> Serge Leblanc >> ------------------------------------------------------------------------ >> gpg --search-keys 0x67B17A3F >> Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > -- > Serge Leblanc > ------------------------------------------------------------------------ > gpg --search-keys 0x67B17A3F > Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From kaposi.ambrus at gmail.com Mon Sep 4 16:04:32 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Mon, 4 Sep 2017 16:04:32 +0200 Subject: [Agda] TYPES 2017 post-proceedings open call for papers Message-ID: Abstract submission deadline 16 October 2017 Open call for papers Post-proceedings of the 23rd International Conference on Types for Proofs and Programs TYPES 2017 TYPES is a major forum for the presentation of research on all aspects of type theory and its applications. TYPES 2017 was held between 29 May and 1 June in Budapest, Hungary. The post-proceedings volume will be published in LIPIcs, Leibniz International Proceedings in Informatics, an open-access series of conference proceedings (http://www.dagstuhl.de/en/publications/lipics). Submission to this post-proceedings volume is open to everyone, also to those who did not participate in the conference. We would like to invite all researchers that study and apply type systems to share their results. In particular, we welcome submissions on the following topics: * Foundations of type theory and constructive mathematics; * Homotopy type theory; * Applications of type theory; * Dependently typed programming; * Industrial uses of type theory technology; * Meta-theoretic studies of type systems; * Proof assistants and proof technology; * Automation in computer-assisted reasoning; * Links between type theory and functional programming; * Formalizing mathematics using type theory; * Type theory in linguistics. IMPORTANT DATES * Abstract submission: 16 October 2017 * Paper submission: 23 October 2017 * Author notification: 26 March 2018 DETAILS * Papers have to be formatted with lipics.cls and adhere to the style requirements of LIPIcs. http://www.dagstuhl.de/en/publications/lipics/instructions-for-authors/ * The recommended length of a paper is 15-25 pages. Submissions significantly longer than 25 pages will not be considered. * Papers have to be submitted in pdf through EasyChair: https://easychair.org/conferences/?conf=types2017postproceed * Authors have the option to attach to their submission a zip or tgz file containing code (formalized proofs or programs), but reviewers are not obliged to take those attachments into account and they will not be published. * More information is available on http://types2017.elte.hu/#postproc * In case of questions, please contact one of the editors. EDITORS Andreas Abel andreas.abel at gu.se Gothenburg University, Sweden Fredrik Nordvall Forsberg fredrik.nordvall-forsberg at strath.ac.uk University of Strathclyde, United Kingdom Ambrus Kaposi akaposi at inf.elte.hu E?tv?s Lor?nd University, Hungary From martin.stone.davis at gmail.com Fri Sep 8 00:59:12 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Thu, 7 Sep 2017 15:59:12 -0700 Subject: [Agda] failure to solve b/c undecidable? custom meta solvers? Message-ID: <3a9866d5-2c68-ecd4-5ad8-2726ff3ce564@gmail.com> The below code type-checks if the hole is filled with `x1`. I believe that this is the unique solution (which Agda fails to solve). ```agda postulate A : Set f : (B : A ? Set) (x : A) ? B x ? B x x0 : A test : (B : A ? Set) (x : A) ? B x ? B x test B1 x1 bx1 = f (? x2 ? B1 {!x1!}) x0 bx1 ``` `show-constraints` reports: ?0 := _10 x1 x2 _13 := ? B1 x1 bx1 ? f (? x2 ? B1 (_10 x1 x2)) x0 (_12 B1 x1 bx1) [blocked by problem 19] [19,20] (_10 x1 x0) = x1 : A _11 := ? B1 x1 bx1 ? bx1 [blocked by problem 17] [17,18] x1 = (_10 x1 x0) : A I'm surprised that the constraint `_10 x1 x0 = x1` does not lead to the unique solution `_10 := ? x1 x0 ? x1`. Taking a look at the debug output, I gather that Agda's failure to solve has something to do with metas being "frozen" and/or a failure to "prune" (though I don't know what that all means). * Am I right that there is a unique solution which Agda is failing to find? * I'm guessing that problems like this are the inevitable result of undecidability. Is that right? And so it's not a bug? And so I shouldn't bother reporting such things? * Is the constraint-solver written-up somewhere separately from the code? With explanations of "pruning" and "freezing", etc.? * Barring a fix, I'm hunting for possible workarounds. The notion of a "custom meta solver" is mentioned in Agda issue #2513. I take it that that refers to a possible enhancement somewhere down the road for Agda. Roughly speaking, how would that work? Would that allow an Agda programmer to "hook-in" to the built-in solver and then nudge it towards finding the unique solution to the above? Or is the idea instead to allow only for solvers that are implemented completely separately from the existing machinery? From ulf.norell at gmail.com Fri Sep 8 07:45:55 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 8 Sep 2017 07:45:55 +0200 Subject: [Agda] failure to solve b/c undecidable? custom meta solvers? In-Reply-To: <3a9866d5-2c68-ecd4-5ad8-2726ff3ce564@gmail.com> References: <3a9866d5-2c68-ecd4-5ad8-2726ff3ce564@gmail.com> Message-ID: > I'm surprised that the constraint `_10 x1 x0 = x1` does not lead to the unique solution `_10 := ? x1 x0 ? x1`. The reason for this is that x0 is not a variable but a postulate. You get the expected solution if you change the code to ```agda postulate A : Set f : (B : A ? Set) (x : A) ? B x ? B x module _ (x0 : A) where test : (B : A ? Set) (x : A) ? B x ? B x test B1 x1 bx1 = f (? x2 ? B1 {!x1!}) x0 bx1 ``` The idea for custom solvers would be to let you program them with the reflection machinery. Currently it doesn't let you access unsolved constraints, but that would be a reasonable extension to add. / Ulf On Fri, Sep 8, 2017 at 12:59 AM, Martin Stone Davis < martin.stone.davis at gmail.com> wrote: > The below code type-checks if the hole is filled with `x1`. I believe that > this is the unique solution (which Agda fails to solve). > > ```agda > postulate > A : Set > f : (B : A ? Set) (x : A) ? B x ? B x > x0 : A > > test : (B : A ? Set) (x : A) ? B x ? B x > test B1 x1 bx1 = f (? x2 ? B1 {!x1!}) x0 bx1 > ``` > > `show-constraints` reports: > > ?0 := _10 x1 x2 > _13 := ? B1 x1 bx1 ? f (? x2 ? B1 (_10 x1 x2)) x0 (_12 B1 x1 bx1) > [blocked by problem 19] > [19,20] (_10 x1 x0) = x1 : A > _11 := ? B1 x1 bx1 ? bx1 [blocked by problem 17] > [17,18] x1 = (_10 x1 x0) : A > > I'm surprised that the constraint `_10 x1 x0 = x1` does not lead to the > unique solution `_10 := ? x1 x0 ? x1`. Taking a look at the debug output, I > gather that Agda's failure to solve has something to do with metas being > "frozen" and/or a failure to "prune" (though I don't know what that all > means). > > * Am I right that there is a unique solution which Agda is failing to find? > > * I'm guessing that problems like this are the inevitable result of > undecidability. Is that right? And so it's not a bug? And so I shouldn't > bother reporting such things? > > * Is the constraint-solver written-up somewhere separately from the code? > With explanations of "pruning" and "freezing", etc.? > > * Barring a fix, I'm hunting for possible workarounds. The notion of a > "custom meta solver" is mentioned in Agda issue #2513. I take it that that > refers to a possible enhancement somewhere down the road for Agda. Roughly > speaking, how would that work? Would that allow an Agda programmer to > "hook-in" to the built-in solver and then nudge it towards finding the > unique solution to the above? Or is the idea instead to allow only for > solvers that are implemented completely separately from the existing > machinery? > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Sat Sep 9 01:57:01 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 8 Sep 2017 18:57:01 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 Message-ID: Dear all, The Agda Team is very pleased to announce the release of Agda 2.5.3. GHC supported versions =============== Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. Installation ======= cabal update && cabal install Agda Standard library ========== For the time being, you can use the master branch of the standard library with Agda 2.5.3. This master branch is available at https://github.com/agda/agda-stdlib/ Known problems ========== Agda 2.5.3 is not compatible with Alex 3.2.2 when using the (default) cpphs preprocessor. You can use a different version of Alex (e.g. 3.2.1, 3.2.3, etc.) or you can use the cpp preprocessor by running the following command: cabal install -f -cpphs What is new, fixed issues and incompatibilities ============================ https://github.com/agda/agda/blob/de04d4564b586114a9fb89ed7f7095cc3cd25810/CHANGELOG.md Enjoy Agda 2.5.3. -- Andr?s on behalf of the Agda Team La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mechvel at botik.ru Sun Sep 10 13:48:06 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 10 Sep 2017 14:48:06 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: References: Message-ID: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the release of Agda 2.5.3. > > GHC supported versions > =============== > > Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. > > Installation > ======= > > cabal update && cabal install Agda > [..] I command (under Debian Linux) > cabal update > cabal install Agda And it responds Resolving dependencies... All the requested packages are already installed: Agda-2.6.0 Use --reinstall if you want to reinstall anyway. Is this because I have agda-2.5.3-candidate installed before? Do I need to command > cabal install --reinstall Agda ? Regards, ------ Sergei From abela at chalmers.se Sun Sep 10 13:59:12 2017 From: abela at chalmers.se (Andreas Abel) Date: Sun, 10 Sep 2017 13:59:12 +0200 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> Message-ID: <60508b72-e9b4-ded5-e298-f85fdb3b9f78@chalmers.se> > > cabal install Agda > > And it responds > > Resolving dependencies... > All the requested packages are already installed: > Agda-2.6.0 > Use --reinstall if you want to reinstall anyway. Seems cabal is smarter these days. Does the following work? cabal install Agda-2.5.4 Anyway, if you are working with Agda-2.6.0 (development version), I see no reason good to install the released version. Rather, update your clone of the github repository and install from there. Best, Andreas On 10.09.2017 13:48, Sergei Meshveliani wrote: > On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: >> Dear all, >> >> The Agda Team is very pleased to announce the release of Agda 2.5.3. >> >> GHC supported versions >> =============== >> >> Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. >> >> Installation >> ======= >> >> cabal update && cabal install Agda >> [..] > > > I command (under Debian Linux) > > > cabal update > > cabal install Agda > > And it responds > > Resolving dependencies... > All the requested packages are already installed: > Agda-2.6.0 > Use --reinstall if you want to reinstall anyway. > > Is this because I have agda-2.5.3-candidate installed before? > Do I need to command > > > cabal install --reinstall Agda > ? > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sun Sep 10 14:22:14 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 10 Sep 2017 15:22:14 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <60508b72-e9b4-ded5-e298-f85fdb3b9f78@chalmers.se> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> <60508b72-e9b4-ded5-e298-f85fdb3b9f78@chalmers.se> Message-ID: <1505046134.5840.19.camel@one.mechvel.pereslavl.ru> On Sun, 2017-09-10 at 13:59 +0200, Andreas Abel wrote: > > > cabal install Agda > > > > And it responds > > > > Resolving dependencies... > > All the requested packages are already installed: > > Agda-2.6.0 > > Use --reinstall if you want to reinstall anyway. > > Seems cabal is smarter these days. > > Does the following work? > > cabal install Agda-2.5.4 > > Anyway, if you are working with Agda-2.6.0 (development version), I see > no reason good to install the released version. Rather, update your > clone of the github repository and install from there. The current goal is different. My application release DoCon-A 2.00 writes in install.txt that it is needed Agda 2.5.3 (or a compatible). Because it needs to refer to any official Agda release, which is reasonably simple for the users to install, and under which the application is workable. And it is workable only under Agda 2.5.3-candidate (which probably may mention in messages "Agda-2.6.0"). So, I need first to make sure that I myself can install Agda 2.5.3, and then to compile DoCon-A 2.00 with it. Right? Does the command > cabal install --reinstall Agda fits this goal in my situation? ------ Sergei > On 10.09.2017 13:48, Sergei Meshveliani wrote: > > On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: > >> Dear all, > >> > >> The Agda Team is very pleased to announce the release of Agda 2.5.3. > >> > >> GHC supported versions > >> =============== > >> > >> Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. > >> > >> Installation > >> ======= > >> > >> cabal update && cabal install Agda > >> [..] > > > > > > I command (under Debian Linux) > > > > > cabal update > > > cabal install Agda > > > > And it responds > > > > Resolving dependencies... > > All the requested packages are already installed: > > Agda-2.6.0 > > Use --reinstall if you want to reinstall anyway. > > > > Is this because I have agda-2.5.3-candidate installed before? > > Do I need to command > > > > > cabal install --reinstall Agda > > ? > > > > Regards, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > From mechvel at botik.ru Sun Sep 10 14:44:54 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 10 Sep 2017 15:44:54 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: References: Message-ID: <1505047494.6079.14.camel@one.mechvel.pereslavl.ru> On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the release of Agda 2.5.3. > > GHC supported versions > =============== > > Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. > > Installation > ======= > > cabal update && cabal install Agda > > Standard library > ========== > > For the time being, you can use the master branch of the standard > library with Agda 2.5.3. This master branch is available at > > https://github.com/agda/agda-stdlib/ > > [..] This is written in e-mail. But in future many users will not read this e-mail. They will take this Agda version from the Agda www page, clicking at "Download" and getting to http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Download How do they find and install the needed library? what is the precise instruction? Currently I write in my application library "it works under Agda 2.5.3". The users will get to the page of Agda 2.5.3, and they will doubt about the standard library version installation. (?) Regards, ------ Sergei From asr at eafit.edu.co Sun Sep 10 15:22:12 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 10 Sep 2017 08:22:12 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> Message-ID: On 10 September 2017 at 06:48, Sergei Meshveliani wrote: > On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: > > I command (under Debian Linux) > > > cabal update > > cabal install Agda > > And it responds > > Resolving dependencies... > All the requested packages are already installed: > Agda-2.6.0 > Use --reinstall if you want to reinstall anyway. It seems you are running the above commands from the directory where Agda 2.6.0 is installed. You need to run these command from a different directory. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From asr at eafit.edu.co Sun Sep 10 15:31:06 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 10 Sep 2017 08:31:06 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <1505047494.6079.14.camel@one.mechvel.pereslavl.ru> References: <1505047494.6079.14.camel@one.mechvel.pereslavl.ru> Message-ID: On 10 September 2017 at 07:44, Sergei Meshveliani wrote: > How do they find and install the needed library? As usual a released version of the standard library compatible which Agda 2.5.3 *will be* available at http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From abela at chalmers.se Sun Sep 10 17:25:40 2017 From: abela at chalmers.se (Andreas Abel) Date: Sun, 10 Sep 2017 17:25:40 +0200 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <60508b72-e9b4-ded5-e298-f85fdb3b9f78@chalmers.se> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> <60508b72-e9b4-ded5-e298-f85fdb3b9f78@chalmers.se> Message-ID: Sorry, I meant cabal install Agda-2.5.3 (But you may already have a 2.5.3 on your system). On 10.09.2017 13:59, Andreas Abel wrote: > > > cabal install Agda > > > > And it responds > > > > Resolving dependencies... > > All the requested packages are already installed: > > Agda-2.6.0 > > Use --reinstall if you want to reinstall anyway. > > Seems cabal is smarter these days. > > Does the following work? > > cabal install Agda-2.5.4 > > Anyway, if you are working with Agda-2.6.0 (development version), I see > no reason good to install the released version. Rather, update your > clone of the github repository and install from there. > > Best, > Andreas > > > On 10.09.2017 13:48, Sergei Meshveliani wrote: >> On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: >>> Dear all, >>> >>> The Agda Team is very pleased to announce the release of Agda 2.5.3. >>> >>> GHC supported versions >>> =============== >>> >>> Agda 2.5.3 has been tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. >>> >>> Installation >>> ======= >>> >>> cabal update && cabal install Agda >>> [..] >> >> >> I command (under Debian Linux) >> >> > cabal update >> > cabal install Agda >> >> And it responds >> >> Resolving dependencies... >> All the requested packages are already installed: >> Agda-2.6.0 >> Use --reinstall if you want to reinstall anyway. >> >> Is this because I have agda-2.5.3-candidate installed before? >> Do I need to command >> >> > cabal install --reinstall Agda >> ? >> >> Regards, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Sun Sep 10 19:18:03 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 10 Sep 2017 20:18:03 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> Message-ID: <1505063883.2348.19.camel@one.mechvel.pereslavl.ru> On Sun, 2017-09-10 at 08:22 -0500, Andr?s Sicard-Ram?rez wrote: > On 10 September 2017 at 06:48, Sergei Meshveliani wrote: > > On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: > > > > I command (under Debian Linux) > > > > > cabal update > > > cabal install Agda > > > > And it responds > > > > Resolving dependencies... > > All the requested packages are already installed: > > Agda-2.6.0 > > Use --reinstall if you want to reinstall anyway. > > It seems you are running the above commands from the directory where > Agda 2.6.0 is installed. You need to run these command from a > different directory. No. The story was as follows. I was working with Agda-2.5.3-candidate (Agda-2.5.2.20170816.tar.gz) which source is un-tarred to the folder ~/agda/2.5.2.20170816/ Then I have done: > cd ~/.cabal/bin/ and saved mv agda agda.sav mv agda-mode agda-mode.sav -- in order to return the 2.5.3-candidate installation, if I fail with 2.5.3. Then I did: > cd ~/agda > tar xvfz agda-2.5.3.tar.gz > mv agda-2.5.3 2.5.3 > cd 2.5.3 > cabal update > cabal install Agda It reported Resolving dependencies... All the requested packages are already installed: Agda-2.6.0 Use --reinstall if you want to reinstall anyway. Then, I commanded > cabal install --reinstall Agda It is installed anyway, and now > agda -V shows "Agda version 2.5.3". I hope now that I am dealing with Agda 2.5.3. (?) Regards, ------ Sergei From abela at chalmers.se Sun Sep 10 19:53:15 2017 From: abela at chalmers.se (Andreas Abel) Date: Sun, 10 Sep 2017 19:53:15 +0200 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <1505063883.2348.19.camel@one.mechvel.pereslavl.ru> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> <1505063883.2348.19.camel@one.mechvel.pereslavl.ru> Message-ID: > I hope now that I am dealing with Agda 2.5.3. > (?) I think so. On 10.09.2017 19:18, Sergei Meshveliani wrote: > On Sun, 2017-09-10 at 08:22 -0500, Andr?s Sicard-Ram?rez wrote: >> On 10 September 2017 at 06:48, Sergei Meshveliani wrote: >>> On Fri, 2017-09-08 at 18:57 -0500, Andr?s Sicard-Ram?rez wrote: >>> >>> I command (under Debian Linux) >>> >>> > cabal update >>> > cabal install Agda >>> >>> And it responds >>> >>> Resolving dependencies... >>> All the requested packages are already installed: >>> Agda-2.6.0 >>> Use --reinstall if you want to reinstall anyway. >> >> It seems you are running the above commands from the directory where >> Agda 2.6.0 is installed. You need to run these command from a >> different directory. > > > No. The story was as follows. > > I was working with Agda-2.5.3-candidate (Agda-2.5.2.20170816.tar.gz) > which source is un-tarred to the folder > ~/agda/2.5.2.20170816/ > > Then I have done: > > > cd ~/.cabal/bin/ > and saved mv agda agda.sav > mv agda-mode agda-mode.sav > -- in order to return the 2.5.3-candidate installation, > if I fail with 2.5.3. > > Then I did: > > > cd ~/agda > > tar xvfz agda-2.5.3.tar.gz > > mv agda-2.5.3 2.5.3 > > cd 2.5.3 > > cabal update > > cabal install Agda > > It reported > Resolving dependencies... > All the requested packages are already installed: > Agda-2.6.0 > Use --reinstall if you want to reinstall anyway. > > Then, I commanded > > > cabal install --reinstall Agda > > It is installed anyway, and now > agda -V > shows > "Agda version 2.5.3". > > I hope now that I am dealing with Agda 2.5.3. > (?) > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From asr at eafit.edu.co Sun Sep 10 20:08:28 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 10 Sep 2017 13:08:28 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.5.3 In-Reply-To: <1505063883.2348.19.camel@one.mechvel.pereslavl.ru> References: <1505044086.3294.7.camel@one.mechvel.pereslavl.ru> <1505063883.2348.19.camel@one.mechvel.pereslavl.ru> Message-ID: On 10 September 2017 at 12:18, Sergei Meshveliani wrote: > > Then I did: > > > cd ~/agda > > tar xvfz agda-2.5.3.tar.gz I don't know the above file. I guess you meant Agda-2.5.3.tar.gz (note that the first 'A' is in upper-case). > It is installed anyway, and now > agda -V > shows > "Agda version 2.5.3". > > I hope now that I am dealing with Agda 2.5.3. > (?) > Yes. If you were using a development version the option `-V` would also show a commit number, e.g. $ agda --version Agda version 2.5.4-de04d45 -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From robert.atkey at strath.ac.uk Thu Sep 14 12:23:15 2017 From: robert.atkey at strath.ac.uk (Robert Atkey) Date: Thu, 14 Sep 2017 11:23:15 +0100 Subject: [Agda] =?utf-8?q?The_University_of_Strathclyde=E2=80=99s_Global_T?= =?utf-8?q?alent_Programme_-_Security_and_Data_Sciences?= Message-ID: <5319e736-bfcf-25bc-aa2b-ef19f2436bdd@strath.ac.uk> Dear All, The University of Strathclyde?s Global Talent Programme - Security and Data Sciences are currently recruiting, The available posts are for Chancellor?s Fellows, Professors and Readers. This multi-disciplinary research area includes research that addresses major challenges in the key areas of: * Machine Learning: Investigating the science of getting computers to learn how to behave in specific ways, something which underpins many intelligent devices. * Data Science: inventing a scientific approach to extract knowledge and meaning from data. The focus of data science is analytics; uncovering patterns to describe data or predicting existing data sets. * Computer Science (Cyber Security): Working to successfully protect our computer systems and stored data, enabling businesses to operate successfully. Please consider applying, or pass on to anyone you think might be interested. Information about these vacancies and submitting applications can be found at https://www.strath.ac.uk/workwithus/strathclydeglobaltalentprogramme/strategicareas/securitydatasciences/ Best regards Robert Atkey (for Neil Ghani, HoD) From 33dbqnxpy7if at gmail.com Thu Sep 14 16:34:50 2017 From: 33dbqnxpy7if at gmail.com (Serge Leblanc) Date: Thu, 14 Sep 2017 16:34:50 +0200 Subject: [Agda] Bezonas helpon ! In-Reply-To: <880c5cfb-d07f-908c-1b3e-f392a7c35245@ifi.lmu.de> References: <0b7f763f-13bc-f1c9-0a12-aac2d5ab6511@gmail.com> <4c91026d-6da9-1faf-b911-dd5fe8f09dfb@gmail.com> <6e6a4b66-40fe-0806-53ad-98cce40bc480@chalmers.se> <11e233a4-c809-f89e-81bd-f85374a17b07@gmail.com> <019d9b69-fa88-390a-2bad-baf9515fac21@chalmers.se> <6441e3b4-c334-0b50-0e7b-988bf15f40c7@chalmers.se> <8457c90f-5c98-a477-942a-f9916824133f@gmail.com> <1c6f2182-5c1c-4de0-18d3-8a5b2af34938@gmail.com> <880c5cfb-d07f-908c-1b3e-f392a7c35245@ifi.lmu.de> Message-ID: Dear, I succeeded completing the proof1: ? xs ? All (_?_ (max "xs)) (toList xs)" using "tabulate". Can anyone show me a simple method? Sincerely thank you, Estimata, mi sukcesis plenumi pruvon "proof?? : ? xs ? All (_?_ (max? xs)) (toList xs)" per uzado de 'tabulate'. ?u ekzistas pli simpla metodo ? Sinceran dankon, proof?? : ? xs ? All (_?_ (max? xs)) (toList xs) proof?? (h ? t) = tabulate helper where helper? : ? {x xs} ? x ? xs ? (? x? ? max? (x? ? xs) ? x) helper? {x} (here {x?} {xs?} px) x? = begin x ?? lemma? (x? ? xs?) x ? Data.List.foldl _?_ (x ? x?) xs? ?? cong (? s ? Data.List.foldl _?_ s xs?) (?-comm x x?) ? Data.List.foldl _?_ (x? ? x) xs? ?? cong (? s ? Data.List.foldl _?_ (x? ? s) xs?) px ? Data.List.foldl _?_ (x? ? x?) xs? ? where open Data.Nat.?-Reasoning helper? {x} (there {x?} {xs?} pxs) x? = helper? pxs (x? ? x?) helper : {x : ?} ? x ? (h ? t) ? max? (h ? t) ? x helper {x} (here px) = begin x ?? px ? h ?? lemma? t h ? max? (h ? t) ? where open Data.Nat.?-Reasoning helper {x} (there pxs) = (helper? pxs h) -- Serge Leblanc ------------------------------------------------------------------------ gpg --search-keys 0x67B17A3F Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- module Maximal where open import Data.Nat public using (?; zero; suc; _?_; _?_; _?_; z?n; s?s) open import Data.Nat.Properties public using (m?m?n) open import Data.List using (List; []; _?_; _??_; _++_) open import Data.List.NonEmpty using (List?; foldr?; _?_; _??_; _++?_; _?++?_; [_]; toList) open import Data.List.Any as Any using (Any; here; there) open import Data.List.All as All -- using (All) open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; sym ) open import Relation.Binary open DecTotalOrder Data.Nat.decTotalOrder using () renaming (refl to ?-refl) --open import Function using (id) foldr : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldr {A = A} c (n ? l) = foldr? n l where foldr? : A ? List A ? A foldr? n [] = n foldr? n (x ? xs) = c n (foldr? x xs) foldl : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl {A = A} c (n ? l) = foldl? n l where foldl? : A ? List A ? A foldl? n [] = n foldl? n (x ? xs) = foldl? (c n x) xs foldl? : ? {a} {A : Set a} ? (A ? A ? A) ? List? A ? A foldl? f (h ? t) = Data.List.foldl f h t max : List? ? ? ? max l = foldl _?_ l max? : List? ? ? ? max? l = foldr _?_ l max? : List? ? ? ? max? (h ? t) = Data.List.foldl _?_ h t private max? : max [ 2 ] ? 2 max? = refl max?? : max? [ 2 ] ? 2 max?? = refl max? : max (4 ?? 5 ?? [ 6 ]) ? 6 max? = refl max?? : max? (4 ?? 5 ?? [ 6 ]) ? 6 max?? = refl module Examples (_?_ : ? ? ? ? ?) (a b c : ?) where left? : foldl _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl left? : foldl? _?_ (a ?? b ?? [ c ]) ? ((a ? b) ? c) left? = refl right? : foldr _?_ (a ?? b ?? [ c ]) ? (a ? (b ? c)) right? = refl ?-right-identity : ? n ? n ? 0 ? n ?-right-identity zero = refl ?-right-identity (suc n) = refl ?-comm : ? x y ? x ? y ? y ? x ?-comm zero y = sym (?-right-identity y) ?-comm (suc x) zero = refl ?-comm (suc x) (suc y) = cong suc (?-comm x y) ?-asso : ? x y z ? x ? (y ? z) ? (x ? y) ? z ?-asso zero _ _ = refl ?-asso (suc x) zero _ = refl ?-asso (suc x) (suc y) zero = refl ?-asso (suc x) (suc y) (suc z) = cong suc (?-asso x y z) --open import Relation.Binary.PropositionalEquality as PropEq using (_?_; refl; cong; cong?) --open PropEq.?-Reasoning -- renaming (_??_?_ to _?[_]_) private abstract lemma? : ? x? x? xs ? Data.List.foldl _?_ x? (x? ? xs) ? Data.List.foldl _?_ (x? ? x?) xs lemma? x? x? xs = refl lemma? : ? x? x? xs ? x? ? max? (x? ? xs) ? max? (x? ? x? ? xs) lemma? x? x? [] = refl lemma? x? x? (h ? t) = begin x? ? Data.List.foldl _?_ (x? ? h) t ?? lemma? x? (x? ? h) t ? Data.List.foldl _?_ (x? ? (x? ? h)) t ?? cong (? s ? Data.List.foldl _?_ s t) (?-asso x? x? h) ? Data.List.foldl _?_ (x? ? x? ? h) t ? where open PropEq.?-Reasoning lemma? : ? xs x ? max? (x ? xs) ? x lemma? [] x = ?-refl lemma? (x? ? xs) x = begin x ?? m?m?n x (Data.List.foldl _?_ x? xs) ? x ? Data.List.foldl _?_ x? xs ?? lemma? x x? xs ? Data.List.foldl _?_ (x ? x?) xs ? where open Data.Nat.?-Reasoning lemma? : ? xs x ? max? (x ?? xs) ? max? xs lemma? (h ? t) x = begin Data.List.foldl _?_ h t ?? m?m?n (Data.List.foldl _?_ h t) x ? Data.List.foldl _?_ h t ? x ?? ?-comm (Data.List.foldl _?_ h t) x ? x ? Data.List.foldl _?_ h t ?? lemma? x h t ? Data.List.foldl _?_ (x ? h) t ? where open Data.Nat.?-Reasoning lemma? : ? xs x? x ? max? (x ? x? ? xs) ? x? lemma? xs x? x = begin x? ?? lemma? (x ? xs) x? ? Data.List.foldl _?_ (x? ? x) xs ?? cong (? s ? Data.List.foldl _?_ s xs) (?-comm x? x) ? Data.List.foldl _?_ (x ? x?) xs ? where open Data.Nat.?-Reasoning lemma?? : ? xs x x? ? max? (x ? x? ? xs) ? max? (x ? xs) lemma?? xs x x? = begin Data.List.foldl _?_ x xs ?? lemma? (x ? xs) x? ? Data.List.foldl _?_ (x? ? x) xs ?? cong (? s ? Data.List.foldl _?_ s xs) (?-comm x? x) ? Data.List.foldl _?_ (x ? x?) xs ? where open Data.Nat.?-Reasoning right-identity : ? {a} {A : Set a} (xs : List A) ? xs ++ [] ? xs right-identity [] = refl right-identity (x ? xs) = cong (_?_ x) (right-identity xs) lemma? : ? xs? xs? ? max? (xs? ++? xs?) ? max? xs? lemma? [] xs? = ?-refl lemma? (x? ? xs?) xs? = begin max? xs? ?? lemma? xs? xs? ? max? (xs? ++? xs?) ?? lemma? (xs? ++? xs?) x? ? max? (x? ?? xs? ++? xs?) ? where open Data.Nat.?-Reasoning ?-trans : ? {i j k} ? i ? j ? j ? k ? i ? k ?-trans z?n _ = z?n ?-trans (s?s i?j) (s?s j?k) = s?s (?-trans i?j j?k ) lemma? : ? xs? xs x ? max? (xs? ++? x ? xs) ? x lemma? xs? xs x = ?-trans (lemma? xs x) (lemma? xs? (x ? xs)) open Any.Membership-? proof?? : ? xs ? All (_?_ (max? xs)) (toList xs) proof?? (h ? t) = tabulate helper where helper? : ? {x xs} ? x ? xs ? (? x? ? max? (x? ? xs) ? x) helper? {x} (here {x?} {xs?} px) x? = begin x ?? lemma? (x? ? xs?) x ? Data.List.foldl _?_ (x ? x?) xs? ?? cong (? s ? Data.List.foldl _?_ s xs?) (?-comm x x?) ? Data.List.foldl _?_ (x? ? x) xs? ?? cong (? s ? Data.List.foldl _?_ (x? ? s) xs?) px ? Data.List.foldl _?_ (x? ? x?) xs? ? where open Data.Nat.?-Reasoning helper? {x} (there {x?} {xs?} pxs) x? = helper? pxs (x? ? x?) helper : {x : ?} ? x ? (h ? t) ? max? (h ? t) ? x helper {x} (here px) = begin x ?? px ? h ?? lemma? t h ? max? (h ? t) ? where open Data.Nat.?-Reasoning helper {x} (there pxs) = (helper? pxs h) proof? : (xs : List? ?) ? All (_?_ (max? xs)) (toList xs) proof? (x ? []) = {! lemma? [] x ? []!} proof? (x ? x? ? xs?) = {! proof? (x ?? xs?) !} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From apostolis.xekoukoulotakis at gmail.com Fri Sep 15 05:16:14 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 15 Sep 2017 06:16:14 +0300 Subject: [Agda] [ cubical ] : Questions on PathP on Sets. Message-ID: The definition of PathP when it is a path between sets does not make sense to me. Here is an example : ``` module test where open import PathPrelude -- fun : ?{?} ? {A B : Set ?} ? A ? B ? A ? B -- fun eq a = transp eq a fun2 : ?{?} ? {A B : Set ?} ? A ? B ? A ? B fun2 eq a = transp (? i ? eq i) a fun3 : ?{?} ? {A B : Set ?} ? A ? B ? A ? B fun3 eq a = {!!} -- C-u C-u C-c C-, ``` eq ' s type is : ``` eq : PathP (? _ ? Set .?) .A .B ``` but the defintion of PathP is : ``` PathP : ? {?} (A : I ? Set ?) ? A i0 ? A i1 ? Set ? ``` which means A B must be elements of Sets, not Sets. Of course A ? B is a path inside Set ? , thus the definition of PathP makes no sense with regards to Sets. Another problem I am experiencing that might be related is that A=B requires to be eta-abstracted to work like in the fun/fun2 case. I also wonder why I cannot fill the hole with ```r i``` here : https://github.com/xekoukou/cubical-demo/blob/agda-mailing-list/Univalence.agda#L115 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominique.devriese at cs.kuleuven.be Fri Sep 15 13:14:52 2017 From: dominique.devriese at cs.kuleuven.be (Dominique Devriese) Date: Fri, 15 Sep 2017 11:14:52 +0000 Subject: [Agda] Call for Presentations on Secure Compilation (PriSC Workshop @ POPL'18) Message-ID: ===================================================================== Call for Presentations on Secure Compilation (PriSC Workshop @ POPL'18) ===================================================================== Secure compilation is an emerging field that puts together advances in programming languages, security, verification, systems, compilers, and hardware architectures in order to devise secure compiler chains that eliminate many of today's low-level vulnerabilities. Secure compilation aims to protect high-level language abstractions in compiled code, even against adversarial low-level contexts, and to allow sound reasoning about security in the source language. The emerging secure compilation community aims to achieve this by: identifying and formalizing properties that secure compilers must possess; devising efficient enforcement mechanisms; and developing effective verification and proof techniques. ===================================================================== 2nd Workshop on Principles of Secure Compilation (PriSC 2018) ===================================================================== The Workshop on Principles of Secure Compilation (PriSC) is a new informal 1-day workshop without any proceedings. The goal is to identify interesting research directions and open challenges and to bring together researchers interested in secure compilation. The 2nd PriSC edition will be held on Saturday, 13 January 2018, in Los Angeles, together with the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). More information at http://popl18.sigplan.org/track/prisc-2018 ===================================================================== Important Dates ===================================================================== Presentation proposal submission deadline: 18 October 2017, AoE Presentation proposal notification: 8 November 2017 PriSC Workshop takes place: 13 January 2018 ===================================================================== Scope of the Workshop ===================================================================== Anyone interested in presenting at the workshop should submit an extended abstract (up to 2 pages, details below). This can cover past, ongoing, or future work. Any topic that could be of interest to the emerging secure compilation community is in scope. Talks that provide a useful outside view or challenge the community are also welcome. Topics of interest include but are **not** limited to: - attacker models for secure compiler chains - secure compilation properties: full abstraction, memory safety, control-flow integrity, preserving non-interference or (hyper-)properties against adversarial contexts, secure multi-language interoperability - enforcement mechanisms: static checking, program verification, reference monitoring, program rewriting, software fault isolation, system-level protection, secure hardware, crypto, randomization - experimental evaluation and applications of secure compilation - proof methods: (bi)simulation, logical relations, game semantics, multi-language semantics, embedded interpreters - formal verification of secure compilation chain (protection mechanisms, compilers, linkers, loaders), machine-checked proofs, translation validation, property-based testing ===================================================================== Guidelines for Submitting Extended Abstracts ===================================================================== Extended abstracts should be submitted in PDF format and not exceed 2 pages. They should be formatted in two-column layout, 10pt font, and be printable on A4 and US Letter sized paper. We recommend using the new `acmart` LaTeX style in `sigplan` mode: http://www.sigplan.org/sites/default/files/acmart/current/acmart-sigplanproc.zip Submissions are not anonymous and should provide sufficient detail to be assessed by the program committee. Presentation at the workshop does not preclude publication elsewhere. Please submit your extended abstracts at https://prisc18.hotcrp.com/ ===================================================================== Short Talks Session ===================================================================== We will also run a short talks session, where participants get five minutes to present intriguing ideas, advertise ongoing work, etc. You can expect a call for short talks closer to the event. ===================================================================== Program Committee ===================================================================== Program Chair Catalin Hritcu Inria Paris Members Amal Ahmed Inria Paris and Northeastern University Lars Birkedal Aarhus University Dominique Devriese KU Leuven C?dric Fournet Microsoft Research Deepak Garg MPI-SWS Xavier Leroy Inria Paris David Naumann Stevens Institute of Technology Marco Patrignani MPI-SWS Frank Piessens KU Leuven Tamara Rezk Inria Sophia Antipolis Nikhil Swamy Microsoft Research ===================================================================== Organizing Committee ===================================================================== Amal Ahmed Inria Paris and Northeastern University Dominique Devriese KU Leuven Deepak Garg MPI-SWS Catalin Hritcu Inria Paris Marco Patrignani MPI-SWS Tamara Rezk Inria Sophia Antipolis ===================================================================== Contact and More Information ===================================================================== More information about PriSC 2018 can be found on the website: http://popl18.sigplan.org/track/prisc-2018 For questions please contact Catalin Hritcu (Program Chair). To make sure you receive such announcements in the future please subscribe to the following low-traffic mailing list: https://lists.gforge.inria.fr/mailman/listinfo/prisc-announce -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Fri Sep 15 13:51:28 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Fri, 15 Sep 2017 13:51:28 +0200 Subject: [Agda] [ cubical ] : Questions on PathP on Sets. In-Reply-To: References: Message-ID: On Fri, Sep 15, 2017 at 5:16 AM, Apostolis Xekoukoulotakis wrote: > eq ' s type is : > ``` > eq : PathP (? _ ? Set .?) .A .B > ``` > but the defintion of PathP is : > ``` > PathP : ? {?} (A : I ? Set ?) ? A i0 ? A i1 ? Set ? > ``` > which means A B must be elements of Sets, not Sets. Maybe you are missing that "Set ? : Set (?-suc ? )"? i.e. the type of types "Set ?" is itself an element of the type of larger types "Set (?-suc ? )". If you look at the implicit arguments you'll see that you have eq : PathP {?-suc .?} (? _ ? Set .?) .A .B Also note that "Set" is just the traditional name Agda uses for universes, it's not related to hSets > > Another problem I am experiencing that might be related is that A=B requires > to be eta-abstracted to work like in the fun/fun2 case. Right, "A ? B" and "(I -> Set ?)" are different types, both constructed by lambdas, so you are actually converting between them on the fly by performing the expansion. Maybe we will introduce some subtyping to make this transparent to the user. > > I also wonder why I cannot fill the hole with ```r i``` here : > https://github.com/xekoukou/cubical-demo/blob/agda-mailing-list/Univalence.agda#L115 I will try to look at that more closely soon. Cheers, Andrea > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at botik.ru Fri Sep 15 15:27:37 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 15 Sep 2017 16:27:37 +0300 Subject: [Agda] common super-structure Message-ID: <1505482057.2803.7.camel@one.mechvel.pereslavl.ru> People, I have a question on the algebraic hierarchy architecture in Standard library. This concerns the problem of a common super-structure (super-class). Consider the example: having f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l, implement g : (H H' : Semigroup) ? H and H' are on the same setoid ? Semigroup g H H' = f H H' Consider the program ---------------------------------------------------------------------- postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l g : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l -- wrong g H H' = f H H' ---------------------------------------------------------------------- This will not do, because the domain of g is not as required. Below g' pretends to implement the goal: ------------------------------------------------------------- module CommonSuper where open import Relation.Binary using (Setoid) open import Algebra using (Semigroup) open import Algebra.Structures using (IsSemigroup) open import Algebra.FunctionProperties using (Op?) postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l g' : ? {c l} ? (S : Setoid c l) ? let open Setoid S using (_?_; Carrier) in (_?_ _?'_ : Op? Carrier) ? IsSemigroup _?_ _?_ ? IsSemigroup _?_ _?'_ ? Semigroup c l g' S _?_ _?'_ isSemig isSemig' = f H H' where open Setoid S using (_?_; Carrier) H = record{ Carrier = Carrier ; _?_ = _?_ ; _?_ = _?_ ; isSemigroup = isSemig } H' = record{ Carrier = Carrier ; _?_ = _?_ ; _?_ = _?'_ ; isSemigroup = isSemig' } -------------------------------------------------------------- But here g' is applied not to a pair of semigroups but to their rather decomposed forms. Further, g'' looks as something more close to the goal: g'' : ? {c l} ? (H H' : Semigroup c l) ? let S = Semigroup.setoid H S' = Semigroup.setoid H' in (CoinverseSetoidIso S S') ? Semigroup c l g'' H H' _ = f H H' Here isoPair : CoinverseSetoidIso S S' is a pair of mutually inverse setoid isomorphisms between S and S'. For the condition of "over the same setoid" it suggests to include a setoid isomorphism into the signature. Still a complication. We have two different types for setoid instead of one. The release 0.04.1 of the DoCon-A library applies the approach in which the Semigroup record will have (S : Setoid) as an _argument_. And a similar construct with super-structures as arguments is repeated for Group, Ring, and so on. With this approach, the examples like the above g are programmed easier. But this still leads to a certain complication. Because this forces introduction of certain up-structures: Semigroup - UpSemigroup, Group - UpGroup, and so on (see Manual on DoCon-A-0.04.1). In DoCon-A-2.00, I return to the approach similar to Standard library, with adding the Is-structures (IsSemigroup, IsGroup, and such). Anyway, a spot of inadequacy is visible. Can anybody comment on this philosophy? Regards, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Fri Sep 15 15:37:14 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 15 Sep 2017 16:37:14 +0300 Subject: [Agda] [ cubical ] : Questions on PathP on Sets. In-Reply-To: References: Message-ID: So, the type of ```(? _ ? Set .?)``` is ```(I -> Set (?-suc .?))```. Regarding, ```A ? B``` and ```(I -> Set ?)```, I think I got it. So my problem with the proof would most certainly have to do because I was conflating them. I will look into it and come with more questions if necessary. On Fri, Sep 15, 2017 at 2:51 PM, Andrea Vezzosi wrote: > On Fri, Sep 15, 2017 at 5:16 AM, Apostolis Xekoukoulotakis > wrote: > > eq ' s type is : > > ``` > > eq : PathP (? _ ? Set .?) .A .B > > ``` > > but the defintion of PathP is : > > ``` > > PathP : ? {?} (A : I ? Set ?) ? A i0 ? A i1 ? Set ? > > ``` > > which means A B must be elements of Sets, not Sets. > > Maybe you are missing that "Set ? : Set (?-suc ? )"? i.e. the type of > types "Set ?" is itself an element of the type of larger types "Set > (?-suc ? )". > > If you look at the implicit arguments you'll see that you have > > eq : PathP {?-suc .?} (? _ ? Set .?) .A .B > > Also note that "Set" is just the traditional name Agda uses for > universes, it's not related to hSets > > > > > Another problem I am experiencing that might be related is that A=B > requires > > to be eta-abstracted to work like in the fun/fun2 case. > > Right, "A ? B" and "(I -> Set ?)" are different types, both > constructed by lambdas, so you are actually converting between them on > the fly by performing the expansion. > > Maybe we will introduce some subtyping to make this transparent to the > user. > > > > > I also wonder why I cannot fill the hole with ```r i``` here : > > https://github.com/xekoukou/cubical-demo/blob/agda- > mailing-list/Univalence.agda#L115 > > I will try to look at that more closely soon. > > Cheers, > Andrea > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Mon Sep 18 07:49:27 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Mon, 18 Sep 2017 08:49:27 +0300 Subject: [Agda] Should we create an issue to track the status of Cubical? Message-ID: I have recently learned to program with CTT. I was trying to understand the consequences it will have in programming. For now, I will just go back to my usual programming but I would like to be notified when quotient types or Higher Inductive types are ready so as to start using them as soon as possible. For this reason, I propose that we create an issue to track the development of these features. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Mon Sep 18 10:06:01 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Mon, 18 Sep 2017 10:06:01 +0200 Subject: [Agda] Should we create an issue to track the status of Cubical? In-Reply-To: References: Message-ID: Here it is, and thanks for checking cubical out! https://github.com/agda/agda/issues/2761 Cheers, Andrea On Mon, Sep 18, 2017 at 7:49 AM, Apostolis Xekoukoulotakis wrote: > I have recently learned to program with CTT. I was trying to understand the > consequences > it will have in programming. For now, I will just go back to my usual > programming > but I would like to be notified when quotient types or Higher Inductive > types are ready > so as to start using them as soon as possible. > > For this reason, I propose that we create an issue to track the development > of these features. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at botik.ru Mon Sep 18 15:25:58 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 18 Sep 2017 16:25:58 +0300 Subject: [Agda] DoCon-A-2.00 announce Message-ID: <1505741158.24019.4.camel@scico.botik.ru> A N N O U N C E M E N T DoCon-A a Provable Algebraic Domain Constructor Version 2.00 is available, together with its source program and manual, on the Web at the following addresses: http://www.botik.ru/pub/local/Mechveliani/docon-A/ (Russian site), ftp.botik.ru/pub/local/Mechveliani/docon-A/ (same site), DoCon-A is ---------- a Computer Algebra library written in a purely functional, non-strict language Agda having dependent types and allowing machine-checked proofs. DoCon-A applies generic programming. It defines generic notions of the algebraic structures: Semigroup, Group, Ring, and so on. Arithmetic and some other operations are defined under the very generic assumptions: "over any group", "over any ring", and so on. Currently the following Domain Constructors are supported (to a certain extent): Natural, Integer, Product, Fraction, Univariate Polynomial, Euclidean Residue ring. That is certain set of operations are defined automatically, following these domain constructors. What is new with respect to previous version -------------------------------------------- 1. The representation of the generic algebra structures is simplified: there are no `up'-structures. This makes the library design more close to Standard library. 2. The Field instance for Fraction domain over any unique factorization ring, with certified optimized methods for arithmetic. 3. Certain special equational provers InMonoid, InSemiringWithOne, InCommutativeSemiring are implemented (something like a variant of RingSolver of Standard). Ports: ------ DoCon-A-2.00 has been tested under Agda-2.5.3, MAlonzo, ghc-7.10.2, Linux. Reports about possible later ports is in the current notes in the distribution: notes/2.00.txt Documentation. See manual.pdf. ------------- Memory requirement ------------------ For Agda-2.5.3, ghc-7.10.2, and -M11G option (11G byte heap restriction) type-checking the library takes about 55 minutes on a 3 GHz computer. The remarks are welcome: mechvel at botik.ru From mechvel at botik.ru Mon Sep 18 21:26:25 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 18 Sep 2017 22:26:25 +0300 Subject: [Agda] on standard library Message-ID: <1505762785.2998.19.camel@one.mechvel.pereslavl.ru> Dear Agda team, I fail to open New issue on https://github.com/agda/agda-stdlib/issues by clicking at the "New issue" button. It does not open the field to write an issue, does not do anything. And year ago it used to open such. Is this because my Iceape browser is old? I wanted to give there two minor notes. 1. Data.Nat.Properties has <-trans, <-irrefl, <-asym, while Data.Fin.Properties skips the last two. 2. Data.Bin.Properties renames Data.Nat.Properties to ??, Data.Nat.Properties to ?? ?Prop and ?Prop are printed in a nicer way, and also carry a mnemonic. Regards, ------ Sergei From nad at cse.gu.se Tue Sep 19 10:18:13 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 19 Sep 2017 10:18:13 +0200 Subject: [Agda] on standard library In-Reply-To: <1505762785.2998.19.camel@one.mechvel.pereslavl.ru> References: <1505762785.2998.19.camel@one.mechvel.pereslavl.ru> Message-ID: <24a4ab16-1120-df05-dab2-b5d868b4b1b6@cse.gu.se> On 2017-09-18 21:26, Sergei Meshveliani wrote: > I fail to open New issue on > https://github.com/agda/agda-stdlib/issues > > by clicking at the "New issue" button. > It does not open the field to write an issue, does not do anything. > And year ago it used to open such. > > Is this because my Iceape browser is old? I don't know, but it appears as if Iceape hasn't been updated since 2013, so I suggest that you try another program. -- /NAD From gallais at cs.ru.nl Mon Sep 18 13:59:58 2017 From: gallais at cs.ru.nl (Guillaume Allais) Date: Mon, 18 Sep 2017 13:59:58 +0200 Subject: [Agda] common super-structure In-Reply-To: <1505482057.2803.7.camel@one.mechvel.pereslavl.ru> References: <1505482057.2803.7.camel@one.mechvel.pereslavl.ru> Message-ID: <41a71804-4aa2-1493-fb40-7d0db90e5755@cs.ru.nl> Hi Sergei, I don't really have an informed opinion on the two different approaches but something I noticed while I was preparing the PR for the stdlib's structure homomorphisms is that Agda will accept a record definition with missing fields as long as they can be resolved by unification. This means in particular that the where-clause of your g' can be reduced to (this pattern should maybe be given a toplevel definition called "mkSemigroup"): ========================================================== ? H? = record{ isSemigroup = isSemig ???????????? } ? H' = record{ isSemigroup = isSemig' ???????????? } ========================================================== Given that this gets rid of a lot of the repetitions (at least in the term fragment, if not the type one) it may make the stdlib's approach more tractable for you. Best, -- gallais On 15/09/17 15:27, Sergei Meshveliani wrote: > People, > > I have a question on the algebraic hierarchy architecture in Standard > library. > This concerns the problem of a common super-structure (super-class). > > Consider the example: > > having f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l, > implement > g : (H H' : Semigroup) ? H and H' are on the same setoid ? Semigroup > g H H' = f H H' > > Consider the program > > ---------------------------------------------------------------------- > postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l > > g : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l -- wrong > g H H' = f H H' > ---------------------------------------------------------------------- > > This will not do, because the domain of g is not as required. > > Below g' pretends to implement the goal: > > ------------------------------------------------------------- > module CommonSuper where > open import Relation.Binary using (Setoid) > open import Algebra using (Semigroup) > open import Algebra.Structures using (IsSemigroup) > open import Algebra.FunctionProperties using (Op?) > > postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l > > g' : ? {c l} ? (S : Setoid c l) ? > let open Setoid S using (_?_; Carrier) > in > (_?_ _?'_ : Op? Carrier) ? > IsSemigroup _?_ _?_ ? IsSemigroup _?_ _?'_ ? Semigroup c l > > g' S _?_ _?'_ isSemig isSemig' = f H H' > where > open Setoid S using (_?_; Carrier) > > H = record{ Carrier = Carrier > ; _?_ = _?_ > ; _?_ = _?_ > ; isSemigroup = isSemig > } > H' = record{ Carrier = Carrier > ; _?_ = _?_ > ; _?_ = _?'_ > ; isSemigroup = isSemig' > } > -------------------------------------------------------------- > > But here g' is applied not to a pair of semigroups but to their rather > decomposed forms. > > Further, g'' looks as something more close to the goal: > > > g'' : ? {c l} ? (H H' : Semigroup c l) ? > let S = Semigroup.setoid H > S' = Semigroup.setoid H' > in > (CoinverseSetoidIso S S') ? Semigroup c l > > g'' H H' _ = f H H' > > > Here isoPair : CoinverseSetoidIso S S' > > is a pair of mutually inverse setoid isomorphisms between S and S'. > For the condition of "over the same setoid" it suggests to include a > setoid isomorphism into the signature. > Still a complication. We have two different types for setoid instead of > one. > > The release 0.04.1 of the DoCon-A library applies the approach in which > the Semigroup record will have (S : Setoid) as an _argument_. > And a similar construct with super-structures as arguments is repeated > for Group, Ring, and so on. > With this approach, the examples like the above g are programmed > easier. > > But this still leads to a certain complication. Because this forces > introduction of certain up-structures: Semigroup - UpSemigroup, > Group - UpGroup, and so on (see Manual on DoCon-A-0.04.1). > > In DoCon-A-2.00, I return to the approach similar to Standard library, > with adding the Is-structures (IsSemigroup, IsGroup, and such). > > Anyway, a spot of inadequacy is visible. > > Can anybody comment on this philosophy? > > Regards, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From sandro.stucki at epfl.ch Thu Sep 21 11:47:07 2017 From: sandro.stucki at epfl.ch (Sandro Stucki) Date: Thu, 21 Sep 2017 11:47:07 +0200 Subject: [Agda] Cannot apply injectivity Message-ID: Hi all, I recently ported some code from Agda 2.5.1 to 2.5.2 and ran into some errors, probably caused by a change in the unifier. I've reduced the offending code down to the following: ---- open import Data.Nat using (?; suc; _+_) open import Data.Fin using (Fin) data Indexed : ? ? ? ? Set where con : ? m {n} (i : Fin n) ? Indexed (m + n) (m + suc n) data RelIndexed : ? {m n} ? Indexed m n ? Indexed m n ? Set where relIdx : ? {m n} (i : Fin n) (j : Fin n) ? RelIndexed (con m i) (con m j) test1 : ? {m n} {a b : Indexed m n} ? RelIndexed a b ? Indexed m n test1 (relIdx {m} i _) = con m i test2 : ? {m n} {a : Indexed m n} ? RelIndexed a a ? Indexed m n test2 (relIdx {m} i _) = con m i ---- I'm using the modules Data.Nat and Data.Fin from the standard library here. The idea is that `Indexed` is some datatype indexed by naturals, and `RelIndexed` is a family of relations over `Indexed` at given `n` and `m`. I want to write a function (actually a lemma) similar to `test2` for a reflexive instance of `RelIndexed`, i.e. where some `Indexed` instance is related to itself. But somehow the Agda 2.5.2 unifier is not happy about this. For `test1` the unifier succeeds, but for `test2` it apparently fails to solve `con m i = con m j`. The error is ---- Cannot apply injectivity to the equation con m i = con m j of type Indexed (m + n) (m + suc n) because I cannot generalize over the indices [m + n, m + suc n] when checking that the pattern relIdx {m} i _ has type RelIndexed a a ---- What does it mean to "generalize over the indices [m + n, m + suc n]", and why is this necessary here? If I rewrite test2 as `test2 r = ?` and attempt a case split on `r` I get instead ---- I'm not sure if there should be a case for the constructor relIdx, because I get stuck when trying to solve the following unification problems (inferred index ? expected index): {_} ? {_} {_} ? {_} con m? i ? a con m? j ? a when checking that the expression ? has type Indexed .m .n ---- I'm not sure how to interpret this either, especially the `{_} ? {_}` lines. Cheers /Sandro From mechvel at botik.ru Thu Sep 21 12:42:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 21 Sep 2017 13:42:30 +0300 Subject: [Agda] common super-structure In-Reply-To: <41a71804-4aa2-1493-fb40-7d0db90e5755@cs.ru.nl> References: <1505482057.2803.7.camel@one.mechvel.pereslavl.ru> <41a71804-4aa2-1493-fb40-7d0db90e5755@cs.ru.nl> Message-ID: <1505990550.2567.6.camel@one.mechvel.pereslavl.ru> On Mon, 2017-09-18 at 13:59 +0200, Guillaume Allais wrote: > Hi Sergei, > > I don't really have an informed opinion on the two different approaches > but something I noticed while I was preparing the PR for the stdlib's > structure homomorphisms is that Agda will accept a record definition > with missing fields as long as they can be resolved by unification. > > This means in particular that the where-clause of your g' can be reduced > to (this pattern should maybe be given a toplevel definition called > "mkSemigroup"): > > ========================================================== > H = record{ isSemigroup = isSemig > } > H' = record{ isSemigroup = isSemig' > } > ========================================================== > > Given that this gets rid of a lot of the repetitions (at least in the > term fragment, if not the type one) it may make the stdlib's approach > more tractable for you. Nice! Thank you. I see. ------ Sergei > > On 15/09/17 15:27, Sergei Meshveliani wrote: > > People, > > > > I have a question on the algebraic hierarchy architecture in Standard > > library. > > This concerns the problem of a common super-structure (super-class). > > > > Consider the example: > > > > having f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l, > > implement > > g : (H H' : Semigroup) ? H and H' are on the same setoid ? Semigroup > > g H H' = f H H' > > > > Consider the program > > > > ---------------------------------------------------------------------- > > postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l > > > > g : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l -- wrong > > g H H' = f H H' > > ---------------------------------------------------------------------- > > > > This will not do, because the domain of g is not as required. > > > > Below g' pretends to implement the goal: > > > > ------------------------------------------------------------- > > module CommonSuper where > > open import Relation.Binary using (Setoid) > > open import Algebra using (Semigroup) > > open import Algebra.Structures using (IsSemigroup) > > open import Algebra.FunctionProperties using (Op?) > > > > postulate f : ? {c l} ? Semigroup c l ? Semigroup c l ? Semigroup c l > > > > g' : ? {c l} ? (S : Setoid c l) ? > > let open Setoid S using (_?_; Carrier) > > in > > (_?_ _?'_ : Op? Carrier) ? > > IsSemigroup _?_ _?_ ? IsSemigroup _?_ _?'_ ? Semigroup c l > > > > g' S _?_ _?'_ isSemig isSemig' = f H H' > > where > > open Setoid S using (_?_; Carrier) > > > > H = record{ Carrier = Carrier > > ; _?_ = _?_ > > ; _?_ = _?_ > > ; isSemigroup = isSemig > > } > > H' = record{ Carrier = Carrier > > ; _?_ = _?_ > > ; _?_ = _?'_ > > ; isSemigroup = isSemig' > > } > > -------------------------------------------------------------- > > > > But here g' is applied not to a pair of semigroups but to their rather > > decomposed forms. > > > > Further, g'' looks as something more close to the goal: > > > > > > g'' : ? {c l} ? (H H' : Semigroup c l) ? > > let S = Semigroup.setoid H > > S' = Semigroup.setoid H' > > in > > (CoinverseSetoidIso S S') ? Semigroup c l > > > > g'' H H' _ = f H H' > > > > > > Here isoPair : CoinverseSetoidIso S S' > > > > is a pair of mutually inverse setoid isomorphisms between S and S'. > > For the condition of "over the same setoid" it suggests to include a > > setoid isomorphism into the signature. > > Still a complication. We have two different types for setoid instead of > > one. > > > > The release 0.04.1 of the DoCon-A library applies the approach in which > > the Semigroup record will have (S : Setoid) as an _argument_. > > And a similar construct with super-structures as arguments is repeated > > for Group, Ring, and so on. > > With this approach, the examples like the above g are programmed > > easier. > > > > But this still leads to a certain complication. Because this forces > > introduction of certain up-structures: Semigroup - UpSemigroup, > > Group - UpGroup, and so on (see Manual on DoCon-A-0.04.1). > > > > In DoCon-A-2.00, I return to the approach similar to Standard library, > > with adding the Is-structures (IsSemigroup, IsGroup, and such). > > > > Anyway, a spot of inadequacy is visible. > > > > Can anybody comment on this philosophy? > > > > Regards, > > > > ------ > > Sergei > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Thu Sep 21 13:36:33 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 21 Sep 2017 13:36:33 +0200 Subject: [Agda] Cannot apply injectivity In-Reply-To: References: Message-ID: Hi Sandro, The error message "cannot generalize over the indices" is thrown by Agda when it encounters a unification problem of the form `c us =?= c vs` where `c` is a constructor of an indexed datatype, but the indices in the *type* of this equation are something other than distinct variables (i.e. they should be fully general). If they are not, Agda tries to apply a technique called higher-dimensional unification (see our CPP 2017 paper) to bring them in a fully general form. However, this unfortunately doesn't always succeed, for example in your code it gets stuck on the _+_ function in the index of `con`. One way to fix your problem would be to get rid of the 'green slime' in the type of `con`: it's better to use only variables and constructors in the indices of your datatypes, and use explicit proofs of equality for the heavier work. On the other hand, it's possible that there's something more that Agda could do in this situation. Roughly a year ago, I wrote the following comment at the place where this error is thrown: """ -- TODO: we could still make progress here if not --without-K, -- but I'm not sure if it's necessary. """. It seems it is necessary in some situations after all. I'll try to remember what I meant with that and implement it. Best regards, Jesper ps: To change the {_} in the error message into something more useful, you can enable the --show-implicit option. Maybe it would be better if Agda did this by default. On Thu, Sep 21, 2017 at 11:47 AM, Sandro Stucki wrote: > Hi all, > > I recently ported some code from Agda 2.5.1 to 2.5.2 and ran into some > errors, probably caused by a change in the unifier. I've reduced the > offending code down to the following: > > ---- > open import Data.Nat using (?; suc; _+_) > open import Data.Fin using (Fin) > > data Indexed : ? ? ? ? Set where > con : ? m {n} (i : Fin n) ? Indexed (m + n) (m + suc n) > > data RelIndexed : ? {m n} ? Indexed m n ? Indexed m n ? Set where > relIdx : ? {m n} (i : Fin n) (j : Fin n) ? RelIndexed (con m i) (con m j) > > test1 : ? {m n} {a b : Indexed m n} ? RelIndexed a b ? Indexed m n > test1 (relIdx {m} i _) = con m i > > test2 : ? {m n} {a : Indexed m n} ? RelIndexed a a ? Indexed m n > test2 (relIdx {m} i _) = con m i > ---- > > I'm using the modules Data.Nat and Data.Fin from the standard library here. > > The idea is that `Indexed` is some datatype indexed by naturals, and > `RelIndexed` is a family of relations over `Indexed` at given `n` and > `m`. I want to write a function (actually a lemma) similar to `test2` > for a reflexive instance of `RelIndexed`, i.e. where some `Indexed` > instance is related to itself. But somehow the Agda 2.5.2 unifier is > not happy about this. > > For `test1` the unifier succeeds, but for `test2` it apparently fails > to solve `con m i = con m j`. The error is > > ---- > Cannot apply injectivity to the equation con m i = con m j of type > Indexed (m + n) (m + suc n) because I cannot generalize over the > indices [m + n, m + suc n] > when checking that the pattern relIdx {m} i _ has type > RelIndexed a a > ---- > > What does it mean to "generalize over the indices [m + n, m + suc n]", > and why is this necessary here? > > If I rewrite test2 as `test2 r = ?` and attempt a case split on `r` I > get instead > > ---- > I'm not sure if there should be a case for the constructor relIdx, > because I get stuck when trying to solve the following unification > problems (inferred index ? expected index): > {_} ? {_} > {_} ? {_} > con m? i ? a > con m? j ? a > when checking that the expression ? has type Indexed .m .n > ---- > > I'm not sure how to interpret this either, especially the `{_} ? {_}` > lines. > > Cheers > /Sandro > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.stucki at epfl.ch Thu Sep 21 17:44:32 2017 From: sandro.stucki at epfl.ch (Sandro Stucki) Date: Thu, 21 Sep 2017 17:44:32 +0200 Subject: [Agda] Cannot apply injectivity In-Reply-To: References: Message-ID: Hi Jesper, Thanks for the quick reply and the pointer to your CPP'17 paper > One way to fix your problem would be to get rid of the 'green slime' in the > type of `con`: (...) Yes, the green slime in the definition if Indexed is indeed unfortunate (and in fact unnecessary in my real use case). So I guess the take home message is simply "avoid green slime". Still, I'm curious what exactly goes wrong here, so I followed your suggestion: > ps: To change the {_} in the error message into something more useful, you > can enable the --show-implicit option. Thanks for pointing that out, I had forgotten about that option! With that I get {m? + n?} ? {m? + n} {m? + suc n?} ? {m? + suc n} con m? {n?} i? ? con m? {n} i? con m? {n?} j ? con m? {n} i? which indeed suggests that _+_ gets in the way. But I'm curious why Agda 2.5.1 was able to handle this case. I guess if we were to apply injectivity of constructors naively, we'd get m? ? m? {n?} ? {n} i? ? i? j ? i? and substituting these, the equations involving _+_ would become trivial. I had a quick look at your paper and it seems the problem is not so much generalizing the indices `m + n` and `m + suc n` but dealing with the resulting higher-dimensional equations. Is that correct? If yes, then maybe the error message is slightly misleading. I'm also curious if and how uniqueness-of-identity proofs would help in dealing with the higher-dimensional equations generated when you generalize indices. Cheers /Sandro On Thu, Sep 21, 2017 at 1:36 PM, Jesper Cockx wrote: > Hi Sandro, > > The error message "cannot generalize over the indices" is thrown by Agda > when it encounters a unification problem of the form `c us =?= c vs` where > `c` is a constructor of an indexed datatype, but the indices in the *type* > of this equation are something other than distinct variables (i.e. they > should be fully general). If they are not, Agda tries to apply a technique > called higher-dimensional unification (see our CPP 2017 paper) to bring them > in a fully general form. However, this unfortunately doesn't always succeed, > for example in your code it gets stuck on the _+_ function in the index of > `con`. > > One way to fix your problem would be to get rid of the 'green slime' in the > type of `con`: it's better to use only variables and constructors in the > indices of your datatypes, and use explicit proofs of equality for the > heavier work. > > On the other hand, it's possible that there's something more that Agda could > do in this situation. Roughly a year ago, I wrote the following comment at > the place where this error is thrown: """ > -- TODO: we could still make progress here if not --without-K, > -- but I'm not sure if it's necessary. > """. It seems it is necessary in some situations after all. I'll try to > remember what I meant with that and implement it. > > Best regards, > Jesper > > ps: To change the {_} in the error message into something more useful, you > can enable the --show-implicit option. Maybe it would be better if Agda did > this by default. > > On Thu, Sep 21, 2017 at 11:47 AM, Sandro Stucki > wrote: >> >> Hi all, >> >> I recently ported some code from Agda 2.5.1 to 2.5.2 and ran into some >> errors, probably caused by a change in the unifier. I've reduced the >> offending code down to the following: >> >> ---- >> open import Data.Nat using (?; suc; _+_) >> open import Data.Fin using (Fin) >> >> data Indexed : ? ? ? ? Set where >> con : ? m {n} (i : Fin n) ? Indexed (m + n) (m + suc n) >> >> data RelIndexed : ? {m n} ? Indexed m n ? Indexed m n ? Set where >> relIdx : ? {m n} (i : Fin n) (j : Fin n) ? RelIndexed (con m i) (con m >> j) >> >> test1 : ? {m n} {a b : Indexed m n} ? RelIndexed a b ? Indexed m n >> test1 (relIdx {m} i _) = con m i >> >> test2 : ? {m n} {a : Indexed m n} ? RelIndexed a a ? Indexed m n >> test2 (relIdx {m} i _) = con m i >> ---- >> >> I'm using the modules Data.Nat and Data.Fin from the standard library >> here. >> >> The idea is that `Indexed` is some datatype indexed by naturals, and >> `RelIndexed` is a family of relations over `Indexed` at given `n` and >> `m`. I want to write a function (actually a lemma) similar to `test2` >> for a reflexive instance of `RelIndexed`, i.e. where some `Indexed` >> instance is related to itself. But somehow the Agda 2.5.2 unifier is >> not happy about this. >> >> For `test1` the unifier succeeds, but for `test2` it apparently fails >> to solve `con m i = con m j`. The error is >> >> ---- >> Cannot apply injectivity to the equation con m i = con m j of type >> Indexed (m + n) (m + suc n) because I cannot generalize over the >> indices [m + n, m + suc n] >> when checking that the pattern relIdx {m} i _ has type >> RelIndexed a a >> ---- >> >> What does it mean to "generalize over the indices [m + n, m + suc n]", >> and why is this necessary here? >> >> If I rewrite test2 as `test2 r = ?` and attempt a case split on `r` I >> get instead >> >> ---- >> I'm not sure if there should be a case for the constructor relIdx, >> because I get stuck when trying to solve the following unification >> problems (inferred index ? expected index): >> {_} ? {_} >> {_} ? {_} >> con m? i ? a >> con m? j ? a >> when checking that the expression ? has type Indexed .m .n >> ---- >> >> I'm not sure how to interpret this either, especially the `{_} ? {_}` >> lines. >> >> Cheers >> /Sandro >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > From mechvel at botik.ru Thu Sep 21 19:42:04 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 21 Sep 2017 20:42:04 +0300 Subject: [Agda] Agda code in slides Message-ID: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> People, I need to prepare a slide presentation in LaTex which has many fragments of Agda code. I write (as an example) ---------------------------------------------- \documentclass[pdf]{beamer} \mode{} % This handles the translation of unicode to latex: \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{autofe} ... \begin{document} \title{Foo} \author{Foo} \maketitle \begin{frame}{Foo} \begin{verbatim} record Foo : Set where constructor foo' field a : Rel C _ op? : C ? C a?0 : a ? 0# _='_ : Rel C _ x =' y = (f x * f y) ? y \end{verbatim} \end{frame} \end{document} ---------------------------------------------- And pdflatex reports errors. Removing {verbatim} makes it compiled. But this breaks the code script, indentations, frame nicety, etc. What is, please, a way out? Thanks, ------ Sergei From guillaume.allais at ens-lyon.org Fri Sep 22 11:44:58 2017 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Fri, 22 Sep 2017 11:44:58 +0200 Subject: [Agda] Agda code in slides In-Reply-To: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> References: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> Message-ID: <22d686da-135b-28bb-a694-f72e19f97262@ens-lyon.org> Hi Sergei, Have you had a look at the wiki on this topic? It's full on neat tricks e.g. the use of the catchfilebetweentags package: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.LiterateAgda Cheers, -- gallais On 21/09/17 19:42, Sergei Meshveliani wrote: > People, > > I need to prepare a slide presentation in LaTex which has many fragments > of Agda code. > I write (as an example) > > ---------------------------------------------- > \documentclass[pdf]{beamer} > \mode{} > > % This handles the translation of unicode to latex: > \usepackage{ucs} > \usepackage[utf8x]{inputenc} > \usepackage{autofe} > ... > > \begin{document} > \title{Foo} > \author{Foo} > \maketitle > > \begin{frame}{Foo} > > \begin{verbatim} > record Foo : Set where > constructor foo' > field > a : Rel C _ > op? : C ? C > a?0 : a ? 0# > > _='_ : Rel C _ > x =' y = (f x * f y) ? y > \end{verbatim} > \end{frame} > \end{document} > ---------------------------------------------- > > And pdflatex reports errors. > Removing {verbatim} makes it compiled. But this breaks the code > script, indentations, frame nicety, etc. > > What is, please, a way out? > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From nad at cse.gu.se Fri Sep 22 14:55:26 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 22 Sep 2017 14:55:26 +0200 Subject: [Agda] Agda code in slides In-Reply-To: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> References: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-09-21 19:42, Sergei Meshveliani wrote: > \begin{frame}{Foo} > > \begin{verbatim} > record Foo : Set where > constructor foo' > field > a : Rel C _ > op? : C ? C > a?0 : a ? 0# > > _='_ : Rel C _ > x =' y = (f x * f y) ? y > \end{verbatim} > \end{frame} I seem to recall that if you want to use the verbatim environment inside a frame, then the frame should be marked as fragile: \begin{frame}[fragile] -- /NAD From mechvel at botik.ru Fri Sep 22 17:20:01 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Fri, 22 Sep 2017 18:20:01 +0300 Subject: [Agda] Agda code in slides In-Reply-To: References: <1506015724.2326.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1506093601.2521.8.camel@one.mechvel.pereslavl.ru> On Fri, 2017-09-22 at 14:55 +0200, Nils Anders Danielsson wrote: > On 2017-09-21 19:42, Sergei Meshveliani wrote: > > \begin{frame}{Foo} > > > > \begin{verbatim} > > record Foo : Set where > > constructor foo' > > field > > a : Rel C _ > > op? : C ? C > > a?0 : a ? 0# > > > > _='_ : Rel C _ > > x =' y = (f x * f y) ? y > > \end{verbatim} > > \end{frame} > > I seem to recall that if you want to use the verbatim environment inside > a frame, then the frame should be marked as fragile: > > \begin{frame}[fragile] Thank you very much! This occurs the simplest way out. Also thanks to people who responded, I store their advices as a reserve. ------ Sergei From Jesper at sikanda.be Fri Sep 22 17:22:35 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 22 Sep 2017 17:22:35 +0200 Subject: [Agda] Cannot apply injectivity In-Reply-To: References: Message-ID: Hi Sandro, If we're not working --without-K, then there's a simpler injectivity rule that can be applied that's very close to the naive one (see Lemma 3.53 in my thesis). I've implemented this alternative injectivity rule as a fallback to the current mechanism (only when --without-K is not enabled of course). This makes your example code typecheck. Thank you for providing a good motivating example for implementing this feature! cheers, Jesper On Thu, Sep 21, 2017 at 5:44 PM, Sandro Stucki wrote: > Hi Jesper, > > Thanks for the quick reply and the pointer to your CPP'17 paper > > > One way to fix your problem would be to get rid of the 'green slime' in > the > > type of `con`: (...) > > Yes, the green slime in the definition if Indexed is indeed > unfortunate (and in fact unnecessary in my real use case). So I guess > the take home message is simply "avoid green slime". > > Still, I'm curious what exactly goes wrong here, so I followed your > suggestion: > > > ps: To change the {_} in the error message into something more useful, > you > > can enable the --show-implicit option. > > Thanks for pointing that out, I had forgotten about that option! With that > I get > > {m? + n?} ? {m? + n} > {m? + suc n?} ? {m? + suc n} > con m? {n?} i? ? con m? {n} i? > con m? {n?} j ? con m? {n} i? > > which indeed suggests that _+_ gets in the way. > > But I'm curious why Agda 2.5.1 was able to handle this case. I guess > if we were to apply injectivity of constructors naively, we'd get > > m? ? m? > {n?} ? {n} > i? ? i? > j ? i? > > and substituting these, the equations involving _+_ would become trivial. > > I had a quick look at your paper and it seems the problem is not so > much generalizing the indices `m + n` and `m + suc n` but dealing with > the resulting higher-dimensional equations. Is that correct? If yes, > then maybe the error message is slightly misleading. > > I'm also curious if and how uniqueness-of-identity proofs would help > in dealing with the higher-dimensional equations generated when you > generalize indices. > > Cheers > /Sandro > > > On Thu, Sep 21, 2017 at 1:36 PM, Jesper Cockx wrote: > > Hi Sandro, > > > > The error message "cannot generalize over the indices" is thrown by Agda > > when it encounters a unification problem of the form `c us =?= c vs` > where > > `c` is a constructor of an indexed datatype, but the indices in the > *type* > > of this equation are something other than distinct variables (i.e. they > > should be fully general). If they are not, Agda tries to apply a > technique > > called higher-dimensional unification (see our CPP 2017 paper) to bring > them > > in a fully general form. However, this unfortunately doesn't always > succeed, > > for example in your code it gets stuck on the _+_ function in the index > of > > `con`. > > > > One way to fix your problem would be to get rid of the 'green slime' in > the > > type of `con`: it's better to use only variables and constructors in the > > indices of your datatypes, and use explicit proofs of equality for the > > heavier work. > > > > On the other hand, it's possible that there's something more that Agda > could > > do in this situation. Roughly a year ago, I wrote the following comment > at > > the place where this error is thrown: """ > > -- TODO: we could still make progress here if not --without-K, > > -- but I'm not sure if it's necessary. > > """. It seems it is necessary in some situations after all. I'll try to > > remember what I meant with that and implement it. > > > > Best regards, > > Jesper > > > > ps: To change the {_} in the error message into something more useful, > you > > can enable the --show-implicit option. Maybe it would be better if Agda > did > > this by default. > > > > On Thu, Sep 21, 2017 at 11:47 AM, Sandro Stucki > > wrote: > >> > >> Hi all, > >> > >> I recently ported some code from Agda 2.5.1 to 2.5.2 and ran into some > >> errors, probably caused by a change in the unifier. I've reduced the > >> offending code down to the following: > >> > >> ---- > >> open import Data.Nat using (?; suc; _+_) > >> open import Data.Fin using (Fin) > >> > >> data Indexed : ? ? ? ? Set where > >> con : ? m {n} (i : Fin n) ? Indexed (m + n) (m + suc n) > >> > >> data RelIndexed : ? {m n} ? Indexed m n ? Indexed m n ? Set where > >> relIdx : ? {m n} (i : Fin n) (j : Fin n) ? RelIndexed (con m i) (con m > >> j) > >> > >> test1 : ? {m n} {a b : Indexed m n} ? RelIndexed a b ? Indexed m n > >> test1 (relIdx {m} i _) = con m i > >> > >> test2 : ? {m n} {a : Indexed m n} ? RelIndexed a a ? Indexed m n > >> test2 (relIdx {m} i _) = con m i > >> ---- > >> > >> I'm using the modules Data.Nat and Data.Fin from the standard library > >> here. > >> > >> The idea is that `Indexed` is some datatype indexed by naturals, and > >> `RelIndexed` is a family of relations over `Indexed` at given `n` and > >> `m`. I want to write a function (actually a lemma) similar to `test2` > >> for a reflexive instance of `RelIndexed`, i.e. where some `Indexed` > >> instance is related to itself. But somehow the Agda 2.5.2 unifier is > >> not happy about this. > >> > >> For `test1` the unifier succeeds, but for `test2` it apparently fails > >> to solve `con m i = con m j`. The error is > >> > >> ---- > >> Cannot apply injectivity to the equation con m i = con m j of type > >> Indexed (m + n) (m + suc n) because I cannot generalize over the > >> indices [m + n, m + suc n] > >> when checking that the pattern relIdx {m} i _ has type > >> RelIndexed a a > >> ---- > >> > >> What does it mean to "generalize over the indices [m + n, m + suc n]", > >> and why is this necessary here? > >> > >> If I rewrite test2 as `test2 r = ?` and attempt a case split on `r` I > >> get instead > >> > >> ---- > >> I'm not sure if there should be a case for the constructor relIdx, > >> because I get stuck when trying to solve the following unification > >> problems (inferred index ? expected index): > >> {_} ? {_} > >> {_} ? {_} > >> con m? i ? a > >> con m? j ? a > >> when checking that the expression ? has type Indexed .m .n > >> ---- > >> > >> I'm not sure how to interpret this either, especially the `{_} ? {_}` > >> lines. > >> > >> Cheers > >> /Sandro > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sun Sep 24 13:46:32 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 24 Sep 2017 14:46:32 +0300 Subject: [Agda] `with' in standard functions Message-ID: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> People, There is a certain problem with user proofs for Standard library functions that use `with' or `case_of_'. If a function is written without `with' (`with' replaced with calling an auxiliary function aux, and this aux is exported from the module), then it is much easier to compose various new proofs about it. But the user cannot change implementation for a standard function. For example, Data.Bin implements ------------------------- fromBits : List Bit ? Bin fromBits [] = 0# fromBits (b ? bs) with fromBits bs fromBits (b ? bs) | bs? 1# = (b ? bs?) 1# fromBits (0b ? bs) | 0# = 0# fromBits (1b ? bs) | 0# = [] 1# fromBits (?b ? bs) | _ ------------------------- I need to prove fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# And find it difficult. Then I get free of `with', and a proof becomes plain and easy to compose: -------------------------------------------------- fromBits-aux : Bit ? List Bit ? Bin ? Bin -- needs to be exported fromBits-aux b bs (bs' 1#) = (b ? bs') 1# fromBits-aux 0b bs 0# = 0# fromBits-aux 1b bs 0# = [] 1# fromBits-aux ?b bs _ fromBits' : List Bit ? Bin fromBits' [] = 0# fromBits' (b ? bs) = fromBits-aux b bs (fromBits' bs) fromBits-bs++1 : fromBits' ? (_?? 1b) ? _1# fromBits-bs++1 [] = refl fromBits-bs++1 (b ? bs) = begin fromBits' (b ? (bs ?? 1b)) ?? refl ? fromBits-aux b (bs ?? 1b) (fromBits' (bs ?? 1b)) ?? cong (fromBits-aux b (bs ?? 1b)) (fromBits-bs++1 bs) ? fromBits-aux b (bs ?? 1b) (bs 1#) ?? refl ? (b ? bs) 1# ? --------------------------------------------------- Please, what is a way out? Thanks, ------ Sergei From sandro.stucki at gmail.com Mon Sep 25 14:32:07 2017 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Mon, 25 Sep 2017 14:32:07 +0200 Subject: [Agda] `with' in standard functions In-Reply-To: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> Message-ID: Hi Sergei, Here's a solution that uses a with clause in the proof (similar to that in the definition of `fromBits`) and the `inspect` idiom to keep track of the result of the with clause. There's also a helper lemma to dispatch some absurd cases. It's not very elegant, and I'm not sure it will scale to bigger examples, but I hope it's useful to you anyway. ---- open import Data.Bin open import Data.Digit open import Data.Fin renaming (suc to 1+_) open import Data.List open import Function open import Relation.Binary.PropositionalEquality open ?-Reasoning open import Relation.Nullary.Negation -- A helper: lists of bits ending in `1b` do not convert to `0#`. fromBits-bs++1?0 : ? bs ? fromBits (bs ?? 1b) ? 0# fromBits-bs++1?0 [] () fromBits-bs++1?0 (b ? bs) _ with fromBits (bs ?? 1b) | inspect fromBits (bs ?? 1b) fromBits-bs++1?0 (zero ? bs) _ | 0# | [ eq ] = fromBits-bs++1?0 bs eq fromBits-bs++1?0 (1+ zero ? bs) () | 0# | [ _ ] fromBits-bs++1?0 (1+ (1+ ()) ? bs) _ | 0# | _ fromBits-bs++1?0 (b ? bs) () | bs? 1# | [ _ ] fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# fromBits-bs++1 [] = refl fromBits-bs++1 (b ? bs) with fromBits (bs ?? 1b) | inspect fromBits (bs ?? 1b) fromBits-bs++1 (b ? bs) | bs? 1# | [ eq ] = helper (begin bs? 1# ?? sym eq ? fromBits (bs ++ (1+ zero) ? []) ?? fromBits-bs++1 bs ? bs 1# ?) where -- Combines injectivity of `_1#` with `cong (_#1 ? (b ?_))`. helper : ? {b bs? bs?} ? bs? 1# ? bs? 1# ? (b ? bs?) 1# ? (b ? bs?) 1# helper refl = refl fromBits-bs++1 (zero ? bs) | 0# | [ eq ] = contradiction eq ((fromBits-bs++1?0 bs)) fromBits-bs++1 (1+ zero ? bs) | 0# | [ eq ] = contradiction eq ((fromBits-bs++1?0 bs)) fromBits-bs++1 (1+ (1+ ()) ? bs) | 0# | _ ---- Cheers /Sandro On Sun, Sep 24, 2017 at 1:46 PM, Sergei Meshveliani wrote: > People, > > There is a certain problem with user proofs for Standard library > functions that use `with' or `case_of_'. > If a function is written without `with' (`with' replaced with calling an > auxiliary function aux, and this aux is exported from the module), > then it is much easier to compose various new proofs about it. > > But the user cannot change implementation for a standard function. > > For example, Data.Bin implements > > ------------------------- > fromBits : List Bit ? Bin > fromBits [] = 0# > fromBits (b ? bs) with fromBits bs > fromBits (b ? bs) | bs? 1# = (b ? bs?) 1# > fromBits (0b ? bs) | 0# = 0# > fromBits (1b ? bs) | 0# = [] 1# > fromBits (?b ? bs) | _ > ------------------------- > > I need to prove > > fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# > > And find it difficult. > Then I get free of `with', and a proof becomes plain and easy to > compose: > > -------------------------------------------------- > fromBits-aux : Bit ? List Bit ? Bin ? Bin -- needs to be exported > > fromBits-aux b bs (bs' 1#) = (b ? bs') 1# > fromBits-aux 0b bs 0# = 0# > fromBits-aux 1b bs 0# = [] 1# > fromBits-aux ?b bs _ > > fromBits' : List Bit ? Bin > fromBits' [] = 0# > fromBits' (b ? bs) = fromBits-aux b bs (fromBits' bs) > > > fromBits-bs++1 : fromBits' ? (_?? 1b) ? _1# > fromBits-bs++1 [] = refl > fromBits-bs++1 (b ? bs) = > begin > fromBits' (b ? (bs ?? 1b)) ?? refl ? > fromBits-aux b (bs ?? 1b) (fromBits' (bs ?? 1b)) > ?? cong (fromBits-aux b (bs ?? 1b)) > (fromBits-bs++1 bs) > ? > fromBits-aux b (bs ?? 1b) (bs 1#) ?? refl ? > (b ? bs) 1# > ? > --------------------------------------------------- > > Please, what is a way out? > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Mon Sep 25 16:56:38 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 25 Sep 2017 17:56:38 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1506351398.4018.6.camel@one.mechvel.pereslavl.ru> On Mon, 2017-09-25 at 14:32 +0200, Sandro Stucki wrote: > Hi Sergei, > > Here's a solution that uses a with clause in the proof (similar to > that in the definition of `fromBits`) and the `inspect` idiom to keep > track of the result of the with clause. There's also a helper lemma to > dispatch some absurd cases. It's not very elegant, and I'm not sure it > will scale to bigger examples, but I hope it's useful to you anyway. > > [..] Thanks to Sandro! You see, I often occur unlucky when apply `inspect'. > ---- > open import Data.Bin > open import Data.Digit > open import Data.Fin renaming (suc to 1+_) > open import Data.List > open import Function > open import Relation.Binary.PropositionalEquality > open ?-Reasoning > open import Relation.Nullary.Negation > > -- A helper: lists of bits ending in `1b` do not convert to `0#`. > fromBits-bs++1?0 : ? bs ? fromBits (bs ?? 1b) ? 0# > fromBits-bs++1?0 [] () > fromBits-bs++1?0 (b ? bs) _ > with fromBits (bs ?? 1b) | inspect fromBits (bs ?? 1b) > fromBits-bs++1?0 (zero ? bs) _ | 0# | [ eq ] = fromBits-bs++1?0 bs eq > fromBits-bs++1?0 (1+ zero ? bs) () | 0# | [ _ ] > fromBits-bs++1?0 (1+ (1+ ()) ? bs) _ | 0# | _ > fromBits-bs++1?0 (b ? bs) () | bs? 1# | [ _ ] > > fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# > fromBits-bs++1 [] = refl > fromBits-bs++1 (b ? bs) > with fromBits (bs ?? 1b) | inspect fromBits (bs ?? 1b) > fromBits-bs++1 (b ? bs) | bs? 1# | [ eq ] = > helper (begin > bs? 1# ?? sym eq ? > fromBits (bs ++ (1+ zero) ? []) ?? fromBits-bs++1 bs ? > bs 1# ?) > where > -- Combines injectivity of `_1#` with `cong (_#1 ? (b ?_))`. > helper : ? {b bs? bs?} ? bs? 1# ? bs? 1# ? (b ? bs?) 1# ? (b ? bs?) 1# > helper refl = refl > fromBits-bs++1 (zero ? bs) | 0# | [ eq ] = > contradiction eq ((fromBits-bs++1?0 bs)) > fromBits-bs++1 (1+ zero ? bs) | 0# | [ eq ] = > contradiction eq ((fromBits-bs++1?0 bs)) > fromBits-bs++1 (1+ (1+ ()) ? bs) | 0# | _ > ---- > > Cheers > /Sandro > > > On Sun, Sep 24, 2017 at 1:46 PM, Sergei Meshveliani wrote: > > People, > > > > There is a certain problem with user proofs for Standard library > > functions that use `with' or `case_of_'. > > If a function is written without `with' (`with' replaced with calling an > > auxiliary function aux, and this aux is exported from the module), > > then it is much easier to compose various new proofs about it. > > > > But the user cannot change implementation for a standard function. > > > > For example, Data.Bin implements > > > > ------------------------- > > fromBits : List Bit ? Bin > > fromBits [] = 0# > > fromBits (b ? bs) with fromBits bs > > fromBits (b ? bs) | bs? 1# = (b ? bs?) 1# > > fromBits (0b ? bs) | 0# = 0# > > fromBits (1b ? bs) | 0# = [] 1# > > fromBits (?b ? bs) | _ > > ------------------------- > > > > I need to prove > > > > fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# > > > > And find it difficult. > > Then I get free of `with', and a proof becomes plain and easy to > > compose: > > > > -------------------------------------------------- > > fromBits-aux : Bit ? List Bit ? Bin ? Bin -- needs to be exported > > > > fromBits-aux b bs (bs' 1#) = (b ? bs') 1# > > fromBits-aux 0b bs 0# = 0# > > fromBits-aux 1b bs 0# = [] 1# > > fromBits-aux ?b bs _ > > > > fromBits' : List Bit ? Bin > > fromBits' [] = 0# > > fromBits' (b ? bs) = fromBits-aux b bs (fromBits' bs) > > > > > > fromBits-bs++1 : fromBits' ? (_?? 1b) ? _1# > > fromBits-bs++1 [] = refl > > fromBits-bs++1 (b ? bs) = > > begin > > fromBits' (b ? (bs ?? 1b)) ?? refl ? > > fromBits-aux b (bs ?? 1b) (fromBits' (bs ?? 1b)) > > ?? cong (fromBits-aux b (bs ?? 1b)) > > (fromBits-bs++1 bs) > > ? > > fromBits-aux b (bs ?? 1b) (bs 1#) ?? refl ? > > (b ? bs) 1# > > ? > > --------------------------------------------------- > > > > Please, what is a way out? > > > > Thanks, > > > > ------ > > Sergei > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at botik.ru Mon Sep 25 18:00:40 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 25 Sep 2017 19:00:40 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> Message-ID: <1506355240.4018.69.camel@one.mechvel.pereslavl.ru> Dear Agda developers, Proofs by using the `inspect' construct are difficult to compose, the thing is unclear, leads to complications. When a function does not use `with' nor 'cade_of_', it is much easier to write proofs for it. Am I the only one who thinks so? --------------------------------- In 2013 I had a talk on CICM-2013, and in the questions part someone asked me "Really, do you write proofs in Agda ? Personally I cannot write proofs in Agda !". He had exclaimed this with a suffer. I had an impression that he really knew of what he was talking about. (And some proofs in my program for algebra had the `postulate' stubs). I answered something like this "There are some difficulties, I have not enough experience, I need to see further. Anyway, what language or system do you suggest for writing these proofs for programming algebra? Is it Coq ? " He thought a bit, and had not said anything. So, I thought that all tools bring difficulties. I suspect now, that the problem was in proofs for the functions using the constructs of `with' or case_of, which lead to unclear complications caused by the `inspect' construct. If this was today, I would answer "A proof is not difficult to write in Agda -- when the function is free of the constructs of `with' and case_of_, and soon as an intuitive constructive proof is ready. And it is not difficult to program any algorithm without using these constructs". As I convert by hand any function to the form free of `with' and case_of_, may be, this can be done automatically, and so that `inspect' would not be necessary? What people think of this? Regards, ------ Sergei On Sun, 2017-09-24 at 14:46 +0300, Sergei Meshveliani wrote: > People, > > There is a certain problem with user proofs for Standard library > functions that use `with' or `case_of_'. > If a function is written without `with' (`with' replaced with calling an > auxiliary function aux, and this aux is exported from the module), > then it is much easier to compose various new proofs about it. > > But the user cannot change implementation for a standard function. > > For example, Data.Bin implements > > ------------------------- > fromBits : List Bit ? Bin > fromBits [] = 0# > fromBits (b ? bs) with fromBits bs > fromBits (b ? bs) | bs? 1# = (b ? bs?) 1# > fromBits (0b ? bs) | 0# = 0# > fromBits (1b ? bs) | 0# = [] 1# > fromBits (?b ? bs) | _ > ------------------------- > > I need to prove > > fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# > > And find it difficult. > Then I get free of `with', and a proof becomes plain and easy to > compose: > > -------------------------------------------------- > fromBits-aux : Bit ? List Bit ? Bin ? Bin -- needs to be exported > > fromBits-aux b bs (bs' 1#) = (b ? bs') 1# > fromBits-aux 0b bs 0# = 0# > fromBits-aux 1b bs 0# = [] 1# > fromBits-aux ?b bs _ > > fromBits' : List Bit ? Bin > fromBits' [] = 0# > fromBits' (b ? bs) = fromBits-aux b bs (fromBits' bs) > > > fromBits-bs++1 : fromBits' ? (_?? 1b) ? _1# > fromBits-bs++1 [] = refl > fromBits-bs++1 (b ? bs) = > begin > fromBits' (b ? (bs ?? 1b)) ?? refl ? > fromBits-aux b (bs ?? 1b) (fromBits' (bs ?? 1b)) > ?? cong (fromBits-aux b (bs ?? 1b)) > (fromBits-bs++1 bs) > ? > fromBits-aux b (bs ?? 1b) (bs 1#) ?? refl ? > (b ? bs) 1# > ? > --------------------------------------------------- > > Please, what is a way out? > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From nad at cse.gu.se Tue Sep 26 10:27:29 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 26 Sep 2017 10:27:29 +0200 Subject: [Agda] `with' in standard functions In-Reply-To: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> Message-ID: <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> On 2017-09-24 13:46, Sergei Meshveliani wrote: > There is a certain problem with user proofs for Standard library > functions that use `with' or `case_of_'. I guess that the main problem is when one or more parts of the first definition cannot be referred to directly in the second definition. Some examples: * With. When with is used there is no way to refer directly (without using unification) to the generated with function. We could perhaps fix this by parsing with expressions of the form "f?ps?|?e_1?|?...?|?e_n". * Pattern-matching lambdas. Such lambdas are compared by name, but the name is generated and cannot be written down explicitly in source code. This could perhaps be fixed by comparing such lambdas by structure rather than name, but that is a rather big change. * Local definitions in where clauses. Such definitions are presumably supposed to be hidden, but can be named if the where clause is named. -- /NAD From mechvel at botik.ru Tue Sep 26 20:09:31 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 26 Sep 2017 21:09:31 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> Message-ID: <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> On Tue, 2017-09-26 at 10:27 +0200, Nils Anders Danielsson wrote: > On 2017-09-24 13:46, Sergei Meshveliani wrote: > > There is a certain problem with user proofs for Standard library > > functions that use `with' or `case_of_'. > > I guess that the main problem is when one or more parts of the first > definition cannot be referred to directly in the second definition. Some > examples: > > * With. When with is used there is no way to refer directly (without > using unification) to the generated with function. We could perhaps > fix this by parsing with expressions of the form > "f ps | e_1 | ... | e_n". Can you, please, demonstrate this parsing on a simple example? Say, on Data.Bin.fromBits. ? > * Pattern-matching lambdas. Such lambdas are compared by name, but the > name is generated and cannot be written down explicitly in source > code. This could perhaps be fixed by comparing such lambdas by > structure rather than name, but that is a rather big change. > > * Local definitions in where clauses. Such definitions are presumably > supposed to be hidden, but can be named if the where clause is named. For example, Data.Bin.fromBits can be written as fromBits : List Bit ? Bin fromBits [] = 0# fromBits (b ? bs) = aux b bs (fromBits' bs) where aux : Bit ? Bin ? Bin aux b (bs' 1#) = (b ? bs') 1# aux 0b 0# = 0# aux 1b 0# = [] 1# aux ?b _ How would this aux be referred from outside? ("fromBits.aux" does not look as concrete enough). Thanks, ------ Sergei From nad at cse.gu.se Tue Sep 26 21:13:33 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 26 Sep 2017 21:13:33 +0200 Subject: [Agda] `with' in standard functions In-Reply-To: <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-09-26 20:09, Sergei Meshveliani wrote: > Can you, please, demonstrate this parsing on a simple example? Agda currently prints expressions of this form, but does not parse them. > How would this aux be referred from outside? Let's take the following, self-contained example instead: open import Agda.Builtin.List open import Agda.Builtin.Nat F : List Set ? Set F [] = Nat F (A ? As) = B 12 module M where B : Nat ? Set B zero = A B (suc n) = A ? B n Here you can refer to the local function B as M.B. Note, however, that the inferred type of M.B is (A?:?Set)?(As?:?List?Set)???Nat???Set. In cases like this, where one or more arguments are not used by the local function and you want to refer to it by name, it may be better to move it to the top-level than to name the where module. -- /NAD From mechvel at botik.ru Tue Sep 26 21:47:01 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 26 Sep 2017 22:47:01 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> Message-ID: <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> On Tue, 2017-09-26 at 21:13 +0200, Nils Anders Danielsson wrote: > On 2017-09-26 20:09, Sergei Meshveliani wrote: > > Can you, please, demonstrate this parsing on a simple example? > > Agda currently prints expressions of this form, but does not parse them. > I meant: how will it look the intended parsing result, for a simple example. > > How would this aux be referred from outside? > > Let's take the following, self-contained example instead: > > open import Agda.Builtin.List > open import Agda.Builtin.Nat > > F : List Set ? Set > F [] = Nat > F (A ? As) = B 12 > module M where > B : Nat ? Set > B zero = A > B (suc n) = A ? B n > > Here you can refer to the local function B as M.B. Note, however, that > the inferred type of M.B is (A : Set) (As : List Set) ? Nat ? Set. In > cases like this, where one or more arguments are not used by the local > function and you want to refer to it by name, it may be better to move > it to the top-level than to name the where module. > Year or two ago I tried this once. And decided that it is still better to move it to the top level, even with polluting the top level with "-aux" functions. Regards, ------ Sergei From apostolis.xekoukoulotakis at gmail.com Wed Sep 27 14:56:29 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 27 Sep 2017 15:56:29 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> Message-ID: I recently had to move a local function to top-level. Previously I used irrelevance to to disregard the fact that I provide different (in name only) functions. I was lucky that the function did not use many local variables. My main problem with 'with' is the error message. Someone on twitter said that "Type-driven development allows him to prove things that he wouldn't be able to do on his own". When the complexity of the code increases, the 'with' error message does not increase our ability to handle that complexity. We have to solve things ourselves. On Tue, Sep 26, 2017 at 10:47 PM, Sergei Meshveliani wrote: > On Tue, 2017-09-26 at 21:13 +0200, Nils Anders Danielsson wrote: > > On 2017-09-26 20:09, Sergei Meshveliani wrote: > > > Can you, please, demonstrate this parsing on a simple example? > > > > Agda currently prints expressions of this form, but does not parse them. > > > > I meant: how will it look the intended parsing result, for a simple > example. > > > > > How would this aux be referred from outside? > > > > Let's take the following, self-contained example instead: > > > > open import Agda.Builtin.List > > open import Agda.Builtin.Nat > > > > F : List Set ? Set > > F [] = Nat > > F (A ? As) = B 12 > > module M where > > B : Nat ? Set > > B zero = A > > B (suc n) = A ? B n > > > > Here you can refer to the local function B as M.B. Note, however, that > > the inferred type of M.B is (A : Set) (As : List Set) ? Nat ? Set. In > > cases like this, where one or more arguments are not used by the local > > function and you want to refer to it by name, it may be better to move > > it to the top-level than to name the where module. > > > > Year or two ago I tried this once. And decided that it is still better > to move it to the top level, even with polluting the top level with > "-aux" functions. > > Regards, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Sep 27 15:33:13 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 27 Sep 2017 15:33:13 +0200 Subject: [Agda] `with' in standard functions In-Reply-To: <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> Message-ID: On 2017-09-26 21:47, Sergei Meshveliani wrote: > I meant: how will it look the intended parsing result, for a simple > example. Consider the following code: f : {A : Set} ? List A ? List A f [] = [] f (x ? xs) with xs ... | [] = xs ... | y ? ys = x ? ys This is expanded into something like the following: .f-aux : {A : Set} ? A ? List A ? List A ? List A .f-aux x xs [] = xs .f-aux x xs (y ? ys) = x ? ys f : {A : Set} ? List A ? List A f [] = [] f (x ? xs) = .f-aux x xs xs The idea is that the expression f (x ? xs) | ys would stand for .f-aux?x?xs?ys. -- /NAD From pepm.workshop at gmail.com Thu Sep 28 06:21:35 2017 From: pepm.workshop at gmail.com (PEPM Workshop) Date: Thu, 28 Sep 2017 13:21:35 +0900 Subject: [Agda] PEPM 2018 Final Call for Papers Message-ID: PEPM 2018 FINAL CALL FOR PAPERS =============================== The submission site is now open: https://pepm18.hotcrp.com Only one week until the paper submission deadline (6th October AoE)! Highlights ---------- PEPM 2018 welcomes submissions on * semantics based and machine-learning based program synthesis and program optimisation, and * modelling, analysis, and transformation techniques for distributed and concurrent protocols and programs, such as session types, linear types, and contract specifications, in addition to traditional PEPM topics. Do submit a short paper if you want to get feedback for your work in progress! If requested, short papers can be left out of the proceedings so that the results can be published elsewhere. New in this call ---------------- Invited talks by Alex Aiken, Conal Elliott, and Jan Midtgaard. Short papers should include the words ?short paper? somewhere in their title, and will be evaluated primarily on the basis of their ideas rather than finished execution. -- CALL FOR PAPERS -- ACM SIGPLAN Workshop on PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM) 2018 =============================================================================== * Website : http://popl18.sigplan.org/track/PEPM-2018 * Time : 8th ? 9th January 2018 * Place : Los Angeles, CA, US (co-located with POPL 2018) The ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM), which has a history going back to 1991 and has co-located with POPL every year since 2006, originates in the discoveries of practically useful automated techniques for evaluating programs with only partial input. Over the years, the scope of PEPM has expanded to include a variety of research areas centred around the theme of semantics-based program manipulation ? the systematic exploitation of treating programs not only as subject to black-box execution, but also as data structures that can be generated, analysed, and transformed while establishing or maintaining important semantic properties. Scope ----- In addition to the traditional PEPM topics (see below), PEPM 2018 welcomes submissions in new domains, in particular: * Semantics based and machine-learning based program synthesis and program optimisation. * Modelling, analysis, and transformation techniques for distributed and concurrent protocols and programs, such as session types, linear types, and contract specifications. More generally, topics of interest for PEPM 2018 include, but are not limited to: * Program and model manipulation techniques such as: supercompilation, partial evaluation, fusion, on-the-fly program adaptation, active libraries, program inversion, slicing, symbolic execution, refactoring, decompilation, and obfuscation. * Techniques that treat programs/models as data objects including metaprogramming, generative programming, embedded domain-specific languages, program synthesis by sketching and inductive programming, staged computation, and model-driven program generation and transformation. * Program analysis techniques that are used to drive program/model manipulation such as: abstract interpretation, termination checking, binding-time analysis, constraint solving, type systems, automated testing and test case generation. * Application of the above techniques including case studies of program manipulation in real-world (industrial, open-source) projects and software development processes, descriptions of robust tools capable of effectively handling realistic applications, benchmarking. Examples of application domains include legacy program understanding and transformation, DSL implementations, visual languages and end-user programming, scientific computing, middleware frameworks and infrastructure needed for distributed and web-based applications, embedded and resource-limited computation, and security. This list of categories is not exhaustive, and we encourage submissions describing new theories and applications related to semantics-based program manipulation in general. If you have a question as to whether a potential submission is within the scope of the workshop, please contact the programme co-chairs, Fritz Henglein (http://www.diku.dk/~henglein/) and Josh Ko (https://josh-hs-ko.github.io). Submission categories and guidelines ------------------------------------ Two kinds of submissions will be accepted: Regular Research Papers and Short Papers. * Regular Research Papers should describe new results, and will be judged on originality, correctness, significance, and clarity. Regular research papers must not exceed 12 pages (excluding bibliography). * Short Papers may include tool demonstrations and presentations of exciting if not fully polished research, and of interesting academic, industrial, and open-source applications that are new or unfamiliar; they will be evaluated primarily on the basis of their ideas rather than finished execution. Short papers must not exceed 6 pages (excluding bibliography), and should include the words ?short paper? somewhere in their title. Both kinds of submissions should be typeset using the two-column ?sigplan? sub-format of the new ?acmart? format available at: http://sigplan.org/Resources/Author/ and submitted electronically via HotCRP: https://pepm18.hotcrp.com/ PEPM 2018 will employ lightweight double-blind reviewing according to the rules of POPL 2018. Quoting from POPL 2018?s call for papers: ?submitted papers must adhere to two rules: 1. author names and institutions must be omitted, and 2. references to authors? own related work should be in the third person (e.g., not ?We build on our previous work ...? but rather ?We build on the work of ...?). The purpose of this process is to help the PC and external reviewers come to an initial judgment about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult. In particular, important background references should not be omitted or anonymized. In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas.? See POPL 2018?s Submission and Reviewing FAQ page for more information: http://popl18.sigplan.org/track/POPL-2018-papers#Submission-and-Reviewing-FAQ Submissions are welcome from PC members (except the two co-chairs) provided that there are non-PC co-authors. Accepted papers will appear in formal proceedings published by ACM, and be included in the ACM Digital Library. Authors of short papers, however, can ask for their papers to be left out of the formal proceedings. At least one author of each accepted contribution must attend the workshop and present the work. In the case of tool demonstration papers, a live demonstration of the described tool is expected. Student participants with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses and other support. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC programme, see its web page. Important dates --------------- * Paper submission deadline : Friday 6th October 2017 (AoE) (firm) * Author notification : Saturday 4th November 2017 * Workshop : Monday 8th ? Tuesday 9th January 2018 The proceedings will be published 2 weeks pre-conference. AUTHORS TAKE NOTE: The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to two weeks prior to the first day of your conference. The official publication date affects the deadline for any patent filings related to published work. (For those rare conferences whose proceedings are published in the ACM Digital Library after the conference is over, the official publication date remains the first day of the conference.) Best paper award ---------------- PEPM 2018 continues the tradition of a Best Paper award. The winner will be announced at the workshop. Invited speakers ---------------- Alex Aiken (Stanford University) Conal Elliott (Target) Jan Midtgaard (University of Southern Denmark) Programme committee ------------------- Nada Amin (EPFL) Shigeru Chiba (University of Tokyo) Ezgi ?i?ek (Max Planck Institute for Software Systems) Olivier Danvy (Yale-NUS College) Ronald Garcia (University of British Columbia) Simon Gay (University of Glasgow) Andy Gill (X, the Moonshot Factory) Fritz Henglein (co-chair) (University of Copenhagen) Anastasia Izmaylova (IMC Financial Markets) Johan Jeuring (Utrecht University) Gabriele Keller (University of New South Wales) Oleg Kiselyov (Tohoku University) Hsiang-Shang Ko (co-chair) (National Institute of Informatics) Ralf L?mmel (University of Koblenz-Landau) Julia Lawall (Inria) Simon Peyton Jones (Microsoft Research Cambridge) Frank Pfenning (Carnegie Mellon University) Sriram Rajamani (Microsoft Research India) Norman Ramsey (Tufts University) Thomas Reps (University of Wisconsin-Madison) Sergei Romanenko (Keldysh Institute of Applied Mathematics) Tiark Rompf (Purdue University) Wolfram Schulte (Facebook) Peter Sestoft (IT University of Copenhagen) Harald S?ndergaard (University of Melbourne) Kohei Suenaga (Kyoto University) Martin Vechev (ETH Zurich) Marcos Viera (University of the Republic) Nobuko Yoshida (Imperial College London) From mechvel at botik.ru Thu Sep 28 13:16:16 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 28 Sep 2017 14:16:16 +0300 Subject: [Agda] `with' in standard functions In-Reply-To: References: <1506253592.2848.26.camel@one.mechvel.pereslavl.ru> <4a528b70-27ab-66fe-a2a0-f5954cdd173f@cse.gu.se> <1506449371.2672.28.camel@one.mechvel.pereslavl.ru> <1506455221.3067.13.camel@one.mechvel.pereslavl.ru> Message-ID: <1506597376.22284.16.camel@scico.botik.ru> On Wed, 2017-09-27 at 15:33 +0200, Nils Anders Danielsson wrote: > On 2017-09-26 21:47, Sergei Meshveliani wrote: > > I meant: how will it look the intended parsing result, for a simple > > example. > > Consider the following code: > > f : {A : Set} ? List A ? List A > f [] = [] > f (x ? xs) with xs > ... | [] = xs > ... | y ? ys = x ? ys > > This is expanded into something like the following: > > .f-aux : {A : Set} ? A ? List A ? List A ? List A > .f-aux x xs [] = xs > .f-aux x xs (y ? ys) = x ? ys > > f : {A : Set} ? List A ? List A > f [] = [] > f (x ? xs) = .f-aux x xs xs > > The idea is that the expression f (x ? xs) | ys would stand for > .f-aux x xs ys. > For example, Data.Bin has fromBits : List Bit ? Bin fromBits [] = 0# fromBits (b ? bs) with fromBits bs fromBits (b ? bs) | bs? 1# = (b ? bs?) 1# fromBits (0b ? bs) | 0# = 0# fromBits (1b ? bs) | 0# = [] 1# fromBits (?b ? bs) | _ And a proof for fromBits-bs++1 : fromBits ? (_?? 1b) ? _1# will be possible as ------------------------------- fromBits-bs++1 [] = refl fromBits-bs++1 (b ? bs) = begin fromBits ((b ? bs) ?? 1b) ?? refl ? fromBits (b ? (bs ?? 1b)) ?? refl ? fromBits (b ? (bs ?? 1b)) | fromBits (bs ?? 1b) -- ?? cong prefix0 (fromBits-bs++1 bs) ) fromBits (b ? (bs ?? 1b)) | bs 1# ?? refl ? -- (b ? bs) 1# ? where prefix0 = (fromBits (b ? (bs ?? 1b)) |_) -- ------------------------------- Right? If so, than this looks good. Because less helper functions will appear on the top level. Can this "_|_" be implemented? As to 'where', any algorithm can be rewritten with eliminating `where' by introducing top level helpers. I do not know, may be, these helpers can be somehow rewritten to the `with' construct ... ? Thanks, ------ Sergei From i.hidekazu at gmail.com Thu Sep 28 14:38:11 2017 From: i.hidekazu at gmail.com (Hidekazu IWAKI) Date: Thu, 28 Sep 2017 21:38:11 +0900 Subject: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: References: Message-ID: Hello, I'd like to describe a physical system with the intuitionistic type theory(not computer simulation). I wonder if it is possible to convince readers that all famous physical equations have evenly a strict derivation. So I want to confirm it with the type theory. In order to refer, I'm looking about such a system, a plot or a interpretation of value with type in physics. Does anyone know such a information? sincerely, IWAKI Hidekazu -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Thu Sep 28 17:09:23 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 28 Sep 2017 16:09:23 +0100 Subject: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: References: Message-ID: <5927c5b9-69bb-8f95-a61f-e73fb88f5497@cs.bham.ac.uk> On 28/09/17 13:38, i.hidekazu at gmail.com wrote: > Hello, > > I'd like to describe a physical system with the intuitionistic type > theory(not computer simulation).? I wonder if it is possible to convince > readers that all famous physical equations have evenly a strict > derivation. So I want to confirm it with the type theory. > > In order to refer, I'm looking about such a system, a plot or a > interpretation of value with type in physics. Does anyone know such a > information? I don't know about your question with intuitionistic mathematics. But people have thought about this in the context of computability theory (developed within classical mathematics, as usual - which is closely related, as well as closely unrelated to intuitionistic mathematics). Here are two examples I remember without thinking too much: (1) Pour-el and Richards book, whose chapters are available individually on Project Euclid. https://www.google.com/search?client=ubuntu&hs=xgx&channel=fs&q=pour-el+and+richards&oq=pour-el+and+richards&gs_l=psy-ab.3..0i22i30k1l2.1396.1396.0.2909.1.1.0.0.0.0.95.95.1.1.0.dummy_maps_web_fallback...0...1.1.64.psy-ab..0.1.94....0.xVYVMRJyYEc There the heat and wave (differential) equations are discussed. For one of them, the solution is computable from the initial condition. For the other one, it isn't. (2) John Longley, University of Edinburgh, On the calculating power of Laplace's demon (Part I). I don't think part II exists in writing. This is an extended version of a CiE'2006 publication. http://homepages.inf.ed.ac.uk/jrl/Research/laplace1.pdf Martin > sincerely, > > IWAKI Hidekazu > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From b.a.w.spitters at gmail.com Thu Sep 28 17:22:41 2017 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Thu, 28 Sep 2017 17:22:41 +0200 Subject: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: <5927c5b9-69bb-8f95-a61f-e73fb88f5497@cs.bham.ac.uk> References: <5927c5b9-69bb-8f95-a61f-e73fb88f5497@cs.bham.ac.uk> Message-ID: Regarding the wave equation you may want to read: The Wave Propagator Is Turing Computable https://link.springer.com/content/pdf/10.1007/3-540-48523-6_66.pdf On Thu, Sep 28, 2017 at 5:09 PM, Martin Escardo wrote: > > > On 28/09/17 13:38, i.hidekazu at gmail.com wrote: >> >> Hello, >> >> I'd like to describe a physical system with the intuitionistic type >> theory(not computer simulation). I wonder if it is possible to convince >> readers that all famous physical equations have evenly a strict derivation. >> So I want to confirm it with the type theory. >> >> In order to refer, I'm looking about such a system, a plot or a >> interpretation of value with type in physics. Does anyone know such a >> information? > > > I don't know about your question with intuitionistic mathematics. But people > have thought about this in the context of computability theory (developed > within classical mathematics, as usual - which is closely related, as well > as closely unrelated to intuitionistic mathematics). > > Here are two examples I remember without thinking too much: > > > (1) Pour-el and Richards book, whose chapters are available individually on > Project Euclid. > https://www.google.com/search?client=ubuntu&hs=xgx&channel=fs&q=pour-el+and+richards&oq=pour-el+and+richards&gs_l=psy-ab.3..0i22i30k1l2.1396.1396.0.2909.1.1.0.0.0.0.95.95.1.1.0.dummy_maps_web_fallback...0...1.1.64.psy-ab..0.1.94....0.xVYVMRJyYEc > > There the heat and wave (differential) equations are discussed. For one of > them, the solution is computable from the initial condition. For the other > one, it isn't. > > (2) John Longley, University of Edinburgh, On the calculating power of > Laplace's demon (Part I). I don't think part II exists in writing. This is > an extended version of a CiE'2006 publication. > http://homepages.inf.ed.ac.uk/jrl/Research/laplace1.pdf > > Martin > > >> sincerely, >> >> IWAKI Hidekazu >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From marioxcc.MT at yandex.com Thu Sep 28 18:38:48 2017 From: marioxcc.MT at yandex.com (=?UTF-8?Q?Mario_Castel=c3=a1n_Castro?=) Date: Thu, 28 Sep 2017 11:38:48 -0500 Subject: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: References: Message-ID: <48185ab5-9fa6-5aa3-4d9c-c0e241e5ed41@yandex.com> On 28/09/17 07:38, Hidekazu IWAKI wrote: > I'd like to describe a physical system with the intuitionistic type > theory(not computer simulation). I wonder if it is possible to convince > readers that all famous physical equations have evenly a strict derivation. > So I want to confirm it with the type theory. > > In order to refer, I'm looking about such a system, a plot or a > interpretation of value with type in physics. Does anyone know such a > information? Hello. First, I must note that my knowledge of constructive type theory is near null. I am subscribed to this mailing list because I am interested in learning Agda and its underlying logic but so far I have not allocated the required time. What specific famous physical equations do you have in mind? I have been thinking about formalizing (in HOL4) a derivation of the Lorentz transform from invariance or symmetry axioms, something like the textbook derivation (in special relativity) of the Lorentz transform based on the invariance of the speed of light and isotropy of space. Having done this, the natural continuation is to follow with the laws of relativistic mechanics and eventually electromagnetics. Unfortunately, I need more background in analysis before undertaking the part about electromagnetics. (Side note: Poincar? and Lorentz formulated special relativity; Einstein just took what these men had already discovered, added his own metaphysical interpretation and published it as if it was his sole work; in other words, plagiarism combined with philosophical bullshit) -- Do not eat animals; respect them as you respect people. https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From i.hidekazu at gmail.com Fri Sep 29 14:04:38 2017 From: i.hidekazu at gmail.com (Hidekazu IWAKI) Date: Fri, 29 Sep 2017 21:04:38 +0900 Subject: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: <5927c5b9-69bb-8f95-a61f-e73fb88f5497@cs.bham.ac.uk> References: <5927c5b9-69bb-8f95-a61f-e73fb88f5497@cs.bham.ac.uk> Message-ID: 2017/09/29 ??0:09 "Martin Escardo" : On 28/09/17 13:38, i.hidekazu at gmail.com wrote: > Hello, > > I'd like to describe a physical system with the intuitionistic type > theory(not computer simulation). I wonder if it is possible to convince > readers that all famous physical equations have evenly a strict derivation. > So I want to confirm it with the type theory. > > In order to refer, I'm looking about such a system, a plot or a > interpretation of value with type in physics. Does anyone know such a > information? > I don't know about your question with intuitionistic mathematics. But people have thought about this in the context of computability theory (developed within classical mathematics, as usual - which is closely related, as well as closely unrelated to intuitionistic mathematics). Here are two examples I remember without thinking too much: (1) Pour-el and Richards book, whose chapters are available individually on Project Euclid. https://www.google.com/search?client=ubuntu&hs=xgx&channel=f s&q=pour-el+and+richards&oq=pour-el+and+richards&gs_l=psy-ab .3..0i22i30k1l2.1396.1396.0.2909.1.1.0.0.0.0.95.95.1.1.0.dum my_maps_web_fallback...0...1.1.64.psy-ab..0.1.94....0.xVYVMRJyYEc There the heat and wave (differential) equations are discussed. For one of them, the solution is computable from the initial condition. For the other one, it isn't. (2) John Longley, University of Edinburgh, On the calculating power of Laplace's demon (Part I). I don't think part II exists in writing. This is an extended version of a CiE'2006 publication. http://homepages.inf.ed.ac.uk/jrl/Research/laplace1.pdf Bas Spitters wrote: >Regarding the wave equation you may want to read: >The Wave Propagator Is Turing Computable >https://link.springer.com/content/pdf/10.1007/3-540-48523-6_66.pdf Thank you for your presentation of the references! I'm really grateful to give answer! As you have said, I'd like to construct computability theory of physics, if it's possible. But I'm not quite advanced enough yet, just thinking basic design. Frankly speaking, I want to get interpretations of "type" of typed value in knowledge about physics.(not physical interpretation) Although it is not systematic enough, I think that Lajas Y?nossy's representation theory on physical reality includes any hints, probably. (His theory is written in "Theory of relativity based on physical reality". https://www.amazon.com/dp/0569066336 But I have only the Japanese version.) In the book, physical reality and its measure are distinguished. A physical measure "a" is a representation of physical reality "?" to show an aspect of ?. He formed this relationship between a reality and its measure by representation function R to grasp an aspect of the reality R(?) = a that is to say, R() = . I realize that it perhaps opens up a little possibility to interpreting physical reality as type. In other words, above relationship can be rewrite to a : ?, : . Therefore, we think that the consideration of relationships between physical realities corresponds the type inference. To tell the truth, I thought it was nice idea; however, Y?nossy's physical realism is not systematic and ambiguous. If I went this approach, I must rebuild his physical realism to match the intuitionistic type theory. The difficulties, it goes without saying, are clear to all. So, I'd like to ask for information on typed physical language system or interpretations of typed value. If it's possible, it would be good that anyone provides any ideas about the above topic. Sincerely, IWAKI Martin sincerely, > > IWAKI Hidekazu > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.hidekazu at gmail.com Sat Sep 30 14:09:55 2017 From: i.hidekazu at gmail.com (Hidekazu IWAKI) Date: Sat, 30 Sep 2017 21:09:55 +0900 Subject: [Agda] Fwd: Can intuitionistic type theory express derivations of physical equations more strictly? In-Reply-To: References: <48185ab5-9fa6-5aa3-4d9c-c0e241e5ed41@yandex.com> Message-ID: Sorry. I didn't send the reply to the mailing list. ---------- Forwarded message ---------- From: Hidekazu IWAKI Date: 2017-09-29 23:49 GMT+09:00 Subject: Re: [Agda] Can intuitionistic type theory express derivations of physical equations more strictly? To: Mario Castel?n Castro 2017-09-29 1:38 GMT+09:00 Mario Castel?n Castro : > On 28/09/17 07:38, Hidekazu IWAKI wrote: >> I'd like to describe a physical system with the intuitionistic type >> theory(not computer simulation). I wonder if it is possible to convince >> readers that all famous physical equations have evenly a strict derivation. >> So I want to confirm it with the type theory. >> >> In order to refer, I'm looking about such a system, a plot or a >> interpretation of value with type in physics. Does anyone know such a >> information? > > Hello. > > First, I must note that my knowledge of constructive type theory is near > null. I am subscribed to this mailing list because I am interested in > learning Agda and its underlying logic but so far I have not allocated > the required time. > Thank you for your honesty! I also don't have enough knowledge about the type theory. I cannot yet understand Martin-L?f's papers enough. If anything, I prefer to G?ran Sundholm's philosophical papers at this time. So, since asking makes me think more about some topics of it, I did to understand more better. To tell the truth, I have little knowledge of Agda. Of course, I have programmed in Haskell years ago. > What specific famous physical equations do you have in mind? > I understand, as you said, that to specify worrying factors makes this question more concrete; however, I have no equation proposed and don't want to be misunderstood. > I have been thinking about formalizing (in HOL4) a derivation of the > Lorentz transform from invariance or symmetry axioms, something like the > textbook derivation (in special relativity) of the Lorentz transform > based on the invariance of the speed of light and isotropy of space. > Having done this, the natural continuation is to follow with the laws of > relativistic mechanics and eventually electromagnetics. Unfortunately, I > need more background in analysis before undertaking the part about > electromagnetics. > Sorry. I do not know HOL4 and not realize what the point is. But as far as I can tell you that each theory has a different origin. So there is not a natural continuation, probably. Einstein developed the eventually electromagnetics in implicit and mechanics of electron(1907); however so-called "relativistic mechanics"(non-Newtonian mechanics) was developed by Gilbert Newton Lewis and his coworker Richard Chess Tolman. Although Lewis and Tolman's mechanics rested on Einstein's 1907 paper, Lewis constructed it based on another principle at the beginning, so there are some conceptual mismatch between Einsterin's theory and their mechanics.(e.g. "rest mass". Because Lewis believe the absolute space existence at the beginning.) === References === Gilbert N. Lewis "A revision of the Fundamental Laws of Matter and Energy" https://en.wikisource.org/wiki/A_revision_of_the_Fundamental_Laws_of_Matter_and_Energy Gilbert N. Lewis and Richard C. Tolman "The Principle of Relativity, and Non-Newtonian Mechanics" https://www.jstor.org/stable/pdf/20022495.pdf?refreqid=excelsior:03dbb0a71b64f57611cdac1adaf32035 ======= > (Side note: Poincar? and Lorentz formulated special relativity; Einstein > just took what these men had already discovered, added his own > metaphysical interpretation and published it as if it was his sole work; > in other words, plagiarism combined with philosophical bullshit) > You have a sure eye. I think that it is very important to distinguish what Einstein was doing or not doing in order to understand the 20th physics. Sincerely, IWAKI > -- > Do not eat animals; respect them as you respect people. > https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Graham.Hutton at nottingham.ac.uk Mon Oct 2 10:47:03 2017 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Mon, 2 Oct 2017 08:47:03 +0000 Subject: [Agda] Journal of Functional Programming - Call for PhD Abstracts Message-ID: <6D45E86A-065B-4B56-AFFB-6BB281DA71FB@exmail.nottingham.ac.uk> If you or one of your students recently completed a PhD in the area of functional programming, please submit the dissertation abstract for publication in JFP: simple process, no refereeing, open access, deadline 31st October 2017. Please share! Best wishes, Graham ============================================================ CALL FOR PHD ABSTRACTS Journal of Functional Programming Deadline: 31st October 2017 http://tinyurl.com/jfp-phd-abstracts ============================================================ PREAMBLE: Many students complete PhDs in functional programming each year. As a service to the community, the Journal of Functional Programming publishes the abstracts from PhD dissertations completed during the previous year. The abstracts are made freely available on the JFP website, i.e. not behind any paywall. They do not require any transfer of copyright, merely a license from the author. A dissertation is eligible for inclusion if parts of it have or could have appeared in JFP, that is, if it is in the general area of functional programming. The abstracts are not reviewed. Please submit dissertation abstracts according to the instructions below. We welcome submissions from both the PhD student and PhD advisor/supervisor although we encourage them to coordinate. ============================================================ SUBMISSION: Please submit the following information to Graham Hutton by 31st October 2017. o Dissertation title: (including any subtitle) o Student: (full name) o Awarding institution: (full name and country) o Date of PhD award: (month and year; depending on the institution, this may be the date of the viva, corrections being approved, graduation ceremony, or otherwise) o Advisor/supervisor: (full names) o Dissertation URL: (please provide a permanently accessible link to the dissertation if you have one, such as to an institutional repository or other public archive; links to personal web pages should be considered a last resort) o Dissertation abstract: (plain text, maximum 1000 words; you may use \emph{...} for emphasis, but we prefer no other markup or formatting in the abstract, but do get in touch if this causes significant problems) Please do not submit a copy of the dissertation itself, as this is not required. JFP reserves the right to decline to publish abstracts that are not deemed appropriate. ============================================================ PHD ABSTRACT EDITOR: Graham Hutton School of Computer Science University of Nottingham Nottingham NG8 1BB United Kingdom ============================================================ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From andersmortberg at gmail.com Wed Oct 4 15:28:53 2017 From: andersmortberg at gmail.com (Anders Mortberg) Date: Wed, 4 Oct 2017 15:28:53 +0200 Subject: [Agda] Open call for papers: Special Issue on Homotopy Type Theory and Univalent Foundations Message-ID: Open call for papers for a Special Issue of Mathematical Structures in Computer Science in association with the workshops on Homotopy Type Theory and Univalent Foundations HoTT/UF 2017-2018 https://hott-uf.github.io/special-issue-17-18/ BACKGROUND Homotopy Type Theory is a young research area combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory and higher category theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. These ideas have led to many interesting developments, from the study of syntax and semantics of type theories to practical formalizations in proof assistants based on univalent type theory. The HoTT/UF workshops, co-located with FSCD since 2016, started out as a forum for formalization of mathematics in a univalent setting. From the 2017 edition and onwards, its scope has been broadened to encompass all aspects of Homotopy Type Theory and Univalent Foundations, in particular (but not exclusively): - semantics of (univalent) type theory, - computational content of the univalence axiom, - syntax and semantics of higher inductive types, - synthetic homotopy theory, and - formalization of mathematics and computer science in Homotopy Type Theory and Univalent Foundations. SPECIAL ISSUE We are soliciting submissions for a Special Issue of the journal *Mathematical Structures in Computer Science* (Cambridge University Press) edited in association with the 2017 and 2018 editions of the HoTT/UF workshop. Submission is open to everyone and not limited to workshop participants. Submission is open from now and contributions will be reviewed on a *rolling basis*, as soon as they are received. Accepted papers will be published on the MSCS website via 'FirstView' and will be citeable through a DOI shortly after acceptance - before the completion of the whole journal issue (expected end of 2019). Submission will be closed on December 31, 2018. For details and submission instructions see: https://hott-uf.github.io/special-issue-17-18/ GUEST EDITORS * Benedikt Ahrens * Simon Huber * Anders M?rtberg From mechvel at botik.ru Thu Oct 5 20:58:14 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 05 Oct 2017 21:58:14 +0300 Subject: [Agda] decidable equality in algebra Message-ID: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> People, My DoCon-A library currently requires DecSetoid as a base for all the computer algebra. But I think about making _?_ optional. Because I think, for example, that a Real number can be reasonably represented as a certain sequence of embedded seqments, so that it will be possible to prove in Agda that Real has the instances of CommutativeRing and Field. But equality will not be solvable there. (only I mean a real Real, do not confuse with floating point). However I expect that most known algorithms will require various complicated additional witness arguments to be correct for the case of real numbers. For example, for univariate polynomials over Rational coefficients it is easy to resolve the divisibility relation. And for Real coefficients, resolving the relation (x + c) divides (x^2 + a*x + b) (1) is equivalent to resolving b - (a-c)*c ? 0 (2) -- a witness for (1) is reduced to a witness for (2). For arbitrary polynomials over Real, the corresponding condition will be complicated. Anyone here dealt with constructive methods for arbitrary real numbers? (the Coq users mentioned some library). I wonder of how many nice algorithms are known for real numbers, whether they are interesting so that it could be worthy to lift the ? requirement. Thanks, ------ Sergei From mechvel at botik.ru Thu Oct 5 22:05:19 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 05 Oct 2017 23:05:19 +0300 Subject: [Agda] decidable equality in algebra In-Reply-To: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> References: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> Message-ID: <1507233919.2299.12.camel@one.mechvel.pereslavl.ru> Still I am not sure about Field for Real, because the instance for _?_ occurs rather complicated. I do not know the subject, but I suspect that thif Field for Real is possible. ------ Sergei On Thu, 2017-10-05 at 21:58 +0300, Sergei Meshveliani wrote: > People, > > My DoCon-A library currently requires DecSetoid as a base for all the > computer algebra. > But I think about making _?_ optional. > Because I think, for example, that a Real number can be reasonably > represented as a certain sequence of embedded seqments, so that it will > be possible to prove in Agda that Real has the instances of > CommutativeRing and Field. But equality will not be solvable there. > > (only I mean a real Real, do not confuse with floating point). > > However I expect that most known algorithms will require various > complicated additional witness arguments to be correct for the case of > real numbers. > For example, for univariate polynomials over Rational coefficients it is > easy to resolve the divisibility relation. > And for Real coefficients, resolving the relation > > (x + c) divides (x^2 + a*x + b) (1) > > is equivalent to resolving > b - (a-c)*c ? 0 (2) > > -- a witness for (1) is reduced to a witness for (2). > For arbitrary polynomials over Real, the corresponding condition will be > complicated. > > Anyone here dealt with constructive methods for arbitrary real numbers? > (the Coq users mentioned some library). > > I wonder of how many nice algorithms are known for real numbers, whether > they are interesting so that it could be worthy to lift the ? > requirement. > > Thanks, > > ------ > Sergei > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From m.escardo at cs.bham.ac.uk Thu Oct 5 23:43:04 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 5 Oct 2017 22:43:04 +0100 Subject: [Agda] decidable equality in algebra In-Reply-To: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> References: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> Message-ID: <0460f6a0-8e29-60d3-f38e-f4eb0fbf1e89@cs.bham.ac.uk> On 05/10/17 19:58, mechvel at botik.ru wrote: > I wonder of how many nice algorithms are known for real numbers, whether > they are interesting so that it could be worthy to lift the ? > requirement. There is a huge literature on constructive analysis. You may with to start with Bishop's Founctions of Constructive Analysis, and Bishop and Bridges' Constructive Analysis. Bishop works with setoids, and in particular with a setoid of real numbers along the lines you describe in your message. Fred Richman has many interesting papers on constructive analysis, most of them available on his web page. But he doesn't work with setoids. If I were to try to formalize his work, I would use univalent type theory rather than setoids. As I said, many authors have worked on this vast subject. Best, Martin From m.escardo at cs.bham.ac.uk Thu Oct 5 23:44:52 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 5 Oct 2017 22:44:52 +0100 Subject: [Agda] decidable equality in algebra In-Reply-To: <0460f6a0-8e29-60d3-f38e-f4eb0fbf1e89@cs.bham.ac.uk> References: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> <0460f6a0-8e29-60d3-f38e-f4eb0fbf1e89@cs.bham.ac.uk> Message-ID: Too many typos, sorry. Here we go again more carefully. There is a huge literature on constructive analysis. You may wish to start with Bishop's Foundations of Constructive Analysis, and Bishop and Bridges' Constructive Analysis. Bishop works with setoids, and in particular with a setoid of real numbers along the lines you describe in your message. Fred Richman has many interesting papers on constructive analysis, most of them available on his web page. But he doesn't work with setoids. If I were to try to formalize his work, I would use univalent type theory rather than setoids. As I said, many authors have worked on this vast subject. Best, Martin On 05/10/17 22:43, Martin Escardo wrote: > > > On 05/10/17 19:58, mechvel at botik.ru wrote: > >> I wonder of how many nice algorithms are known for real numbers, whether >> they are interesting so that it could be worthy to lift the ? >> requirement. > > There is a huge literature on constructive analysis. You may with to > start with Bishop's Founctions of Constructive Analysis, and Bishop and > Bridges' Constructive Analysis. > > Bishop works with setoids, and in particular with a setoid of real > numbers along the lines you describe in your message. > > > Fred Richman has many interesting papers on constructive analysis, most > of them available on his web page. But he doesn't work with setoids. If > I were to try to formalize his work, I would use univalent type theory > rather than setoids. > > As I said, many authors have worked on this vast subject. > > Best, > Martin -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From b.a.w.spitters at gmail.com Fri Oct 6 09:45:20 2017 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Fri, 6 Oct 2017 09:45:20 +0200 Subject: [Agda] decidable equality in algebra In-Reply-To: <0460f6a0-8e29-60d3-f38e-f4eb0fbf1e89@cs.bham.ac.uk> References: <1507229894.2788.65.camel@one.mechvel.pereslavl.ru> <0460f6a0-8e29-60d3-f38e-f4eb0fbf1e89@cs.bham.ac.uk> Message-ID: We've developed a substantial library for constructive analysis in Coq. Here's an list of related publications: http://corn.cs.ru.nl/pub.html Please let me know it you have any questions. I agree with Martin, I would also like to UF for this. Perhaps cubical agda will make this possible! https://hott-uf.github.io/2017/abstracts/cubicalagda.pdf Best, Bas On Thu, Oct 5, 2017 at 11:43 PM, Martin Escardo wrote: > > > On 05/10/17 19:58, mechvel at botik.ru wrote: > >> I wonder of how many nice algorithms are known for real numbers, whether >> they are interesting so that it could be worthy to lift the ? >> requirement. > > > There is a huge literature on constructive analysis. You may with to start > with Bishop's Founctions of Constructive Analysis, and Bishop and Bridges' > Constructive Analysis. > > Bishop works with setoids, and in particular with a setoid of real numbers > along the lines you describe in your message. > > > Fred Richman has many interesting papers on constructive analysis, most of > them available on his web page. But he doesn't work with setoids. If I were > to try to formalize his work, I would use univalent type theory rather than > setoids. > > As I said, many authors have worked on this vast subject. > > Best, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From kaposi.ambrus at gmail.com Tue Oct 10 16:58:14 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Tue, 10 Oct 2017 16:58:14 +0200 Subject: [Agda] TYPES 2017 post-proceedings call for papers Message-ID: Abstract deadline in 6 days! Open call for papers Post-proceedings of the 23rd International Conference on Types for Proofs and Programs TYPES 2017 TYPES is a major forum for the presentation of research on all aspects of type theory and its applications. TYPES 2017 was held between 29 May and 1 June in Budapest, Hungary. The post-proceedings volume will be published in LIPIcs, Leibniz International Proceedings in Informatics, an open-access series of conference proceedings (http://www.dagstuhl.de/en/publications/lipics). Submission to this post-proceedings volume is open to everyone, also to those who did not participate in the conference. We would like to invite all researchers that study and apply type systems to share their results. In particular, we welcome submissions on the following topics: * Foundations of type theory and constructive mathematics; * Homotopy type theory; * Applications of type theory; * Dependently typed programming; * Industrial uses of type theory technology; * Meta-theoretic studies of type systems; * Proof assistants and proof technology; * Automation in computer-assisted reasoning; * Links between type theory and functional programming; * Formalizing mathematics using type theory; * Type theory in linguistics. IMPORTANT DATES * Abstract submission: 16 October 2017 * Paper submission: 23 October 2017 * Author notification: 26 March 2018 DETAILS * Papers have to be formatted with lipics.cls and adhere to the style requirements of LIPIcs. http://www.dagstuhl.de/en/publications/lipics/instructions-for-authors/ * The recommended length of a paper is 15-25 pages. Submissions significantly longer than 25 pages will not be considered. * Papers have to be submitted in pdf through EasyChair: https://easychair.org/conferences/?conf=types2017postproceed * Authors have the option to attach to their submission a zip or tgz file containing code (formalized proofs or programs), but reviewers are not obliged to take those attachments into account and they will not be published. * More information is available on http://types2017.elte.hu/#postproc * In case of questions, please contact one of the editors. EDITORS Andreas Abel andreas.abel at gu.se Gothenburg University, Sweden Fredrik Nordvall Forsberg fredrik.nordvall-forsberg at strath.ac.uk University of Strathclyde, United Kingdom Ambrus Kaposi akaposi at inf.elte.hu E?tv?s Lor?nd University, Hungary From apostolis.xekoukoulotakis at gmail.com Thu Oct 12 18:25:25 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Thu, 12 Oct 2017 19:25:25 +0300 Subject: [Agda] Help with With-permutations. Message-ID: Hello, I have something similar to the below : ``` open import Relation.Binary.PropositionalEquality data A : Set where a1 : A a2 : A fun : A ? A fun a1 = a2 fun a2 = a1 bun : A ? A bun a1 = a2 bun a2 = a1 cun : A ? A cun a with fun a cun a | a1 = a1 cun a | a2 = a1 gun : (a : A) ? cun a ? a1 ? A gun a c with fun a gun a c | a1 with bun a gun a c | a1 | a1 = a1 gun a c | a1 | a2 = a1 gun a c | a2 = a1 dun : (a : A) ? cun a ? a1 ? A dun a c with bun a dun a c | a1 with fun a dun a c | a1 | a1 = a1 dun a c | a1 | a2 = a1 dun a c | a2 = a1 --qun : (a : A) ? (c : cun a ? a1) ? gun a c ? dun a c --qun a c with fun a --... | z = ? pun : (a : A) ? (c : cun a ? a1) ? gun a c ? dun a c pun a c with bun a pun a c | a1 with fun a pun a c | a1 | a1 with bun a pun a c | a1 | a1 | a1 = refl pun a c | a1 | a1 | a2 = refl pun a c | a1 | a2 = refl pun a c | a2 with fun a pun a c | a2 | a1 with bun a pun a c | a2 | a1 | a1 = refl pun a c | a2 | a1 | a2 = refl pun a c | a2 | a2 = refl ``` Could someone explain to me why qun returns an error? In my code, I have pun in the type of the function I am working on and I also have problems with with abstraction there. Given gun and dun, is there a way to simplify pun, possibly removing the second bun abstraction? -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Fri Oct 13 00:37:23 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 13 Oct 2017 01:37:23 +0300 Subject: [Agda] Help with With-permutations. In-Reply-To: References: Message-ID: Ok, so one needs to look whether a with abstraction changes the type of a variable and then if that variable is used by a function that can not be abstracted. In this case, 'dun' requires a non-abstracted version of 'c'. If we really wanted to abstract over 'fun' first, it is impossible to do with 'with'-abstractions. It would require a notion of best-effort or partial with-abstraction. Here is qun with auxiliary functions and partial abstraction. : ``` cun-aux : A ? A ? A cun-aux a a1 = a1 cun-aux a a2 = a1 cun' : A ? A cun' a = cun-aux a (fun a) gun-aux2 : (a : A) ? cun-aux a a1 ? a1 ? A ? A gun-aux2 a c a1 = a1 gun-aux2 a c a2 = a1 gun-aux1 : (a : A) ? (w : A) ? cun-aux a w ? a1 ? A gun-aux1 a a1 c = gun-aux2 a c (bun a) gun-aux1 a a2 c = a1 gun' : (a : A) ? cun' a ? a1 ? A gun' a c = gun-aux1 a (fun a) c dun-aux2 : (a : A) ? (w : A) ? cun-aux a w ? a1 ? A dun-aux2 a a1 c = a1 dun-aux2 a a2 c = a1 dun-aux1 : (a : A) ? cun' a ? a1 ? A ? A dun-aux1 a c a1 = dun-aux2 a (fun a) c dun-aux1 a c a2 = a1 dun' : (a : A) ? cun' a ? a1 ? A dun' a c = dun-aux1 a c (bun a) qun-aux31 : (a : A) ? (w : A) ? (a1 ? w) ? (cp : cun-aux a w ? a1) ? a1 ? dun-aux2 a w cp qun-aux31 a .a1 refl cp = refl qun-aux32 : (a : A) ? (w : A) ? (a2 ? w) ? (cp : cun-aux a w ? a1) ? a1 ? dun-aux2 a w cp qun-aux32 a .a2 refl cp = refl qun-aux21 : (a : A) ? (c : cun-aux a a1 ? a1) ? (a1 ? fun a) ? (cp : cun' a ? a1) ? (w : A) ? gun-aux2 a c w ? dun-aux1 a cp w qun-aux21 a c eq cp a1 = qun-aux31 a (fun a) eq cp qun-aux21 a c eq cp a2 = refl qun-aux22 : (a : A) ? (c : cun-aux a a2 ? a1) ? (a2 ? fun a) ? (cp : cun' a ? a1) ? (w : A) ? a1 ? dun-aux1 a cp w qun-aux22 a c eq cp a1 = qun-aux32 a (fun a) eq cp qun-aux22 a c eq cp a2 = refl qun-aux1 : (a : A) ? (w : A) ? (c : cun-aux a w ? a1) ? (w ? fun a) ? (cp : cun' a ? a1) ? gun-aux1 a w c ? dun' a cp qun-aux1 a a1 c eq cp = qun-aux21 a c eq cp (bun a) qun-aux1 a a2 c eq cp = qun-aux22 a c eq cp (bun a) qun' : (a : A) ? (c : cun' a ? a1) ? gun' a c ? dun' a c qun' a c = qun-aux1 a (fun a) c refl c ``` *~~~~* Given that 'with' auxiliary functions are not available and that there is no notion of partial with abstraction, it seems possible to me to end up in an order of required 'with'-abstractions that blocks us from going forward. ~~~~ I am thinking of reverting to using auxiliary functions to perform abstractions. The downside is that it requires more lines of code and good name conventions. On Thu, Oct 12, 2017 at 7:25 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > Hello, I have something similar to the below : > > ``` > open import Relation.Binary.PropositionalEquality > > data A : Set where > a1 : A > a2 : A > > > > fun : A ? A > fun a1 = a2 > fun a2 = a1 > > bun : A ? A > bun a1 = a2 > bun a2 = a1 > > cun : A ? A > cun a with fun a > cun a | a1 = a1 > cun a | a2 = a1 > > gun : (a : A) ? cun a ? a1 ? A > gun a c with fun a > gun a c | a1 with bun a > gun a c | a1 | a1 = a1 > gun a c | a1 | a2 = a1 > gun a c | a2 = a1 > > dun : (a : A) ? cun a ? a1 ? A > dun a c with bun a > dun a c | a1 with fun a > dun a c | a1 | a1 = a1 > dun a c | a1 | a2 = a1 > dun a c | a2 = a1 > > --qun : (a : A) ? (c : cun a ? a1) ? gun a c ? dun a c > --qun a c with fun a > --... | z = ? > > > pun : (a : A) ? (c : cun a ? a1) ? gun a c ? dun a c > pun a c with bun a > pun a c | a1 with fun a > pun a c | a1 | a1 with bun a > pun a c | a1 | a1 | a1 = refl > pun a c | a1 | a1 | a2 = refl > pun a c | a1 | a2 = refl > pun a c | a2 with fun a > pun a c | a2 | a1 with bun a > pun a c | a2 | a1 | a1 = refl > pun a c | a2 | a1 | a2 = refl > pun a c | a2 | a2 = refl > > ``` > > Could someone explain to me why qun returns an error? > > In my code, I have pun in the type of the function I am working on and I > also have problems with with abstraction there. > Given gun and dun, is there a way to simplify pun, possibly removing the > second bun abstraction? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominique.devriese at cs.kuleuven.be Mon Oct 16 09:13:16 2017 From: dominique.devriese at cs.kuleuven.be (Dominique Devriese) Date: Mon, 16 Oct 2017 07:13:16 +0000 Subject: [Agda] Final call for Secure Compilation presentations (PriSC Workshop @ POPL'18) Message-ID: ======================================================================= Call for Presentations on Secure Compilation (PriSC Workshop @ POPL'18) ======================================================================= Secure compilation is an emerging field that puts together advances in programming languages, security, verification, systems, compilers, and hardware architectures in order to devise secure compiler chains that eliminate many of today's low-level vulnerabilities. Secure compilation aims to protect high-level language abstractions in compiled code, even against adversarial low-level contexts, and to allow sound reasoning about security in the source language. The emerging secure compilation community aims to achieve this by: identifying and formalizing properties that secure compilers must possess; devising efficient enforcement mechanisms; and developing effective verification and proof techniques. ====================================================================== 2nd Workshop on Principles of Secure Compilation (PriSC 2018) ====================================================================== The Workshop on Principles of Secure Compilation (PriSC) is a new informal 1-day workshop without any proceedings. The goal is to identify interesting research directions and open challenges and to bring together researchers interested in secure compilation. The 2nd PriSC edition will be held on Saturday, 13 January 2018, in Los Angeles, together with the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). More information at http://popl18.sigplan.org/track/prisc-2018 ====================================================================== Important Dates ====================================================================== Presentation proposal submission deadline: 18 October 2017, AoE Presentation proposal notification: 8 November 2017 PriSC Workshop takes place: 13 January 2018 ====================================================================== Scope of the Workshop ====================================================================== Anyone interested in presenting at the workshop should submit an extended abstract (up to 2 pages, details below). This can cover past, ongoing, or future work. Any topic that could be of interest to the emerging secure compilation community is in scope. Talks that provide a useful outside view or challenge the community are also welcome. Topics of interest include but are **not** limited to: - attacker models for secure compiler chains - secure compilation properties: full abstraction, memory safety, control-flow integrity, preserving non-interference or (hyper-)properties against adversarial contexts, secure multi-language interoperability - enforcement mechanisms: static checking, program verification, reference monitoring, program rewriting, software fault isolation, system-level protection, secure hardware, crypto, randomization - experimental evaluation and applications of secure compilation - proof methods: (bi)simulation, logical relations, game semantics, multi-language semantics, embedded interpreters - formal verification of secure compilation chain (protection mechanisms, compilers, linkers, loaders), machine-checked proofs, translation validation, property-based testing ====================================================================== Guidelines for Submitting Extended Abstracts ====================================================================== Extended abstracts should be submitted in PDF format and not exceed 2 pages. They should be formatted in two-column layout, 10pt font, and be printable on A4 and US Letter sized paper. We recommend using the new `acmart` LaTeX style in `sigplan` mode: http://www.sigplan.org/sites/default/files/acmart/current/acmart-sigplanproc.zip Submissions are not anonymous and should provide sufficient detail to be assessed by the program committee. Presentation at the workshop does not preclude publication elsewhere. Please submit your extended abstracts at https://prisc18.hotcrp.com/ ====================================================================== Short Talks Session ====================================================================== We will also run a short talks session, where participants get five minutes to present intriguing ideas, advertise ongoing work, etc. You can expect a call for short talks closer to the event. ====================================================================== Program Committee ====================================================================== Program Chair Catalin Hritcu Inria Paris Members Amal Ahmed Inria Paris and Northeastern University Lars Birkedal Aarhus University Dominique Devriese KU Leuven C?dric Fournet Microsoft Research Deepak Garg MPI-SWS Xavier Leroy Inria Paris David Naumann Stevens Institute of Technology Marco Patrignani MPI-SWS Frank Piessens KU Leuven Tamara Rezk Inria Sophia Antipolis Nikhil Swamy Microsoft Research ====================================================================== Organizing Committee ====================================================================== Amal Ahmed Inria Paris and Northeastern University Dominique Devriese KU Leuven Deepak Garg MPI-SWS Catalin Hritcu Inria Paris Marco Patrignani MPI-SWS Tamara Rezk Inria Sophia Antipolis ====================================================================== Contact and More Information ===================================================================== More information about PriSC 2018 can be found on the website: http://popl18.sigplan.org/track/prisc-2018 For questions please contact Catalin Hritcu (Program Chair). To make sure you receive such announcements in the future please subscribe to the following low-traffic mailing list: https://lists.gforge.inria.fr/mailman/listinfo/prisc-announce -------------- next part -------------- An HTML attachment was scrubbed... URL: From stvienna at gmail.com Wed Oct 18 02:11:28 2017 From: stvienna at gmail.com (stvienna wiener) Date: Wed, 18 Oct 2017 02:11:28 +0200 Subject: [Agda] No Agda AIM meeting any more? Message-ID: Hi all, I guess there is not Agda AIM meeting planned in Autumn? Usually a AIM meeting takes place in September or October. I checked the mailing list and also the wiki to be sure. So is it true? Best, Stephan From andreas.abel at ifi.lmu.de Wed Oct 18 11:57:31 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 18 Oct 2017 11:57:31 +0200 Subject: [Agda] No Agda AIM meeting any more? In-Reply-To: References: Message-ID: Hi Stephan, this Fall we did not find good dates for an Agda meeting. Currently we are discussing having AIM early 2018. Best, Andreas On 18.10.2017 02:11, stvienna wiener wrote: > Hi all, > > I guess there is not Agda AIM meeting planned in Autumn? Usually a AIM > meeting takes place in September or October. I checked the mailing > list and also the wiki to be sure. > > So is it true? > > Best, > Stephan > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From chantal.keller at wanadoo.fr Wed Oct 18 16:51:10 2017 From: chantal.keller at wanadoo.fr (Chantal Keller) Date: Wed, 18 Oct 2017 16:51:10 +0200 Subject: [Agda] Use the ring solver with an abstract ring Message-ID: <6632da56-4179-a143-8f2d-16fef873fd15@wanadoo.fr> Hi How can I use the ring solver with an abstract ring? See the attached file for an example of what I would like to do. Cheers Chantal -------------- next part -------------- open import Algebra open import Algebra.RingSolver.AlmostCommutativeRing module sr {r? r?} (R : AlmostCommutativeRing r? r?) where open AlmostCommutativeRing R open import Algebra.RingSolver foo : (n : Carrier) ? n ? n + 0# foo n = {!solve 1!} From abela at chalmers.se Wed Oct 18 18:53:29 2017 From: abela at chalmers.se (Andreas Abel) Date: Wed, 18 Oct 2017 18:53:29 +0200 Subject: [Agda] Use the ring solver with an abstract ring In-Reply-To: <6632da56-4179-a143-8f2d-16fef873fd15@wanadoo.fr> References: <6632da56-4179-a143-8f2d-16fef873fd15@wanadoo.fr> Message-ID: <4f67190d-2208-df2d-1510-a3c0aca7240a@chalmers.se> I don't know, but at least you should instantiate the RingSolver module to its parameters: > open import Algebra.RingSolver should be > open import Algebra.RingSolver CoefficientRing R embedding decide for some suitable definitions of CoefficientRing, embedding, and decide. Maybe the CoefficientRing could be the integers? Best, Andreas On 18.10.2017 16:51, Chantal Keller wrote: > Hi > > How can I use the ring solver with an abstract ring? > > See the attached file for an example of what I would like to do. > > open import Algebra > open import Algebra.RingSolver.AlmostCommutativeRing > > module sr {r? r?} (R : AlmostCommutativeRing r? r?) where > > open AlmostCommutativeRing R > open import Algebra.RingSolver > > > > > foo : (n : Carrier) ? n ? n + 0# > foo n = {!solve 1!} -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Thu Oct 19 17:53:03 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 19 Oct 2017 17:53:03 +0200 Subject: [Agda] Fwd: [FP] FW: Google Internships in Programming Languages, Compilers, and Software Engineering (2018) In-Reply-To: <148a436bd3a248829dabb3e6e45f80dc@chalmers.se> References: <148a436bd3a248829dabb3e6e45f80dc@chalmers.se> Message-ID: <630a6cc8-db4f-628c-f6e3-d5f4a6834284@chalmers.se> PL internships to be aware of. ?Most positions are for summer, and begin to fill in December?. *From:*Tipp Moseley [mailto:tipp at google.com] *Sent:* den 18 oktober 2017 16:23 *Subject:* Google Internships in Programming Languages, Compilers, and Software Engineering (2018) Hello, again :) ?We at Google are looking for interns (as well as new graduates looking for full-time positions), and we know you have a great supply.? My apologies if you've received similar mail from us already; please let me know if you would like to not receive future emails from us. Could you please forward the following to the relevant people/lists for your department? We are recruiting top undergraduate, Masters, and PhD students. ?(Computer Science, Computer Engineering, or Applied Mathematics only, please.) Thanks! Tipp ------------------------------------------------------------------------- Google is looking for great interns and full-time engineers with backgrounds in programming languages, compilers, optimization, and software engineering! We are leading many active development projects relating to hardware performance/acceleration, Android, ChromeOS, GCC, LLVM, JavaScript, Go, Dart, Java, and Python, and we have some great projects in mind.? Interns will be exposed to Google's extensive internal developer tools and massive computing infrastructure.? Some projects will have a strong emphasis on research and publication, with recent interns submitting to conferences including ASPLOS, CGO, HiPEAC, HPCA, ISCA, MICRO, PLDI, ICSE, and Supercomputing. Areas of interest include: - Performance analysis of large datacenter applications - Improving performance for x86, ARM (aarch32 and aarch64), GPUs, and POWER - Improving security via code sandboxing - Compiling for GPUs and hardware accelerators for Machine Learning and image processing (e.g. TPU) - Software correctness and race detection - Static/dynamic program analyses - Machine learning - Autotuning and staged compilation - Large-scale, automated refactoring - Application co-location performance studies - Hardware performance monitoring - Feedback-directed optimization - Profiling tools, perf_events, Linux perf tool - Low-overhead instrumentation - Type inference, type checking, gradual typing - Garbage collection and automatic memory management - Managed runtime optimization - Power and energy optimizations for the datacenter If you are interested, please submit your resume to us[1].? Please be sure to be descriptive in open-ended questions about skills and preferences; e.g., "Compilers and Performance" (or something specific to your area).? We accept applications and host interns year around, but most positions are for summer and begin to fill in December. Thanks!? We look forward to hearing from you. [1] https://www.google.com/about/careers/students/ PS: We are looking for full-time hires too! -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ -------------- next part -------------- _______________________________________________ FP mailing list FP at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/fp From dominique.devriese at gmail.com Fri Oct 20 11:21:31 2017 From: dominique.devriese at gmail.com (Dominique Devriese) Date: Fri, 20 Oct 2017 09:21:31 +0000 Subject: [Agda] PriSC'18 deadline extended by 1 week Message-ID: ======================================================================= Call for Presentations on Secure Compilation (PriSC Workshop @ POPL'18) ======================================================================= Secure compilation is an emerging field that puts together advances in programming languages, security, verification, systems, compilers, and hardware architectures in order to devise secure compiler chains that eliminate many of today's low-level vulnerabilities. Secure compilation aims to protect high-level language abstractions in compiled code, even against adversarial low-level contexts, and to allow sound reasoning about security in the source language. The emerging secure compilation community aims to achieve this by: identifying and formalizing properties that secure compilers must possess; devising efficient enforcement mechanisms; and developing effective verification and proof techniques. ====================================================================== 2nd Workshop on Principles of Secure Compilation (PriSC 2018) ====================================================================== The Workshop on Principles of Secure Compilation (PriSC) is a new informal 1-day workshop without any proceedings. The goal is to identify interesting research directions and open challenges and to bring together researchers interested in secure compilation. The 2nd PriSC edition will be held on Saturday, 13 January 2018, in Los Angeles, together with the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). More information at http://popl18.sigplan.org/track/prisc-2018 ====================================================================== Important Dates ====================================================================== Presentation proposal submission deadline: 25 October 2017, AoE Presentation proposal notification: 15 November 2017 PriSC Workshop takes place: 13 January 2018 ====================================================================== Scope of the Workshop ====================================================================== Anyone interested in presenting at the workshop should submit an extended abstract (up to 2 pages, details below). This can cover past, ongoing, or future work. Any topic that could be of interest to the emerging secure compilation community is in scope. Talks that provide a useful outside view or challenge the community are also welcome. Topics of interest include but are **not** limited to: - attacker models for secure compiler chains - secure compilation properties: full abstraction, memory safety, control-flow integrity, preserving non-interference or (hyper-)properties against adversarial contexts, secure multi-language interoperability - enforcement mechanisms: static checking, program verification, reference monitoring, program rewriting, software fault isolation, system-level protection, secure hardware, crypto, randomization - experimental evaluation and applications of secure compilation - proof methods: (bi)simulation, logical relations, game semantics, multi-language semantics, embedded interpreters - formal verification of secure compilation chain (protection mechanisms, compilers, linkers, loaders), machine-checked proofs, translation validation, property-based testing ====================================================================== Guidelines for Submitting Extended Abstracts ====================================================================== Extended abstracts should be submitted in PDF format and not exceed 2 pages. They should be formatted in two-column layout, 10pt font, and be printable on A4 and US Letter sized paper. We recommend using the new `acmart` LaTeX style in `sigplan` mode: http://www.sigplan.org/sites/default/files/acmart/current/acmart-sigplanproc.zip Submissions are not anonymous and should provide sufficient detail to be assessed by the program committee. Presentation at the workshop does not preclude publication elsewhere. Please submit your extended abstracts at https://prisc18.hotcrp.com/ ====================================================================== Short Talks Session ====================================================================== We will also run a short talks session, where participants get five minutes to present intriguing ideas, advertise ongoing work, etc. You can expect a call for short talks closer to the event. ====================================================================== Program Committee ====================================================================== Program Chair Catalin Hritcu Inria Paris Members Amal Ahmed Inria Paris and Northeastern University Lars Birkedal Aarhus University Dominique Devriese KU Leuven C?dric Fournet Microsoft Research Deepak Garg MPI-SWS Xavier Leroy Inria Paris David Naumann Stevens Institute of Technology Marco Patrignani MPI-SWS Frank Piessens KU Leuven Tamara Rezk Inria Sophia Antipolis Nikhil Swamy Microsoft Research ====================================================================== Organizing Committee ====================================================================== Amal Ahmed Inria Paris and Northeastern University Dominique Devriese KU Leuven Deepak Garg MPI-SWS Catalin Hritcu Inria Paris Marco Patrignani MPI-SWS Tamara Rezk Inria Sophia Antipolis ====================================================================== Contact and More Information ===================================================================== More information about PriSC 2018 can be found on the website: http://popl18.sigplan.org/track/prisc-2018 For questions please contact Catalin Hritcu (Program Chair). To make sure you receive such announcements in the future please subscribe to the following low-traffic mailing list: https://lists.gforge.inria.fr/mailman/listinfo/prisc-announce -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaposi.ambrus at gmail.com Fri Oct 20 14:04:01 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Fri, 20 Oct 2017 14:04:01 +0200 Subject: [Agda] TYPES 2017 post-proceedings DEADLINE EXTENDED Message-ID: DEADLINES EXTENDED by 2 weeks: * abstract deadline: 30 October * paper deadline: 6 November --------------------------------------- Open call for papers Post-proceedings of the 23rd International Conference on Types for Proofs and Programs TYPES 2017 TYPES is a major forum for the presentation of research on all aspects of type theory and its applications. TYPES 2017 was held between 29 May and 1 June in Budapest, Hungary. The post-proceedings volume will be published in LIPIcs, Leibniz International Proceedings in Informatics, an open-access series of conference proceedings (http://www.dagstuhl.de/en/publications/lipics). Submission to this post-proceedings volume is open to everyone, also to those who did not participate in the conference. We would like to invite all researchers that study and apply type systems to share their results. In particular, we welcome submissions on the following topics: * Foundations of type theory and constructive mathematics; * Homotopy type theory; * Applications of type theory; * Dependently typed programming; * Industrial uses of type theory technology; * Meta-theoretic studies of type systems; * Proof assistants and proof technology; * Automation in computer-assisted reasoning; * Links between type theory and functional programming; * Formalizing mathematics using type theory; * Type theory in linguistics. IMPORTANT DATES * Abstract submission: 30 October 2017 (was: 16 Oct) * Paper submission: 6 November (was: 23 Oct) * Author notification: 26 March 2018 DETAILS * Papers have to be formatted with lipics.cls and adhere to the style requirements of LIPIcs. http://www.dagstuhl.de/en/publications/lipics/instructions-for-authors/ * The recommended length of a paper is 15-25 pages. Submissions significantly longer than 25 pages will not be considered. * Papers have to be submitted in pdf through EasyChair: https://easychair.org/conferences/?conf=types2017postproceed * Authors have the option to attach to their submission a zip or tgz file containing code (formalized proofs or programs), but reviewers are not obliged to take those attachments into account and they will not be published. * More information is available on http://types2017.elte.hu/#postproc * In case of questions, please contact one of the editors. EDITORS Andreas Abel andreas.abel at gu.se Gothenburg University, Sweden Fredrik Nordvall Forsberg fredrik.nordvall-forsberg at strath.ac.uk University of Strathclyde, United Kingdom Ambrus Kaposi akaposi at inf.elte.hu E?tv?s Lor?nd University, Hungary From grewe at st.informatik.tu-darmstadt.de Fri Oct 20 18:30:30 2017 From: grewe at st.informatik.tu-darmstadt.de (Sylvia Grewe) Date: Fri, 20 Oct 2017 18:30:30 +0200 Subject: [Agda] CfP 2018: Research Papers Third Submission Deadline Message-ID: <1b8663f3-515b-03f4-2956-6023e1406101@st.informatik.tu-darmstadt.de> 2018 : The Art, Science, and Engineering of Programming Mon 9 - Thu 12 April 2018 Nice, France http://2018.programming-conference.org/ In 2017, we started a new conference and journal focused on everything to do with programming, including the experience of programming, called for short. The first edition of was a great success (see http://twitter.com/programmingconf for testimonies). Paper submissions and publications are handled by the affiliated journal (http://programming-journal.org/). Accepted papers must be presented at the conference. ******************************************************** CALL FOR PAPERS ******************************************************** 2018 accepts papers that advance knowledge of programming. Almost anything about programming is in scope, but in each case there should be a clear relevance to the act and experience of programming. UPCOMING SUBMISSION DEADLINES: December 1 2017 (Research Papers Third Submission Deadline, for journal Vol. 2, Issue 3) We accept submissions covering several areas of expertise. These areas include, but are not limited to: ? General-purpose programming ? Distributed systems programming ? Parallel and multi-core programming ? Graphics and GPU programming ? Security programming ? User interface programming ? Database programming ? Visual and live programming ? Data mining and machine learning programming ? Interpreters, virtual machines and compilers ? Modularity and separation of concerns ? Model-based development ? Metaprogramming and reflection ? Testing and debugging ? Program verification ? Programming education ? Programming environments ? Social coding ******************************************************** IMPORTANT UPCOMING DATES ******************************************************** Research paper submissions: December 1 2017 (Research Papers Third Submission Deadline, for journal Vol. 2, Issue 3) Research paper first notification (for third submission deadline): February 1 2018 Research paper revised submission (for third submission deadline): March 1 2018 Research paper final notification (for third submission deadline): March 7 2018 Camera-ready copy (for third submission deadline): March 15 2018 Student Research Competition Abstracts Submission: January 22 2018 All important dates of the journal throughout the year can also be found at http://programming-journal.org/timeline/ ******************************************************** ORGANIZATION ******************************************************** General Chair: Manuel Serrano, INRIA France Local Organizing Chair: Tamara Rezk, INRIA France Organizing Committee: Stefan Marr (workshops co-chair), University of Kent, United Kingdom Jennifer B. Sartor (workshops co-chair), Software Languages Lab, Vrije Universiteit Brussel Belgium Philipp Haller (student research competition chair), KTH Royal Institute of Technology, Sweden Tobias Pape (web technology), HPI - University of Potsdam Sylvia Grewe (publicity), Technische Universit?t Darmstadt Germany Minh Ngo (volunteers chair), INRIA France Etienne Lozes (grants committee chair), Universit? de Nice Sophia-Antipolis, France Yves Roudier (poster chair), Universit? de Nice Sophia-Antipolis, France Program Committee: Guido Salvaneschi (program chair), Technische Universit?t Darmstadt, Germany Davide Ancona, University of Genova, Italy Alberto Bacchelli, Delft University of Technology, Netherlands Shigeru Chiba, University of Tokyo, Japan Yvonne Coady, University of Victoria, Canada Susan Eisenbach, Imperial College London, UK Patrick Eugster, TU Darmstadt, Germany & Purdue University, United States Antonio Filieri, Imperial College London, UK Matthew Flatt, University of Utah, United States Lidia Fuentes, Universidad de M?laga, Spain Richard P. Gabriel, Dream Songs, Inc. & HPI, California Jeremy Gibbons, University of Oxford, UK Yossi Gil, Israel Institute of Technology Elisa Gonzalez Boix, Vrije Universiteit Brussel, Belgium Phlipp Haller, KTH Royal Institute of Technology, Sweden Matthew Hammer, University of Colorado, Boulder, United States Felienne Hermans, Delft University of Technology, Netherlands Robert Hirschfeld, Hasso Plattner Institute (HPI), Germany Roberto Ierusalimschy, Pontifical Catholic University of Rio de Janeiro, Brazil Jun Kato, National Institute of Advanced Industrial Science and Technology, Japan J?rg Kienzle, McGill University, Canada Neelakantan R. Krishnaswami, University of Cambridge, UK Ralf L?mmel, University of Koblenz-Landau, Germany Hidehiko Masuhara, Tokyo Institute of Technology, Japan Mira Mezini, Technische Universit?t Darmstadt, Germany Emerson Murphy-Hill, North Carolina State University, United States Mario S?dholt, IMT Atlantique, Nantes, France Sam Tobin-Hochstadt, Indiana University, United States Eelco Visser, Delft University of Technology, Netherlands Tijs van der Storm, CWI & University of Groningen, Netherlands ******************************************************** 2018 is kindly supported by: ACM In-Cooperation SIGPLAN (In-cooperation) SIGSOFT (In-cooperation) INRIA France AOSA ******************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaposi.ambrus at gmail.com Mon Oct 23 17:21:20 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Mon, 23 Oct 2017 17:21:20 +0200 Subject: [Agda] AIM XXVI - Budapest, 29 Jan -- 3 Feb 2018 Message-ID: --------------------------------------------------------------- Agda Implementors' Meeting XXVI Call for participation http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXVI --------------------------------------------------------------- The twenty-sixth Agda Implementors' Meeting will take place at E?tv?s Lor?nd University in Budapest, Hungary from 2018-01-29 to 2018-02-03 (Mon to Sat). The meeting will be similar to previous ones: * Presentations concerning theory, implementation, and use cases of Agda and other Agda-like languages. * Discussions around issues related to the Agda language. * Plenty of time to work in, on, under or around Agda, in collaboration with other participants. To register for AIM XXVI, please fill out the form below and send it to Ambrus via email. For preliminary information (more appearing later), please visit http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXVI Please spread the word about this meeting. Best Regards, Ambrus, Andr?s, Bal?zs and P?ter -------8<-------------------------------------------------- Registration form (send it to Ambrus Kaposi ) Agda Implementors' Meeting XXVI Name: Title and optionally abstract (if you want to give a talk or lead a discussion): Suggestions for code sprints (optional): Additional comments: From matthewdaggitt at gmail.com Wed Oct 25 11:06:17 2017 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Wed, 25 Oct 2017 10:06:17 +0100 Subject: [Agda] [ANNOUNCE] Standard library 0.14 Message-ID: Dear all, The Agda Team is very pleased to announce the release of the standard library 0.14. The library has been tested using Agda 2.5.3. The library, CHANGELOG and README are available at http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Note that no guarantees are made about backwards or forwards compatibility, the library is still at an experimental stage. Enjoy the standard library 0.14. -- Matthew, on behalf of the Agda Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andrzej.Murawski at cs.ox.ac.uk Wed Oct 11 00:05:30 2017 From: Andrzej.Murawski at cs.ox.ac.uk (Andrzej Murawski) Date: Tue, 10 Oct 2017 22:05:30 -0000 Subject: [Agda] The 2018 Federated Logic Conference - Workshop Announcement Message-ID: FLoC 2018 --- The 2018 Federated Logic Conference 6-19 July 2018 Oxford, UK http://www.floc2018.org/workshops The seventh Federated Logic Conference (FLoC'18) will be held in Oxford, UK, in July 2018, at the Mathematical Institute and the Blavatnik School of Government at the University of Oxford. In addition to nine major international conferences related to mathematical logic and computer science (CAV, CSF, FM, FSCD, ICLP, IJCAR, ITP, LICS and SAT), FLoC 2018 will feature as many as 79 workshops and the School on Foundations of Programming and Software Systems (FoPSS, 30 June - 6 July). The selection process for workshops is now over and the complete list can be found below. *** Pre-FLoC workshops (Saturday 7 - Sunday 8 July) 32nd International Workshop on Unification (UNIF 2018), 7 July http://unif2018.cic.unb.br/ 7th International Workshop on Confluence (IWC 2018), 7 July http://cl-informatik.uibk.ac.at/events/iwc-2018/ 7th International Workshop on Classical Logic and Computation (CL&C 2018), 7 July http://www.di.unito.it/~stefano/CL&C/CL&C18.htm Higher-Dimensional Rewriting and Algebra (HDRA 2018), 7 July http://hdra.gforge.inria.fr/ International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP 2018), 7 July http://lfmtp.org/workshops/2018/ 7th International Workshop on the Cross-Fertilization Between CSP and SAT (CSPSAT 2018), 7 July (website coming soon) Pragmatics of SAT (PoS 2018), 7 July http://www.pragmaticsofsat.org/2018/ Twenty Years of Deep Inference (TYDI 2018), 7 July https://www.lix.polytechnique.fr/~lutz/orgs/TYDI2018.html 10th International Workshop on Computing with Terms and Graphs (TERMGRAPH 2018), 7 July https://nms.kcl.ac.uk/maribel.fernandez/TERMGRAPH.html Syntax and Semantics of Low-Level Languages (LOLA 2018), 7 July https://cs.appstate.edu/~johannp/lola18/ 9th Workshop on Higher Order Rewriting (HOR 2018), 7 July https://lipn.univ-paris13.fr/HOR18/ 2018 Joint Workshop on Linearity & TLLA (5th International Workshop on Linearity and 2nd Workshop on Trends in Linear Logic and Applications), 7-8 July http://lipn.univ-paris13.fr/TLLALinearity18/ Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF 2018), 7-8 July https://hott-uf.github.io/2018/ Game Semantics 25, 7-8 July http://www.gamesemantics.org/game-semantics-25 Workshop on Proof Complexity (PC 2018), 7-8 July http://easychair.org/smart-program/PC2018/ Programming And Reasoning on Infinite Structures (PARIS 2018), 7-8 July https://www.irif.fr/~saurin/RAPIDO/PARIS-2018/ 6th Workshop on Strategic Reasoning (SR 2018), 7-8 July http://projects.lsv.fr/sr18/ Workshop in honour of Dana Scott's 85th birthday and 50 years of domain theory, 7-8 July https://andrejbauer.github.io/domains-floc-2018/ 5th Workshop on Natural Language and Computer Science (NLCS 2018), 7-8 July http://www.indiana.edu/~iulg/nlcs.html 7th Workshop on Mathematically Structured Functional Programming (MSFP 2018), 8 July https://msfp2018.bentnib.org/ 5th International Workshop on Rewriting Techniques for Program Transformations and Evaluation (WPTE 2018), 8 July http://researchers.lille.inria.fr/niehren/WPTE-2018/main.html The Coq Workshop 2018, 8 July https://coqworkshop2018.inria.fr/ International Workshop on Quantified Boolean Formulas and Beyond (QBF 2018), 8 July http://fmv.jku.at/qbf18/ 5th International Workshop on Graphical Models for Security (GraMSec 2018), 8 July http://gramsec.uni.lu/ Women in Logic 2018, 8 July https://sites.google.com/site/womeninlogic2018/welcome 9th Workshop on Intersection Types and Related Systems (ITRS 2018), 8 July https://www.irif.fr/~michele/itrs2018 Coalgebra Now, 8 July http://homepage.tudelft.nl/c9d1n/floc2018coalgebra/index.html 12th International Workshop on Developments in Computational Models (DCM 2018), 8 July https://sites.google.com/g.uporto.pt/dcm18 IFIP Working Group 1.6: Rewriting, 8 July http://cbr.uibk.ac.at/ifip-wg1.6/ Workshop on Foundations of Computer Security (FCS 2018), 8 July http://www.andrew.cmu.edu/user/liminjia/events/fcs2018/ LICS Mentor Workshop, 8 July (website coming soon) *** Mid-FLoC workshops (Wednesday 11 - Saturday 14 July) IFAC Conference on Analysis and Design of Hybrid Systems (ADHS 2018), 11-13 July http://www.cs.ox.ac.uk/conferences/ADHS18/ 16th International Workshop on Satisfiability Modulo Theories (SMT 2018), 12-13 July http://smt-workshop.cs.uiowa.edu/2018/ 7th Workshop on Logic and Systems Biology (LSB), 13 July http://perso.ens-lyon.fr/russell.harmer/lsb7.html Isabelle Workshop, 13 July http://sketis.net/isabelle/isabelle-workshop-2018 25th RCRA International Workshop on Experimental Evaluation of Algorithms for Solving Problems with Combinatorial Explosion, 13 July https://sites.google.com/a/aixia.it/rcra/rcra-2018 5th Workshop on Formal Reasoning in Distributed Algorithms (FRIDA 2018), 13 July http://forsyte.at/events/frida2018/ 5th Vampire Workshop (Vampire 2018), 13 July http://easychair.org/smart-program/Vampire18/ 19th Workshop on Logic and Computational Complexity (LCC), 13 July http://www.cs.swansea.ac.uk/lcc/index.html 5th Workshop on Horn Clauses for Verification and Synthesis (HCVS 2018), 13 July https://www.sci.unich.it/hcvs18/ Workshop on Learning and Automata (LearnAut 2018), 13 July https://learnaut2018.wordpress.com/ 1st International Workshop on Multi-objective Reasoning in Verification and Synthesis (MoRe 2018), 13 July http://math.umons.ac.be/more2018/ Workshop on Modular Knowledge (Tetrapod), 13 July http://new.kwarc.info/events/Tetrapod-2018/ First Workshop on Automated Deduction for Separation Logics (ADSL 2018), 13 July http://adsl.univ-grenoble-alpes.fr/ DMW18: Deduction Mentoring Workshop, 13 July http://easychair.org/smart-program/DMW18/ Runtime Verification for Rigorous Systems Engineering (RV4RISE), 13 July http://rv4rise.conf.tuwien.ac.at/ Logic and Learning, 13 July http://lics.rwth-aachen.de/LoL/ 13th International Workshop on User Interfaces for Theorem Provers (UITP 2018), 13 July http://www.informatik.uni-bremen.de/uitp/uitp2018/ CAV Mentor Workshop, 13 July (website coming soon) Summit on Machine Learning Meets Formal Methods, sponsored by the Alan Turing Institute (https://www.turing.ac.uk), 13 July (website coming soon) 4th Workshop on Formal Integrated Development Environment (F-IDE 2018), 14 July https://sites.google.com/view/fideworkshop2018 16th International Workshop on Quantitative Aspects of Programming Languages and Systems (QAPL 2018), 14 July http://www1.isti.cnr.it/~Massink/EVENTS/QAPL2018/ 16th Overture Workshop: New Capabilities and Applications for Model-based Systems Engineering, 14 July http://overturetool.org/workshops/16th-Overture-Workshop.html FM Doctoral Symposium, 14 July (website coming soon) *** Post-FLoC workshops (Wednesday 18 - Thursday 19 July) 18th Refinement Workshop, 18 July http://www.refinenet.org.uk/ 1st International Workshop on Parallel Logical Reasoning (PLR), 18 July https://antonwijs.wixsite.com/plr2018 7th Workshop on Synthesis (SYNT 2018), 18 July (website coming soon) Theorem Prover Components for Educational Software (ThEdu 2018), 18 July http://www.uc.pt/en/congressos/thedu/thedu18 TLA+ Community Event 2018, 18 July http://tla2018.loria.fr/ Workshop on Answer Set Programming and Other Computing Paradigms (ASPOCP 2018), 18 July https://sites.google.com/site/aspocp2018/ International Conference on Logical Programming - Doctoral Consortium (ICLP - DC 2018), 18 July http://easychair.org/smart-program/ICLP-DC2018/ 16th International Colloquium on Implementation of Constraint and Logic Programming Systems (CICLOPS 2018), 18 July https://people.cs.kuleuven.be/~tom.schrijvers/CICLOPS2018/ 3rd International Workshop on Automated Reasoning in Quantified Non-Classical Logics (ARQNL 2018), 18 July http://iltp.de/ARQNL-2018/ Workshop on Logic and Practice of Programming (LPoP 2018), 18 July http://lpop.cs.stonybrook.edu/ 13th International Workshop on Constraint Based Methods in Bioinformatics (WCB 2018), 18 July http://clp.dimi.uniud.it/wcb/wcb18/ International Workshop on the Verification and Validation of Autonomous Systems (VaVAS), 18-19 July http://cgi.csc.liv.ac.uk/~michael/VaVAS-July2018/ 16th International Workshop on Termination (WST 2018), 18-19 July http://wst2018.webs.upv.es/ MLP18: Machine Learning for Programming, 18-19 July https://prodo.ai/mlp18 Satisfiability Checking and Symbolic Computation: Bridging Two Communities to Solve Real Problems (SC^2 2018), 18-19 July http://www.sc-square.org/CSA/workshop3.html The LaSh 2018 Workshop on Logic and Search, 18-19 July http://www.logicandsearch.org/LaSh2018/ 10th Working Conference on Verified Software: Theories, Tools and Experiments (VSTTE 2018), 18-19 July http://vstte18.it.uu.se/ 11th International Workshop on Numerical Software Verification (NSV-XI), 18-19 July (website coming soon) 18th International Workshop on Automated Verification of Critical Systems (AVOCS 2018), 18-19 July http://avocs18.irisa.fr/ Logics for Reasoning about Preferences, Uncertainty, and Vagueness (PRUV 2018), 19 July http://pruv18.inf.unibz.it/ Third Workshop on Fun With Formal Methods (FWFM 2018), 19 July http://persons.iis.nsk.su/en/FWFM2018 International Workshop on External and Internal Calculi for Non-Classical Logics, 19 July http://weic2018.loria.fr/ Robots, Morality, and Trust through the Verification Lens, 19 July http://qav.cs.ox.ac.uk/robots_morality_trust/ 6th Workshop on the Practical Aspects of Automated Reasoning (PAAR 2018), 19 July http://easychair.org/smart-program/PAAR-2018/ Verification of Engineered Molecular Devices and Programs (VEMDP 2018), 19 July http://dna.caltech.edu/vemdp2018/ Workshops Committee General Chair: Moshe Y. Vardi Co-chairs: Daniel Kroening, Marta Kwiatkowska Workshops Chair: Gethin Norman Workshops Deputy Chair: Christoph Haase CAV: Hana Chockler CSF: Cas Cremers FM: Helen Treharne FSCD: Paula Severi ICLP: Stefan Woltran IJCAR: Alberto Griggio ITP: Assia Mahboubi LICS: Patricia Bouyer SAT: Martina Seidl From James.McKinna at ed.ac.uk Thu Oct 26 18:42:06 2017 From: James.McKinna at ed.ac.uk (James McKinna) Date: Thu, 26 Oct 2017 17:42:06 +0100 Subject: [Agda] [REQUEST] Help with transition from 2.5.1/2 (std-lib 0.12) to 2.5.3 (std-lib 0.14) Message-ID: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> Dear List, in response to a reviewer's request for the upcoming CPP, we are attempting to migrate proofs which previously typechecked under 2.5.1/2, with stdlib 0.12 to 2.5.3 with stdlib 0.14. This has revealed some (very!) unpleasant backwards incompatibilities, so this is a request for assistance/insight into how to deal with them. Hoping to hear from experts on some or all of the following points! Cheers, James McKinna ===================================================================== 0) dependency on ghc Previously, and for institutional reasons, we've been building/running Agda under ghc-7.10.2/3 What is the most recent agda version which builds under ghc-7.x.y? 1) stdlib 0.14 dependency on agda Many things in stdlib 0.14 appear to depend on having agda version 2.5.3 or above. In particular, the language pragmas FOREIGN and COMPILE in Data.Empty seem to make 2.5.1/2 fall over. Is there a sensible way to disable such pragmas without editing the stdlib, for developments which make *no use* of compilation to haskell? 2) reduction behaviour of functions/compile-time conversion checking Lots of things we rely on in our proofs seem now no longer to typecheck. Agda seems no longer to be unfolding definitions, or at least not in the ways we expect, during proof construction or re-checking, as previously in 2.5.1/2. There's no easy way to phrase this question, but how are we supposed to understand the change, and rework our codebase so that old proofs still check? For the time being, no minimal failing example is easy to provide. Is it possible to explain at least what has changed, and better still, to restore the old reduction/unification behaviour? The CHANGELOG gives no clues (at least that I could understand) -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From asr at eafit.edu.co Thu Oct 26 19:21:15 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 26 Oct 2017 12:21:15 -0500 Subject: [Agda] [REQUEST] Help with transition from 2.5.1/2 (std-lib 0.12) to 2.5.3 (std-lib 0.14) In-Reply-To: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> References: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> Message-ID: On 26 October 2017 at 11:42, James McKinna wrote: > ===================================================================== > 0) dependency on ghc > > Previously, and for institutional reasons, we've been building/running > Agda under ghc-7.10.2/3 > > What is the most recent agda version which builds under ghc-7.x.y? > Agda 2.5.3 was tested with GHC 7.8.4, 7.10.3, 8.0.2 and 8.2.1. I guess Agda 2.5.3 also works with GHC 7.10.2. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From sanzhiyan at gmail.com Thu Oct 26 19:26:34 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Thu, 26 Oct 2017 19:26:34 +0200 Subject: [Agda] [REQUEST] Help with transition from 2.5.1/2 (std-lib 0.12) to 2.5.3 (std-lib 0.14) In-Reply-To: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> References: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> Message-ID: 1) You would have to edit the sources themselves 2) Are you disabling termination checking in any way? {-# TERMINATING #-} is how you promise that the definition is terminating so that Agda will reduce it at compile time. On Thu, Oct 26, 2017 at 6:42 PM, James McKinna wrote: > Dear List, > > in response to a reviewer's request for the upcoming CPP, we are attempting > to migrate proofs which previously typechecked under 2.5.1/2, with stdlib > 0.12 to 2.5.3 with stdlib 0.14. > > This has revealed some (very!) unpleasant backwards incompatibilities, so > this is a request for assistance/insight into how to deal with them. > > Hoping to hear from experts on some or all of the following points! > > Cheers, > > James McKinna > ===================================================================== > 0) dependency on ghc > > Previously, and for institutional reasons, we've been building/running Agda > under ghc-7.10.2/3 > > What is the most recent agda version which builds under ghc-7.x.y? > > 1) stdlib 0.14 dependency on agda > > Many things in stdlib 0.14 appear to depend on having agda version 2.5.3 or > above. In particular, the language pragmas FOREIGN and COMPILE in Data.Empty > seem to make 2.5.1/2 fall over. Is there a sensible way to disable such > pragmas without editing the stdlib, for developments which make *no use* of > compilation to haskell? > > 2) reduction behaviour of functions/compile-time conversion checking > > Lots of things we rely on in our proofs seem now no longer to typecheck. > > Agda seems no longer to be unfolding definitions, or at least not in the > ways we expect, during proof construction or re-checking, as previously in > 2.5.1/2. There's no easy way to phrase this question, but how are we > supposed to understand the change, and rework our codebase so that old > proofs still check? For the time being, no minimal failing example is easy > to provide. Is it possible to explain at least what has changed, and better > still, to restore the old reduction/unification behaviour? The CHANGELOG > gives no clues (at least that I could understand) > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From icfp.publicity at googlemail.com Fri Oct 27 03:37:01 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Thu, 26 Oct 2017 18:37:01 -0700 Subject: [Agda] Call for Participation: ICFP 2017 Message-ID: <59f28dbdd7256_59703fcb06059be47356e@landin.local.mail> CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2018 23rd ACM SIGPLAN International Conference on Functional Programming September 23-29, 2018 St. Louis, Missouri, United States http://conf.researchr.org/home/icfp-2018 The 23rd ACM SIGPLAN International Conference on Functional Programming will be held in St. Louis, Missouri, United States on September 23-29, 2018. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for workshops (and other co-located events, such as tutorials) to be affiliated with ICFP 2018 and sponsored by SIGPLAN. These events should be less formal and more focused than ICFP itself, include sessions that enable interaction among the attendees, and foster the exchange of new ideas. The preference is for one-day events, but other schedules can also be considered. The workshops are scheduled to occur on September 23 (the day before ICFP) and September 27-29 (the three days after ICFP). ---------------------------------------------------------------------- Submission details Deadline for submission: November 20, 2017 Notification of acceptance: December 18, 2017 Prospective organizers of workshops or other co-located events are invited to submit a completed workshop proposal form in plain text format to the ICFP 2017 workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018 at googlegroups.com by November 20, 2017. (For proposals of co-located events other than workshops, please fill in the workshop proposal form and just leave blank any sections that do not apply.) Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by December 18, 2017, and if successful, depending on the event, they will be asked to produce a final report after the event has taken place that is suitable for publication in SIGPLAN Notices. The proposal form is available at: http://www.icfpconference.org/icfp2018-files/icfp18-workshops-form.txt Further information about SIGPLAN sponsorship is available at: http://www.sigplan.org/Resources/Proposals/Sponsored/ ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2018 organizing committee, together with the members of the SIGPLAN executive committee. Workshop Co-Chair: Christophe Scholliers (University of Ghent) Workshop Co-Chair: David Christiansen (Indiana University) General Chair: Robby Findler (Northwestern University) Program Chair: Matthew Flatt (University of Utah) ---------------------------------------------------------------------- Further information Any queries should be addressed to the workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018 at googlegroups.com From icfp.publicity at googlemail.com Fri Oct 27 03:40:01 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Thu, 26 Oct 2017 18:40:01 -0700 Subject: [Agda] Call for Workshop Proposals: ICFP 2018 Message-ID: <59f28e7197d3_59753fc3c5457be450249@landin.local.mail> [ Please disregard previous version sent with the wrong subject line. ] CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2018 23rd ACM SIGPLAN International Conference on Functional Programming September 23-29, 2018 St. Louis, Missouri, United States http://conf.researchr.org/home/icfp-2018 The 23rd ACM SIGPLAN International Conference on Functional Programming will be held in St. Louis, Missouri, United States on September 23-29, 2018. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for workshops (and other co-located events, such as tutorials) to be affiliated with ICFP 2018 and sponsored by SIGPLAN. These events should be less formal and more focused than ICFP itself, include sessions that enable interaction among the attendees, and foster the exchange of new ideas. The preference is for one-day events, but other schedules can also be considered. The workshops are scheduled to occur on September 23 (the day before ICFP) and September 27-29 (the three days after ICFP). ---------------------------------------------------------------------- Submission details Deadline for submission: November 20, 2017 Notification of acceptance: December 18, 2017 Prospective organizers of workshops or other co-located events are invited to submit a completed workshop proposal form in plain text format to the ICFP 2017 workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018 at googlegroups.com by November 20, 2017. (For proposals of co-located events other than workshops, please fill in the workshop proposal form and just leave blank any sections that do not apply.) Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by December 18, 2017, and if successful, depending on the event, they will be asked to produce a final report after the event has taken place that is suitable for publication in SIGPLAN Notices. The proposal form is available at: http://www.icfpconference.org/icfp2018-files/icfp18-workshops-form.txt Further information about SIGPLAN sponsorship is available at: http://www.sigplan.org/Resources/Proposals/Sponsored/ ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2018 organizing committee, together with the members of the SIGPLAN executive committee. Workshop Co-Chair: Christophe Scholliers (University of Ghent) Workshop Co-Chair: David Christiansen (Indiana University) General Chair: Robby Findler (Northwestern University) Program Chair: Matthew Flatt (University of Utah) ---------------------------------------------------------------------- Further information Any queries should be addressed to the workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018 at googlegroups.com From icfp.publicity at googlemail.com Tue Oct 31 04:15:18 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Mon, 30 Oct 2017 20:15:18 -0700 Subject: [Agda] Call for Sponsorships: ICFP 2018 Message-ID: <59f7eac63fab5_6d3c3fc7de057be44195c@landin.local.mail> ICFP 2018 The 23rd ACM SIGPLAN International Conference on Functional Programming https://icfp18.sigplan.org Call for Sponsorships Web version of this call for sponsorships: https://icfp18.sigplan.org/attending/supporting-icfp ## Why Sponsor ICFP 2018? ICFP is the premier conference on functional programming languages, covering all aspects of theory, implementation, and application. Every year, we bring together over 500 world-leading researchers, practitioners, and students to discuss the latest findings, collaborate on new ideas, and meet new people. By sponsoring ICFP, your organization can demonstrate its commitment to supporting high quality research and to developing the next generation of functional programming experts. Most of our sponsorship funds are used to help students from around the world afford to attend the conference and get the most out of their experience. We believe that this commitment will pay dividends for our students, our sponsors, and the public for years to come. If you're interested in becoming a sponsor, we'd love to hear from you: get in touch with our sponsorship team at sponsorship-2018 at icfpconference.org ## Sponsorship Opportunities and Benefits ### Bronze - $750 * Your logo on the ICFP 2018 website * Your name listed in the proceedings ### Silver - $3,000 * All of the benefits of Bronze sponsorship * One complimentary 3-day ICFP registration * A table at the industrial reception * Your logo in the proceedings * Your logo on publicity materials such as banners and posters ### Gold - $6,000 * All of the benefits of Silver sponsorship * One additional complimentary 3-day ICFP registration (2 in total) * A named supporter of the industrial reception * An opportunity to include branded merchandise in participants' swag bag ### Platinum - $10,000 * All the benefits of Gold sponsorship * One additional complimentary 3-day ICFP registration (3 in total) * A named supporter of ICFP 2018 * An opportunity to speak to the audience at the industrial reception * A table/booth-like space in the coffee break areas ## Additional Sponsorship Opportunities We offer some additional sponsorship options to sponsors at the silver level or above. ### Lanyard Sponsor - $4,000 You provide the lanyards that every attendee will wear around their neck. ### Video Sponsor - $4,000 ICFP makes videos available for free to non-attendees following the conference. As a video sponsor, you support the recording and release of these videos. In exchange, your logo will be displayed as part of every ICFP video. ### Banner - $1,000 Post a free-standing banner (up to 2m high and 1m wide, provided by you) on the ICFP main stage throughout the conference. From apostolis.xekoukoulotakis at gmail.com Tue Oct 31 17:17:50 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 31 Oct 2017 18:17:50 +0200 Subject: [Agda] Instance arguments vs auto in Idris. Message-ID: I am trying to simplify my code by using instance arguments and thus letting agda fill them. I am wondering why Agda does not allow to pick variables that are not instance tagged as solutions if there is a unique such solution in the context. A similar feature is the 'auto' in Idris. In this case, auto specifies which implicit arguments to automatically fill , with anything found in the context. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Tue Oct 31 17:47:46 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 31 Oct 2017 18:47:46 +0200 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: http://docs.idris-lang.org/en/latest/tutorial/miscellany.html?#auto-implicit-arguments On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > I am trying to simplify my code by using instance arguments and thus > letting agda fill them. > > I am wondering why Agda does not allow to pick variables that are not > instance tagged as solutions if there is a unique such solution in the > context. > > A similar feature is the 'auto' in Idris. In this case, auto specifies > which implicit arguments to automatically fill , with anything found in the > context. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Tue Oct 31 19:01:10 2017 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 31 Oct 2017 14:01:10 -0400 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: By "in the context", you only mean things bound by let and on left-hand sides, right? Not everything in scope? Allowing everything in scope would make instance search prohibitively slow when using big libraries. If you do mean variables bound on left-hand sides, I?m not quite sure either why explicit arguments are not available for instance search but note that - instance arguments *are* available for instance search, as you mention, so even though in f : A -> B f a = ? the [a] is not available for instance search in the goal, it is available in f : {{_ : A}} -> B f = ? - In case you need explicit arguments to be available for instance search, you can use the following workaround: f : A -> B -> C f a b = ? where instance _ = a; _ = b Now both [a] and [b] are available for instance search. On Tue, Oct 31, 2017 at 12:47 PM, Apostolis Xekoukoulotakis wrote: > http://docs.idris-lang.org/en/latest/tutorial/miscellany.html?#auto-implicit-arguments > > On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis > wrote: >> >> I am trying to simplify my code by using instance arguments and thus >> letting agda fill them. >> >> I am wondering why Agda does not allow to pick variables that are not >> instance tagged as solutions if there is a unique such solution in the >> context. >> >> A similar feature is the 'auto' in Idris. In this case, auto specifies >> which implicit arguments to automatically fill , with anything found in the >> context. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From apostolis.xekoukoulotakis at gmail.com Tue Oct 31 19:11:15 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Tue, 31 Oct 2017 20:11:15 +0200 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: I haven't used Idris for a while but in the documentation, it says that using something in the outer context requires the "%hint" annotation, so this is similar to how we need to annotate functions with instance in Agda. I am mostly referring to the lhs variables. What you propose is a nice hack that is only useful if the constructed proof is proportionally bigger. On Tue, Oct 31, 2017 at 8:01 PM, Guillaume Brunerie < guillaume.brunerie at gmail.com> wrote: > By "in the context", you only mean things bound by let and on > left-hand sides, right? Not everything in scope? Allowing everything > in scope would make instance search prohibitively slow when using big > libraries. > > If you do mean variables bound on left-hand sides, I?m not quite sure > either why explicit arguments are not available for instance search > but note that > - instance arguments *are* available for instance search, as you > mention, so even though in > > f : A -> B > f a = ? > > the [a] is not available for instance search in the goal, it is available > in > > f : {{_ : A}} -> B > f = ? > > - In case you need explicit arguments to be available for instance > search, you can use the following workaround: > > f : A -> B -> C > f a b = ? where instance _ = a; _ = b > > Now both [a] and [b] are available for instance search. > > On Tue, Oct 31, 2017 at 12:47 PM, Apostolis Xekoukoulotakis > wrote: > > http://docs.idris-lang.org/en/latest/tutorial/miscellany. > html?#auto-implicit-arguments > > > > On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis > > wrote: > >> > >> I am trying to simplify my code by using instance arguments and thus > >> letting agda fill them. > >> > >> I am wondering why Agda does not allow to pick variables that are not > >> instance tagged as solutions if there is a unique such solution in the > >> context. > >> > >> A similar feature is the 'auto' in Idris. In this case, auto specifies > >> which implicit arguments to automatically fill , with anything found in > the > >> context. > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Tue Oct 31 21:07:12 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 31 Oct 2017 21:07:12 +0100 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: There are a few reasons why only instance arguments are available for instance search: - Variables may have big types that are expensive to check against the goal type. And you typically have quite a lot of variables in the context. - Unrelated variables can interfere with instance search if their types contain metas, meaning that instance search cannot determine uniqueness. In some cases (don't have one at hand though), the metas in the types can only be solved once the instance goal is solved, so you get an unsolved metas. - It's a nice symmetric design: top-level things need to be 'instance' to be eligible and lambda-bound things need to be '{{ }}'. / Ulf On Tue, Oct 31, 2017 at 7:11 PM, Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > I haven't used Idris for a while but in the documentation, it says that > using something in the outer context requires the "%hint" annotation, so > this is similar to how we need to annotate functions with instance in Agda. > > I am mostly referring to the lhs variables. > > What you propose is a nice hack that is only useful if the constructed > proof is proportionally bigger. > > On Tue, Oct 31, 2017 at 8:01 PM, Guillaume Brunerie < > guillaume.brunerie at gmail.com> wrote: > >> By "in the context", you only mean things bound by let and on >> left-hand sides, right? Not everything in scope? Allowing everything >> in scope would make instance search prohibitively slow when using big >> libraries. >> >> If you do mean variables bound on left-hand sides, I?m not quite sure >> either why explicit arguments are not available for instance search >> but note that >> - instance arguments *are* available for instance search, as you >> mention, so even though in >> >> f : A -> B >> f a = ? >> >> the [a] is not available for instance search in the goal, it is available >> in >> >> f : {{_ : A}} -> B >> f = ? >> >> - In case you need explicit arguments to be available for instance >> search, you can use the following workaround: >> >> f : A -> B -> C >> f a b = ? where instance _ = a; _ = b >> >> Now both [a] and [b] are available for instance search. >> >> On Tue, Oct 31, 2017 at 12:47 PM, Apostolis Xekoukoulotakis >> wrote: >> > http://docs.idris-lang.org/en/latest/tutorial/miscellany.htm >> l?#auto-implicit-arguments >> > >> > On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis >> > wrote: >> >> >> >> I am trying to simplify my code by using instance arguments and thus >> >> letting agda fill them. >> >> >> >> I am wondering why Agda does not allow to pick variables that are not >> >> instance tagged as solutions if there is a unique such solution in the >> >> context. >> >> >> >> A similar feature is the 'auto' in Idris. In this case, auto specifies >> >> which implicit arguments to automatically fill , with anything found >> in the >> >> context. >> > >> > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Tue Oct 31 21:10:33 2017 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 31 Oct 2017 16:10:33 -0400 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: Maybe there could be a way to declare an explicit argument to be available for instance search (other than my hack above). For instance f : A -> B -> C f (instance a) (instance b) = ? Guillaume On Tue, Oct 31, 2017 at 4:07 PM, Ulf Norell wrote: > There are a few reasons why only instance arguments are available for > instance search: > > - Variables may have big types that are expensive to check against the goal > type. And you > typically have quite a lot of variables in the context. > > - Unrelated variables can interfere with instance search if their types > contain metas, > meaning that instance search cannot determine uniqueness. In some cases > (don't > have one at hand though), the metas in the types can only be solved once > the instance > goal is solved, so you get an unsolved metas. > > - It's a nice symmetric design: top-level things need to be 'instance' to be > eligible and > lambda-bound things need to be '{{ }}'. > > / Ulf > > On Tue, Oct 31, 2017 at 7:11 PM, Apostolis Xekoukoulotakis > wrote: >> >> I haven't used Idris for a while but in the documentation, it says that >> using something in the outer context requires the "%hint" annotation, so >> this is similar to how we need to annotate functions with instance in Agda. >> >> I am mostly referring to the lhs variables. >> >> What you propose is a nice hack that is only useful if the constructed >> proof is proportionally bigger. >> >> On Tue, Oct 31, 2017 at 8:01 PM, Guillaume Brunerie >> wrote: >>> >>> By "in the context", you only mean things bound by let and on >>> left-hand sides, right? Not everything in scope? Allowing everything >>> in scope would make instance search prohibitively slow when using big >>> libraries. >>> >>> If you do mean variables bound on left-hand sides, I?m not quite sure >>> either why explicit arguments are not available for instance search >>> but note that >>> - instance arguments *are* available for instance search, as you >>> mention, so even though in >>> >>> f : A -> B >>> f a = ? >>> >>> the [a] is not available for instance search in the goal, it is available >>> in >>> >>> f : {{_ : A}} -> B >>> f = ? >>> >>> - In case you need explicit arguments to be available for instance >>> search, you can use the following workaround: >>> >>> f : A -> B -> C >>> f a b = ? where instance _ = a; _ = b >>> >>> Now both [a] and [b] are available for instance search. >>> >>> On Tue, Oct 31, 2017 at 12:47 PM, Apostolis Xekoukoulotakis >>> wrote: >>> > >>> > http://docs.idris-lang.org/en/latest/tutorial/miscellany.html?#auto-implicit-arguments >>> > >>> > On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis >>> > wrote: >>> >> >>> >> I am trying to simplify my code by using instance arguments and thus >>> >> letting agda fill them. >>> >> >>> >> I am wondering why Agda does not allow to pick variables that are not >>> >> instance tagged as solutions if there is a unique such solution in the >>> >> context. >>> >> >>> >> A similar feature is the 'auto' in Idris. In this case, auto specifies >>> >> which implicit arguments to automatically fill , with anything found >>> >> in the >>> >> context. >>> > >>> > >>> > >>> > _______________________________________________ >>> > Agda mailing list >>> > Agda at lists.chalmers.se >>> > https://lists.chalmers.se/mailman/listinfo/agda >>> > >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > From ulf.norell at gmail.com Wed Nov 1 10:22:48 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 1 Nov 2017 10:22:48 +0100 Subject: [Agda] Instance arguments vs auto in Idris. In-Reply-To: References: Message-ID: You can also define a function infixr 0 _asInst_ _asInst_ : ? {a b} {A : Set a} {B : A ? Set b} (x : A) ? ({{y : A}} ? B y) ? B x x asInst f = f {{x}} and say f : A -> B -> C f a b = a asInst b asInst ? I think pattern synonyms is the best vehicle to solve this problem. Currently they don't support instance arguments, but that's been on my todo list for a while. I filed #2829: https://github.com/agda/agda/issues/2829 / Ulf On Tue, Oct 31, 2017 at 9:10 PM, Guillaume Brunerie < guillaume.brunerie at gmail.com> wrote: > Maybe there could be a way to declare an explicit argument to be > available for instance search (other than my hack above). > For instance > > f : A -> B -> C > f (instance a) (instance b) = ? > > Guillaume > > On Tue, Oct 31, 2017 at 4:07 PM, Ulf Norell wrote: > > There are a few reasons why only instance arguments are available for > > instance search: > > > > - Variables may have big types that are expensive to check against the > goal > > type. And you > > typically have quite a lot of variables in the context. > > > > - Unrelated variables can interfere with instance search if their types > > contain metas, > > meaning that instance search cannot determine uniqueness. In some cases > > (don't > > have one at hand though), the metas in the types can only be solved > once > > the instance > > goal is solved, so you get an unsolved metas. > > > > - It's a nice symmetric design: top-level things need to be 'instance' > to be > > eligible and > > lambda-bound things need to be '{{ }}'. > > > > / Ulf > > > > On Tue, Oct 31, 2017 at 7:11 PM, Apostolis Xekoukoulotakis > > wrote: > >> > >> I haven't used Idris for a while but in the documentation, it says that > >> using something in the outer context requires the "%hint" annotation, so > >> this is similar to how we need to annotate functions with instance in > Agda. > >> > >> I am mostly referring to the lhs variables. > >> > >> What you propose is a nice hack that is only useful if the constructed > >> proof is proportionally bigger. > >> > >> On Tue, Oct 31, 2017 at 8:01 PM, Guillaume Brunerie > >> wrote: > >>> > >>> By "in the context", you only mean things bound by let and on > >>> left-hand sides, right? Not everything in scope? Allowing everything > >>> in scope would make instance search prohibitively slow when using big > >>> libraries. > >>> > >>> If you do mean variables bound on left-hand sides, I?m not quite sure > >>> either why explicit arguments are not available for instance search > >>> but note that > >>> - instance arguments *are* available for instance search, as you > >>> mention, so even though in > >>> > >>> f : A -> B > >>> f a = ? > >>> > >>> the [a] is not available for instance search in the goal, it is > available > >>> in > >>> > >>> f : {{_ : A}} -> B > >>> f = ? > >>> > >>> - In case you need explicit arguments to be available for instance > >>> search, you can use the following workaround: > >>> > >>> f : A -> B -> C > >>> f a b = ? where instance _ = a; _ = b > >>> > >>> Now both [a] and [b] are available for instance search. > >>> > >>> On Tue, Oct 31, 2017 at 12:47 PM, Apostolis Xekoukoulotakis > >>> wrote: > >>> > > >>> > http://docs.idris-lang.org/en/latest/tutorial/miscellany. > html?#auto-implicit-arguments > >>> > > >>> > On Tue, Oct 31, 2017 at 6:17 PM, Apostolis Xekoukoulotakis > >>> > wrote: > >>> >> > >>> >> I am trying to simplify my code by using instance arguments and thus > >>> >> letting agda fill them. > >>> >> > >>> >> I am wondering why Agda does not allow to pick variables that are > not > >>> >> instance tagged as solutions if there is a unique such solution in > the > >>> >> context. > >>> >> > >>> >> A similar feature is the 'auto' in Idris. In this case, auto > specifies > >>> >> which implicit arguments to automatically fill , with anything found > >>> >> in the > >>> >> context. > >>> > > >>> > > >>> > > >>> > _______________________________________________ > >>> > Agda mailing list > >>> > Agda at lists.chalmers.se > >>> > https://lists.chalmers.se/mailman/listinfo/agda > >>> > > >> > >> > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.mckinna at ed.ac.uk Wed Nov 1 20:09:32 2017 From: james.mckinna at ed.ac.uk (James McKinna) Date: Wed, 01 Nov 2017 19:09:32 +0000 Subject: [Agda] [REQUEST] Help with transition from 2.5.1/2 (std-lib 0.12) to 2.5.3 (std-lib 0.14) In-Reply-To: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> References: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> Message-ID: <59FA1BEC.5050106@ed.ac.uk> Dear List, Many thanks to Andrea Vezzosi and Andr?s Sicard-Ram?rez, for their speedy replies addressing points 0) and 1). That just leaves 2), which is still giving us problems, effectively limiting our development to v2.5.2. Apologies in adavance for not being able to follow the list's customary request for a minimal failing example, but it's far from obvious (to us, at least) how to construct one. It remains the case that the unfolding behaviour of definitions in one module, both in interactive proof construction, and in subsequent typechecking/reloading, appears to have changed, such that agda2.5.3 rejects terms which previously typechecked, having failed to validate equations/coercions between types. AFAICT, this is due to unfolding behaviour which is less strict in 2.5.3 than previously in 2.5.1/2 (Andrea's suggestion concerning the {- TERMINATING -} pragma wrt point 2) does not seem relevant here; all our definitions are terminating). Is it possible to describe how Agda's reduction behaviour has changed, and how it might be to force evaluation in the relevant places to allow checking to proceed? Thanks in advance, James Previously, I wrote: > Dear List, > > in response to a reviewer's request for the upcoming CPP, we are > attempting to migrate proofs which previously typechecked under > 2.5.1/2, with stdlib 0.12 to 2.5.3 with stdlib 0.14. > > This has revealed some (very!) unpleasant backwards incompatibilities, > so this is a request for assistance/insight into how to deal with them. > > Hoping to hear from experts on some or all of the following points! > > Cheers, > > James McKinna > ===================================================================== > 0) dependency on ghc > > Previously, and for institutional reasons, we've been building/running > Agda under ghc-7.10.2/3 > > What is the most recent agda version which builds under ghc-7.x.y? > > 1) stdlib 0.14 dependency on agda > > Many things in stdlib 0.14 appear to depend on having agda version > 2.5.3 or above. In particular, the language pragmas FOREIGN and > COMPILE in Data.Empty seem to make 2.5.1/2 fall over. Is there a > sensible way to disable such pragmas without editing the stdlib, for > developments which make *no use* of compilation to haskell? > > 2) reduction behaviour of functions/compile-time conversion checking > > Lots of things we rely on in our proofs seem now no longer to typecheck. > > Agda seems no longer to be unfolding definitions, or at least not in > the ways we expect, during proof construction or re-checking, as > previously in 2.5.1/2. There's no easy way to phrase this question, > but how are we supposed to understand the change, and rework our > codebase so that old proofs still check? For the time being, no > minimal failing example is easy to provide. Is it possible to explain > at least what has changed, and better still, to restore the old > reduction/unification behaviour? The CHANGELOG gives no clues (at > least that I could understand) > > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From andreas.abel at ifi.lmu.de Wed Nov 1 22:16:58 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 1 Nov 2017 22:16:58 +0100 Subject: [Agda] [REQUEST] Help with transition from 2.5.1/2 (std-lib 0.12) to 2.5.3 (std-lib 0.14) In-Reply-To: <59FA1BEC.5050106@ed.ac.uk> References: <20171026174206.10231nj1f86bffpc@www.staffmail.ed.ac.uk> <59FA1BEC.5050106@ed.ac.uk> Message-ID: Dear James, > Apologies in adavance for not being able to follow the list's customary > request for a minimal failing example, but it's far from obvious (to us, > at least) how to construct one. You also send a link to e.g. a github commit to one of us developers so that we can investigate the failure further... --Andreas On 01.11.2017 20:09, James McKinna wrote: > Dear List, > > Many thanks to Andrea Vezzosi and Andr?s Sicard-Ram?rez, for their > speedy replies addressing points 0) and 1). That just leaves 2), which > is still giving us problems, effectively limiting our development to > v2.5.2. > > Apologies in adavance for not being able to follow the list's customary > request for a minimal failing example, but it's far from obvious (to us, > at least) how to construct one. It remains the case that the unfolding > behaviour of definitions in one module, both in interactive proof > construction, and in subsequent typechecking/reloading, appears to have > changed, such that agda2.5.3 rejects terms which previously typechecked, > having failed to validate equations/coercions between types. > > AFAICT, this is due to unfolding behaviour which is less strict in 2.5.3 > than previously in 2.5.1/2 (Andrea's suggestion concerning the {- > TERMINATING -} pragma wrt point 2) does not seem relevant here; all our > definitions are terminating). Is it possible to describe how Agda's > reduction behaviour has changed, and how it might be to force evaluation > in the relevant places to allow checking to proceed? > > Thanks in advance, > > James > > > Previously, I wrote: >> Dear List, >> >> in response to a reviewer's request for the upcoming CPP, we are >> attempting to migrate proofs which previously typechecked under >> 2.5.1/2, with stdlib 0.12 to 2.5.3 with stdlib 0.14. >> >> This has revealed some (very!) unpleasant backwards incompatibilities, >> so this is a request for assistance/insight into how to deal with them. >> >> Hoping to hear from experts on some or all of the following points! >> >> Cheers, >> >> James McKinna >> ===================================================================== >> 0) dependency on ghc >> >> Previously, and for institutional reasons, we've been building/running >> Agda under ghc-7.10.2/3 >> >> What is the most recent agda version which builds under ghc-7.x.y? >> >> 1) stdlib 0.14 dependency on agda >> >> Many things in stdlib 0.14 appear to depend on having agda version >> 2.5.3 or above. In particular, the language pragmas FOREIGN and >> COMPILE in Data.Empty seem to make 2.5.1/2 fall over. Is there a >> sensible way to disable such pragmas without editing the stdlib, for >> developments which make *no use* of compilation to haskell? >> >> 2) reduction behaviour of functions/compile-time conversion checking >> >> Lots of things we rely on in our proofs seem now no longer to typecheck. >> >> Agda seems no longer to be unfolding definitions, or at least not in >> the ways we expect, during proof construction or re-checking, as >> previously in 2.5.1/2. There's no easy way to phrase this question, >> but how are we supposed to understand the change, and rework our >> codebase so that old proofs still check? For the time being, no >> minimal failing example is easy to provide. Is it possible to explain >> at least what has changed, and better still, to restore the old >> reduction/unification behaviour? The CHANGELOG gives no clues (at >> least that I could understand) >> >> >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From apostolis.xekoukoulotakis at gmail.com Fri Nov 3 11:52:04 2017 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Fri, 3 Nov 2017 12:52:04 +0200 Subject: [Agda] instance arguments and negation. Message-ID: I made a negation that takes an instance argument. This unfortunately stops unification from taking place. In hole 0 , the type is ?. in hole 1 , the type is ? B .a Is there a way to force agda to have (?? B .a) in hole 0 so that unification deduces a? ``` data ? : Set where infix 3 ??_ ??_ : ? {?} ? Set ? ? Set ? ?? P = {{p : P}} ? ? infix 3 ?_ ?_ : ? {?} ? Set ? ? Set ? ? P = (p : P) ? ? data A : Set where a1 : A a2 : A data B : A ? Set where b1 : B a1 b2 : B a2 gun : ?{a} ? ?? B a gun = {!!} fun : ?{a} ? ?? B a fun = gun gun2 : ?{a} ? ? B a gun2 = {!!} fun2 : ?{a} ? ? B a fun2 = gun2 ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Fri Nov 3 13:48:57 2017 From: abela at chalmers.se (Andreas Abel) Date: Fri, 3 Nov 2017 13:48:57 +0100 Subject: [Agda] instance arguments and negation. In-Reply-To: References: Message-ID: <12aa6ecf-d6f4-26d6-e460-6c6b4e1b4ae5@chalmers.se> This is not specific to instance arguments, you get the same problem with hidden arguments: infix 3 ??_ ??_ : ? {?} ? Set ? ? Set ? ?? P = {p : P} ? ? gun3 : ?{a} ? ?? B a gun3 = {!!} fun3 : ?{a} ? ?? B a fun3 = gun3 -- yellow -- fun3 is short for: fun3' : ?{a} ? ?? B a fun3' {a} {p} = gun3 {_} {_} -- yellow yellow The underlying reason for the unsolved metas is that hidden arguments are inserted eagerly. Workaround: eta-expand manually. fun3'' : ?{a} ? ?? B a fun3'' {a} {p} = gun3 {_} {p} -- no yellow Best, Andreas On 03.11.2017 11:52, Apostolis Xekoukoulotakis wrote: > > data ? : Set where > > infix 3 ??_ > > ??_ : ? {?} ? Set ? ? Set ? > ?? P = {{p : P}} ? ? > > > infix 3 ?_ > > ?_ : ? {?} ? Set ? ? Set ? > ? P = (p : P) ? ? > > > data A : Set where > ? a1 : A > ? a2 : A > > > data B : A ? Set where > ? b1 : B a1 > ? b2 : B a2 > > > gun : ?{a} ? ?? B a > gun = {!!} > > fun : ?{a} ? ?? B a > fun = gun > > > gun2 : ?{a} ? ? B a > gun2 = {!!} > > fun2 : ?{a} ? ? B a > fun2 = gun2 -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From fhi.1990 at gmail.com Fri Nov 3 14:06:09 2017 From: fhi.1990 at gmail.com (=?UTF-8?Q?Frederik_Hangh=C3=B8j_Iversen?=) Date: Fri, 3 Nov 2017 14:06:09 +0100 Subject: [Agda] Agda's syntax declaration Message-ID: I recently discovered Agda's syntax directive. And just now discovered that as a user I can define my own syntax directive. The thing I'm talking about is exemplified in agda-stdlib in Data.Product: ?-syntax : ? {a b} (A : Set a) ? (A ? Set b) ? Set (a ? b) ?-syntax = ? syntax ?-syntax A (? x ? B) = ?[ x ? A ] B Unfortunately I cannot find any documentation on this directive. If anyone has a resource please let me know. I was also wondering if it would be possible to use this directive to define a syntactical construct for e.g. lists with arbitrary elements. That is, I'd like to be able to write a syntax declaration allowing me to write. [0,1,2] in stead of 0 ? 1 ? 2 ? [] Is this possible? From sanzhiyan at gmail.com Fri Nov 3 16:58:19 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Fri, 3 Nov 2017 16:58:19 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Hi Frederik, it seems like the only documentation was in the CHANGELOG, so I collected it here: https://github.com/agda/agda/blob/master/doc/user-manual/language/syntax-declarations.lagda.rst it should soon appear at http://agda.readthedocs.io/ , I presume. About the list syntax, I was able to find this gist, not sure how well it works in practice though. https://gist.github.com/bishboria/8568581 Cheers, Andrea On Fri, Nov 3, 2017 at 2:06 PM, Frederik Hangh?j Iversen wrote: > I recently discovered Agda's syntax directive. And just now discovered > that as a user I can define my own syntax directive. > > The thing I'm talking about is exemplified in agda-stdlib in Data.Product: > > ?-syntax : ? {a b} (A : Set a) ? (A ? Set b) ? Set (a ? b) > ?-syntax = ? > > syntax ?-syntax A (? x ? B) = ?[ x ? A ] B > > Unfortunately I cannot find any documentation on this directive. If > anyone has a resource please let me know. > > I was also wondering if it would be possible to use this directive to > define a syntactical construct for e.g. lists with arbitrary elements. > That is, I'd like to be able to write a syntax declaration allowing me > to write. > > [0,1,2] > > in stead of > > 0 ? 1 ? 2 ? [] > > > Is this possible? > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From nad at cse.gu.se Fri Nov 3 22:51:45 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 3 Nov 2017 22:51:45 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: On 2017-11-03 16:58, Andrea Vezzosi wrote: > About the list syntax, I was able to find this gist, not sure how well > it works in practice though. > > https://gist.github.com/bishboria/8568581 Note that regular list literals have the advantage that there is no need to give parentheses around list elements, or around list literals. -- /NAD From m.escardo at cs.bham.ac.uk Fri Nov 3 23:37:18 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 3 Nov 2017 22:37:18 +0000 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Can I say some things about Agda's syntax declaration? * Why are the definitions backwards (what you define is in the right-hand side)? * There isn't any precise definition, as far as I know, of the syntax of syntax. * And there isn't much documentation, as discussed. * And it is impossible to google search for "Agda syntax" (say) because this gives answers about Agda's syntax, and not about the "syntax" keyword. (And it doesn't help to search for "Agda syntax" or "Agda syntax keyword" or "Agda syntax declaration".) Anyway, after heroic guesswork, I managed to make some useful things to work nicely using "syntax". (So thanks for implementing this feature!) Definitely the most mysterious thing, to make such things work, was to declare the (polymorphic) identity function as an infix left-associative operator with priority 0: infixl 0 id This does work (for some things I've done), but I am not sure how I figured it out (it is not documented), and I still don't know what making the identity into an infix left-associative operator means. :-) Enjoy the weekend. Best, Martin On 03/11/17 21:51, nad at cse.gu.se wrote: > On 2017-11-03 16:58, Andrea Vezzosi wrote: >> About the list syntax, I was able to find this gist, not sure how well >> it works in practice though. >> >> https://gist.github.com/bishboria/8568581 > > Note that regular list literals have the advantage that there is no need > to give parentheses around list elements, or around list literals. > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Sat Nov 4 00:02:25 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 3 Nov 2017 23:02:25 +0000 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Here is a particular (useful) concrete instance of the phenomenon I discussed in the previous message: ``` id : {A : Type} ? A ? A id {A} x = x syntax id {A} x = x ? A infixl 0 id ``` Here the symbol "?" is the unicode one, not the Ascii one that is built-in in Agda for type declarations. This allows you to * Say "x" with an explicit description of its type, by writing "x ? A" (like in Haskell) * This can be for clarity (the human reader of your Agda proof). * For disambiguation (the computer reader of your Agda proof). This also allows, with the associativity for id (!), to write things such as * x ? A ? A' to emphasize that the defined type of x is A, but is definitionally equal to A' in a complex proof that we want not only Agda to approve of, but also people to understand and appreciate. Anyway, this was just a successful example of a use of "syntax", by guesswork Please, Agda developers, tell us the precise syntax of syntax. Best, Martin On 03/11/17 22:37, Martin Escardo wrote: > Can I say some things about Agda's syntax declaration? > > * Why are the definitions backwards (what you define is in the > right-hand side)? > > * There isn't any precise definition, as far as I know, of the syntax of > syntax. > > * And there isn't much documentation, as discussed. > > * And it is impossible to google search for "Agda syntax" (say) because > this gives answers about Agda's syntax, and not about the "syntax" > keyword. (And it doesn't help to search for "Agda syntax" or "Agda > syntax keyword" or "Agda syntax declaration".) > > Anyway, after heroic guesswork, I managed to make some useful things to > work nicely using "syntax". (So thanks for implementing this feature!) > > Definitely the most mysterious thing, to make such things work, was to > declare the (polymorphic) identity function as an infix left-associative > operator with priority 0: > > infixl 0 id > > This does work (for some things I've done), but I am not sure how I > figured it out (it is not documented), and I still don't know what > making the identity into an infix left-associative operator means. > > :-) > > Enjoy the weekend. > > Best, > Martin > > On 03/11/17 21:51, nad at cse.gu.se wrote: >> On 2017-11-03 16:58, Andrea Vezzosi wrote: >>> About the list syntax, I was able to find this gist, not sure how well >>> it works in practice though. >>> >>> https://gist.github.com/bishboria/8568581 >> >> Note that regular list literals have the advantage that there is no need >> to give parentheses around list elements, or around list literals. >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Sat Nov 4 00:03:40 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 3 Nov 2017 23:03:40 +0000 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: <1b6fe932-17b9-0ed5-23f5-08d17b67ee0a@cs.bham.ac.uk> Sorry, Type was Set, I copied frin a development with adapting to this context. Type = Set. M. On 03/11/17 23:02, Martin Escardo wrote: > Here is a particular (useful) concrete instance of the phenomenon I > discussed in the previous message: > > ``` > id : {A : Type} ? A ? A > id {A} x = x > > syntax id {A} x = x ? A > > infixl 0 id > ``` > > Here the symbol "?" is the unicode one, not the Ascii one that is > built-in in Agda for type declarations. > > This allows you to > > * Say "x" with an explicit description of its type, by writing "x ? A" > (like in Haskell) > > * This can be for clarity (the human reader of your Agda proof). > > * For disambiguation (the computer reader of your Agda proof). > > This also allows, with the associativity for id (!), to write things such as > > * x ? A > ? A' > > to emphasize that the defined type of x is A, but is definitionally > equal to A' in a complex proof that we want not only Agda to approve of, > but also people to understand and appreciate. > > Anyway, this was just a successful example of a use of "syntax", by > guesswork > > Please, Agda developers, tell us the precise syntax of syntax. > > Best, > Martin > > > On 03/11/17 22:37, Martin Escardo wrote: >> Can I say some things about Agda's syntax declaration? >> >> * Why are the definitions backwards (what you define is in the >> right-hand side)? >> >> * There isn't any precise definition, as far as I know, of the syntax of >> syntax. >> >> * And there isn't much documentation, as discussed. >> >> * And it is impossible to google search for "Agda syntax" (say) because >> this gives answers about Agda's syntax, and not about the "syntax" >> keyword. (And it doesn't help to search for "Agda syntax" or "Agda >> syntax keyword" or "Agda syntax declaration".) >> >> Anyway, after heroic guesswork, I managed to make some useful things to >> work nicely using "syntax". (So thanks for implementing this feature!) >> >> Definitely the most mysterious thing, to make such things work, was to >> declare the (polymorphic) identity function as an infix left-associative >> operator with priority 0: >> >> infixl 0 id >> >> This does work (for some things I've done), but I am not sure how I >> figured it out (it is not documented), and I still don't know what >> making the identity into an infix left-associative operator means. >> >> :-) >> >> Enjoy the weekend. >> >> Best, >> Martin >> >> On 03/11/17 21:51, nad at cse.gu.se wrote: >>> On 2017-11-03 16:58, Andrea Vezzosi wrote: >>>> About the list syntax, I was able to find this gist, not sure how well >>>> it works in practice though. >>>> >>>> https://gist.github.com/bishboria/8568581 >>> >>> Note that regular list literals have the advantage that there is no need >>> to give parentheses around list elements, or around list literals. >>> >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Sat Nov 4 00:05:56 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 3 Nov 2017 23:05:56 +0000 Subject: [Agda] Agda's syntax declaration In-Reply-To: <1b6fe932-17b9-0ed5-23f5-08d17b67ee0a@cs.bham.ac.uk> References: <1b6fe932-17b9-0ed5-23f5-08d17b67ee0a@cs.bham.ac.uk> Message-ID: <3393b965-a3fa-c347-3a16-d6902669626d@cs.bham.ac.uk> I shoudn't type so fast without reading what I wrote. I copied from a development without adapting to this context. This is what I meant to write. M, On 03/11/17 23:03, Martin Escardo wrote: > Sorry, Type was Set, I copied frin a development with adapting to this > context. > > Type = Set. > > M. > > On 03/11/17 23:02, Martin Escardo wrote: >> Here is a particular (useful) concrete instance of the phenomenon I >> discussed in the previous message: >> >> ``` >> id : {A : Type} ? A ? A >> id {A} x = x >> >> syntax id {A} x = x ? A >> >> infixl 0 id >> ``` >> >> Here the symbol "?" is the unicode one, not the Ascii one that is >> built-in in Agda for type declarations. >> >> This allows you to >> >> * Say "x" with an explicit description of its type, by writing "x ? A" >> (like in Haskell) >> >> * This can be for clarity (the human reader of your Agda proof). >> >> * For disambiguation (the computer reader of your Agda proof). >> >> This also allows, with the associativity for id (!), to write things such as >> >> * x ? A >> ? A' >> >> to emphasize that the defined type of x is A, but is definitionally >> equal to A' in a complex proof that we want not only Agda to approve of, >> but also people to understand and appreciate. >> >> Anyway, this was just a successful example of a use of "syntax", by >> guesswork >> >> Please, Agda developers, tell us the precise syntax of syntax. >> >> Best, >> Martin >> >> >> On 03/11/17 22:37, Martin Escardo wrote: >>> Can I say some things about Agda's syntax declaration? >>> >>> * Why are the definitions backwards (what you define is in the >>> right-hand side)? >>> >>> * There isn't any precise definition, as far as I know, of the syntax of >>> syntax. >>> >>> * And there isn't much documentation, as discussed. >>> >>> * And it is impossible to google search for "Agda syntax" (say) because >>> this gives answers about Agda's syntax, and not about the "syntax" >>> keyword. (And it doesn't help to search for "Agda syntax" or "Agda >>> syntax keyword" or "Agda syntax declaration".) >>> >>> Anyway, after heroic guesswork, I managed to make some useful things to >>> work nicely using "syntax". (So thanks for implementing this feature!) >>> >>> Definitely the most mysterious thing, to make such things work, was to >>> declare the (polymorphic) identity function as an infix left-associative >>> operator with priority 0: >>> >>> infixl 0 id >>> >>> This does work (for some things I've done), but I am not sure how I >>> figured it out (it is not documented), and I still don't know what >>> making the identity into an infix left-associative operator means. >>> >>> :-) >>> >>> Enjoy the weekend. >>> >>> Best, >>> Martin >>> >>> On 03/11/17 21:51, nad at cse.gu.se wrote: >>>> On 2017-11-03 16:58, Andrea Vezzosi wrote: >>>>> About the list syntax, I was able to find this gist, not sure how well >>>>> it works in practice though. >>>>> >>>>> https://gist.github.com/bishboria/8568581 >>>> >>>> Note that regular list literals have the advantage that there is no need >>>> to give parentheses around list elements, or around list literals. >>>> >>> >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From ulf.norell at gmail.com Sat Nov 4 07:33:57 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Sat, 4 Nov 2017 07:33:57 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: On Fri, Nov 3, 2017 at 11:37 PM, Martin Escardo wrote: > Can I say some things about Agda's syntax declaration? > > * Why are the definitions backwards (what you define is in the > right-hand side)? > They're not. You are defining the syntax for a particular name in the same way that you define the value of a particular name (`syntax f x = bla` vs `f x = bla`). If syntax declarations were the other way around you would be very surprised to find that you can't have multiple syntax declarations for the same name (which you can't). > * There isn't any precise definition, as far as I know, of the syntax of > syntax. > > * And there isn't much documentation, as discussed. > What do you feel is missing from the documentation Andrea added [1], aside from a more explicit explanation of what you are allowed to write in a syntax declaration? [1] http://agda.readthedocs.io/en/latest/language/syntax-declarations.html > * And it is impossible to google search for "Agda syntax" (say) because > this gives answers about Agda's syntax, and not about the "syntax" > keyword. (And it doesn't help to search for "Agda syntax" or "Agda > syntax keyword" or "Agda syntax declaration".) > Now you can do a page search in the user manual which should work better. For future undocumented features your best bet when googling fails is to grep the CHANGELOG. Definitely the most mysterious thing, to make such things work, was to > declare the (polymorphic) identity function as an infix left-associative > operator with priority 0: > > infixl 0 id > > This does work (for some things I've done), but I am not sure how I > figured it out (it is not documented), and I still don't know what > making the identity into an infix left-associative operator means. > You answered this question yourself (and it's explained in the documentation): > This also allows, with the associativity for id (!), to write things such > as > * x ? A > ? A' / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Sat Nov 4 08:44:21 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Sat, 4 Nov 2017 07:44:21 +0000 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Thanks for you answer, Ulf. On 04/11/17 06:33, ulf.norell at gmail.com wrote: > > On Fri, Nov 3, 2017 at 11:37 PM, Martin Escardo > wrote: > > Can I say some things about Agda's syntax declaration? > > * Why are the definitions backwards (what you define is in the > right-hand side)? > > > They're not. You are defining the syntax for a particular name in the > same way that > you define the value of a particular name (`syntax f x = bla` vs `f x = > bla`). If syntax > declarations were the other way around you would be very surprised to > find that you > can't have multiple syntax declarations for the same name (which you can't). I don't understand this remark. Consider again ``` id : {A : Type} ? A ? A id {A} x = x syntax id {A} x = x ? A infixl 0 id ``` In the syntax definition, I have *already* define id (occurring in the left-hand side), and the new thing I am *defining* in the syntax declaration is ":", which occurs in the *right*-hand side. At first I tried to define ":" to be left-associative, but this didn't work. Then cheating from other people's examples I realized that one is expected to define `id` to be left-associative. I didn't answer the question myself as you suggest: I still don't know what it means for id to be left-associative. :-) The above works and is useful, but I don't understand it. Best, Martin From ulf.norell at gmail.com Sat Nov 4 10:29:41 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Sat, 4 Nov 2017 10:29:41 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Ok, let me try to be more precise. In your example you are defining a single thing (id) with multiple properties. You can read it as something like this: ``` id.TYPE = {A : Type} ? A ? A id.VALUE = {A} x ? x id.SYNTAX = {A} x ? x "?" A id.FIXITY = infixl 0 ``` Contrary to your intuition "?" is not a thing in its own right, but simply a terminal symbol in the parsing rule for id. / Ulf On Sat, Nov 4, 2017 at 8:44 AM, Martin Escardo wrote: > Thanks for you answer, Ulf. > > On 04/11/17 06:33, ulf.norell at gmail.com wrote: > >> >> On Fri, Nov 3, 2017 at 11:37 PM, Martin Escardo > > wrote: >> >> Can I say some things about Agda's syntax declaration? >> >> * Why are the definitions backwards (what you define is in the >> right-hand side)? >> >> >> They're not. You are defining the syntax for a particular name in the >> same way that >> you define the value of a particular name (`syntax f x = bla` vs `f x = >> bla`). If syntax >> declarations were the other way around you would be very surprised to >> find that you >> can't have multiple syntax declarations for the same name (which you >> can't). >> > > I don't understand this remark. Consider again > > ``` > id : {A : Type} ? A ? A > id {A} x = x > > syntax id {A} x = x ? A > > infixl 0 id > ``` > > In the syntax definition, I have *already* define id (occurring in the > left-hand side), and the new thing I am *defining* in the syntax > declaration is ":", which occurs in the *right*-hand side. > > At first I tried to define ":" to be left-associative, but this didn't > work. Then cheating from other people's examples I realized that one is > expected to define `id` to be left-associative. I didn't answer the > question myself as you suggest: I still don't know what it means for id to > be left-associative. :-) The above works and is useful, but I don't > understand it. > > Best, > Martin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fhi.1990 at gmail.com Sat Nov 4 12:42:01 2017 From: fhi.1990 at gmail.com (=?UTF-8?Q?Frederik_Hangh=C3=B8j_Iversen?=) Date: Sat, 4 Nov 2017 12:42:01 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: This is really great. Thank you for putting this in the docs. I'll be sure to search the changelog next time I run into an undocumented feature. As for the documentation I think this example: syntax _==_ x y = x === y Could benefit from a change. As far as I understand it the issue with this declaration is the LHS, i.e. _==_ and not the RHS ===, but I could be wrong. So perhaps it's a bit misleading. Maybe linking the gist for list-syntax would also be helpful (perhaps even adding it to agda-stdlib?) And the documentation could also expand on the caveat of using this approach as pointed out by NAD here and Toxaris in the Gist. Also, it's a bit funny to me that so many readthedocs articles have the disclaimer "this is a stub" xD On Fri, Nov 3, 2017 at 4:58 PM, Andrea Vezzosi wrote: > Hi Frederik, > > it seems like the only documentation was in the CHANGELOG, so I > collected it here: > > https://github.com/agda/agda/blob/master/doc/user-manual/ > language/syntax-declarations.lagda.rst > > > it should soon appear at http://agda.readthedocs.io/ , I presume. > > About the list syntax, I was able to find this gist, not sure how well > it works in practice though. > > https://gist.github.com/bishboria/8568581 > > Cheers, > Andrea > > On Fri, Nov 3, 2017 at 2:06 PM, Frederik Hangh?j Iversen > wrote: > > I recently discovered Agda's syntax directive. And just now discovered > > that as a user I can define my own syntax directive. > > > > The thing I'm talking about is exemplified in agda-stdlib in > Data.Product: > > > > ?-syntax : ? {a b} (A : Set a) ? (A ? Set b) ? Set (a ? b) > > ?-syntax = ? > > > > syntax ?-syntax A (? x ? B) = ?[ x ? A ] B > > > > Unfortunately I cannot find any documentation on this directive. If > > anyone has a resource please let me know. > > > > I was also wondering if it would be possible to use this directive to > > define a syntactical construct for e.g. lists with arbitrary elements. > > That is, I'd like to be able to write a syntax declaration allowing me > > to write. > > > > [0,1,2] > > > > in stead of > > > > 0 ? 1 ? 2 ? [] > > > > > > Is this possible? > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > -- Regards *Frederik Hangh?j Iversen* -------------- next part -------------- An HTML attachment was scrubbed... URL: From kahl at cas.mcmaster.ca Sat Nov 4 15:58:57 2017 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Sat, 4 Nov 2017 10:58:57 -0400 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: <20171104145857.GT11720@ritchie.cas.mcmaster.ca> On Sat, Nov 04, 2017 at 10:29:41AM +0100, Ulf Norell wrote: > Ok, let me try to be more precise. In your example you are defining a > single thing (id) > with multiple properties. You can read it as something like this: > > ``` > id.TYPE = {A : Type} ? A ? A > id.VALUE = {A} x ? x > id.SYNTAX = {A} x ? x "?" A > id.FIXITY = infixl 0 > ``` > > Contrary to your intuition "?" is not a thing in its own right, but simply > a terminal symbol in > the parsing rule for id. Saying ``the parsing rule for id'' might be a bit misleading currently, since ``id'' still continues to be parsed without problems. My pragmatic recommendation for syntax declarations is to never attach syntax to an identifier that will still be used for other purposes, including that it needs to be visible for export. For example, you could write: ``` id : {A : Type} ? A ? A id {A} x = x idViaColon : {A : Type} ? A ? A idViaColon = id -- the following clause augments the definition of the meta-function -- `syntax` by one more pattern-matching clause, -- where the type of the first argument is the meta-type `identifier` -- ;-) -- syntax idViaColon {A} x = x ? A infixl 0 idViaColon ``` Then users of your library can decide whether they just want TYPE and VALUE of `id`, and import only that, or they only want SYNTAX and FIXITY of `idViaColon` (with the VALUE and TYPE of `id` attached), and they would then import only `idViaColon`, or in some cases they might import both. With that kind of usage pattern for syntax, I would not even object to actually making the syntax declaration ``the'' parsing rule for `idViaColon`, and thus making that identifier unavailable otherwise, except in import lists. Wolfram From sanzhiyan at gmail.com Sun Nov 5 11:14:21 2017 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Sun, 5 Nov 2017 11:14:21 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: Indeed the "syntax _==_ x y = x === y" example could be changed to "syntax _>>=_ e? (? x ? e?) = x ? e? , e?" to highlight what the problem is, as compared to bind above. By the way, if you find more to add to the docs feel free to send pull requests :) We might get rid of some of those stubs one day. Cheers, Andrea On Sat, Nov 4, 2017 at 12:42 PM, Frederik Hangh?j Iversen wrote: > This is really great. Thank you for putting this in the docs. I'll be sure > to search the changelog next time I run into an undocumented feature. > > As for the documentation I think this example: > > syntax _==_ x y = x === y > > > Could benefit from a change. As far as I understand it the issue with this > declaration is the LHS, i.e. _==_ and not the RHS ===, but I could be wrong. > So perhaps it's a bit misleading. > > Maybe linking the gist for list-syntax would also be helpful (perhaps even > adding it to agda-stdlib?) And the documentation could also expand on the > caveat of using this approach as pointed out by NAD here and Toxaris in the > Gist. > > Also, it's a bit funny to me that so many readthedocs articles have the > disclaimer "this is a stub" xD > > On Fri, Nov 3, 2017 at 4:58 PM, Andrea Vezzosi wrote: >> >> Hi Frederik, >> >> it seems like the only documentation was in the CHANGELOG, so I >> collected it here: >> >> >> https://github.com/agda/agda/blob/master/doc/user-manual/language/syntax-declarations.lagda.rst >> >> >> it should soon appear at http://agda.readthedocs.io/ , I presume. >> >> About the list syntax, I was able to find this gist, not sure how well >> it works in practice though. >> >> https://gist.github.com/bishboria/8568581 >> >> Cheers, >> Andrea >> >> On Fri, Nov 3, 2017 at 2:06 PM, Frederik Hangh?j Iversen >> wrote: >> > I recently discovered Agda's syntax directive. And just now discovered >> > that as a user I can define my own syntax directive. >> > >> > The thing I'm talking about is exemplified in agda-stdlib in >> > Data.Product: >> > >> > ?-syntax : ? {a b} (A : Set a) ? (A ? Set b) ? Set (a ? b) >> > ?-syntax = ? >> > >> > syntax ?-syntax A (? x ? B) = ?[ x ? A ] B >> > >> > Unfortunately I cannot find any documentation on this directive. If >> > anyone has a resource please let me know. >> > >> > I was also wondering if it would be possible to use this directive to >> > define a syntactical construct for e.g. lists with arbitrary elements. >> > That is, I'd like to be able to write a syntax declaration allowing me >> > to write. >> > >> > [0,1,2] >> > >> > in stead of >> > >> > 0 ? 1 ? 2 ? [] >> > >> > >> > Is this possible? >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda > > > > > -- > Regards > Frederik Hangh?j Iversen From abela at chalmers.se Mon Nov 6 10:08:34 2017 From: abela at chalmers.se (Andreas Abel) Date: Mon, 6 Nov 2017 10:08:34 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: References: Message-ID: <57426ece-d13c-cc2a-76eb-b1ea03fbe7b3@chalmers.se> I must say I am with Martin on this. I never understood why the syntax declarations are backwards. The usual mathematical style is that you introduce a notation and what it expands to. It is the notation which is the new thing and whose meaning is defined in terms of things understood before, and the defined thing is commonly on the left hand side of the =. And Ulf, your explanation is very implementation-centric. I think it was easiest for the user, if declarations of the form lhs = rhs could be uniformly be understood as "rewrite lhs to rhs if you are stuck on with something involving lhs". If we take a step back, there is two things that we would want from a notation introduced by a syntax declaration: 1. Have Agda parse it. 2. Have Agda use it when it prints stuff to us. For 1. it is perfectly fine to have several notations that expand to the same function symbol or function application. For 2. having several notations for the same function symbol leads to more ambiguity. (There is already some ambiguity, because Agda could print the original function symbol or use the notation.) As it stands, I deem goal 1. higher in practice, and also, it works better. For 2. there is an overlapping feature, DISPLAY pragmas, which can sometimes be used to fix up the printing. (Note that for the display pragma, DISPLAY lhs = rhs, means "rewrite lhs to rhs for the purpose of printing", which is the intuitive reading.) Also, goal 2. does seem to be achieved in practice. For instance, trying the notation for the Sigma type in Data.Product: open import Data.Product goal : ?{A : Set}{B : A ? Set} ? ?[ x ? A ] B x goal = {!!} Agda prints the goal as ?-syntax .A .B In this case, DISPLAY does not help either, {-# DISPLAY ?-syntax A B = ?[ x ? A ] B x #-} as Agda reports Not allowed in DISPLAY pragma right-hand side: lambdas when checking the pragma DISPLAY ?-syntax A B = ?-syntax A ? x ? B x Since the "syntax" facility does not work properly, I don't use it. Well, the father of the syntax facility ran away soon after the conception. Cheers, Andreas P.S.: Martin, for now you should just memorize to read syntax lhs = rhs as "a new syntax for lhs is rhs". On 04.11.2017 10:29, Ulf Norell wrote: > Ok, let me try to be more precise. In your example you are defining a > single thing (id) > with multiple properties. You can read it as something like this: > > ``` > id.TYPE = {A : Type} ? A ? A > id.VALUE = {A} x ??x > id.SYNTAX = {A} x ? x "?" A > id.FIXITY = infixl 0 > ``` > > Contrary to your intuition "?" is not a thing in its own right, but > simply a terminal symbol in > the parsing rule for id. > > / Ulf > > > On Sat, Nov 4, 2017 at 8:44 AM, Martin Escardo > wrote: > > Thanks for you answer, Ulf. > > On 04/11/17 06:33, ulf.norell at gmail.com > wrote: > > > On Fri, Nov 3, 2017 at 11:37 PM, Martin Escardo > > >> wrote: > > ? ? Can I say some things about Agda's syntax declaration? > > ? ? * Why are the definitions backwards (what you define is in the > ? ? right-hand side)? > > > They're not. You are defining the syntax for a particular name > in the same way that > you define the value of a particular name (`syntax f x = bla` vs > `f x = bla`). If syntax > declarations were the other way around you would be very > surprised to find that you > can't have multiple syntax declarations for the same name (which > you can't). > > > I don't understand this remark. Consider again > > ``` > id : {A : Type} ? A ? A > id {A} x = x > > syntax id {A} x = x ? A > > infixl 0 id > ``` > > In the syntax definition, I have *already* define id (occurring in > the left-hand side), and the new thing I am *defining* in the syntax > declaration is ":", which occurs in the *right*-hand side. > > At first I tried to define ":" to be left-associative, but this > didn't work. Then cheating from other people's examples I realized > that one is expected to define `id` to be left-associative. I didn't > answer the question myself as you suggest: I still don't know what > it means for id to be left-associative. :-) The above works and is > useful, but I don't understand it. > > Best, > Martin > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From ulf.norell at gmail.com Mon Nov 6 11:09:48 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 6 Nov 2017 11:09:48 +0100 Subject: [Agda] Agda's syntax declaration In-Reply-To: <57426ece-d13c-cc2a-76eb-b1ea03fbe7b3@chalmers.se> References: <57426ece-d13c-cc2a-76eb-b1ea03fbe7b3@chalmers.se> Message-ID: On Mon, Nov 6, 2017 at 10:08 AM, Andreas Abel wrote: > I must say I am with Martin on this. I never understood why the syntax > declarations are backwards. The usual mathematical style is that you > introduce a notation and what it expands to. It is the notation which is > the new thing and whose meaning is defined in terms of things understood > before, and the defined thing is commonly on the left hand side of the =. > > And Ulf, your explanation is very implementation-centric. Indeed, my explanation was of what's actually implemented in Agda at the moment. One can certainly imagine other syntax extension mechanisms that may or may not be easier to grasp for a user. I'm still not sure why the "parsing rule" intuition doesn't work for you. No one writes grammars with the new syntax in the left-hand side. / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From fhi.1990 at gmail.com Fri Nov 10 16:51:27 2017 From: fhi.1990 at gmail.com (=?UTF-8?Q?Frederik_Hangh=C3=B8j_Iversen?=) Date: Fri, 10 Nov 2017 16:51:27 +0100 Subject: [Agda] Installing libraries Message-ID: I'm reading up on library management in Agda[1]. From what I gather it is not possible to install a certain library to be used in a specific project. Is this correct? What I'm hoping for is the possibility to put something like the following in my .agda-lib file: name: my-project depend: funky-dep include: src libs: path-to-funky-dep Where funky-dep is some dependencies I don't want to make available to all agda projects on my machine, but rather just for the purpose of developing "my-project". Is this is possible it would also make it a lot easier to share code with other people. That way you can package your code along with all it's dependencies and you don't need the recipient to make changes to their global configuration. The way I understand it, at the moment it's only possible to add path-to-funky-dep to $AGDA_DIR/libraries (as per [1]). [1]: http://agda.readthedocs.io/en/v2.5.2/tools/package-system.html?highlight=agda-lib#installing-libraries -- Regards *Frederik Hangh?j Iversen* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Fri Nov 10 19:24:41 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 10 Nov 2017 19:24:41 +0100 Subject: [Agda] Installing libraries In-Reply-To: References: Message-ID: One possibility might be to add support for local 'libraries' files. That way you could distribute your project together with a special libraries file for the funky dependencies, without cluttering the agda-lib file with explicit paths. / Ulf On Fri, Nov 10, 2017 at 4:51 PM, Frederik Hangh?j Iversen < fhi.1990 at gmail.com> wrote: > I'm reading up on library management in Agda[1]. From what I gather it is > not possible to install a certain library to be used in a specific project. > Is this correct? > > What I'm hoping for is the possibility to put something like the following > in my .agda-lib file: > > name: my-project > depend: > funky-dep > include: > src > libs: > path-to-funky-dep > > Where funky-dep is some dependencies I don't want to make available to all > agda projects on my machine, but rather just for the purpose of developing > "my-project". > > Is this is possible it would also make it a lot easier to share code with > other people. That way you can package your code along with all it's > dependencies and you don't need the recipient to make changes to their > global configuration. > > The way I understand it, at the moment it's only possible to add > path-to-funky-dep to $AGDA_DIR/libraries (as per [1]). > > [1]: http://agda.readthedocs.io/en/v2.5.2/tools/package- > system.html?highlight=agda-lib#installing-libraries > > -- > Regards > *Frederik Hangh?j Iversen* > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.rouvoet at gmail.com Sat Nov 11 12:24:27 2017 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Sat, 11 Nov 2017 12:24:27 +0100 Subject: [Agda] Installing libraries In-Reply-To: References: Message-ID: <5eb08508-32c3-9874-15c2-91ca069b4115@gmail.com> At some point I was looking for similar functionality, but am very content now using git sub-modules for tracking specific versions of "funky" dependencies in the project repository. Assuming you are using git and that your dependencies are tracked in git, this makes it very easy to pull in the correct versions and instead of using the 'depend' key in your .agda-lib file, you use the project-root relative include paths. For an example see the following .agda-lib file and makefile in this repository [1]. The makefile is set up to do all the work for you when you run `make`. [1]: https://github.com/metaborg/mj.agda/ Cheers, Arjen On 11/10/2017 07:24 PM, Ulf Norell wrote: > One possibility might be to add support for local 'libraries' files. > That way you could distribute > your project together with a special libraries file for the funky > dependencies, without cluttering > the agda-lib file with explicit paths. > > / Ulf > > On Fri, Nov 10, 2017 at 4:51 PM, Frederik Hangh?j Iversen > > wrote: > > I'm reading up on library management in Agda[1]. From what I > gather it is not possible to install a certain library to be used > in a specific project. Is this correct? > > What I'm hoping for is the possibility to put something like the > following in my .agda-lib file: > > name: my-project > depend: > ? funky-dep > include: > ? src > libs: > ? path-to-funky-dep > > Where funky-dep is some dependencies I don't want to make > available to all agda projects on my machine, but rather just for > the purpose of developing "my-project". > > Is this is possible it would also make it a lot easier to share > code with other people. That way you can package your code along > with all it's dependencies and you don't need the recipient to > make changes to their global configuration. > > The way I understand it, at the moment it's only possible to add > path-to-funky-dep to $AGDA_DIR/libraries (as per [1]). > > [1]: > http://agda.readthedocs.io/en/v2.5.2/tools/package-system.html?highlight=agda-lib#installing-libraries > > > -- > Regards > /Frederik Hangh?j Iversen/ > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Nov 13 15:15:54 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 13 Nov 2017 15:15:54 +0100 Subject: [Agda] Installing libraries In-Reply-To: References: Message-ID: <0f03bd01-7370-4517-4d63-bcf9e2758936@cse.gu.se> On 2017-11-10 19:24, Ulf Norell wrote: > One possibility might be to add support for local 'libraries' files. That way you could distribute > your project together with a special libraries file for the funky dependencies, without cluttering > the agda-lib file with explicit paths. One can already give the path to the library file on the command line. However, I think the paths in that file have to be absolute. Perhaps they could also be allowed to be relative to the location of the file. -- /NAD From anthony-cantor at uiowa.edu Tue Nov 14 19:18:38 2017 From: anthony-cantor at uiowa.edu (Anthony Cantor) Date: Tue, 14 Nov 2017 12:18:38 -0600 Subject: [Agda] How do I check whether an agda term associated with a specific name relies on hole? Message-ID: <1510683518.2042.2.camel@uiowa.edu> Hi, I'm hoping somebody can help me with my Agda question on stack overflow. https://stackoverflow.com/questions/47193486/how-do-i-check-whether-an- agda-term-associated-with-a-specific-name-relies-on-ho?noredirect=1 If anybody has any insight on my issue, especially any knowledge about whether the reflection library can normalize a term past a rewrite, please let me know (either by email or on stack overflow). The text of the SO question [1] is copied inline below for convenience. Thanks for any help anybody can provide! [1] For the purpose of a script I would like to query the agda compiler about the definition of a function in an agda source file. I would like to ask the question: does the function named by **X** rely on a hole, or not? (i.e. is it a "completed proof", or is it a "proof in progress"). Where **X** is the name of the function in the source file. For example, take the following example source file: ????open import Relation.Binary.PropositionalEquality ???? ????postulate ??????A : Set ??????x : A ??????y : A ??????z : A?? ??????q1 : x ? y ??????q2 : y ? z ???? ????pf1 : x ? z ????pf1 = trans q1 q2? ???? ????pf2 : z ? x ????pf2 rewrite q1 | q2 = refl I would like to be able to determine (in my script), does `pf2` rely on any holes? In this case the answer is no. Alternatively, suppose that file were something like: ????open import Relation.Binary.PropositionalEquality ???? ????postulate ??????A : Set ??????x : A ??????y : A ??????z : A?? ??????q1 : x ? y ??????q2 : y ? z ???? ????pf1 : x ? z ????pf1 = trans q1 q2? ????lemma1 : z ? y ????lemma1 = {!!} ????pf2 : z ? x ????pf2 rewrite q1 = lemma1 Now the answer to the question posed above is "yes": `pf2` is incomplete because it relies on a hole (indirectly, through lemma1). I know that I can find out the answer to the question: are there **any** functions in this agda source file that rely on holes. When we run the agda compiler on a source file, the return status will be 1 if there are "unsolved interaction metas", and the status will be 0 if everything is completed. However I would like to know the granular information of whether a **particular** function (by name) within a source file has "unsolved interaction metas". Is there any way to do this? I looked through the source code for the interaction mode of agda (the interface used by the agda-mode emacs code), but it seems most of the commands defined for the interaction mode rely on character ranges rather than symbols, so I haven't found a way to get this information from interaction mode. EDIT: based on user3237465's comment, I looked into using reflection to solve this issue. It seems like it could work but there is an issue with rewrites. For example, suppose we have the following file loaded in emacs: ????open import Relation.Binary.PropositionalEquality ????open import Agda.Builtin.Reflection ???? ????postulate ??????A : Set ??????x : A ??????y : A ??????z : A?? ??????q1 : x ? y ??????q2 : y ? z ???? ????pf1 : x ? z ????pf1 = trans q1 q2? ???? ????lemma1 : z ? y ????lemma1 = {!!} ???? ????pf2 : z ? x ????pf2 rewrite q1 = lemma1 ???? ????pf3 : z ? x ????pf3 = trans lemma1 (sym q1) ???? ????-- user3237465 suggested this macro. ????-- unfortunately, normalizing `test` ????-- using this macro still doesn't show ????-- information about the contents of ????-- lemma1 ????macro ??????actualQuote : Term -> Term -> TC _ ??????actualQuote term hole = ????????bindTC (normalise term) ? nterm -> ????????bindTC (quoteTC nterm) (unify hole) ???? ????test = actualQuote pf2 ????test2 = actualQuote pf3 ????test3 = actualQuote pf1 If I type C-c C-n and enter `quoteTC pf3`, it outputs `quoteTC (trans ?0 (sym q1))`. This is what I wanted because it indicates that a the proof depends on a hole. On the other hand, if I type C-c C-n and enter `quoteTC pf2`, it outputs `quoteTC (pf2 | x | q1)`. So it appears that the normalization process can't see past a rewrite. Does anyone know if there is a way around this? EDIT2: the normalization of pf2 using user3237465's macro is: ????def (quote .test4.rewrite-20) ????(arg (arg-info visible relevant) ?????(def (quote x) .Agda.Builtin.List.List.[]) ?????.Agda.Builtin.List.List.? ?????arg (arg-info visible relevant) ?????(def (quote q1) .Agda.Builtin.List.List.[]) ?????.Agda.Builtin.List.List.? .Agda.Builtin.List.List.[]) From ulf.norell at gmail.com Tue Nov 14 23:12:46 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 14 Nov 2017 23:12:46 +0100 Subject: [Agda] How do I check whether an agda term associated with a specific name relies on hole? In-Reply-To: <1510683518.2042.2.camel@uiowa.edu> References: <1510683518.2042.2.camel@uiowa.edu> Message-ID: My answer on SO: https://stackoverflow.com/a/47295996/1802306 / Ulf On Tue, Nov 14, 2017 at 7:18 PM, Anthony Cantor wrote: > Hi, I'm hoping somebody can help me with my Agda question on stack > overflow. > > https://stackoverflow.com/questions/47193486/how-do-i-check-whether-an- > agda-term-associated-with-a-specific-name-relies-on-ho?noredirect=1 > > If anybody has any insight on my issue, especially any knowledge about > whether the reflection library can normalize a term past a rewrite, > please let me know (either by email or on stack overflow). The text of > the SO question [1] is copied inline below for convenience. > > Thanks for any help anybody can provide! > > [1] > For the purpose of a script I would like to query the agda compiler > about the definition of a function in an agda source file. I would like > to ask the question: does the function named by **X** rely on a hole, > or not? (i.e. is it a "completed proof", or is it a "proof in > progress"). Where **X** is the name of the function in the source file. > > For example, take the following example source file: > > open import Relation.Binary.PropositionalEquality > > postulate > A : Set > x : A > y : A > z : A > q1 : x ? y > q2 : y ? z > > pf1 : x ? z > pf1 = trans q1 q2 > > pf2 : z ? x > pf2 rewrite q1 | q2 = refl > > I would like to be able to determine (in my script), does `pf2` rely on > any holes? In this case the answer is no. > > Alternatively, suppose that file were something like: > > open import Relation.Binary.PropositionalEquality > > postulate > A : Set > x : A > y : A > z : A > q1 : x ? y > q2 : y ? z > > pf1 : x ? z > pf1 = trans q1 q2 > > lemma1 : z ? y > lemma1 = {!!} > > pf2 : z ? x > pf2 rewrite q1 = lemma1 > Now the answer to the question posed above is "yes": `pf2` is > incomplete because it relies on a hole (indirectly, through lemma1). > > I know that I can find out the answer to the question: are there > **any** functions in this agda source file that rely on holes. When we > run the agda compiler on a source file, the return status will be 1 if > there are "unsolved interaction metas", and the status will be 0 if > everything is completed. However I would like to know the granular > information of whether a **particular** function (by name) within a > source file has "unsolved interaction metas". > > Is there any way to do this? > > I looked through the source code for the interaction mode of agda (the > interface used by the agda-mode emacs code), but it seems most of the > commands defined for the interaction mode rely on character ranges > rather than symbols, so I haven't found a way to get this information > from interaction mode. > > EDIT: based on user3237465's comment, I looked into using reflection to > solve this issue. It seems like it could work but there is an issue > with rewrites. For example, suppose we have the following file loaded > in emacs: > > open import Relation.Binary.PropositionalEquality > open import Agda.Builtin.Reflection > > postulate > A : Set > x : A > y : A > z : A > q1 : x ? y > q2 : y ? z > > pf1 : x ? z > pf1 = trans q1 q2 > > lemma1 : z ? y > lemma1 = {!!} > > pf2 : z ? x > pf2 rewrite q1 = lemma1 > > pf3 : z ? x > pf3 = trans lemma1 (sym q1) > > -- user3237465 suggested this macro. > -- unfortunately, normalizing `test` > -- using this macro still doesn't show > -- information about the contents of > -- lemma1 > macro > actualQuote : Term -> Term -> TC _ > actualQuote term hole = > bindTC (normalise term) ? nterm -> > bindTC (quoteTC nterm) (unify hole) > > test = actualQuote pf2 > test2 = actualQuote pf3 > test3 = actualQuote pf1 > > > If I type C-c C-n and enter `quoteTC pf3`, it outputs `quoteTC (trans > ?0 (sym q1))`. This is what I wanted because it indicates that a the > proof depends on a hole. > > On the other hand, if I type C-c C-n and enter `quoteTC pf2`, it > outputs `quoteTC (pf2 | x | q1)`. So it appears that the normalization > process can't see past a rewrite. > > Does anyone know if there is a way around this? > > EDIT2: the normalization of pf2 using user3237465's macro is: > > def (quote .test4.rewrite-20) > (arg (arg-info visible relevant) > (def (quote x) .Agda.Builtin.List.List.[]) > .Agda.Builtin.List.List.? > arg (arg-info visible relevant) > (def (quote q1) .Agda.Builtin.List.List.[]) > .Agda.Builtin.List.List.? .Agda.Builtin.List.List.[]) > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bove at chalmers.se Wed Nov 15 10:51:43 2017 From: bove at chalmers.se (Ana Bove) Date: Wed, 15 Nov 2017 10:51:43 +0100 Subject: [Agda] LFMTP'18 Call for Papers Message-ID: [Apologies if you receive multiple copies of this announcement] ======================================================================= Call for papers Logical Frameworks and Meta-Languages: Theory and Practice LFMTP 2018 Oxford, UK, 7 July 2018 Affiliated with FSCD 2018 (part of FLoC) http://lfmtp.org/workshops/2018/ ======================================================================= SUBMISSION DEADLINE: 16 APRIL 2018 Logical frameworks and meta-languages form a common substrate for representing, implementing and reasoning about a wide variety of deductive systems of interest in logic and computer science. Their design, implementation and their use in reasoning tasks, ranging from the correctness of software to the properties of formal systems, have been the focus of considerable research over the last two decades. This workshop will bring together designers, implementors and practitioners to discuss various aspects impinging on the structure and utility of logical frameworks, including the treatment of variable binding, inductive and co-inductive reasoning techniques and the expressiveness and lucidity of the reasoning process. LFMTP 2018 will provide researchers a forum to present state-of-the-art techniques and discuss progress in areas such as the following: * Encoding and reasoning about the meta-theory of programming languages, logical systems and related formally specified systems. * Theoretical and practical issues concerning the treatment of variable binding, especially the representation of, and reasoning about, datatypes defined from binding signatures. * Logical treatments of inductive and co-inductive definitions and associated reasoning techniques, including inductive types of higher dimension in homotopy type theory. * Graphical languages for building proofs, applications in geometry, equational reasoning and category theory. * New theory contributions: canonical and substructural frameworks, contextual frameworks, proof-theoretic foundations supporting binders, functional programming over logical frameworks, homotopy and cubical type theory. * Applications of logical frameworks: proof-carrying architectures, proof exchange and transformation, program refactoring, etc. * Techniques for programming with binders in functional programming languages such as Haskell, OCaml or Agda, and logic programming languages such as lambda Prolog or Alpha-Prolog. Invited Speakers TBA Important Dates Abstract submission deadline: Monday April 9th Submission deadline: Monday April 16th Notification to authors: Monday May 14th Final version due: Monday June 4th Workshop date: Saturday July 7th Submission In addition to regular papers, we accept the submission of "work in progress" reports, in a broad sense. Those do not need to report fully polished research results, but should be of interest for the community at large. Submitted papers should be in PDF, formatted using the EPTCS style guidelines. The length is restricted to 15 pages for regular papers and 8 pages for "Work in Progress" papers. Submission is via EasyChair: https://easychair.org/conferences/?conf=lfmtp18. Proceedings Accepted regular papers will be included in the proceedings of LMFTP 2018, whose mode of publication will be determined shortly. Program Committee * Mar?a Alpuente (Universitat Polit?cnica de Val?ncia, Spain) * Andrej Bauer (University of Ljubljana, Slovenia) * Fr?d?ric Blanqui (Inria, France), co-chair * Ana Bove (Chalmers University of Technology, Sweden) * St?phane Graham-Lengrand (CNRS, France) * Makoto Hamana (Gunma University, Japan) * Chantal Keller (Universit? Paris-Sud, France) * Carlos Olarte (Universidade Federal do Rio grande do Norte, Brazil) * Giselle Reis (CMU Qatar), co-chair * Aaron Stump (University of Iowa, USA) * Yuting Wang (Yale University, USA) From dominique.devriese at cs.kuleuven.be Fri Nov 17 09:05:52 2017 From: dominique.devriese at cs.kuleuven.be (Dominique Devriese) Date: Fri, 17 Nov 2017 08:05:52 +0000 Subject: [Agda] Call for Participation for Secure Compilation Workshop (PriSC @ POPL'18) Message-ID: Quick updates (more details in the Call for Participation below): - Do not miss the chance to submit short talks on your cutting-edge research until 14 December 2017, AoE https://popl18.sigplan.org/track/prisc-2018#Call-for-Short-Talks - POPL/PriSC registration is open; early rate ends on 10 December 2017 - List of accepted PriSC presentations: https://popl18.sigplan.org/track/prisc-2018#event-overview - The PriSC invited talk will be given by Mathias Payer (Purdue University) on Challenges For Compiler-backed Security: From Sanitizer to Mitigation ============================================= Call for Participation for Secure Compilation Workshop (PriSC @ POPL'18) ============================================= Secure compilation is an emerging field that puts together advances in programming languages, security, verification, systems, compilers, and hardware architectures in order to devise secure compiler chains that eliminate many of today's low-level vulnerabilities. Secure compilation aims to protect high-level language abstractions in compiled code, even against adversarial low-level contexts, and to allow sound reasoning about security in the source language. The emerging secure compilation community aims to achieve this by: identifying and formalizing properties that secure compilers must possess; devising efficient enforcement mechanisms; and developing effective verification and proof techniques. ======================================= 2nd Workshop on Principles of Secure Compilation (PriSC 2018) ======================================= The Workshop on Principles of Secure Compilation (PriSC) is a new informal 1-day workshop without any proceedings. The goal is to identify interesting research directions and open challenges and to bring together researchers interested in secure compilation. The 2nd PriSC edition will be held on Saturday, 13 January 2018, in Los Angeles, together with the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). More information at http://popl18.sigplan.org/track/prisc-2018 ========== Important Dates ========== POPL early registration deadline: 10 December 2017 Short talk submission deadline: 14 December 2017, AoE Short talk notification: 18 December 2017 PriSC Workshop takes place: 13 January 2018 Do not miss the chance to submit short talks on your cutting-edge research. More information below. ======== Invited Talk ======== Challenges For Compiler-backed Security: From Sanitizer to Mitigation. Mathias Payer (Purdue University, https://nebelwelt.net/) =============== Accepted Presentations =============== Building Secure SGX Enclaves using F*, C/C++ and X64. Anitha Gollamudi, C?dric Fournet. Constant-time WebAssembly. John Renner, Sunjay Cauligi, Deian Stefan. Enforcing Well-bracketed Control Flow and Stack Encapsulation using Linear Capabilities. Lau Skorstengaard, Dominique Devriese, Lars Birkedal Formally Secure Compilation of Unsafe Low-Level Components. Guglielmo Fachini, Catalin Hritcu, Marco Stronati, Ana Nora Evans, Th?o Laurent, Arthur Azevedo de Amorim, Benjamin C. Pierce, Andrew Tolmach Linear capabilities for modular fully-abstract compilation of verified code. Thomas Van Strydonck, Dominique Devriese, Frank Piessens. On Compositional Compiler Correctness and Fully Abstract Compilation. Daniel Patterson, Amal Ahmed. Per-Thread Compositional Compilation for Confidentiality-Preserving Concurrent Programs. Robert Sison. Robust Hyperproperty Preservation for Secure Compilation. Deepak Garg, Catalin Hritcu, Marco Patrignani, Marco Stronati, David Swasey. Secure Compilation in a Production Environment. Vijay D'Silva. Type-Theoretic Galois Connections. Pierre-Evariste Dagand, Nicolas Tabareau, ?ric Tanter =================== Participation and Registration =================== PriSC will be held on Saturday, 13 Jan 2018 at the POPL'18 venue (Omni Hotel LA). To participate, please register through the POPL registration system: https://popl18.sigplan.org/attending/Registration POPL early registration rate ends on 10 December 2017. ============ Call for Short Talks ============ We also have a short talks session, where participants get 5 minutes to present intriguing ideas, advertise ongoing work, etc. Anyone interested in giving a short 5-minute talk should submit an abstract. Any topic that could be of interest to the emerging secure compilation community is in scope. Presentations that provide a useful outside view or challenge the community are also welcome. Topics of interest include but are **not** limited to: - attacker models for secure compiler chains - secure compilation properties: full abstraction, memory safety, control-flow integrity, preserving non-interference or (hyper-)properties against adversarial contexts, secure multi-language interoperability - enforcement mechanisms: static checking, program verification, reference monitoring, program rewriting, software fault isolation, system-level protection, secure hardware, crypto, randomization - experimental evaluation and applications of secure compilation - proof methods: (bi)simulation, logical relations, game semantics, multi-language semantics, embedded interpreters - formal verification of secure compilation chain (protection mechanisms, compilers, linkers, loaders), machine-checked proofs, translation validation, property-based testing ============================ Guidelines for Submitting Short Talk Abstracts ============================ Abstracts should be submitted in text format and are not anonymous Giving a talk at the workshop does not preclude publication elsewhere. Please submit your abstracts at https://prisc18short.hotcrp.com ============= Program Committee ============= Program Chair Catalin Hritcu Inria Paris Members Amal Ahmed Inria Paris and Northeastern University Lars Birkedal Aarhus University Dominique Devriese KU Leuven C?dric Fournet Microsoft Research Deepak Garg MPI-SWS Xavier Leroy Inria Paris David Naumann Stevens Institute of Technology Marco Patrignani MPI-SWS Frank Piessens KU Leuven Tamara Rezk Inria Sophia Antipolis Nikhil Swamy Microsoft Research =============== Organizing Committee =============== Amal Ahmed Inria Paris and Northeastern University Dominique Devriese KU Leuven Deepak Garg MPI-SWS Catalin Hritcu Inria Paris Marco Patrignani MPI-SWS Tamara Rezk Inria Sophia Antipolis =================== Contact and More Information =================== More information about PriSC 2018 can be found on the website: http://popl18.sigplan.org/track/prisc-2018 For questions please contact the Program Chair. To make sure you receive such announcements in the future please subscribe to the following low-traffic mailing list: https://lists.gforge.inria.fr/mailman/listinfo/prisc-announce -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Nov 20 16:47:13 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 20 Nov 2017 18:47:13 +0300 Subject: [Agda] difficult termination Message-ID: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> Dear all, I am thinking of the practical termination proof possibility in Agda. In my current practice with computer algebra, all termination proofs are as follows. 1) Syntactic: the built-in rule of Agda when in each recursive call of the function some argument is syntactically smaller (in a certain "subterm" ordering) than in the current call. 2) By the counter. For example, for a certain recursively defined function f : Bin -> Bin, I prove termination by rewriting f as follows: f x = aux x (toNat x) ?-refl where aux : (x : Bin) -> (cnt : Nat) -> toNat x ? cnt -> Bin aux x cnt xN?cnt = ... When cnt is 0, it is derived from xN = toNat x ? cnt that x ? 0#, and this is the base of recursion. Otherwise the LHS is aux x (suc cnt) xN?cnt', and the recursive call is aux y cnt yN?cnt cnt is reduced by one, and y is so that xN ? yN ? 1 for yN = toNat y. So that the first argument is reduced at least by one, and yN ? cnt is derived from xN?cnt'. And this recursive call of aux proves termination for Agda. Probably, such proofs by the counter are possible only for primitively recursive functions. For example, for the above f, (toNat x) is the upper bound for the number of recursive calls of aux. Do I mistake? Further, the Ackermann's function ack : ? ? ? ? ? ack 0 m = suc m ack (suc n) 0 = ack n 1 ack (suc n) (suc m) = ack n (ack (suc n) m) is not primitively recursive. But Agda sees its termination by the syntactic comparison rule. Can anybody give a _simple_ example of a terminating algorithm which is difficult or impossible to write in Agda with providing termination proof for Agda ? Regards, ------ Sergei From mechvel at botik.ru Mon Nov 20 18:03:08 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 20 Nov 2017 20:03:08 +0300 Subject: [Agda] difficult termination In-Reply-To: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> References: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> Message-ID: <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> On Mon, 2017-11-20 at 18:47 +0300, Sergei Meshveliani wrote: > Dear all, > > I am thinking of the practical termination proof possibility in Agda. > > In my current practice with computer algebra, all termination proofs are > as follows. > > 1) Syntactic: the built-in rule of Agda when in each recursive call of > the function some argument is syntactically smaller (in a certain > "subterm" ordering) than in the current call. > > 2) By the counter. > [..] > Further, the Ackermann's function > > ack : ? ? ? ? ? > ack 0 m = suc m > ack (suc n) 0 = ack n 1 > ack (suc n) (suc m) = ack n (ack (suc n) m) > > is not primitively recursive. But Agda sees its termination by the > syntactic comparison rule. > > Can anybody give a _simple_ example of a terminating algorithm which > is difficult or impossible to write in Agda with providing termination > proof for Agda ? This can be finding by searching through of any n : ? satisfying some subtle property P. It needs to be known a non-constructive proof for ? \(n : ?) ? P n, but a bound for such x to be not known. I wonder what might be this example. Regards, ------ Sergei From nad at cse.gu.se Mon Nov 20 18:57:50 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 20 Nov 2017 18:57:50 +0100 Subject: [Agda] difficult termination In-Reply-To: <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> References: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> Message-ID: <141faf8f-f359-b082-b7bc-d9c2c50f5278@cse.gu.se> On 2017-11-20 18:03, Sergei Meshveliani wrote: > This can be finding by searching through of any n : ? satisfying > some subtle property P. > It needs to be known a non-constructive proof for ? \(n : ?) ? P n, > but a bound for such x to be not known. > I wonder what might be this example. It should not be possible to implement something with the following type in Agda (if it is, then that is a bug): (P : ? ? Set) ? (? n ? Dec (P n)) ? ? ? ? P ? ? P This is (one form of) Markov's principle. Here is one implementation that Agda rejects: markov : (P : ? ? Set) ? (? n ? Dec (P n)) ? ? ? ? P ? ? P markov P dec _ = search 0 where search : ? ? ? P search n with dec n ... | yes p = n , p ... | no _ = search (suc n) -- /NAD From mechvel at botik.ru Mon Nov 20 19:57:18 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 20 Nov 2017 21:57:18 +0300 Subject: [Agda] difficult termination In-Reply-To: <141faf8f-f359-b082-b7bc-d9c2c50f5278@cse.gu.se> References: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> <141faf8f-f359-b082-b7bc-d9c2c50f5278@cse.gu.se> Message-ID: <1511204238.3610.42.camel@one.mechvel.pereslavl.ru> On Mon, 2017-11-20 at 18:57 +0100, Nils Anders Danielsson wrote: > On 2017-11-20 18:03, Sergei Meshveliani wrote: > > This can be finding by searching through of any n : ? satisfying > > some subtle property P. > > It needs to be known a non-constructive proof for ? \(n : ?) ? P n, > > but a bound for such x to be not known. > > I wonder what might be this example. > > It should not be possible to implement something with the following type > in Agda (if it is, then that is a bug): > > (P : ? ? Set) ? (? n ? Dec (P n)) ? ? ? ? P ? ? P > > This is (one form of) Markov's principle. > > Here is one implementation that Agda rejects: > > markov : (P : ? ? Set) ? (? n ? Dec (P n)) ? ? ? ? P ? ? P > markov P dec _ = search 0 > where > search : ? ? ? P > search n with dec n > ... | yes p = n , p > ... | no _ = search (suc n) > Thank you. Yes, I thought of Markov's principle. It is good. But P is still rather arbitrary. It is desirable to have an example in which P is as concrete as possible. May be, some modification of Ackermann's function is possible. ------ Sergei From m.escardo at cs.bham.ac.uk Mon Nov 20 21:34:58 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 20 Nov 2017 20:34:58 +0000 Subject: [Agda] difficult termination In-Reply-To: <1511204238.3610.42.camel@one.mechvel.pereslavl.ru> References: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> <141faf8f-f359-b082-b7bc-d9c2c50f5278@cse.gu.se> <1511204238.3610.42.camel@one.mechvel.pereslavl.ru> Message-ID: On 20/11/17 18:57, mechvel at botik.ru wrote: > Thank you. > Yes, I thought of Markov's principle. > It is good. > But P is still rather arbitrary. > It is desirable to have an example in which P is as concrete > as possible. > May be, some modification of Ackermann's function is possible. It won't be so easy. You are asking questions about the proof theory of Agda / Martin-Lof Type Theory. If you don't have any universe (type "Set") or fancy inductive types (defining universes), the expressivity of the language is like that of Goedel's system T regarding what functions N->N you can defined (including, in particular, Ackermann's function, as you say). Once you start having universes Set1, Set2, Set3, ... you start increasing the amount of definable functions N->N. The termination checker by itself won't believe your definitions automatically, though, as you increase the universes you allow yourself to use. Instead, you will have to provide bonafide, rather subtle, means of definition by yourself. Also, there is another subtle point: the fact that you can't prove something like "for all ..., blah", doesn't mean that you will be able to come up with an example of a "..." such that "not blah". Martin From guillaume.brunerie at gmail.com Tue Nov 21 03:37:37 2017 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Mon, 20 Nov 2017 21:37:37 -0500 Subject: [Agda] Printing strings in the emacs mode Message-ID: Hi all, I?m using an Agda program to generate some Agda code. I?m not using reflection, I?m just using Agda as a regular functional programming language to generate strings, that I then want to copy-paste in a different file. For now, I didn?t bother with compilation, so I?m just defining terms of type String (from the standard library), and then I use C-c C-n in order to get their normal form. My problem is that in the result of C-c C-n, the string is surrounded by quotes, and the new lines are escaped as \n, which makes it a bit annoying to copy-paste, as I have to do a search and replace afterwards. Is there a way to use something like C-c C-n in order to get the normal form of a term of type String, but have it printed properly, without escaping the new lines and without the quotes before and after? Thanks, Best, Guillaume From ulf.norell at gmail.com Tue Nov 21 06:39:12 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 21 Nov 2017 06:39:12 +0100 Subject: [Agda] Printing strings in the emacs mode In-Reply-To: References: Message-ID: You can use C-u C-u C-c C-n. This normalises `show TERM` and prints the resulting string without quotes and escapes. It grabs whatever `show` happens to be in scope, so in your case you could define `show = id`. / Ulf On Tue, Nov 21, 2017 at 3:37 AM, Guillaume Brunerie < guillaume.brunerie at gmail.com> wrote: > Hi all, > > I?m using an Agda program to generate some Agda code. I?m not using > reflection, I?m just using Agda as a regular functional programming > language to generate strings, that I then want to copy-paste in a > different file. > > For now, I didn?t bother with compilation, so I?m just defining terms > of type String (from the standard library), and then I use C-c C-n in > order to get their normal form. > > My problem is that in the result of C-c C-n, the string is surrounded > by quotes, and the new lines are escaped as \n, which makes it a bit > annoying to copy-paste, as I have to do a search and replace > afterwards. > > Is there a way to use something like C-c C-n in order to get the > normal form of a term of type String, but have it printed properly, > without escaping the new lines and without the quotes before and > after? > > Thanks, > Best, > Guillaume > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Nov 21 12:16:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 21 Nov 2017 14:16:29 +0300 Subject: [Agda] difficult termination In-Reply-To: References: <1511192833.2922.63.camel@one.mechvel.pereslavl.ru> <1511197388.3428.3.camel@one.mechvel.pereslavl.ru> <141faf8f-f359-b082-b7bc-d9c2c50f5278@cse.gu.se> <1511204238.3610.42.camel@one.mechvel.pereslavl.ru> Message-ID: <1511262989.1023.18.camel@scico.botik.ru> On Mon, 2017-11-20 at 20:34 +0000, Martin Escardo wrote: > > On 20/11/17 18:57, mechvel at botik.ru wrote: > > Thank you. > > Yes, I thought of Markov's principle. > > It is good. > > But P is still rather arbitrary. > > It is desirable to have an example in which P is as concrete > > as possible. > > May be, some modification of Ackermann's function is possible. > > It won't be so easy. You are asking questions about the proof theory of > Agda / Martin-Lof Type Theory. > > If you don't have any universe (type "Set") or fancy inductive types > (defining universes), the expressivity of the language is like that of > Goedel's system T regarding what functions N->N you can defined > (including, in particular, Ackermann's function, as you say). > > Once you start having universes Set1, Set2, Set3, ... you start > increasing the amount of definable functions N->N. The termination > checker by itself won't believe your definitions automatically, though, > as you increase the universes you allow yourself to use. Instead, you > will have to provide bonafide, rather subtle, means of definition by > yourself. > > Also, there is another subtle point: the fact that you can't prove > something like "for all ..., blah", doesn't mean that you will be able > to come up with an example of a "..." such that "not blah". This can be some P for which \exists P is proved non-constructively and is very difficult to prove constructively. For example, Higman's lemma about a certain repetition existing in any infinite sequence of words. But Higman's lemma has a simple enough proof in Agda -- for the alphabet of two letters (see Sergei Romanenko's code). Probably general case is not much more complex. Primitive recursion is not enough for practical usage of Agda. But adding such a simple rule of termination as "argument being a proper subterm" seems to change the situation greatly. And I wonder -- how greatly. I continue programming computer algebra, and wonder: when there will encounter a practical method, for which I fail with termination proof. Regards, ------ Sergei From guillaume.brunerie at gmail.com Tue Nov 21 14:09:38 2017 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 21 Nov 2017 08:09:38 -0500 Subject: [Agda] Printing strings in the emacs mode In-Reply-To: References: Message-ID: Great, thanks, it works! I had tried C-u C-u C-c C-n already but with the `show` in Data.String, and somehow it printed even more escapes. But with `show = id`, it works, thanks! Guillaume On Tue, Nov 21, 2017 at 12:39 AM, Ulf Norell wrote: > You can use C-u C-u C-c C-n. This normalises `show TERM` and > prints the resulting string without quotes and escapes. It grabs > whatever `show` happens to be in scope, so in your case you could > define `show = id`. > > / Ulf > > On Tue, Nov 21, 2017 at 3:37 AM, Guillaume Brunerie > wrote: >> >> Hi all, >> >> I?m using an Agda program to generate some Agda code. I?m not using >> reflection, I?m just using Agda as a regular functional programming >> language to generate strings, that I then want to copy-paste in a >> different file. >> >> For now, I didn?t bother with compilation, so I?m just defining terms >> of type String (from the standard library), and then I use C-c C-n in >> order to get their normal form. >> >> My problem is that in the result of C-c C-n, the string is surrounded >> by quotes, and the new lines are escaped as \n, which makes it a bit >> annoying to copy-paste, as I have to do a search and replace >> afterwards. >> >> Is there a way to use something like C-c C-n in order to get the >> normal form of a term of type String, but have it printed properly, >> without escaping the new lines and without the quotes before and >> after? >> >> Thanks, >> Best, >> Guillaume >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > From andreas.abel at ifi.lmu.de Tue Nov 21 16:03:47 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 21 Nov 2017 16:03:47 +0100 Subject: [Agda] Printing strings in the emacs mode In-Reply-To: References: Message-ID: <6303bbdb-9b3d-cee1-f854-9d612f52006d@ifi.lmu.de> Just to remind the world, Haskell's "show" prints the *Haskell* representation of data. (Usually the AST.) Thus, extra escapes when showing strings. --Andreas, keeper of law and order On 21.11.2017 14:09, Guillaume Brunerie wrote: > Great, thanks, it works! > > I had tried C-u C-u C-c C-n already but with the `show` in > Data.String, and somehow it printed even more escapes. But with `show > = id`, it works, thanks! > > Guillaume > > On Tue, Nov 21, 2017 at 12:39 AM, Ulf Norell wrote: >> You can use C-u C-u C-c C-n. This normalises `show TERM` and >> prints the resulting string without quotes and escapes. It grabs >> whatever `show` happens to be in scope, so in your case you could >> define `show = id`. >> >> / Ulf >> >> On Tue, Nov 21, 2017 at 3:37 AM, Guillaume Brunerie >> wrote: >>> >>> Hi all, >>> >>> I?m using an Agda program to generate some Agda code. I?m not using >>> reflection, I?m just using Agda as a regular functional programming >>> language to generate strings, that I then want to copy-paste in a >>> different file. >>> >>> For now, I didn?t bother with compilation, so I?m just defining terms >>> of type String (from the standard library), and then I use C-c C-n in >>> order to get their normal form. >>> >>> My problem is that in the result of C-c C-n, the string is surrounded >>> by quotes, and the new lines are escaped as \n, which makes it a bit >>> annoying to copy-paste, as I have to do a search and replace >>> afterwards. >>> >>> Is there a way to use something like C-c C-n in order to get the >>> normal form of a term of type String, but have it printed properly, >>> without escaping the new lines and without the quotes before and >>> after? >>> >>> Thanks, >>> Best, >>> Guillaume >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From pepm.workshop at gmail.com Thu Nov 23 13:05:04 2017 From: pepm.workshop at gmail.com (PEPM Workshop) Date: Thu, 23 Nov 2017 21:05:04 +0900 Subject: [Agda] PEPM 2018 Call for Poster/Demo Abstracts and Participation Message-ID: -- Call for Poster/Demo Abstracts and Participation -- ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM) 2018 =============================================================================== * Website : http://popl18.sigplan.org/track/PEPM-2018 * Time : 8th ? 9th January 2018 * Place : Los Angeles, CA, US (co-located with POPL 2018) POSTER/DEMO SESSIONS: PEPM 2018 is accepting proposals for poster/demo presentations on a rolling basis, until 8th December (AoE). See below for the submission guidelines. Registration ------------ * Web page : https://popl18.sigplan.org/attending/Registration * Early registration deadline : 10th December 2017 Invited speakers ---------------- Alex Aiken (Stanford University) Conal Elliott (Target) Jan Midtgaard (University of Southern Denmark) Accepted papers --------------- * https://popl18.sigplan.org/track/PEPM-2018#event-overview A Guess-and-Assume Approach to Loop Fusion for Program Verification Akifumi Imanishi, Kohei Suenaga, and Atsushi Igarashi Checking Cryptographic API Usage with Composable Annotations (Short Paper) Duncan Mitchell, L. Thomas van Binsbergen, Blake Loring, and Johannes Kinder Gradually Typed Symbolic Expressions David Broman and Jeremy G. Siek On the Cost of Type-Tag Soundness Ben Greenman and Zeina migeed Partially Static Data as Free Extension of Algebras (Short Paper) Jeremy Yallop, Tamara von Glehn, and Ohad Kammar Program Generation for ML Modules (Short Paper) Takahisa Watanabe and Yukiyoshi Kameyama Recursive Programs in Normal Form (Short Paper) Barry Jay Selective CPS Transformation for Shift and Reset Kenichi Asai and Chihiro Uehara Poster/demo abstract submission guideline ----------------------------------------- * https://popl18.sigplan.org/track/PEPM-2018#Call-for-Poster-Demo-Abstracts To maintain PEPM?s dynamic and interactive nature, PEPM 2018 will continue to have special sessions for poster/demo presentations. In addition to the main interactive poster/demo session, there will also be a scheduled short-talk session where each poster/demo can be advertised to the audience in, say, 5?10 minutes. Poster/demo abstracts should describe work relevant to PEPM (whose scope is detailed below), typeset as a one-page PDF using the two-column ?sigplan? sub-format of the new ?acmart? format available at: http://sigplan.org/Resources/Author/ and sent by email to the programme co-chairs, Fritz Henglein and Josh Ko, at: henglein at diku.dk, hsiang-shang at nii.ac.jp Please also include in the email: * a short summary of the abstract (in plain text), * the type(s) of proposed presentation (poster and/or demo), and * whether you would like to give a scheduled short talk (in addition to the poster/demo presentation). Abstracts should be sent no later than: Friday, 8th December 2017, anywhere on earth and will be considered for acceptance on a rolling basis. Accepted abstracts, along with their short summary, will be posted on PEPM 2018?s website. At least one author of each accepted abstract must attend the workshop and present the work during the poster/demo session. Student participants with accepted posters/demos can apply for a SIGPLAN PAC grant to help cover travel expenses and other support. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC programme, see its web page. Scope ----- In addition to the traditional PEPM topics (see below), PEPM 2018 welcomes submissions in new domains, in particular: * Semantics based and machine-learning based program synthesis and program optimisation. * Modelling, analysis, and transformation techniques for distributed and concurrent protocols and programs, such as session types, linear types, and contract specifications. More generally, topics of interest for PEPM 2018 include, but are not limited to: * Program and model manipulation techniques such as: supercompilation, partial evaluation, fusion, on-the-fly program adaptation, active libraries, program inversion, slicing, symbolic execution, refactoring, decompilation, and obfuscation. * Techniques that treat programs/models as data objects including metaprogramming, generative programming, embedded domain-specific languages, program synthesis by sketching and inductive programming, staged computation, and model-driven program generation and transformation. * Program analysis techniques that are used to drive program/model manipulation such as: abstract interpretation, termination checking, binding-time analysis, constraint solving, type systems, automated testing and test case generation. * Application of the above techniques including case studies of program manipulation in real-world (industrial, open-source) projects and software development processes, descriptions of robust tools capable of effectively handling realistic applications, benchmarking. Examples of application domains include legacy program understanding and transformation, DSL implementations, visual languages and end-user programming, scientific computing, middleware frameworks and infrastructure needed for distributed and web-based applications, embedded and resource-limited computation, and security. This list of categories is not exhaustive, and we encourage submissions describing new theories and applications related to semantics-based program manipulation in general. If you have a question as to whether a potential submission is within the scope of the workshop, please contact the programme co-chairs, Fritz Henglein and Josh Ko (henglein at diku.dk, hsiang-shang at nii.ac.jp). From a.g.setzer at swansea.ac.uk Thu Nov 23 22:02:19 2017 From: a.g.setzer at swansea.ac.uk (Setzer A.G.) Date: Thu, 23 Nov 2017 21:02:19 +0000 Subject: [Agda] Printing strings in the emacs mode In-Reply-To: References: Message-ID: <93C88F3B5A59424B85B9E392D781F7C6025BCA53E8@ISS-MBX02.tawe.swan.ac.uk> If your output is actually a string, you could create an interactive program and let it print it out for you. The ooAgda library https://github.com/agda/ooAgda has in examples/consoleExamples currently three simple examples of console programs (more to come soon ...) See READMEconsolePrograms.txt Anton ________________________________________ From: Agda [agda-bounces at lists.chalmers.se] on behalf of Guillaume Brunerie [guillaume.brunerie at gmail.com] Sent: 21 November 2017 02:37 To: agda list Subject: [Agda] Printing strings in the emacs mode Hi all, I?m using an Agda program to generate some Agda code. I?m not using reflection, I?m just using Agda as a regular functional programming language to generate strings, that I then want to copy-paste in a different file. For now, I didn?t bother with compilation, so I?m just defining terms of type String (from the standard library), and then I use C-c C-n in order to get their normal form. My problem is that in the result of C-c C-n, the string is surrounded by quotes, and the new lines are escaped as \n, which makes it a bit annoying to copy-paste, as I have to do a search and replace afterwards. Is there a way to use something like C-c C-n in order to get the normal form of a term of type String, but have it printed properly, without escaping the new lines and without the quotes before and after? Thanks, Best, Guillaume _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda From m.escardo at cs.bham.ac.uk Fri Nov 24 22:48:08 2017 From: m.escardo at cs.bham.ac.uk (=?UTF-8?B?TWFydMOtbiBIw7Z0emVsIEVzY2FyZMOz?=) Date: Fri, 24 Nov 2017 21:48:08 +0000 Subject: [Agda] dotted patterns Message-ID: I was working at the University and had this to compile in my computer there, with 2.6.0: ``` yoneda-lemma : {X : U} {x : X} {A : PrShf X} (? : Nat (Hom x) A) ? yoneda-nat A (yoneda-elem A ?) ? ? yoneda-lemma {X} {x} {A} ? x (idp x) = idp (yoneda-elem A ?) ``` But this was an accident with very old code, in which I decided to make some implicit argument explicit, and I forgot add the required dots. At home, now, in another machine with Agda 2.6.0, it didn't compile. But I pulled the last version of Agda (2.6.0-3b39f0f) and it does compile with that. Are non-linear patterns a new feature? Or a bug. If they are a feature, what is their specified behaviour? Martin From abela at chalmers.se Sat Nov 25 11:53:22 2017 From: abela at chalmers.se (Andreas Abel) Date: Sat, 25 Nov 2017 11:53:22 +0100 Subject: [Agda] dotted patterns In-Reply-To: References: Message-ID: <3368039a-b437-d7cf-aa33-a405a4ec6fe5@chalmers.se> > Are non-linear patterns a new feature? Or a bug. If they are a feature, > what is their specified behaviour? Short answer: The plan is that in future versions of Agda (like the current development versions) you can drop the dots in front of variables. Agda will internally place the dots to preserve the linearity of the matching. You can still manually place the dots. --Andreas On 24.11.2017 22:48, Mart?n H?tzel Escard? wrote: > I was working at the University and had this to compile in my computer > there, with 2.6.0: > > ``` > yoneda-lemma : {X : U} {x : X} {A : PrShf X} (? : Nat (Hom x) A) > ???????????? ? yoneda-nat A (yoneda-elem A ?) ? ? > yoneda-lemma {X} {x} {A} ? x (idp x) = idp (yoneda-elem A ?) > ``` > But this was an accident with very old code, in which I decided to make > some implicit argument explicit, and I forgot add the required dots. > > At home, now, in another machine with Agda 2.6.0, it didn't compile. But > I pulled the last version of Agda (2.6.0-3b39f0f) and it does compile > with that. > > Are non-linear patterns a new feature? Or a bug. If they are a feature, > what is their specified behaviour? > > Martin > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From Jesper at sikanda.be Sat Nov 25 13:13:53 2017 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 25 Nov 2017 13:13:53 +0100 Subject: [Agda] dotted patterns In-Reply-To: <3368039a-b437-d7cf-aa33-a405a4ec6fe5@chalmers.se> References: <3368039a-b437-d7cf-aa33-a405a4ec6fe5@chalmers.se> Message-ID: To expand a little on that: the intended semantics is that in the new version of Agda you will be allowed to write `x` exactly where you would previously be allowed to write `.x`. In the current development version the implementation is still a bit too liberal and allows you to write `x` in place of any dot pattern `.t`, but this will be fixed before the next release. -- Jesper On Sat, Nov 25, 2017 at 11:53 AM, Andreas Abel wrote: > > Are non-linear patterns a new feature? Or a bug. If they are a feature, > > what is their specified behaviour? > > Short answer: The plan is that in future versions of Agda (like the > current development versions) you can drop the dots in front of variables. > Agda will internally place the dots to preserve the linearity of the > matching. You can still manually place the dots. > > --Andreas > > > On 24.11.2017 22:48, Mart?n H?tzel Escard? wrote: > >> I was working at the University and had this to compile in my computer >> there, with 2.6.0: >> >> ``` >> yoneda-lemma : {X : U} {x : X} {A : PrShf X} (? : Nat (Hom x) A) >> ? yoneda-nat A (yoneda-elem A ?) ? ? >> yoneda-lemma {X} {x} {A} ? x (idp x) = idp (yoneda-elem A ?) >> ``` >> But this was an accident with very old code, in which I decided to make >> some implicit argument explicit, and I forgot add the required dots. >> >> At home, now, in another machine with Agda 2.6.0, it didn't compile. But >> I pulled the last version of Agda (2.6.0-3b39f0f) and it does compile with >> that. >> >> Are non-linear patterns a new feature? Or a bug. If they are a feature, >> what is their specified behaviour? >> >> Martin >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Mon Nov 27 20:24:37 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 27 Nov 2017 22:24:37 +0300 Subject: [Agda] on `data' declaration Message-ID: <1511810677.2667.11.camel@one.mechvel.pereslavl.ru> People, consider the declaration like data Foo (c x y d : ?) : Set where let e = c + (y * y + y) foo1 : x < e ? Foo c x y d foo2 : x > e ? (x ? e + d) ? Foo c x y d foo3 : ... Agda rejects it. And the programmer is forced to set several times the expanded expression for e in several data constructors. I wrote private expr = \c y -> c + (y * y + y) data Foo (c x y d : ?) : Set where foo1 : x < expr c y ? Foo c x y d foo2 : x > expr c y ? (x ? (expr c y) + d) ? Foo c x y d foo3 : ... Can anybody, please, suggest any better way out? Thanks, ------ Sergei From ulf.norell at gmail.com Tue Nov 28 07:02:25 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 28 Nov 2017 07:02:25 +0100 Subject: [Agda] on `data' declaration In-Reply-To: <1511810677.2667.11.camel@one.mechvel.pereslavl.ru> References: <1511810677.2667.11.camel@one.mechvel.pereslavl.ru> Message-ID: module _ (c x y d : ?) where private e = c + (y * y + y) data Foo : Set where foo1 : x < e ? Foo foo2 : x > e ? (x ? e + d) ? Foo / Ulf On Mon, Nov 27, 2017 at 8:24 PM, Sergei Meshveliani wrote: > People, > > consider the declaration like > > data Foo (c x y d : ?) : Set > where > let e = c + (y * y + y) > > foo1 : x < e ? Foo c x y d > foo2 : x > e ? (x ? e + d) ? Foo c x y d > foo3 : ... > > > Agda rejects it. And the programmer is forced to set several times the > expanded expression for e in several data constructors. > > I wrote > > private expr = \c y -> c + (y * y + y) > > data Foo (c x y d : ?) : Set > where > foo1 : x < expr c y ? Foo c x y d > foo2 : x > expr c y ? (x ? (expr c y) + d) ? Foo c x y d > foo3 : ... > > Can anybody, please, suggest any better way out? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Tue Nov 28 09:36:48 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 28 Nov 2017 11:36:48 +0300 Subject: [Agda] on `data' declaration In-Reply-To: References: <1511810677.2667.11.camel@one.mechvel.pereslavl.ru> Message-ID: <1511858208.2681.1.camel@one.mechvel.pereslavl.ru> Great! Thank you. -- SM On Tue, 2017-11-28 at 07:02 +0100, Ulf Norell wrote: > > module _ (c x y d : ?) where > private e = c + (y * y + y) > data Foo : Set where > foo1 : x < e ? Foo > foo2 : x > e ? (x ? e + d) ? Foo > > > / Ulf > > On Mon, Nov 27, 2017 at 8:24 PM, Sergei Meshveliani > wrote: > People, > > consider the declaration like > > data Foo (c x y d : ?) : Set > where > let e = c + (y * y + y) > > foo1 : x < e ? Foo c x y d > foo2 : x > e ? (x ? e + d) ? Foo c x y d > foo3 : ... > > > Agda rejects it. And the programmer is forced to set several > times the > expanded expression for e in several data constructors. > > I wrote > > private expr = \c y -> c + (y * y + y) > > data Foo (c x y d : ?) : Set > where > foo1 : x < expr c y ? Foo c x y d > foo2 : x > expr c y ? (x ? (expr c y) + d) ? Foo c x y d > foo3 : ... > > Can anybody, please, suggest any better way out? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From m.escardo at cs.bham.ac.uk Wed Nov 29 16:50:15 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Wed, 29 Nov 2017 15:50:15 +0000 Subject: [Agda] Universe level checking Message-ID: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> I am generalizing some old code by replacing `Set` with `Set ?` and using ctrl-C-S to fill such holes when possible. Am I right to think there is a problem with the following? ``` _?_ : {? ?' : Level} {X : Set ?} {Y : Set ?'} ? (X ? Y) ? (X ? Y) ? Set (? ? ?') f ? g = ? x ? f x ? g x retraction-section : {? ?' : Level} {X : Set ?} {Y : Set ?'} ? (X ? Y) ? (Y ? X) ? Set ?' retraction-section r s = r ? s ? id ``` I would have thought that the type of `retraction-section r s` should be `Set (? ? ?')` rather than ` Set ?'`. It shouldn't be possible to construct something in a small universe using ingredients from a large universe without the risk of paradox (but I haven't paused to try to exploit this to get a contradiction). Martin From andreas.abel at ifi.lmu.de Wed Nov 29 20:30:45 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 29 Nov 2017 20:30:45 +0100 Subject: [Agda] Universe level checking In-Reply-To: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> Message-ID: Hi Martin, completing your snipped with standard library imports, in particular open import Function for id and comp, I get the following error: Set .?' != Set (.? ? .?') when checking that the expression id has type .Y ? .X Is that the error you expected? The answer is uniform for all Agda versions > 2.5, I did not try 2.4. However, I can actually not get your code to type check at all. The correct type for retraction-section is: retraction-section : {? : Level} {X Y : Set ?} ? (r : X ? Y) ? (s : Y ? X) ? Set ? retraction-section r s = (r ? s) ? id with just a single level. Best, Andreas On 29.11.2017 16:50, Martin Escardo wrote: > I am generalizing some old code by replacing `Set` with `Set ?` and > using ctrl-C-S to fill such holes when possible. > > Am I right to think there is a problem with the following? > > ``` > _?_ : {? ?' : Level} {X : Set ?} {Y : Set ?'} > ??? ? (X ? Y) ? (X ? Y) ? Set (? ? ?') > f ? g = ? x ? f x ? g x > > retraction-section : {? ?' : Level} {X : Set ?} {Y : Set ?'} > ?????????????????? ? (X ? Y) ? (Y ? X) ? Set ?' > retraction-section r s = r ? s ? id > ``` > > I would have thought that the type of `retraction-section r s` should be > `Set (? ? ?')` rather than ` Set ?'`. > > It shouldn't be possible to construct something in a small universe > using ingredients from a large universe without the risk of paradox (but > I haven't paused to try to exploit this to get a contradiction). > > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From m.escardo at cs.bham.ac.uk Wed Nov 29 21:50:52 2017 From: m.escardo at cs.bham.ac.uk (=?UTF-8?B?TWFydMOtbiBIw7Z0emVsIEVzY2FyZMOz?=) Date: Wed, 29 Nov 2017 20:50:52 +0000 Subject: [Agda] Universe level checking In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> Message-ID: <4caf716f-d4e0-74f2-eb49-51f3a4a5b68e@cs.bham.ac.uk> Hi Andreas, Thanks for the discussion. My code compiles with 2.6.0-5135fd5 (in this machine now at home) and with 2.6.0-3b39f0f (in my office machine when I posted the message). I don't use the standard library, and all my files in this development have --without-K --exact-split --safe. On 29/11/17 19:30, andreas.abel at ifi.lmu.de wrote: > completing your snipped with standard library imports, in particular > > open import Function > > for id and comp, I get the following error: > > Set .?' != Set (.? ? .?') > when checking that the expression id has type .Y ? .X Perhaps you have a different definition of composition there (I don't know). Mine is _?_ : {? ?' ?'' : Level} {X : Set ?} {Y : Set ?'} {Z : Y ? Set ?''} ? ((y : Y) ? Z y) ? (f : X ? Y) ? (x : X) ? Z(f x) g ? f = ? x ? g(f x) > Is that the error you expected? I don't get this error! I didn't expect any particular error. > The answer is uniform for all Agda versions > 2.5, I did not try 2.4. I think that, then, this must depend on the standard library. I am not using it, as I said. > However, I can actually not get your code to type check at all. The > correct type for retraction-section is: > > retraction-section : {? : Level} {X Y : Set ?} > ? (r : X ? Y) ? (s : Y ? X) ? Set ? > retraction-section r s = (r ? s) ? id > > with just a single level. I think it is perfectly fine for a large type to be a retract of a small type. The question was rather whether "being a retract of a large type" should be a small or large (Curry-Howard) proposition. I may include a link to the source code and its compiled html version if you wish, for inspection. But I would like to clarify that my question was not so much an Agda-specific one, but more of a philosophical one, thinking about what the right rendering of universes in a dependendent type theory `a la Martin-Loef is. Best, Martin > > Best, > Andreas > > On 29.11.2017 16:50, Martin Escardo wrote: >> I am generalizing some old code by replacing `Set` with `Set ?` and >> using ctrl-C-S to fill such holes when possible. >> >> Am I right to think there is a problem with the following? >> >> ``` >> _?_ : {? ?' : Level} {X : Set ?} {Y : Set ?'} >> ? (X ? Y) ? (X ? Y) ? Set (? ? ?') >> f ? g = ? x ? f x ? g x >> >> retraction-section : {? ?' : Level} {X : Set ?} {Y : Set ?'} >> ? (X ? Y) ? (Y ? X) ? Set ?' >> retraction-section r s = r ? s ? id >> ``` >> >> I would have thought that the type of `retraction-section r s` should >> be `Set (? ? ?')` rather than ` Set ?'`. >> >> It shouldn't be possible to construct something in a small universe >> using ingredients from a large universe without the risk of paradox >> (but I haven't paused to try to exploit this to get a contradiction). >> >> Martin >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > -- http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Wed Nov 29 22:07:11 2017 From: m.escardo at cs.bham.ac.uk (=?UTF-8?B?TWFydMOtbiBIw7Z0emVsIEVzY2FyZMOz?=) Date: Wed, 29 Nov 2017 21:07:11 +0000 Subject: [Agda] Universe level checking In-Reply-To: <4caf716f-d4e0-74f2-eb49-51f3a4a5b68e@cs.bham.ac.uk> References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <4caf716f-d4e0-74f2-eb49-51f3a4a5b68e@cs.bham.ac.uk> Message-ID: On 29/11/17 20:50, Mart?n H?tzel Escard? wrote: > On 29/11/17 19:30, andreas.abel at ifi.lmu.de wrote: >> completing your snipped with standard library imports, in particular >> >> ?? open import Function >> >> for id and comp, I get the following error: >> >> ?? Set .?' != Set (.? ? .?') >> ?? when checking that the expression id has type .Y ? .X So continuing the discussion from my previous message, I have created a version exhibiting what I said (it would be nice to see which Agda versions can compile it): http://www.cs.bham.ac.uk/~mhe/agda-discussion/all.zip The file in question (in its html rendering) is http://www.cs.bham.ac.uk/~mhe/agda-discussion/Equivalence.html where `retraction-section` is the second definition of the file. Martin > > Perhaps you have a different definition of composition there (I don't > know). Mine is > > _?_ : {? ?' ?'' : Level} {X : Set ?} {Y : Set ?'} {Z : Y ? Set ?''} > ??? ? ((y : Y) ? Z y) ? (f : X ? Y) ? (x : X) ? Z(f x) > g ? f = ? x ? g(f x) > >> Is that the error you expected? > > I don't get this error! I didn't expect any particular error. > >> The answer is uniform for all Agda versions > 2.5, I did not try 2.4. > > I think that, then, this must depend on the standard library. I am not > using it, as I said. > >> However, I can actually not get your code to type check at all.? The >> correct type for retraction-section is: >> >> ?? retraction-section : {?? : Level} {X Y : Set ?} >> ??????????????????? ? (r : X ? Y) ? (s : Y ? X) ? Set ? >> ?? retraction-section r s = (r ? s) ?? id >> >> with just a single level. > > I think it is perfectly fine for a large type to be a retract of a > small type. The question was rather whether "being a retract of a > large type" should be a small or large (Curry-Howard) proposition. > > I may include a link to the source code and its compiled html version > if you wish, for inspection. > > But I would like to clarify that my question was not so much an > Agda-specific one, but more of a philosophical one, thinking about > what the right rendering of universes in a dependendent type theory `a > la Martin-Loef is. > > Best, > Martin > >> >> Best, >> Andreas >> >> On 29.11.2017 16:50, Martin Escardo wrote: >>> I am generalizing some old code by replacing `Set` with `Set ?` and >>> using ctrl-C-S to fill such holes when possible. >>> >>> Am I right to think there is a problem with the following? >>> >>> ``` >>> _?_ : {? ?' : Level} {X : Set ?} {Y : Set ?'} >>> ???? ? (X ? Y) ? (X ? Y) ? Set (? ? ?') >>> f ? g = ? x ? f x ? g x >>> >>> retraction-section : {? ?' : Level} {X : Set ?} {Y : Set ?'} >>> ??????????????????? ? (X ? Y) ? (Y ? X) ? Set ?' >>> retraction-section r s = r ? s ? id >>> ``` >>> >>> I would have thought that the type of `retraction-section r s` should >>> be `Set (? ? ?')` rather than ` Set ?'`. >>> >>> It shouldn't be possible to construct something in a small universe >>> using ingredients from a large universe without the risk of paradox >>> (but I haven't paused to try to exploit this to get a contradiction). >>> >>> Martin >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> > -- http://www.cs.bham.ac.uk/~mhe From monnier at iro.umontreal.ca Thu Nov 30 03:16:44 2017 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Wed, 29 Nov 2017 21:16:44 -0500 Subject: [Agda] Universe level checking References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> Message-ID: > retraction-section : {? ?' : Level} {X : Set ?} {Y : Set ?'} > ? (X ? Y) ? (Y ? X) ? Set ?' > retraction-section r s = r ? s ? id [...] > I would have thought that the type of `retraction-section r s` should be > `Set (? ? ?')` rather than ` Set ?'`. `r ? s` has type `Y -> Y`, where `Y : Set ?'`, so `Y -> Y : Set ?'`. I don't see any reason for `?` to appear in there at all. It's perfectly OK for a function to return a value in a smaller universe than some of its arguments. It's the *type* of that function which will belong to a larger universe. E.g. (X ? Y) : Set (? ? ?') and (X ? Y) ? (Y ? X) ? Set ?' : Set (? ? (succ ?')) -- Stefan From mannyromero at mail.com Sat Dec 2 21:24:17 2017 From: mannyromero at mail.com (Manny Romero) Date: Sat, 2 Dec 2017 21:24:17 +0100 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> Message-ID: An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Sat Dec 2 21:30:32 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 2 Dec 2017 21:30:32 +0100 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> Message-ID: <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Manny, you need to upgrade to a newer version of Agda. The latest release is 2.5.3. > 7,12 : Parse error > constructor This is because Agda 2.4 does not know about the "instance" keyword. Alternatively, you could try to get an old version of Ulf's Prelude, the one he used for the OPLSS. I have no clue if this is possible, though. Best, Andreas On 02.12.2017 21:24, Manny Romero wrote: > I'm trying to follow the OPLSS 2014 Agda tutorial. As seen in the first > two minutes here ( https://www.youtube.com/watch?v=NrSW7YsneVg ), this > requires loading some files from agda-summer-school-OPLSS and > agda-prelude on this ( https://github.com/UlfNorell/agda-summer-school ) > website. > Despite not knowing anything about computers, I think I've somehow > managed to both download these files and tell emacs where to look for > them successfully. The problem is that I now get error messages for > Prelude files when I try to load Day1.agda. For instance, when I do so, > the main screen shows "module Prelude.Unit where" followed by the rest > of Unit.agda from the Prelude subdirectory > ----------------------- > > module Prelude.Unit where > open import Agda.Builtin.Unit public > record ?? {a} : Set a where > ? instance constructor tt > -- To keep changes from compat-2.4.0 to a minimum. > Unit = ? > pattern unit = tt > ------------------------- > and the screen below reads something like > ------------------------- > 7,12 :? Parse error > constructor > tt > -------------------------- > When I comment out the text of this file and save, an error message for > another Prelude file pops up. > What might I be doing wrong? Surely there isn't really something wrong > with all these files? Why might this be happening to me? > I have Linux Mint 18, Agda 2.4.2.5, Emacs 24.5.1. And again, I am > completely computer illiterate and it's a minor miracle I managed to get > this far! > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mannyromero at mail.com Sat Dec 2 22:11:15 2017 From: mannyromero at mail.com (Manny Romero) Date: Sat, 2 Dec 2017 22:11:15 +0100 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Sun Dec 3 00:01:06 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 Dec 2017 18:01:06 -0500 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: On 2 December 2017 at 16:11, Manny Romero wrote: > I am now attempting to use cabal to install the newest Agda. It keeps > failing because of different programs I have not installed yet, so that's > what I'm doing now. I am stuck at this point on one in particular, cpphs. > What happened is I initially installed one version, 1.19.3, using "sudo apt > install", but this was apparently not as new as the Agda 2.5 requires. > I was > able to use cabal to install the latest, cabal-1.20.8, but apparently this > does not affect what is found under usr/bin/cpphs. Nor can I use the "sudo > apt install cabal-1.20.8" at this point; it reports that it cannot find it. > What is going on here? It seems you installed two versions of cpphs: cpphs 1.19.3 in usr/bin/cpphs (v?a sudo apt install) and cpphs 1.20.8 in ~/.cabal/bin/cpphs (via cabal install) but you didn't add the directory ~/.cabal/bin to your path. Note: The directory ~/.cabal/bin should be the first one in your path. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mannyromero at mail.com Sun Dec 3 04:45:10 2017 From: mannyromero at mail.com (Manny Romero) Date: Sun, 3 Dec 2017 04:45:10 +0100 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Sun Dec 3 05:12:28 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 Dec 2017 23:12:28 -0500 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: It is weird that you have this problem after fixing the cpphs problem. If you installed Agda 2.4.2.5 from your distribution, please remove it. Which is the output of $ type agda ? On 2 December 2017 at 22:45, Manny Romero wrote: > Using this advice I was able to install the new version (or so it would > certainly appear): > > ---------- > > Configuring Agda-2.5.3... > Building Agda-2.5.3... > Installed Agda-2.5.3 > > ---------- > > ...but when I enter "Agda --version" > I still get 2.4.2.5 > > and the original tutorial problems, resulting from the earlier version, > persist as before. > > > (Also: I added this > > ---------- > > PATH=~/.cabal/bin:$PATH > export PATH > > ----------- > > to the end of my ~/.profile document, as suggested on the Internet. But it > doesn't change my path when I call up a fresh session. What did I do wrong? > > --Note: I don't think this problem is related to the first, because I was > checking the Agda version from within the same session with the altered path > that enabled me to finally install the 2.5 Agda in the first place.) > Sent: Saturday, December 02, 2017 at 6:01 PM > From: "Andr?s Sicard-Ram?rez" > To: "Manny Romero" > Cc: "Andreas Abel" , "Agda users" > > Subject: Re: [Agda] Trying to load modules from Norell OPLSS tutorial > On 2 December 2017 at 16:11, Manny Romero wrote: >> I am now attempting to use cabal to install the newest Agda. It keeps >> failing because of different programs I have not installed yet, so that's >> what I'm doing now. I am stuck at this point on one in particular, cpphs. >> What happened is I initially installed one version, 1.19.3, using "sudo >> apt >> install", but this was apparently not as new as the Agda 2.5 requires. >> I was >> able to use cabal to install the latest, cabal-1.20.8, but apparently this >> does not affect what is found under usr/bin/cpphs. Nor can I use the "sudo >> apt install cabal-1.20.8" at this point; it reports that it cannot find >> it. >> What is going on here? > > It seems you installed two versions of cpphs: > > cpphs 1.19.3 in usr/bin/cpphs (v?a sudo apt install) and > > cpphs 1.20.8 in ~/.cabal/bin/cpphs (via cabal install) > > but you didn't add the directory ~/.cabal/bin to your path. > > Note: The directory ~/.cabal/bin should be the first one in your path. > > -- > Andr?s > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente > a su destinatario y puede contener informaci?n confidencial, material > privilegiado o informaci?n protegida por derecho de autor. Est? prohibida > cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, > distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje > por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? > contenida es responsabilidad exclusiva de su remitente por lo tanto la > Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The > information contained in this email is addressed to its recipient only and > may contain confidential information, privileged material or information > protected by copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial reproduction. > If you receive this message by error, please contact the sender and delete > it. The information contained herein is the sole responsibility of the > sender therefore Universidad EAFIT is not responsible for what the message > contains. > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente > a su destinatario y puede contener informaci?n confidencial, material > privilegiado o informaci?n protegida por derecho de autor. Est? prohibida > cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, > distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje > por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? > contenida es responsabilidad exclusiva de su remitente por lo tanto la > Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The > information contained in this email is addressed to its recipient only and > may contain confidential information, privileged material or information > protected by copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial reproduction. > If you receive this message by error, please contact the sender and delete > it. The information contained herein is the sole responsibility of the > sender therefore Universidad EAFIT is not responsible for what the message > contains. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From mannyromero at mail.com Sun Dec 3 05:25:44 2017 From: mannyromero at mail.com (Manny Romero) Date: Sun, 3 Dec 2017 05:25:44 +0100 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Sun Dec 3 05:46:36 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 Dec 2017 23:46:36 -0500 Subject: [Agda] Trying to load modules from Norell OPLSS tutorial In-Reply-To: References: <5a39f817-4893-4558-8030-29c1793b020e@cs.bham.ac.uk> <8fd82f75-3442-ebf9-52b3-5197f9b38731@ifi.lmu.de> Message-ID: I will make you some questions off the mailing list. On 2 December 2017 at 23:25, Manny Romero wrote: > I used "sudo apt remove agda". It reported success, and when I attempt to > repeat the command it reports that it is not installed so cannot be removed. > However, "agda --version" still results in "Agda version 2.4.2.5". And "type > agda" results in "agda is hashed (/usr/bin/agda)". > > Note that success was reported from the previous attempt at installing 2.5. > It did take a very long time to install, but it printed the success message > copied below verbatim. > > Sent: Saturday, December 02, 2017 at 11:12 PM > > From: "Andr?s Sicard-Ram?rez" > To: "Manny Romero" > Cc: "Andreas Abel" , "Agda users" > > Subject: Re: [Agda] Trying to load modules from Norell OPLSS tutorial > It is weird that you have this problem after fixing the cpphs problem. > > If you installed Agda 2.4.2.5 from your distribution, please remove it. > > Which is the output of > > $ type agda > > ? > > > > On 2 December 2017 at 22:45, Manny Romero wrote: >> Using this advice I was able to install the new version (or so it would >> certainly appear): >> >> ---------- >> >> Configuring Agda-2.5.3... >> Building Agda-2.5.3... >> Installed Agda-2.5.3 >> >> ---------- >> >> ...but when I enter "Agda --version" >> I still get 2.4.2.5 >> >> and the original tutorial problems, resulting from the earlier version, >> persist as before. >> >> >> (Also: I added this >> >> ---------- >> >> PATH=~/.cabal/bin:$PATH >> export PATH >> >> ----------- >> >> to the end of my ~/.profile document, as suggested on the Internet. But it >> doesn't change my path when I call up a fresh session. What did I do >> wrong? >> >> --Note: I don't think this problem is related to the first, because I was >> checking the Agda version from within the same session with the altered >> path >> that enabled me to finally install the 2.5 Agda in the first place.) >> Sent: Saturday, December 02, 2017 at 6:01 PM >> From: "Andr?s Sicard-Ram?rez" >> To: "Manny Romero" >> Cc: "Andreas Abel" , "Agda users" >> >> Subject: Re: [Agda] Trying to load modules from Norell OPLSS tutorial >> On 2 December 2017 at 16:11, Manny Romero wrote: >>> I am now attempting to use cabal to install the newest Agda. It keeps >>> failing because of different programs I have not installed yet, so that's >>> what I'm doing now. I am stuck at this point on one in particular, cpphs. >>> What happened is I initially installed one version, 1.19.3, using "sudo >>> apt >>> install", but this was apparently not as new as the Agda 2.5 requires. >>> I was >>> able to use cabal to install the latest, cabal-1.20.8, but apparently >>> this >>> does not affect what is found under usr/bin/cpphs. Nor can I use the >>> "sudo >>> apt install cabal-1.20.8" at this point; it reports that it cannot find >>> it. >>> What is going on here? >> >> It seems you installed two versions of cpphs: >> >> cpphs 1.19.3 in usr/bin/cpphs (v?a sudo apt install) and >> >> cpphs 1.20.8 in ~/.cabal/bin/cpphs (via cabal install) >> >> but you didn't add the directory ~/.cabal/bin to your path. >> >> Note: The directory ~/.cabal/bin should be the first one in your path. >> >> -- >> Andr?s >> La informaci?n contenida en este correo electr?nico est? dirigida >> ?nicamente >> a su destinatario y puede contener informaci?n confidencial, material >> privilegiado o informaci?n protegida por derecho de autor. Est? prohibida >> cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, >> distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje >> por error, por favor contacte al remitente y elim?nelo. La informaci?n >> aqu? >> contenida es responsabilidad exclusiva de su remitente por lo tanto la >> Universidad EAFIT no se hace responsable de lo que el mensaje contenga. >> The >> information contained in this email is addressed to its recipient only and >> may contain confidential information, privileged material or information >> protected by copyright. Its prohibited any copy, use, improper retention, >> modification, dissemination, distribution or total or partial >> reproduction. >> If you receive this message by error, please contact the sender and delete >> it. The information contained herein is the sole responsibility of the >> sender therefore Universidad EAFIT is not responsible for what the message >> contains. >> La informaci?n contenida en este correo electr?nico est? dirigida >> ?nicamente >> a su destinatario y puede contener informaci?n confidencial, material >> privilegiado o informaci?n protegida por derecho de autor. Est? prohibida >> cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, >> distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje >> por error, por favor contacte al remitente y elim?nelo. La informaci?n >> aqu? >> contenida es responsabilidad exclusiva de su remitente por lo tanto la >> Universidad EAFIT no se hace responsable de lo que el mensaje contenga. >> The >> information contained in this email is addressed to its recipient only and >> may contain confidential information, privileged material or information >> protected by copyright. Its prohibited any copy, use, improper retention, >> modification, dissemination, distribution or total or partial >> reproduction. >> If you receive this message by error, please contact the sender and delete >> it. The information contained herein is the sole responsibility of the >> sender therefore Universidad EAFIT is not responsible for what the message >> contains. > > > > -- > Andr?s > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente > a su destinatario y puede contener informaci?n confidencial, material > privilegiado o informaci?n protegida por derecho de autor. Est? prohibida > cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, > distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje > por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? > contenida es responsabilidad exclusiva de su remitente por lo tanto la > Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The > information contained in this email is addressed to its recipient only and > may contain confidential information, privileged material or information > protected by copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial reproduction. > If you receive this message by error, please contact the sender and delete > it. The information contained herein is the sole responsibility of the > sender therefore Universidad EAFIT is not responsible for what the message > contains. > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente > a su destinatario y puede contener informaci?n confidencial, material > privilegiado o informaci?n protegida por derecho de autor. Est? prohibida > cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, > distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje > por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? > contenida es responsabilidad exclusiva de su remitente por lo tanto la > Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The > information contained in this email is addressed to its recipient only and > may contain confidential information, privileged material or information > protected by copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial reproduction. > If you receive this message by error, please contact the sender and delete > it. The information contained herein is the sole responsibility of the > sender therefore Universidad EAFIT is not responsible for what the message > contains. -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From kaposi.ambrus at gmail.com Mon Dec 4 00:12:53 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Mon, 4 Dec 2017 00:12:53 +0100 Subject: [Agda] Agda Implementors' Meeting XXVI - Budapest, 29 Jan -- 3 Feb 2018 Message-ID: --------------------------------------------------------------- Agda Implementors' Meeting XXVI Call for participation http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXVI --------------------------------------------------------------- The twenty-sixth Agda Implementors' Meeting will take place at E?tv?s Lor?nd University in Budapest, Hungary from 2018-01-29 to 2018-02-03 (Mon to Sat). The meeting will be similar to previous ones: * Presentations concerning theory, implementation, and use cases of Agda and other Agda-like languages. * Discussions around issues related to the Agda language. * Plenty of time to work in, on, under or around Agda, in collaboration with other participants. To register for AIM XXVI, please fill out the form below and send it to Ambrus via email. For preliminary information (more appearing later), please visit http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.AIMXXVI Please spread the word about this meeting. Best Regards, Ambrus, Andr?s, Bal?zs and P?ter -------8<-------------------------------------------------- Registration form (send it to Ambrus Kaposi ) Agda Implementors' Meeting XXVI Name: Title and optionally abstract (if you want to give a talk or lead a discussion): Suggestions for code sprints (optional): Additional comments: From martin.stone.davis at gmail.com Mon Dec 4 03:02:54 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Sun, 3 Dec 2017 18:02:54 -0800 Subject: [Agda] problems installing agda master using stack Message-ID: <47db0e95-7394-ff91-885d-d9217452e397@gmail.com> I am trying and failing to build the latest agda (on the master branch). My platform is parabola, which is an arch clone. A while back, I had been able to use cabal install, but when that went south for some reason, I hit upon using stack. Unfortunately, that also is not working for me anymore. Hopefully, this is the right place to report this, or you can direct me to the proper authorities. I'm using stack Version 1.6.0.20171022 x86_64 Here's the command I am using for stack: stack --stack-yaml stack-8.0.2.yaml install And here's the error: > --? While building package old-time-1.1.0.3 using: > /tmp/stack31341/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup > > --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 > configure > --with-ghc=/home/martin/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc > > --with-ghc-pkg=/home/martin/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg > --user --package-db=clear --package-db=global > --package-db=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/pkgdb > > --libdir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/lib > > --bindir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/bin > > --datadir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/share > > --libexecdir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/libexec > > --sysconfdir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/etc > > --docdir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/doc/old-time-1.1.0.3 > > --htmldir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/doc/old-time-1.1.0.3 > > --haddockdir=/home/martin/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.12/8.0.2/doc/old-time-1.1.0.3 > --dependency=base=base-4.9.1.0 > --dependency=old-locale=old-locale-1.0.0.7-KGBP1BSKxH5GCm0LnZP04j > ??? Process exited with code: ExitFailure 1 > ??? Logs have been written to: > /home/martin/agda/.stack-work/logs/old-time-1.1.0.3.log > > ??? [1 of 2] Compiling Main???????????? ( > /tmp/stack31341/old-time-1.1.0.3/Setup.hs, > /tmp/stack31341/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/Main.o > ) > ??? [2 of 2] Compiling StackSetupShim?? ( > /home/martin/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, > /tmp/stack31341/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/StackSetupShim.o > ) > ??? Linking > /tmp/stack31341/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup > ... > ??? Configuring old-time-1.1.0.3... > ??? configure: WARNING: unrecognized options: --with-compiler > ??? checking for gcc... /usr/bin/gcc > ??? checking whether the C compiler works... yes > ??? checking for C compiler default output file name... a.out > ??? checking for suffix of executables... > ??? checking whether we are cross compiling... configure: error: in > `/tmp/stack31341/old-time-1.1.0.3': > ??? configure: error: cannot run C compiled programs. > ??? If you meant to cross compile, use `--host'. > ??? See `config.log' for more details From asr at eafit.edu.co Mon Dec 4 12:23:44 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Mon, 4 Dec 2017 06:23:44 -0500 Subject: [Agda] problems installing agda master using stack In-Reply-To: <47db0e95-7394-ff91-885d-d9217452e397@gmail.com> References: <47db0e95-7394-ff91-885d-d9217452e397@gmail.com> Message-ID: On 3 December 2017 at 21:02, Martin Stone Davis wrote: > > I'm using stack Version 1.6.0.20171022 x86_64 > > Here's the command I am using for stack: > > stack --stack-yaml stack-8.0.2.yaml install > I'm not familiar with stack, but Travis and I couldn't reproduce using $ stack --version Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1 Could you reproduce the problem using this version of stack? I'm using my local installed version of GHC with stack, that is, I ran the following command: $ stack --stack-yaml stack-8.0.2.yaml --system-ghc install -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From asr at eafit.edu.co Mon Dec 4 13:10:35 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Mon, 4 Dec 2017 07:10:35 -0500 Subject: [Agda] problems installing agda master using stack In-Reply-To: References: <47db0e95-7394-ff91-885d-d9217452e397@gmail.com> Message-ID: On 4 December 2017 at 06:23, Andr?s Sicard-Ram?rez wrote: > On 3 December 2017 at 21:02, Martin Stone Davis > wrote: >> >> I'm using stack Version 1.6.0.20171022 x86_64 >> >> Here's the command I am using for stack: >> >> stack --stack-yaml stack-8.0.2.yaml install >> > > I'm not familiar with stack, but Travis and I couldn't reproduce using > > $ stack --version > Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e > (4861 commits) x86_64 hpack-0.17.1 > > Could you reproduce the problem using this version of stack? > > I'm using my local installed version of GHC with stack, that is, I ran > the following command: > > $ stack --stack-yaml stack-8.0.2.yaml --system-ghc install > I couldn't reproduce the problem using your version of stack. Googling by old-time-1.1.0.3: configure: error: cannot run C compiled programs. I found the same problem on Windows and Arch (Travis and I use Ubuntu). -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From henning at basold.eu Mon Dec 4 21:20:22 2017 From: henning at basold.eu (Henning Basold) Date: Mon, 4 Dec 2017 21:20:22 +0100 Subject: [Agda] CMCS 2018: Second Call for Papers Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Call for Papers The 14th International Workshop on Coalgebraic Methods in Computer Science (CMCS'18) Thessaloniki, Greece, 14 - 15 April 2018 (co-located with ETAPS 2018) www.coalg.org/cmcs18 Objectives and scope - -------------------- Established in 1998, the CMCS workshops aim to bring together researchers with a common interest in the theory of coalgebras, their logics, and their applications. As the workshop series strives to maintain breadth in its scope, areas of interest include neighbouring fields as well. Topics of interest include, but are not limited to, the following: - - the theory of coalgebras (including set theoretic and categorical approaches); - - coalgebras as computational and semantical models (for programming languages, dynamical systems, term rewriting, etc.); - - coalgebras in (functional, logic, answer set, object-oriented, concurrent, and constraint) programming; - - coalgebraic data types, type systems and behavioural typing; - - coinductive definition and proof principles for coalgebras (including "up-to" techniques); - - coalgebras and algebras; - - coalgebras and (modal) logic; - - coalgebraic specification and verification; - - coalgebra and control theory (notably of discrete event and hybrid systems); - - coalgebra in quantum computing; - - coalgebra and game theory; - - tools exploiting coalgebraic techniques. Venue and event - --------------- CMCS'18 will be held in Thessaloniki, Greece, co-located with ETAPS 2018, on 14 - 15 April 2018. Keynote speaker - --------------- Samson Abramsky (University of Oxford, United Kingdom) Invited speakers - ---------------- Clemens Kupke (University of Strathclyde, United Kingdom) Daniela Petrisan (University Diderot Paris 7, France) Invited tutorial speakers - ------------------------- Bob Coecke (University of Oxford, United Kingdom) Aleks Kissinger (Radboud University Nijmegen, The Netherlands) Important dates - --------------- Abstract regular papers 5 January 2018 Submission regular papers 12 January 2018 Notification regular papers 12 February 2018 Camera-ready copy 19 February 2018 Submission short contributions 23 February 2018 Notification short contributions 9 March 2018 Proceedings - ----------- The proceedings of CMCS 2018 will include all accepted regular papers and will be published post-conference as a Springer volume in the IFIP-LNCS series. Accepted short contributions will be bundled in a technical report. Programme committee - ------------------- Filippo Bonchi (University of Pisa, Italy) Marcello Bonsangue (LIACS, Leiden University, The Netherlands) Corina Cirstea (University of Southampton, United Kingdom) Fredrik Dahlqvist (University College London, United Kingdom) Ugo Dal Lago (University of Bologna, Italy) Sergey Goncharov (FAU Erlangen-N?rnberg, Germany) Helle Hvid Hansen (Delft University of Technology, The Netherlands) Ichiro Hasuo (National Institute of Informatics, Japan) Bart Jacobs (Radboud University Nijmegen, The Netherlands) Bartek Klin (University of Warsaw, Poland) Paul Levy (University of Birmingham, United Kingdom) Stefan Milius (FAU Erlangen-N?rnberg, Germany) Lawrence Moss (Indiana University, United States) Dirk Pattinson (Australian National University, Australia) Dusko Pavlovic (University of Hawai?i at M?noa, United States) Daniela Petrisan (University Diderot Paris 7, France) Damien Pous (CNRS, ENS Lyon, France) Juriaan Rot (Radboud University Nijmegen, The Netherlands) Jan Rutten (CWI/Radboud University Nijmegen, The Netherlands) Lutz Schr?der (FAU Erlangen-N?rnberg, Germany) Alexandra Silva (University College London, United Kingdom) Ana Sokolova (University of Salzburg, Austria) Henning Urbat (Technische Universit?t Braunschweig, Germany) Jamie Vicary (University of Oxford, United Kingdom) Publicity chair - --------------- Henning Basold (CNRS, ENS Lyon, France) PC chair - -------- Corina Cirstea (University of Southampton, United Kingdom) Steering committee - ------------------ Filippo Bonchi (University of Pisa, Italy) Marcello Bonsangue (LIACS, Leiden University, The Netherlands) Corina Cirstea (University of Southampton, United Kingdom) Ichiro Hasuo (National Institute of Informatics, Japan) Bart Jacobs (Radboud University Nijmegen, The Netherlands) Bartek Klin (University of Warsaw, Poland) Alexander Kurz (University of Leicester, United Kingdom) Marina Lenisa (University of Udine, Italy) Stefan Milius (chair), FAU Erlangen-N?rnberg, Germany Larry Moss (Indiana University, United States) Dirk Pattinson (Australian National University, Australia) Jan Rutten (CWI/Radboud University Nijmegen, The Netherlands) Lutz Schr?der (FAU Erlangen-N?rnberg, Germany) Alexandra Silva (University College London, United Kingdom) Submission guidelines - --------------------- We solicit two types of contributions: regular papers and short contributions. Regular papers must be original, unpublished, and not submitted for publication elsewhere. They should not exceed 20 pages in length in Springer LNCS style. Short contributions may describe work in progress, or summarise work submitted to a conference or workshop elsewhere. They should be no more than two pages. Regular papers and short contributions should be submitted electronically as a PDF file via the Easychair system at http://www.easychair.org/conferences/?conf=cmcs2018. -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEMnUmuprSDishxVMiatBsEc2xMm4FAlolrgMACgkQatBsEc2x Mm6tJA/+JcDtjjL/YRy2se/00uAonKopY7cpxGCiwQqGSQO6Chmqn5SRKs6VRR4u KKP1u6Sw8TJosj8gbK/pWY5rTb7GL1RGIivIntUhROogbW7RpPNAmmAazuVWyzG0 4nFl40fQZjSynv7aL92+UGYQ7z8uI6k17KW98v/SLJkmGOlhOPJPnG2Dy7or3tNx wkJYN1KOVnF7u+2djj6SpsZ7mFJIUkDan1Bk8LTaZiQSTApUVVyVlrTgnaTFUGyj NP2iJyz5IDTTBhAD8B06jA9QAGnVBZlXavt+H2h4PFRntqZUe/vM1oNxYtJ8BBTK 7xATUHj0OWF3Mggvj/GO8QhabU11wqBTcom89f14+MtMLbDiq3Ufm+LD+RkkeIB0 ENc7djcrEfxcyOh9N1IfI8KUmuuwpjyD43qRxNpBJngFZtuaCx+2drLZwCQugnpP Mn0eCXWkdBSBWBbB2i7bB2C9+eP7yXw1evcD1pqbIUoOr7HK/7rYtQlDvifxsejx yqHIePCdhjlh8l0b7uvVBt5IjaqXQ1CSDW+uUcFKMZqsGIxNWWRYBxnmJCQTPeXg WRJrCNsA1NlBbXnjoC8vmmRNlz8kX6fKwrgR3/01l5WmuAxaKTMaVZV9YikCSd5x 3GGUAajp5sAHG2ctfoCd0eRlMqGVIdUlU8oW/CQFplGly7lv1oQ= =D5An -----END PGP SIGNATURE----- From martin.stone.davis at gmail.com Tue Dec 5 01:15:15 2017 From: martin.stone.davis at gmail.com (Martin Stone Davis) Date: Mon, 4 Dec 2017 16:15:15 -0800 Subject: [Agda] Fwd: Re: problems installing agda master using stack In-Reply-To: <293727a6-9b8b-2f01-4999-b25c3c452dac@gmail.com> References: <293727a6-9b8b-2f01-4999-b25c3c452dac@gmail.com> Message-ID: <8ce4ad3b-1bb2-66f2-ffdd-18d0e298688d@gmail.com> My email program messes me up by defaulting to reply instead of reply-to-list. Here's the solution I sent to Andr?s. -------- Forwarded Message -------- Subject: Re: [Agda] problems installing agda master using stack Date: Mon, 4 Dec 2017 07:10:51 -0800 From: Martin Stone Davis To: Andr?s Sicard-Ram?rez Thanks Andr?s, Indeed, it looks like a problem specific to arch and stack. I followed your search-text suggestion and eventually found the following solution: I copied `stack-8.0.2.yaml` to `stack-8.0.2-arch.yaml` and added a line `ghc-build: tinfo6`. Then the following command builds w/o error: `stack --stack-yaml stack-8.0.2-arch.yaml install`. For sake of completeness, the full file, `stack-8.0.2-arch.yaml` is here: ``` resolver: lts-9.12 ghc-build: tinfo6 # Local packages, usually specified by relative directory name packages: - '.' ``` On 12/04/2017 04:10 AM, Andr?s Sicard-Ram?rez wrote: > On 4 December 2017 at 06:23, Andr?s Sicard-Ram?rez wrote: >> On 3 December 2017 at 21:02, Martin Stone Davis >> wrote: >>> I'm using stack Version 1.6.0.20171022 x86_64 >>> >>> Here's the command I am using for stack: >>> >>> stack --stack-yaml stack-8.0.2.yaml install >>> >> I'm not familiar with stack, but Travis and I couldn't reproduce using >> >> $ stack --version >> Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e >> (4861 commits) x86_64 hpack-0.17.1 >> >> Could you reproduce the problem using this version of stack? >> >> I'm using my local installed version of GHC with stack, that is, I ran >> the following command: >> >> $ stack --stack-yaml stack-8.0.2.yaml --system-ghc install >> > I couldn't reproduce the problem using your version of stack. Googling by > > old-time-1.1.0.3: configure: error: cannot run C compiled programs. > > I found the same problem on Windows and Arch (Travis and I use Ubuntu). > > > -- > Andr?s > La informaci?n contenida en este correo electr?nico est?dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida porderecho de autor. Est? prohibida cualquier copia, utilizaci?n,indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente porlo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pepm.workshop at gmail.com Wed Dec 6 05:55:09 2017 From: pepm.workshop at gmail.com (PEPM Workshop) Date: Wed, 6 Dec 2017 13:55:09 +0900 Subject: [Agda] PEPM 2018 Final Call for Poster/Demo Abstracts and Participation Message-ID: PEPM 2018 Final Call for Poster/Demo Abstracts and Participation ================================================================ A tentative programme is available, with two invited talks decided. Poster/demo abstracts are due this Friday (8th December, AoE). See below for the submission guideline. Registration ------------ * Web page : https://popl18.sigplan.org/attending/Registration * Early registration deadline : 10th December 2017 Programme --------- * https://popl18.sigplan.org/track/PEPM-2018#program Monday, 8th January 2018 10:30 - 11:30 Developments in Property-Based Testing (Invited Talk) Jan Midtgaard 11:30 - 12:00 Selective CPS Transformation for Shift and Reset Kenichi Asai, Chihiro Uehara Lunch 14:00 - 14:30 A Guess-and-Assume Approach to Loop Fusion for Program Verification Akifumi Imanishi, Kohei Suenaga, Atsushi Igarashi 14:30 - 15:00 Gradually Typed Symbolic Expressions David Broman, Jeremy G. Siek 15:00 - 15:30 On the Cost of Type-Tag Soundness Ben Greenman, Zeina Migeed Break 16:00 - 17:00 TBA (Invited Talk) Conal Elliott Tuesday, 9th January 2018 10:30 - 11:30 Challenges in the Design and Compilation of Programming Languages for Exascale Machines (Invited Talk) Alex Aiken 11:30 - 12:00 Checking Cryptographic API Usage with Composable Annotations (Short Paper) Duncan Mitchell, L. Thomas van Binsbergen, Blake Loring, Johannes Kinder Lunch 14:00 - 14:30 Partially Static Data as Free Extension of Algebras (Short Paper) Jeremy Yallop, Tamara von Glehn, Ohad Kammar 14:30 - 15:00 Program Generation for ML Modules (Short Paper) Takahisa Watanabe, Yukiyoshi Kameyama 15:00 - 15:30 Recursive Programs in Normal Form (Short Paper) Barry Jay Break 16:00 - 17:30 Posters/demos (TBA) Poster/demo abstract submission guideline ----------------------------------------- * https://popl18.sigplan.org/track/PEPM-2018#Call-for-Poster-Demo-Abstracts To maintain PEPM?s dynamic and interactive nature, PEPM 2018 will continue to have special sessions for poster/demo presentations. In addition to the main interactive poster/demo session, there will also be a scheduled short-talk session where each poster/demo can be advertised to the audience in, say, 5?10 minutes. Poster/demo abstracts should describe work relevant to PEPM (whose scope is detailed below), typeset as a one-page PDF using the two-column ?sigplan? sub-format of the new ?acmart? format available at: http://sigplan.org/Resources/Author/ and sent by email to the programme co-chairs, Fritz Henglein and Josh Ko, at: henglein at diku.dk, hsiang-shang at nii.ac.jp Please also include in the email: * a short summary of the abstract (in plain text), * the type(s) of proposed presentation (poster and/or demo), and * whether you would like to give a scheduled short talk (in addition to the poster/demo presentation). Abstracts should be sent no later than: Friday, 8th December 2017, anywhere on earth and will be considered for acceptance on a rolling basis. Accepted abstracts, along with their short summary, will be posted on PEPM 2018?s website. At least one author of each accepted abstract must attend the workshop and present the work during the poster/demo session. Student participants with accepted posters/demos can apply for a SIGPLAN PAC grant to help cover travel expenses and other support. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC programme, see its web page. Scope ----- In addition to the traditional PEPM topics (see below), PEPM 2018 welcomes submissions in new domains, in particular: * Semantics based and machine-learning based program synthesis and program optimisation. * Modelling, analysis, and transformation techniques for distributed and concurrent protocols and programs, such as session types, linear types, and contract specifications. More generally, topics of interest for PEPM 2018 include, but are not limited to: * Program and model manipulation techniques such as: supercompilation, partial evaluation, fusion, on-the-fly program adaptation, active libraries, program inversion, slicing, symbolic execution, refactoring, decompilation, and obfuscation. * Techniques that treat programs/models as data objects including metaprogramming, generative programming, embedded domain-specific languages, program synthesis by sketching and inductive programming, staged computation, and model-driven program generation and transformation. * Program analysis techniques that are used to drive program/model manipulation such as: abstract interpretation, termination checking, binding-time analysis, constraint solving, type systems, automated testing and test case generation. * Application of the above techniques including case studies of program manipulation in real-world (industrial, open-source) projects and software development processes, descriptions of robust tools capable of effectively handling realistic applications, benchmarking. Examples of application domains include legacy program understanding and transformation, DSL implementations, visual languages and end-user programming, scientific computing, middleware frameworks and infrastructure needed for distributed and web-based applications, embedded and resource-limited computation, and security. This list of categories is not exhaustive, and we encourage submissions describing new theories and applications related to semantics-based program manipulation in general. If you have a question as to whether a potential submission is within the scope of the workshop, please contact the programme co-chairs, Fritz Henglein and Josh Ko (henglein at diku.dk, hsiang-shang at nii.ac.jp). From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 6 15:25:56 2017 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 6 Dec 2017 14:25:56 +0000 Subject: [Agda] PhD positions at Nottingham Message-ID: Dear all, The School of Computer Science in Nottingham is advertising 10 fully-funded PhD studentships. Applicants in the area of the Functional Programming Lab (https://tinyurl.com/fp-notts) are encouraged! If you are interested in applying, please contact a potential supervisor prior to submitting your application: Thorsten Altenkirch - constructive logic, proof assistants, homotopy type theory, category theory, lambda calculus. Venanzio Capretta - type theory, mathematical logic, corecursive structures, proof assistants, dependently-typed programming. Graham Hutton - program calculation and verification, category theory, recursion operators, coinductive types. Henrik Nilsson - functional reactive programming, modelling and simulation, domain-specific languages, probabilistic languages. +---------------------------------------------------------------+ 10 Fully-Funded PhD Studentships School of Computer Science University of Nottingham, UK https://tinyurl.com/10-phds-2018 Applications are invited for up to ten fully-funded PhD studentships in the School of Computer Science at the University of Nottingham, starting on 1 October 2018. The topics for the studentships are open, but should relate to the interests of one of the School?s research groups: Agents Lab; Automated Scheduling, Optimisation and Planning; Computer Vision Lab; Functional Programming; Intelligent Modelling and Analysis; Mixed Reality Lab; Data Driven Algorithms, Systems and Design and Uncertainty in Data and Decision Making The studentships are for three years and include a stipend of ?14,553 per year and tuition fees, and are available to students of any nationality. Applicants are normally expected to have a first-class Masters or Bachelors degree in Computer Science or a related discipline, and must obtain the support of a potential supervisor in the School prior to submitting their application. Initial contact with supervisors should be made at least two weeks prior to the closing date for applications. Informal enquiries may be addressed to SS-PGR-JC at nottingham.ac.uk To apply, please submit the following items by email to: Christine.Fletcher at nottingham.ac.uk: (1) a brief covering letter that describes your reasons for wishing to pursue a PhD, your proposed research area and topic, and the name of a potential supervisor; (2) a copy of your CV, including your actual or expected degree class(es), and results of all University examinations; (3) an example of your technical writing, such as a project report or dissertation; (4) contact details for two academic referees. Closing date for applications: 19th January 2018 +---------------------------------------------------------------+ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From avigad at cmu.edu Tue Dec 5 23:02:37 2017 From: avigad at cmu.edu (Jeremy Avigad) Date: Tue, 5 Dec 2017 17:02:37 -0500 Subject: [Agda] Interactive Theorem Proving (ITP) 2018: Second CFP Message-ID: SECOND CALL FOR PAPERS ITP 2018 9th International Conference on Interactive Theorem Proving Oxford, UK July 9-12, 2018 https://itp2018.inria.fr/ Submission Deadlines: Thursday, January 25, 2018 (abstracts) Wednesday, January 31, 2018 (full papers) GENERAL INFORMATION The ITP conference series is concerned with all topics related to interactive theorem proving, ranging from theoretical foundations to implementation aspects and applications in program verification, security, and formalization of mathematics. ITP is the evolution of the TPHOLs conference series to the broad field of interactive theorem proving. TPHOLs meetings took place every year from 1988 until 2009. The ninth ITP conference, ITP 2018, will be held in Oxford, July 9-12, 2018. SCOPE OF CONFERENCE ITP welcomes submissions describing original research on all aspects of interactive theorem proving and its applications. Suggested topics include but are not limited to the following: * formal aspects of hardware and software * formalizations of mathematics * improvements in theorem prover technology * user interfaces for interactive theorem provers * formalizations of computational models * verification of security algorithms * use of theorem provers in education * industrial applications of interactive theorem provers * concise and elegant worked examples of formalizations (proof pearls) PUBLICATION DETAILS The proceedings of the symposium will be published in the Springer's LNCS series. The organizers intend to publish expanded versions of a select subset of papers from the conference in a special issue of the Journal of Automated Reasoning. PAPER SUBMISSIONS All submissions must be original, unpublished, and not submitted concurrently for publication elsewhere. Furthermore, when appropriate, submissions are expected to be accompanied by verifiable evidence of a suitable implementation, such as the source files of a formalization for the proof assistant used. These materials can be uploaded with the submission, or made available on the web. In either case, the submission should provide clear instructions to referees as to how to obtain the relevant materials and compile them or check them, as the case may be. Submissions will be subjected to single-blind peer review. They should be no more than 16 pages in length excluding bibliographic references and are to be submitted in PDF via EasyChair at the following address: https://easychair.org/conferences/?conf=itp2018 Submissions must conform to the LNCS style in LaTeX. An author of each accepted paper is expected to present it at the conference and will be required to sign a copyright release form. In addition to regular papers, described above, there will be a section for shorter papers, which can be used to describe interesting work that is still ongoing and not fully mature. Such a preliminary report is limited to 6 pages and may consist of an extended abstract. Each of these papers should bear the phrase "(short paper)" beneath the title, and will be refereed and be expected to present innovative and promising ideas, possibly in early form. Accepted submissions in this category will be published in the main proceedings and will be presented as short talks. IMPORTANT DATES Abstract submission deadline: January 25, 2018 Full paper submission deadline: January 31, 2018 Author notification: March 31, 2018 Camera-ready papers: May 25, 2018 Conference: July 9-12, 2018 PROGRAM COMMITTEE Jeremy Avigad, Carnegie Mellon University (chair) Assia Mahboubi, Inria (chair) Andreas Abel, Gothenburg University Benedikt Ahrens, University of Birmingham June Andronick, CSIRO|Data61 and UNSW Adam Chlipala, Massachusetts Institute of Technology Jasmin Christian Blanchette, Vrije Universiteit Amsterdam Thierry Coquand, Chalmers University of Technology Karl Crary, Carnegie Mellon University Delphine Demange, IRISA / University of Rennes 1 Timothy Griffin, University of Cambridge Thomas Hales, University of Pittsburgh John Harrison, Intel Johannes H?lzl, Vrije Universiteit Amsterdam Chung-Kil Hur, Seoul National University Jacques-Henri Jourdan, LRI, CNRS, Universit? Paris-Sud Cezary Kaliszyk, University of Innsbruck Ambrus Kaposi, E?tv?s Lor?nd University, Budapest Chantal Keller, LRI, CNRS, Universit? Paris-Sud Panagiotis Manolios, Northeastern University Mariano Moscato, National Institute of Aerospace Leonardo de Moura, Microsoft Research Magnus O. Myreen, Chalmers University of Technology Tobias Nipkow, Technische Universit?t M?nchen Lawrence Paulson, University of Cambridge Andr? Platzer, Carnegie Mellon University Andrei Popescu, Middlesex University London Matthieu Sozeau, Inria Pierre-Yves Strub, ?cole Polytechnique Enrico Tassi, Inria Zachary Tatlock, University of Washington Laurent Th?ry, Inria Cesare Tinelli, The University of Iowa Alwen Tiu, Australian National University Makarius Wenzel, sketis.net Freek Wiedijk, Radboud University Nijmegen CONTACT INFORMATION Jeremy Avigad Assia Mahboubi itp2018 at easychair.org https://itp2018.inria.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From avigad at cmu.edu Tue Dec 5 23:14:07 2017 From: avigad at cmu.edu (Jeremy Avigad) Date: Tue, 5 Dec 2017 17:14:07 -0500 Subject: [Agda] Call for bids to host ITP 2019 Message-ID: We call for bids to host ITP 2019, the 10th International Conference on Interactive Theorem Proving. As in previous years, the procedure consists of two phases: solicitation of bids and voting. This message concerns the first phase. A long-standing ITP/TPHOLs convention is that the conference should be held on a continent different from the location of the previous meeting. For 2019, we therefore solicit bids from prospective hosts located outside Europe. Similar to previous years, we expect bids to propose a date in July, August or September. Bids should be sent to itp2018 at easychair.org and should include at least the following information: ? name and email address of a contact person ? names of other people involved ? address of website for the bid ? approximate dates of the conference ? structure (e.g., k workshop days and n days of presentations, excursion, etc.) ? advantages of the proposed venue Example of previous winning bids follow: ? http://itp2011.cs.ru.nl/ITP2011/Bid_ITP11.html ? http://www.cs.princeton.edu/~appel/itp2012/bid.html ? http://www.irisa.fr/celtique/blazy/bid-itp13.html The deadline for bids is Friday, March 2, 2018. Shortly after, all admitted bids will be made public and the voting phase will take place. The people eligible to vote are those who are seriously considering attending ITP 2019. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at dcc.fceia.unr.edu.ar Wed Dec 6 14:56:12 2017 From: martin at dcc.fceia.unr.edu.ar (=?UTF-8?Q?Mart=c3=adn?=) Date: Wed, 6 Dec 2017 10:56:12 -0300 Subject: [Agda] Non-termination help! Message-ID: Hello everyone. I am struggling with Agda's termination checker. The idea is to define a recursive function like *size* over terms ? S for some signature S (definitions are bellow). I can destruct (t : ? S) to obtain some symbol and its 'arguments', such arguments should be smaller since ? S is strictly positive. Therefore, I should be able to recursively call size, right?. Here is an example where I leave the holes to be filled. I have tried different approaches to help the termination checker such as views and sized types. Sized types fix these simple functions, but it complicates matters in further proofs. Cheers, Mart?n. ---- module Q where open import Data.Vec open import Data.Nat open import Level renaming (zero to lzero ; suc to lsuc) record Signature : Set (lsuc lzero) where ? constructor sig ? field ??? ? : Set ??? arity : ? -> ? record ? (Sig : Signature) (X : Set) : Set where ? constructor _,_ ? field ??? C : Signature.? Sig ??? as : Vec X (Signature.arity Sig C) data ? (S : Signature) : Set where ? In : ? S (? S) -> ? S size : {S : Signature} -> ? S -> ? size (In (C , as)) = suc (sum (map {!size!} as)) size' : {S : Signature} -> ? S -> ? size' {sig ? arity} (In (C , as)) with arity C size' {sig ? arity} (In (C , [])) | zero = 0 size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map {!size'!} (x ? as) )) From abela at chalmers.se Thu Dec 7 09:29:02 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 7 Dec 2017 09:29:02 +0100 Subject: [Agda] Non-termination help! In-Reply-To: References: Message-ID: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> Mart?n, a bit ironically, to define "size" you need "sized types". ;-) The termination checker per se does not see that in the call map size as function "size" will be only applied to arguments that are structurally smaller than "In (C , as)"; simply, because it cannot even "see" an argument to "size". To help the termination checker, you need to index type \mu with a Size (built-in notion for an upper bound on the height). open import Size data ? (S : Signature) (i : Size) : Set where In : {j : Size< i} ? ? S (? S j) -> ? S i size : ?{i} {S : Signature} -> ? S i -> ? size (In (C , as)) = suc (sum (map size as)) Now "size" has an additional argument "i" which decreases in recursive calls. Alternatively, you can define "size" mutually with a function "mapSize" which is an inling of the code for "map size". Cheers, Andreas On 06.12.2017 14:56, Mart?n wrote: > Hello everyone. I am struggling with Agda's termination checker. > > The idea is to define a recursive function like *size* over terms ? S > for some signature S (definitions are bellow). I can destruct (t : ? S) > to obtain some symbol and its 'arguments', such arguments should be > smaller since ? S is strictly positive. Therefore, I should be able to > recursively call size, right?. > > Here is an example where I leave the holes to be filled. I have tried > different approaches to help the termination checker such as views and > sized types. Sized types fix these simple functions, but it complicates > matters in further proofs. > > Cheers, > > Mart?n. > > ---- > > module Q where > > open import Data.Vec > open import Data.Nat > > open import Level renaming (zero to lzero ; suc to lsuc) > > record Signature : Set (lsuc lzero) where > ? constructor sig > ? field > ??? ? : Set > ??? arity : ? -> ? > > record ? (Sig : Signature) (X : Set) : Set where > ? constructor _,_ > ? field > ??? C : Signature.? Sig > ??? as : Vec X (Signature.arity Sig C) > > data ? (S : Signature) : Set where > ? In : ? S (? S) -> ? S > > size : {S : Signature} -> ? S -> ? > size (In (C , as)) = suc (sum (map {!size!} as)) > > size' : {S : Signature} -> ? S -> ? > size' {sig ? arity} (In (C , as)) with arity C > size' {sig ? arity} (In (C , [])) | zero = 0 > size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map > {!size'!} (x ? as) )) > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ -------------- next part -------------- open import Size open import Level renaming (zero to lzero ; suc to lsuc) open import Data.Vec open import Data.Nat record Signature : Set (lsuc lzero) where constructor sig field ? : Set arity : ? -> ? record ? (Sig : Signature) (X : Set) : Set where constructor _,_ field C : Signature.? Sig as : Vec X (Signature.arity Sig C) data ? (S : Signature) (i : Size) : Set where In : {j : Size< i} ? ? S (? S j) -> ? S i size : ?{i} {S : Signature} -> ? S i -> ? size (In (C , as)) = suc (sum (map size as)) From martin at dcc.fceia.unr.edu.ar Thu Dec 7 19:21:45 2017 From: martin at dcc.fceia.unr.edu.ar (=?UTF-8?Q?Mart=c3=adn?=) Date: Thu, 7 Dec 2017 15:21:45 -0300 Subject: [Agda] Non-termination help! In-Reply-To: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> References: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> Message-ID: <1ebfb9c5-dcab-0117-0417-47f6cf5df21e@dcc.fceia.unr.edu.ar> Hello Andreas, Thank you very much for the quick response. As I told you I wanted to avoid sized types and after a bit we came up with another solution. We use *Fin* datatype to represent N-Ary product instead of Vec. ??? open import Data.Fin ??? record Signature : Set (lsuc lzero) where ? ??? constructor sig ? ??? field ??? ??? ? : Set ??? ??? arity : ? -> ? ??? record ? (Sig : Signature) (X : Set) : Set where ? ??? constructor _,_ ? ??? field ??? ??? C? : Signature.? Sig ??? ??? as : Fin (Signature.arity Sig C) -> X ??? data ?M (S : Signature) : Set where ? ??? In : ? S (?M S) -> ?M S ??? sumUp : {n : ?} -> (Fin n -> ?) -> ? ??? sumUp {zero} f = zero ??? sumUp {suc n} f =? f zero + sumUp ? x ? f (suc x) ??? size : {Sig : Signature} -> ?M Sig -> ? ??? size {Sig} (In (C , as)) = suc (sumUp ? x ? size (as x)) Sadly I am a bit confused now. Why does this representation work? I know that *FIn* is an indexed type, but my guess is that I also have more power from the higher order function *as*. Basically the termination checker now sees that I am calling *size (as x)* with *as* being smaller than *In (C, as)*, am I correct? Thank you again for your time! Cheers, Mart?n. -- On 12/07/2017 05:29 AM, Andreas Abel wrote: > Mart?n, > > a bit ironically, to define "size" you need "sized types". ;-) > > The termination checker per se does not see that in the call > > ? map size as > > function "size" will be only applied to arguments that are > structurally smaller than "In (C , as)"; simply, because it cannot > even "see" an argument to "size". > > To help the termination checker, you need to index type \mu with a > Size (built-in notion for an upper bound on the height). > > ? open import Size > > ? data ? (S : Signature) (i : Size) : Set where > ??? In : {j : Size< i} ? ? S (? S j) -> ? S i > > ? size : ?{i} {S : Signature} -> ? S i -> ? > ? size (In (C , as)) = suc (sum (map size as)) > > Now "size" has an additional argument "i" which decreases in recursive > calls. > > Alternatively, you can define "size" mutually with a function > "mapSize" which is an inling of the code for "map size". > > Cheers, > Andreas > > On 06.12.2017 14:56, Mart?n wrote: >> Hello everyone. I am struggling with Agda's termination checker. >> >> The idea is to define a recursive function like *size* over terms ? S >> for some signature S (definitions are bellow). I can destruct (t : ? >> S) to obtain some symbol and its 'arguments', such arguments should >> be smaller since ? S is strictly positive. Therefore, I should be >> able to recursively call size, right?. >> >> Here is an example where I leave the holes to be filled. I have tried >> different approaches to help the termination checker such as views >> and sized types. Sized types fix these simple functions, but it >> complicates matters in further proofs. >> >> Cheers, >> >> Mart?n. >> >> ---- >> >> module Q where >> >> open import Data.Vec >> open import Data.Nat >> >> open import Level renaming (zero to lzero ; suc to lsuc) >> >> record Signature : Set (lsuc lzero) where >> ?? constructor sig >> ?? field >> ???? ? : Set >> ???? arity : ? -> ? >> >> record ? (Sig : Signature) (X : Set) : Set where >> ?? constructor _,_ >> ?? field >> ???? C : Signature.? Sig >> ???? as : Vec X (Signature.arity Sig C) >> >> data ? (S : Signature) : Set where >> ?? In : ? S (? S) -> ? S >> >> size : {S : Signature} -> ? S -> ? >> size (In (C , as)) = suc (sum (map {!size!} as)) >> >> size' : {S : Signature} -> ? S -> ? >> size' {sig ? arity} (In (C , as)) with arity C >> size' {sig ? arity} (In (C , [])) | zero = 0 >> size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map >> {!size'!} (x ? as) )) >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > From guillaume.allais at ens-lyon.org Thu Dec 7 19:56:00 2017 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Thu, 7 Dec 2017 19:56:00 +0100 Subject: [Agda] Non-termination help! In-Reply-To: <1ebfb9c5-dcab-0117-0417-47f6cf5df21e@dcc.fceia.unr.edu.ar> References: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> <1ebfb9c5-dcab-0117-0417-47f6cf5df21e@dcc.fceia.unr.edu.ar> Message-ID: <65ae9840-e2e8-bb0e-714f-8ad5e158bfc6@ens-lyon.org> Hi Mart?n, This representation works because the subterm relationship between `as` and `as x` is self-evident from Agda's point of view. However, when you have a vector of subterms and you step through it via `map`, you add one level of indirection which hides from Agda the fact that the recursive calls are performed on direct subterms. As Andreas said, the old-school solution to this issue is to write a mutually defined `mapSize`, an inlined and specialised version of `map` partially applied to `size`. And the modern approach to this problem is to use sized types so that the *type* is explicit about the fact that `map` doesn't do anything funky with the induction hypothesis it is handed down. You have demonstrated a third way which is to use the duality between a finite data structure and its lookup function (or dually: between a function with a finite domain and its tabulation). However this will probably create some trouble whenever you want to prove things equal (unless you're willing to postulate functional extensionality) because vectors are much more permissive than functions when it comes to proving them propositionally equal. Cheers, -- gallais On 07/12/17 19:21, Mart?n wrote: > Hello Andreas, > > Thank you very much for the quick response. As I told you I wanted to > avoid sized types and after a bit we came up with another solution. > > We use *Fin* datatype to represent N-Ary product instead of Vec. > > ??? open import Data.Fin > > ??? record Signature : Set (lsuc lzero) where > ? ??? constructor sig > ? ??? field > ??? ??? ? : Set > ??? ??? arity : ? -> ? > > ??? record ? (Sig : Signature) (X : Set) : Set where > ? ??? constructor _,_ > ? ??? field > ??? ??? C? : Signature.? Sig > ??? ??? as : Fin (Signature.arity Sig C) -> X > > ??? data ?M (S : Signature) : Set where > ? ??? In : ? S (?M S) -> ?M S > > ??? sumUp : {n : ?} -> (Fin n -> ?) -> ? > ??? sumUp {zero} f = zero > ??? sumUp {suc n} f =? f zero + sumUp ? x ? f (suc x) > > ??? size : {Sig : Signature} -> ?M Sig -> ? > ??? size {Sig} (In (C , as)) = suc (sumUp ? x ? size (as x)) > > Sadly I am a bit confused now. Why does this representation work? I > know that *FIn* is an indexed type, but my guess is that I also have > more power from the higher order function *as*. Basically the > termination checker now sees that I am calling *size (as x)* with *as* > being smaller than *In (C, as)*, am I correct? > > Thank you again for your time! > > Cheers, > > Mart?n. > > -- > > On 12/07/2017 05:29 AM, Andreas Abel wrote: >> Mart?n, >> >> a bit ironically, to define "size" you need "sized types". ;-) >> >> The termination checker per se does not see that in the call >> >> ? map size as >> >> function "size" will be only applied to arguments that are >> structurally smaller than "In (C , as)"; simply, because it cannot >> even "see" an argument to "size". >> >> To help the termination checker, you need to index type \mu with a >> Size (built-in notion for an upper bound on the height). >> >> ? open import Size >> >> ? data ? (S : Signature) (i : Size) : Set where >> ??? In : {j : Size< i} ? ? S (? S j) -> ? S i >> >> ? size : ?{i} {S : Signature} -> ? S i -> ? >> ? size (In (C , as)) = suc (sum (map size as)) >> >> Now "size" has an additional argument "i" which decreases in >> recursive calls. >> >> Alternatively, you can define "size" mutually with a function >> "mapSize" which is an inling of the code for "map size". >> >> Cheers, >> Andreas >> >> On 06.12.2017 14:56, Mart?n wrote: >>> Hello everyone. I am struggling with Agda's termination checker. >>> >>> The idea is to define a recursive function like *size* over terms ? >>> S for some signature S (definitions are bellow). I can destruct (t : >>> ? S) to obtain some symbol and its 'arguments', such arguments >>> should be smaller since ? S is strictly positive. Therefore, I >>> should be able to recursively call size, right?. >>> >>> Here is an example where I leave the holes to be filled. I have >>> tried different approaches to help the termination checker such as >>> views and sized types. Sized types fix these simple functions, but >>> it complicates matters in further proofs. >>> >>> Cheers, >>> >>> Mart?n. >>> >>> ---- >>> >>> module Q where >>> >>> open import Data.Vec >>> open import Data.Nat >>> >>> open import Level renaming (zero to lzero ; suc to lsuc) >>> >>> record Signature : Set (lsuc lzero) where >>> ?? constructor sig >>> ?? field >>> ???? ? : Set >>> ???? arity : ? -> ? >>> >>> record ? (Sig : Signature) (X : Set) : Set where >>> ?? constructor _,_ >>> ?? field >>> ???? C : Signature.? Sig >>> ???? as : Vec X (Signature.arity Sig C) >>> >>> data ? (S : Signature) : Set where >>> ?? In : ? S (? S) -> ? S >>> >>> size : {S : Signature} -> ? S -> ? >>> size (In (C , as)) = suc (sum (map {!size!} as)) >>> >>> size' : {S : Signature} -> ? S -> ? >>> size' {sig ? arity} (In (C , as)) with arity C >>> size' {sig ? arity} (In (C , [])) | zero = 0 >>> size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map >>> {!size'!} (x ? as) )) >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From martin at dcc.fceia.unr.edu.ar Thu Dec 7 20:10:28 2017 From: martin at dcc.fceia.unr.edu.ar (=?UTF-8?Q?Mart=c3=adn?=) Date: Thu, 7 Dec 2017 16:10:28 -0300 Subject: [Agda] Non-termination help! In-Reply-To: <65ae9840-e2e8-bb0e-714f-8ad5e158bfc6@ens-lyon.org> References: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> <1ebfb9c5-dcab-0117-0417-47f6cf5df21e@dcc.fceia.unr.edu.ar> <65ae9840-e2e8-bb0e-714f-8ad5e158bfc6@ens-lyon.org> Message-ID: <79fc7d3a-0be7-d063-03c9-1ab6a50f8790@dcc.fceia.unr.edu.ar> Hello Gallais, Exactly! I have to postulate functional extensionality in order to prove equality between these functions. The good thing is that I just use it when proving that every Signature defines an endofunctor in Set. ?Endo : Signature -> Endofunctor (Sets lzero) ?Endo Sig = record { F? = ? Sig ?????????????????? ; F? = ? { x (C , as) ? C , ? x? ? x (as x?)} ?????????????????? ; homomorphism = ?-refl ?????????????????? ; F-resp-? = ?{ x {C , as} ? ?-cong (? y ? C , y) (ext ? a ? x {as a})} -- <- here it is! ?????????????????? ; identity = ?-refl ??????????? } Thank you for your answer! Cheers, Mart?n On 12/07/2017 03:56 PM, Guillaume Allais wrote: > Hi Mart?n, > > This representation works because the subterm relationship between > `as` and `as x` is self-evident from Agda's point of view. However, > when you have a vector of subterms and you step through it via `map`, > you add one level of indirection which hides from Agda the fact that > the recursive calls are performed on direct subterms. > > As Andreas said, the old-school solution to this issue is to write > a mutually defined `mapSize`, an inlined and specialised version of > `map` partially applied to `size`. And the modern approach to this > problem is to use sized types so that the *type* is explicit about > the fact that `map` doesn't do anything funky with the induction > hypothesis it is handed down. > > You have demonstrated a third way which is to use the duality between > a finite data structure and its lookup function (or dually: between a > function with a finite domain and its tabulation). However this will > probably create some trouble whenever you want to prove things equal > (unless you're willing to postulate functional extensionality) because > vectors are much more permissive than functions when it comes to proving > them propositionally equal. > > Cheers, > -- > gallais > > On 07/12/17 19:21, Mart?n wrote: >> Hello Andreas, >> >> Thank you very much for the quick response. As I told you I wanted to >> avoid sized types and after a bit we came up with another solution. >> >> We use *Fin* datatype to represent N-Ary product instead of Vec. >> >> ??? open import Data.Fin >> >> ??? record Signature : Set (lsuc lzero) where >> ? ??? constructor sig >> ? ??? field >> ??? ??? ? : Set >> ??? ??? arity : ? -> ? >> >> ??? record ? (Sig : Signature) (X : Set) : Set where >> ? ??? constructor _,_ >> ? ??? field >> ??? ??? C? : Signature.? Sig >> ??? ??? as : Fin (Signature.arity Sig C) -> X >> >> ??? data ?M (S : Signature) : Set where >> ? ??? In : ? S (?M S) -> ?M S >> >> ??? sumUp : {n : ?} -> (Fin n -> ?) -> ? >> ??? sumUp {zero} f = zero >> ??? sumUp {suc n} f =? f zero + sumUp ? x ? f (suc x) >> >> ??? size : {Sig : Signature} -> ?M Sig -> ? >> ??? size {Sig} (In (C , as)) = suc (sumUp ? x ? size (as x)) >> >> Sadly I am a bit confused now. Why does this representation work? I >> know that *FIn* is an indexed type, but my guess is that I also have >> more power from the higher order function *as*. Basically the >> termination checker now sees that I am calling *size (as x)* with *as* >> being smaller than *In (C, as)*, am I correct? >> >> Thank you again for your time! >> >> Cheers, >> >> Mart?n. >> >> -- >> >> On 12/07/2017 05:29 AM, Andreas Abel wrote: >>> Mart?n, >>> >>> a bit ironically, to define "size" you need "sized types". ;-) >>> >>> The termination checker per se does not see that in the call >>> >>> ? map size as >>> >>> function "size" will be only applied to arguments that are >>> structurally smaller than "In (C , as)"; simply, because it cannot >>> even "see" an argument to "size". >>> >>> To help the termination checker, you need to index type \mu with a >>> Size (built-in notion for an upper bound on the height). >>> >>> ? open import Size >>> >>> ? data ? (S : Signature) (i : Size) : Set where >>> ??? In : {j : Size< i} ? ? S (? S j) -> ? S i >>> >>> ? size : ?{i} {S : Signature} -> ? S i -> ? >>> ? size (In (C , as)) = suc (sum (map size as)) >>> >>> Now "size" has an additional argument "i" which decreases in >>> recursive calls. >>> >>> Alternatively, you can define "size" mutually with a function >>> "mapSize" which is an inling of the code for "map size". >>> >>> Cheers, >>> Andreas >>> >>> On 06.12.2017 14:56, Mart?n wrote: >>>> Hello everyone. I am struggling with Agda's termination checker. >>>> >>>> The idea is to define a recursive function like *size* over terms ? >>>> S for some signature S (definitions are bellow). I can destruct (t : >>>> ? S) to obtain some symbol and its 'arguments', such arguments >>>> should be smaller since ? S is strictly positive. Therefore, I >>>> should be able to recursively call size, right?. >>>> >>>> Here is an example where I leave the holes to be filled. I have >>>> tried different approaches to help the termination checker such as >>>> views and sized types. Sized types fix these simple functions, but >>>> it complicates matters in further proofs. >>>> >>>> Cheers, >>>> >>>> Mart?n. >>>> >>>> ---- >>>> >>>> module Q where >>>> >>>> open import Data.Vec >>>> open import Data.Nat >>>> >>>> open import Level renaming (zero to lzero ; suc to lsuc) >>>> >>>> record Signature : Set (lsuc lzero) where >>>> ?? constructor sig >>>> ?? field >>>> ???? ? : Set >>>> ???? arity : ? -> ? >>>> >>>> record ? (Sig : Signature) (X : Set) : Set where >>>> ?? constructor _,_ >>>> ?? field >>>> ???? C : Signature.? Sig >>>> ???? as : Vec X (Signature.arity Sig C) >>>> >>>> data ? (S : Signature) : Set where >>>> ?? In : ? S (? S) -> ? S >>>> >>>> size : {S : Signature} -> ? S -> ? >>>> size (In (C , as)) = suc (sum (map {!size!} as)) >>>> >>>> size' : {S : Signature} -> ? S -> ? >>>> size' {sig ? arity} (In (C , as)) with arity C >>>> size' {sig ? arity} (In (C , [])) | zero = 0 >>>> size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map >>>> {!size'!} (x ? as) )) >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Thu Dec 7 21:14:42 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 07 Dec 2017 23:14:42 +0300 Subject: [Agda] `<' reasoning Message-ID: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> People, I meet the following difficulty in Agda reasoning about _<_. For Nat, it is all right, because m < n is defined as suc m ? n, and it works the construct e[1] References: <40703d08-879b-4478-40f5-183e1cf2fe5c@chalmers.se> <1ebfb9c5-dcab-0117-0417-47f6cf5df21e@dcc.fceia.unr.edu.ar> Message-ID: <48665877-9e6e-4afd-9b4b-10140baf54a6@chalmers.se> > Basically the termination > checker now sees that I am calling *size (as x)* with *as* being smaller > than *In (C, as)*, am I correct? Exactly! And sumUp is defined by recursion on the hidden argument n. --Andreas On 07.12.2017 19:21, Mart?n wrote: > Hello Andreas, > > Thank you very much for the quick response. As I told you I wanted to > avoid sized types and after a bit we came up with another solution. > > We use *Fin* datatype to represent N-Ary product instead of Vec. > > ??? open import Data.Fin > > ??? record Signature : Set (lsuc lzero) where > ? ??? constructor sig > ? ??? field > ??? ??? ? : Set > ??? ??? arity : ? -> ? > > ??? record ? (Sig : Signature) (X : Set) : Set where > ? ??? constructor _,_ > ? ??? field > ??? ??? C? : Signature.? Sig > ??? ??? as : Fin (Signature.arity Sig C) -> X > > ??? data ?M (S : Signature) : Set where > ? ??? In : ? S (?M S) -> ?M S > > ??? sumUp : {n : ?} -> (Fin n -> ?) -> ? > ??? sumUp {zero} f = zero > ??? sumUp {suc n} f =? f zero + sumUp ? x ? f (suc x) > > ??? size : {Sig : Signature} -> ?M Sig -> ? > ??? size {Sig} (In (C , as)) = suc (sumUp ? x ? size (as x)) > > Sadly I am a bit confused now. Why does this representation work? I know > that *FIn* is an indexed type, but my guess is that I also have more > power from the higher order function *as*. Basically the termination > checker now sees that I am calling *size (as x)* with *as* being smaller > than *In (C, as)*, am I correct? > > Thank you again for your time! > > Cheers, > > Mart?n. > > -- > > On 12/07/2017 05:29 AM, Andreas Abel wrote: >> Mart?n, >> >> a bit ironically, to define "size" you need "sized types". ;-) >> >> The termination checker per se does not see that in the call >> >> ? map size as >> >> function "size" will be only applied to arguments that are >> structurally smaller than "In (C , as)"; simply, because it cannot >> even "see" an argument to "size". >> >> To help the termination checker, you need to index type \mu with a >> Size (built-in notion for an upper bound on the height). >> >> ? open import Size >> >> ? data ? (S : Signature) (i : Size) : Set where >> ??? In : {j : Size< i} ? ? S (? S j) -> ? S i >> >> ? size : ?{i} {S : Signature} -> ? S i -> ? >> ? size (In (C , as)) = suc (sum (map size as)) >> >> Now "size" has an additional argument "i" which decreases in recursive >> calls. >> >> Alternatively, you can define "size" mutually with a function >> "mapSize" which is an inling of the code for "map size". >> >> Cheers, >> Andreas >> >> On 06.12.2017 14:56, Mart?n wrote: >>> Hello everyone. I am struggling with Agda's termination checker. >>> >>> The idea is to define a recursive function like *size* over terms ? S >>> for some signature S (definitions are bellow). I can destruct (t : ? >>> S) to obtain some symbol and its 'arguments', such arguments should >>> be smaller since ? S is strictly positive. Therefore, I should be >>> able to recursively call size, right?. >>> >>> Here is an example where I leave the holes to be filled. I have tried >>> different approaches to help the termination checker such as views >>> and sized types. Sized types fix these simple functions, but it >>> complicates matters in further proofs. >>> >>> Cheers, >>> >>> Mart?n. >>> >>> ---- >>> >>> module Q where >>> >>> open import Data.Vec >>> open import Data.Nat >>> >>> open import Level renaming (zero to lzero ; suc to lsuc) >>> >>> record Signature : Set (lsuc lzero) where >>> ?? constructor sig >>> ?? field >>> ???? ? : Set >>> ???? arity : ? -> ? >>> >>> record ? (Sig : Signature) (X : Set) : Set where >>> ?? constructor _,_ >>> ?? field >>> ???? C : Signature.? Sig >>> ???? as : Vec X (Signature.arity Sig C) >>> >>> data ? (S : Signature) : Set where >>> ?? In : ? S (? S) -> ? S >>> >>> size : {S : Signature} -> ? S -> ? >>> size (In (C , as)) = suc (sum (map {!size!} as)) >>> >>> size' : {S : Signature} -> ? S -> ? >>> size' {sig ? arity} (In (C , as)) with arity C >>> size' {sig ? arity} (In (C , [])) | zero = 0 >>> size' {sig ? arity} (In (C , (x ? as))) | suc arC = suc (sum (map >>> {!size'!} (x ? as) )) >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From ulf.norell at gmail.com Fri Dec 8 09:45:01 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 8 Dec 2017 09:45:01 +0100 Subject: [Agda] `<' reasoning In-Reply-To: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> References: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> Message-ID: Here's how you can do it: https://gist.github.com/UlfNorell/102f8e59744de8a69f94b39f09f70c1d I'll leave it as an exercise to hook it up to the relevant structures in the standard library. / Ulf On Thu, Dec 7, 2017 at 9:14 PM, Sergei Meshveliani wrote: > People, > > I meet the following difficulty in Agda reasoning about _<_. > > For Nat, it is all right, because m < n is defined as suc m ? n, > and it works the construct > > e[1] begin suc e[1] ?? .. ? > ... > ... ?? .. ? > ... > e[n] > ? > > formed with standard functions > begin_ , _? , _??_?_ , _??_?_ > > But there are domains without suc operator (agreed with _?_, _<_). > For example, consider the proof > > ---------------------------------------------- > postulate bs1 > goal : 0bs1 < 0# + 0bs'1 > goal = subst? _<_ (sym eq0) eq1 le > where > eq0 : 0bs1 ? bs1 * 2bin > eq0 = *2?*2bin bs1 > > eq1 = begin bs'1 * 2bin ?? sym (*2?*2bin bs'1) ? > bs'1 *2 ?? sym (0+ 0bs'1) ? > 0# + 0bs'1 > ? > > le : bs1 * 2bin < bs'1 * 2bin > le = *bs1-mono-< [ 0b ] bs1 ---------------------------------------------- > > _?_ is defined as x ? y = x < y ? x ? y. > And imagine that we do not use suc for redefining _?_. > > This is more difficult to compose and to read than the `linear' > construct of > goal = > begin< 0bs1 (1) ?[ *2?*2bin bs1 ] > bs1 * 2bin (2) <[ *bs1-mono-< [ 0b ] bs1 bs'1 * 2bin (3) ?[ sym (*2?*2bin bs'1) ] > bs'1 *2 (4) ?[ sym (0+ 0bs'1) ] > 0# + 0bs'1 (5) > end< > > Each next term in the column is less or is equal to the current one, > and there is at least one line of the strict construct (that is of > _<[_]_). Hence this proves the goal. > > Are there provers in Standard library that enable writing something like > the above `linear' proofs with _<_ ? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.stucki at epfl.ch Fri Dec 8 12:14:47 2017 From: sandro.stucki at epfl.ch (Sandro Stucki) Date: Fri, 8 Dec 2017 12:14:47 +0100 Subject: [Agda] `<' reasoning In-Reply-To: References: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> Message-ID: Hi Sergei, The usual preorder reasoning framework from the standard library does not work for _<_ because strict orders are irreflexive, but reflexivity is crucial in the implementation of Relation.Binary.PreorderReasoning. Ulf's gist gets around that by defining a different framework for inequality reasoning that is not based on Relation.Binary.PreorderReasoning. Another solution is to relax the requirements of Relation.Binary.PreorderReasoning to allow reasoning about arbitrary transitive relations that respect the underlying equality but are not necessarily reflexive. Here's a possible implementation: https://gist.github.com/sstucki/2ce758a6dc62883ecbe54e71c0177fd0 The drawback of this solution is that it's not specific to strict/non-strict orders so it doesn't allow mixing strict and non-strict steps in the way Ulf's framework does. I suspect that this limitation could be overcome via the conversion modules Relation.Binary.{StrictToNonStrict,NonStrictToStrict} but I have not tried that. Cheers /Sandro On Fri, Dec 8, 2017 at 9:45 AM, Ulf Norell wrote: > Here's how you can do it: > > https://gist.github.com/UlfNorell/102f8e59744de8a69f94b39f09f70c1d > > I'll leave it as an exercise to hook it up to the relevant structures in the > standard library. > > / Ulf > > On Thu, Dec 7, 2017 at 9:14 PM, Sergei Meshveliani wrote: >> >> People, >> >> I meet the following difficulty in Agda reasoning about _<_. >> >> For Nat, it is all right, because m < n is defined as suc m ? n, >> and it works the construct >> >> e[1]> begin suc e[1] ?? .. ? >> ... >> ... ?? .. ? >> ... >> e[n] >> ? >> >> formed with standard functions >> begin_ , _? , _??_?_ , _??_?_ >> >> But there are domains without suc operator (agreed with _?_, _<_). >> For example, consider the proof >> >> ---------------------------------------------- >> postulate bs1> >> goal : 0bs1 < 0# + 0bs'1 >> goal = subst? _<_ (sym eq0) eq1 le >> where >> eq0 : 0bs1 ? bs1 * 2bin >> eq0 = *2?*2bin bs1 >> >> eq1 = begin bs'1 * 2bin ?? sym (*2?*2bin bs'1) ? >> bs'1 *2 ?? sym (0+ 0bs'1) ? >> 0# + 0bs'1 >> ? >> >> le : bs1 * 2bin < bs'1 * 2bin >> le = *bs1-mono-< [ 0b ] bs1> ---------------------------------------------- >> >> _?_ is defined as x ? y = x < y ? x ? y. >> And imagine that we do not use suc for redefining _?_. >> >> This is more difficult to compose and to read than the `linear' >> construct of >> goal = >> begin< 0bs1 (1) ?[ *2?*2bin bs1 ] >> bs1 * 2bin (2) <[ *bs1-mono-< [ 0b ] bs1> bs'1 * 2bin (3) ?[ sym (*2?*2bin bs'1) ] >> bs'1 *2 (4) ?[ sym (0+ 0bs'1) ] >> 0# + 0bs'1 (5) >> end< >> >> Each next term in the column is less or is equal to the current one, >> and there is at least one line of the strict construct (that is of >> _<[_]_). Hence this proves the goal. >> >> Are there provers in Standard library that enable writing something like >> the above `linear' proofs with _<_ ? >> >> Thanks, >> >> ------ >> Sergei >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From nad at cse.gu.se Fri Dec 8 14:58:35 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 8 Dec 2017 14:58:35 +0100 Subject: [Agda] `<' reasoning In-Reply-To: References: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> Message-ID: <90121af3-78ec-787f-3e28-d0ee632dd803@cse.gu.se> On 2017-12-08 12:14, Sandro Stucki wrote: > Another solution is to relax the requirements of > Relation.Binary.PreorderReasoning to allow reasoning about arbitrary > transitive relations that respect the underlying equality but are not > necessarily reflexive. Here's a possible implementation: > > https://gist.github.com/sstucki/2ce758a6dc62883ecbe54e71c0177fd0 In a proof-relevant setting it can also be nice to avoid inserting extra steps in proofs. I often use combinators of the following kind: finally : ? {a} {A : Set a} (x y : A) ? x ? y ? x ? y finally _ _ x?y = x?y syntax finally x y x?y = x ?? x?y ?? y ? I also have a library that allows you to mix different relations: http://www.cse.chalmers.se/~nad/listings/up-to/Equational-reasoning.html One key piece is the following abstraction of transitivity: record Transitive {a b p q} {A : Set a} {B : Set b} (P : A ? A ? Set p) (Q : A ? B ? Set q) : Set (a ? b ? p ? q) where constructor is-transitive field transitive : ? {x y z} ? P x y ? Q y z ? Q x z (I also have one where transitivity goes from P and Q to P.) It is then up to users of the library to define suitable instances. -- /NAD From i.sergey at ucl.ac.uk Fri Dec 8 15:17:34 2017 From: i.sergey at ucl.ac.uk (Sergey, Ilya) Date: Fri, 8 Dec 2017 14:17:34 +0000 Subject: [Agda] CoqPL'18: call for participations and final programme Message-ID: <998C3815-58D8-40F0-98AA-6A56D806F47E@ucl.ac.uk> ============================================================= CoqPL 2018 Coq for Programming Languages -- A Coq users and developers meeting 13 January 2018, co-located with POPL (as usual) Los Angeles, California, United States CALL FOR PARTICIPATIONS https://popl18.sigplan.org/track/CoqPL-2018 ============================================================= Workshop Overview ----------------- The series of CoqPL workshops provide an opportunity for programming languages researchers to meet and interact with one another and members from the core Coq development team. At the meeting, we will discuss upcoming new features, see talks and demonstrations of exciting current projects, solicit feedback for potential future changes, and generally work to strengthen the vibrant community around our favourite proof assistant. The exciting final progamme is now available at: https://popl18.sigplan.org/track/CoqPL-2018#program Workshop Programme ------------------ 9:00-10:00: Keynote * CoqHammer: Strong Automation for Program Verification ?ukasz Czajka and Cezary Kaliszyk 10:30-12:10: Tactics and Proof Engineering * A ?destruct? Tactic for Mtac2 Jan-Oliver Kaiser and Beta Ziliani * Typed Template Coq Simon Boulier, Matthieu Sozeau, Nicolas Tabareau and Abhishek Anand * Elpi: an extension language for Coq Enrico Tassi * Coqatoo: Generating Natural Language Versions of Coq Proofs Andrew Bedford 14:00-14:50: PL Metatheory * Locally Nameless at Scale Stephanie Weirich, Antoine Voizard and Anastasiya Kravchuk-Kirilyuk * A Coq Formalisation of a Core of R Martin Bodin 14:50-15:30: Coq Deveveloprs Talk & Panel 16:00-18:05: Semantics and Synthesis * Revisiting Parametricity: Inductives and Uniformity of Propositions Abhishek Anand and Greg Morrisett * Phantom Types for Quantum Programs Robert Rand, Jennifer Paykin and Steve Zdancewic * Towards Context-Aware Data Refinement Paul Krogmeier, Steven Kidd and Benjamin Delaware * Mechanizing the Construction and Rewriting of Proper Functions in Coq Edwin Westbrook * A calculus for logical refinements in separation logic Dan Frumin and Robbert Krebbers Contact ----------------- For any queries, please contact : coqpl2018 at easychair.org Kind regards, Yves Bertot and Ilya Sergey -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sat Dec 9 11:25:56 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sat, 09 Dec 2017 13:25:56 +0300 Subject: [Agda] `<' reasoning In-Reply-To: References: <1512677682.2835.42.camel@one.mechvel.pereslavl.ru> Message-ID: <1512815156.2774.27.camel@one.mechvel.pereslavl.ru> On Fri, 2017-12-08 at 09:45 +0100, Ulf Norell wrote: > Here's how you can do it: > > > https://gist.github.com/UlfNorell/102f8e59744de8a69f94b39f09f70c1d > > [..] Great! It works. Thanks to people for the references. I just start with the first one. Ulf, it remains a minor question about including there the functionality of Relation.Binary.PropositionalEquality.?-Reasoning In the below example, the equality goal test4 needs using ?-Reasoning and renaming the operators begin_ and _?. Can InequalityReasoning be fixed so as to include the functionality of ?-Reasoning (so that import Relation.Binary.PropositionalEquality to be canceled) ? ------------------------------------------------------------------------ open import Relation.Binary.PropositionalEquality as PE using (_?_; refl; sym) open import Data.List using ([]) open import Bin0 using (0#; 1bin; _<_; _?_; _+_) -- of application open import BinProp0 using (0 > On Thu, Dec 7, 2017 at 9:14 PM, Sergei Meshveliani > wrote: > People, > > I meet the following difficulty in Agda reasoning about _<_. > > For Nat, it is all right, because m < n is defined as suc > m ? n, > and it works the construct > > e[1] begin suc e[1] ?? .. ? > ... > ... ?? .. ? > ... > e[n] > ? > > formed with standard functions > begin_ , _? , _??_?_ , _??_?_ > > But there are domains without suc operator (agreed with _?_, > _<_). > For example, consider the proof > > ---------------------------------------------- > postulate bs1 > goal : 0bs1 < 0# + 0bs'1 > goal = subst? _<_ (sym eq0) eq1 le > where > eq0 : 0bs1 ? bs1 * 2bin > eq0 = *2?*2bin bs1 > > eq1 = begin bs'1 * 2bin ?? sym (*2?*2bin bs'1) ? > bs'1 *2 ?? sym (0+ 0bs'1) ? > 0# + 0bs'1 > ? > > le : bs1 * 2bin < bs'1 * 2bin > le = *bs1-mono-< [ 0b ] bs1 ---------------------------------------------- > > _?_ is defined as x ? y = x < y ? x ? y. > And imagine that we do not use suc for redefining _?_. > > This is more difficult to compose and to read than the > `linear' > construct of > goal = > begin< 0bs1 (1) ?[ *2?*2bin bs1 ] > bs1 * 2bin (2) <[ *bs1-mono-< [ 0b ] bs1 bs'1 * 2bin (3) ?[ sym (*2?*2bin bs'1) ] > bs'1 *2 (4) ?[ sym (0+ 0bs'1) ] > 0# + 0bs'1 (5) > end< > > Each next term in the column is less or is equal to the > current one, > and there is at least one line of the strict construct (that > is of > _<[_]_). Hence this proves the goal. > > Are there provers in Standard library that enable writing > something like > the above `linear' proofs with _<_ ? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From dominique.devriese at gmail.com Tue Dec 12 15:45:45 2017 From: dominique.devriese at gmail.com (Dominique Devriese) Date: Tue, 12 Dec 2017 14:45:45 +0000 Subject: [Agda] Call for Short Talks on Secure Compilation (PriSC Workshop @ POPL'18) Message-ID: ======================================================================= Call for Short Talks on Secure Compilation (PriSC Workshop @ POPL'18) ======================================================================= Do not miss the chance to submit short talks on your cutting-edge secure compilation research. Submission deadline is 14 December 2017. More information below. ====================================================================== Important Dates ====================================================================== Short talk submission deadline: 14 December 2017, AoE Short talk notification: 18 December 2017 PriSC Workshop takes place: 13 January 2018 ====================================================================== Scope of PriSC Short Talks Session ====================================================================== In the short talks session of PriSC, participants get 5 minutes to present intriguing ideas, advertise ongoing work, etc. Anyone interested in giving a short 5-minute talk should submit an abstract. Any topic that could be of interest to the emerging secure compilation community is in scope. Presentations that provide a useful outside view or challenge the community are also welcome. Topics of interest include but are **not** limited to: - attacker models for secure compiler chains - secure compilation properties: full abstraction, memory safety, control-flow integrity, preserving non-interference or (hyper-)properties against adversarial contexts, secure multi-language interoperability - enforcement mechanisms: static checking, program verification, reference monitoring, program rewriting, software fault isolation, system-level protection, secure hardware, crypto, randomization - experimental evaluation and applications of secure compilation - proof methods: (bi)simulation, logical relations, game semantics, multi-language semantics, embedded interpreters - formal verification of secure compilation chain (protection mechanisms, compilers, linkers, loaders), machine-checked proofs, translation validation, property-based testing ====================================================================== Guidelines for Submitting Short Talk Abstracts ====================================================================== Abstracts should be submitted in text format and are not anonymous Giving a talk at the workshop does not preclude publication elsewhere. Please submit your abstracts at https://prisc18short.hotcrp.com For questions about the short talks please contact the Program Chair. ====================================================================== 2nd Workshop on Principles of Secure Compilation (PriSC 2018) ====================================================================== The Workshop on Principles of Secure Compilation (PriSC) is a new informal 1-day workshop without any proceedings. The goal is to identify interesting research directions and open challenges and to bring together researchers interested in secure compilation. The 2nd PriSC edition will be held on Saturday, 13 January 2018, in Los Angeles, together with the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). More information including the workshop program available at http://popl18.sigplan.org/track/prisc-2018 ====================================================================== Participation and Registration ====================================================================== PriSC will be held at the POPL'18 venue (Omni Hotel LA). To participate, please register through the POPL registration system: https://popl18.sigplan.org/attending/Registration ====================================================================== Program Committee ====================================================================== Program Chair Catalin Hritcu Inria Paris Members Amal Ahmed Inria Paris and Northeastern University Lars Birkedal Aarhus University Dominique Devriese KU Leuven C?dric Fournet Microsoft Research Deepak Garg MPI-SWS Xavier Leroy Inria Paris David Naumann Stevens Institute of Technology Marco Patrignani MPI-SWS Frank Piessens KU Leuven Tamara Rezk Inria Sophia Antipolis Nikhil Swamy Microsoft Research ====================================================================== Organizing Committee ====================================================================== Amal Ahmed Inria Paris and Northeastern University Dominique Devriese KU Leuven Deepak Garg MPI-SWS Catalin Hritcu Inria Paris Marco Patrignani MPI-SWS Tamara Rezk Inria Sophia Antipolis ====================================================================== Contact and More Information ===================================================================== More information about PriSC 2018 can be found on the website: http://popl18.sigplan.org/track/prisc-2018 For questions please contact the Program Chair. To make sure you receive such announcements in the future please subscribe to the following low-traffic mailing list: https://lists.gforge.inria.fr/mailman/listinfo/prisc-announce -------------- next part -------------- An HTML attachment was scrubbed... URL: From grewe at st.informatik.tu-darmstadt.de Thu Dec 14 13:32:37 2017 From: grewe at st.informatik.tu-darmstadt.de (Sylvia Grewe) Date: Thu, 14 Dec 2017 13:32:37 +0100 Subject: [Agda] 2018: Call for workshop, symposium & poster submissions Message-ID: <24e47f9d-56ff-458d-825b-0ed78613ddc5@st.informatik.tu-darmstadt.de> ----------------------------------------------------------------------- ? 2018 : The Art, Science, and Engineering of Programming ?? April 9-12, 2018, Nice, France https://2018.programming-conference.org/ ----------------------------------------------------------------------- The associated journal for already published two exciting issues this year (openly accessible at http://programming-journal.org/2018/), a third one is being prepared at the moment. All of the papers from this year?s volume will be presented at 2018 in Nice in April. Are you still looking for a good opportunity to contribute to the event? We are excited to announce that there will be 11 co-located events at the 2018 conference: ?- ACM Student Research Competition / 2018 Posters ?- Bx 2018 - 7th International Workshop on Bidirectional Transformations ?-?CoCoDo 2018 ? Raincode Labs Compiler Coding Dojo ?- LASSY 2018 - 3rd?Workshop on Live Adaptation of Software SYstems ?- MOMO 2018 - 3rd Workshop on Modularity in Modelling ?- MoreVMs 2018 - 2nd Workshop on Modern Language Runtimes, Ecosystems, and VMs ?-?PASS 2018 - 2nd Workshop on Programming Across the System Stack ?- Programming for the Large 2018 Workshop ?- ProWeb 2018 - 2nd International Workshop on Programming Technology for the Future Web ?- PX/18 - 3rd Workshop on Programming Experience ?- Salon des Refus?s 2018 - 2nd edition of the Salon des Refus?s workshop All co-located events will take place during April 9-10 2018. Below, we list short descriptions and important dates for each event. We are looking forward to your contributions! ******************************************************************** ?ACM Student Research Competition / 2018 Posters ???Submissions: Mon 22 Jan 2018 https://2018.programming-conference.org/track/programming-2018-src ******************************************************************** The ACM Student Research Competition (SRC), sponsored by Microsoft Research, offers a unique forum for ACM student members at the undergraduate and graduate levels to present their original research before a panel of judges and conference attendees. The SRC gives visibility to up-and-coming young researchers, and offers them an opportunity to discuss their research with experts in their field, get feedback, and to help sharpen communication and networking skills. ACM?s SRC program covers expenses up to $500 for all students invited to an SRC. Please see our website for requirements and further details. **************************************************************** ?Bx 2018 - 7th International Workshop on Bidirectional Transformations ???Paper submissions: Fri 19 Jan 2018 ???Notifications: Sat 17 Feb 2018 https://2018.programming-conference.org/track/bx-2018-papers **************************************************************** Bidirectional transformations (bx) are a mechanism for maintaining the consistency of at least two related sources of information. Such sources can be relational databases, software models and code, or any other document following standard or ad-hoc formats. Bx are an emerging topic in a wide range of research areas, with prominent presence at top conferences in several different fields (namely databases, programming languages, software engineering, and graph transformation), but with results in one field often getting limited exposure in the others. Bx 2018 is a dedicated venue for bx in all relevant fields, and is part of a workshop series that was created in order to promote cross-disciplinary research and awareness in the area. As such, since its beginning in 2012, the workshop has rotated between venues in different fields. **************************************************************** ?CoCoDo 2018 ? Raincode Labs Compiler Coding Dojo ??? No submission deadlines! https://cocodo.github.io **************************************************************** If you ever studied any computing discipline, you must have learnt something about compilers as well, and you probably think you forgot everything about it since. Yet, almost every time you develop a non-trivial piece of software, you end up converting data between formats, traversing hierarchical structures, analysing and representing dependences and doing many other things that are at the heart of compiler design and implementation. Whether you are applying a Visitor design pattern or emulating a state machine with a switch/case statement, you are programming a little part of a compiler for your own language. Participating in CoCoDo will give you a chance to immerse in the marvels of compiler technologies for one day ? and if you like it, you are welcome to stay in this field! Our coding dojo will be split into sessions, each dedicated to one aspect of compilation, with brief explanations and supervision by leading field experts. There will be several technologies, mainstream and otherwise, laid out at your disposal. Better yet, you can bring your own workbench and show us how it?s done. **************************************************************** ?LASSY 2018 - 3rd?Workshop on Live Adaptation of Software SYstems ???Paper submissions: Fri 12 Jan 2018 ???Notifications: Fri 12 Feb 2018 https://2018.programming-conference.org/track/LASSY-2018-papers **************************************************************** The LASSY workshop provides a space for discussion and collaboration between researchers working on the problem of enabling live adaptations to software systems, across the development stack. The workshop encourages theoretical work on programming models and techniques to adapt software systems at the programming language, database, or user interface levels; application and practice to adaptive systems to a particular domain; and empirical studies on the impact and assessment of adaptive systems from a societal point of view. **************************************************************** ?MOMO 2018 - 3rd Workshop on Modularity in Modelling ?? Abstract submissions (optional): Fri 2 Feb 2018 ?? Paper submissions: Thu 8 Feb 2018 ?? Notifications: Thu 1 Mar 2018 http://www.momo2018.ece.mcgill.ca/index.htm **************************************************************** Despite the power of abstraction of modelling, models of real-world problems and systems quickly grow to such an extent that managing the complexity by using proper modularization techniques becomes necessary. The Third International Modularity in Modelling Workshop (MoMo?18) will bring together researchers and practitioners interested in the theoretical and practical challenges resulting from applying modularity, advanced separation of concerns, and composition at the modelling level. It is intended to provide a forum for presenting new ideas and discussing the impact of the use of modularization in the context of (MDE) at different levels of abstraction. MoMo?18 will bring together researchers and practitioners interested in exploring modularization techniques for modelling, such as but not limited to aspect-oriented mechanisms to support advanced separation of concerns, advanced composition operators for possibly heterogeneous models, and techniques for execution and reasoning over global properties of modularized models. ****************************************************************************** ?MoreVMs 2018 - 2nd Workshop on Modern Language Runtimes, Ecosystems, and VMs ?? Submissions: Fri 26 Jan 2018 ?? Notifications: Fri 23 Feb 2018 https://2018.programming-conference.org/track/MoreVMs-2018 ****************************************************************************** The MoreVMs'18 workshop aims to bring together industrial and academic programmers to discuss the design, implementation, and usage of modern languages and runtimes. This includes aspects such as reuse of language runtimes, modular implementation, language design and compilation strategies. The workshop aims to enable a diverse discussion on how languages and runtimes are currently being utilized, and where they need to improve further. We welcome presentation proposals in the form of extended abstracts discussing experiences, work-in-progress, as well as future visions, from either an academic or industrial perspective. ************************************************************************** ?PASS 2018 - Workshop on Programming Across the System Stack ?? Submissions: Mon 5 Feb 2018 ?? Notifications: Mon 26 Feb 2018 ? ?Poster Submissions: Tue 6 Mar 2018 https://2018.programming-conference.org/track/PASS-2018-papers ************************************************************************** The landscape of computation platforms has changed dramatically in recent years. Emerging systems - such as wearable devices, smartphones, unmanned aerial vehicles, Internet of things, cloud computing servers, heterogeneous clusters, and data centers - pose a distinct set of system-oriented challenges ranging from data throughput, energy efficiency, security, real-time guarantees, to high performance. In the meantime, code quality, such as modularity or extensibility, remains a cornerstone in modern software engineering, bringing in crucial benefits such as modular reasoning, program understanding, and collaborative software development. This workshop is driven by one fundamental question: How does internal code quality interact with system-oriented goals? We welcome both positive and negative responses to this question. An example of the former would be modular reasoning systems specifically designed to promote system-oriented goals, whereas an example of the latter would be anti-patterns against system-oriented goals during software development. ************************************************************************* ?Programming for the Large 2018 Workshop Abstract submissions: Fri 26 Jan 2018 ?? Submissions (full papers): ?Fri 2 Feb 2018 ? ?Position paper and work-in-progress paper submission: Tue 13 Feb 2018 ?? Notifications: ?Fri 23 Feb 2018 https://2018.programmingconference.org/track/PftL-2018-papers ************************************************************************* In the last decade we have witnessed a new kid on the block in the programming (language) community: programming ?large computers?. Such computers include many-core machines, clusters of raspberry-pies, industry-scale cluster machines, cloud infrastructure, CUDA and MPI-based supercomputers etc. This workshop seeks to gather researchers that contribute to the simplification of the software stack that will be used to program such machinery in the near future. The main focus of the workshop is "Programming for the Large". Nonetheless, this workshop aims to bring together researchers from many disciplines: distributed programming, big data processing, distributed database engineering, etc. This workshop welcomes any contribution that advances the state-of-the-art in the design, implementation and engineering of runtime systems for cluster architectures. ************************************************************************* ?ProWeb 2018 - 2nd International Workshop on Programming Technology for the Future Web ?? Submissions: ?Mon 15 Jan 2018 ?? Notifications: Mon 12 Feb 2018 https://2018.programming-conference.org/track/proweb-2018-papers ************************************************************************* Web applications have become ubiquitous on desktop and mobile devices alike. Whereas ?responsive? web applications already offered a desktop-like experience, there is an increasing demand for ?rich? web applications (RIAs) that offer collaborative and even off-line functionality. ProWeb18, the 2nd International Workshop on Programming Technology for the Future Web, is a forum for researchers and practitioners to share and discuss new technology for programming these and future evolutions of the web. We welcome submissions introducing programming technology (i.e., frameworks, libraries, programming languages, program analyses and development tools) for implementing web applications and for maintaining their quality over time, as well as experience reports about the use of state-of-the-art programming technology. Relevant topics include, but are not limited to: program analysis and testing for the web; design and implementation of languages for the web; distributed technology for data sharing, replication and consistency; and security technology for the web. **************************************************************** PX/18 - 3rd Workshop on Programming Experience ?? Submissions: Sat 3 Feb 2018 ?? Notifications: Mon 26 Feb 2018 https://2018.programming-conference.org/track/px-2018-papers/ http://programming-experience.org/px18/ **************************************************************** PX is a workshop that explores the act of programming, in particular what programmers and programming teams do to create software. Do they type in source text and compile; do they modify running programs; what kinds of tools are available for error detection, correction, and prevention; what collaboration tools are available; what language features make some things easier (or harder); what constitutes programming; etc? The workshop is run as a writers? workshop. **************************************************************** ?Salon des Refus?s 2018 ?? Submissions: Thu 1 Feb 2018 ?? Notifications: Sat 17 Feb 2018 https://www.shift-society.org/salon/2018/ **************************************************************** Salon des Refus?s ("exhibition of rejects") was an 1863 exhibition of artworks rejected from the official Paris Salon. It displayed works by later famous modernists such as ?douard Manet, whose paintings were rejected by the conservative jury of the Paris Salon. A similar space is needed to explore new ways of doing computer science. Many interesting ideas about programming struggle to find space in the modern programming language research community, often because they are difficult to evaluate. To provide space for unorthodox thought provoking ideas, we take inspiration from literary criticism. Papers that spark an interesting debate among the program committee are presented together with an attributed critique that discusses the merits of the work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Sat Dec 16 12:06:03 2017 From: m.escardo at cs.bham.ac.uk (=?UTF-8?B?TWFydMOtbiBIw7Z0emVsIEVzY2FyZMOz?=) Date: Sat, 16 Dec 2017 11:06:03 +0000 Subject: [Agda] How to get rid of warning Message-ID: How do I get rid of this warning? " Warning (agda2): Note that the variable agda2-include-dirs is no longer used. You may want to update your configuration. You have at least two choices: * Use the library management system. * Set the include path using agda2-program-args. One way to avoid seeing this warning is to make sure that agda2-include-dirs is not bound. Warning (agda2): Note that the variable agda2-include-dirs is no longer used. You may want to update your configuration. You have at least two choices: * Use the library management system. * Set the include path using agda2-program-args. One way to avoid seeing this warning is to make sure that agda2-include-dirs is not bound. " I don't want to use any library, mine or somebody else's. I don't have a .agda directory, deliberately. (In another computer, I have it, with the path files empty, but I still get the above warning.) This variable "agda2-include-dirs" is not in my .emacs. Where is it? How do I "update my configuration" to get rid of this warning? Thanks. From abela at chalmers.se Sat Dec 16 18:00:33 2017 From: abela at chalmers.se (Andreas Abel) Date: Sat, 16 Dec 2017 18:00:33 +0100 Subject: [Agda] How to get rid of warning In-Reply-To: References: Message-ID: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> Mmh, are you sure it is not in any of your emacs configuration files, like .emacs .emacs.d/init.el or other configuration files along that line, or any file you include? On 16.12.2017 12:06, Mart?n H?tzel Escard? wrote: > How do I get rid of this warning? > > " > Warning (agda2): Note that the variable agda2-include-dirs is > no longer used. You may want to update your configuration. You > have at least two choices: > * Use the library management system. > * Set the include path using agda2-program-args. > > One way to avoid seeing this warning is to make sure that > agda2-include-dirs is not bound. > Warning (agda2): Note that the variable agda2-include-dirs is > no longer used. You may want to update your configuration. You > have at least two choices: > * Use the library management system. > * Set the include path using agda2-program-args. > > One way to avoid seeing this warning is to make sure that > agda2-include-dirs is not bound. > " > > I don't want to use any library, mine or somebody else's. > > I don't have a .agda directory, deliberately. (In another computer, I > have it, with the path files empty, but I still get the above warning.) > > This variable "agda2-include-dirs" is not in my .emacs. Where is it? How > do I "update my configuration" to get rid of this warning? > > Thanks. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From mechvel at botik.ru Mon Dec 18 21:40:30 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 18 Dec 2017 23:40:30 +0300 Subject: [Agda] Nat for termination counter Message-ID: <1513629630.2736.7.camel@one.mechvel.pereslavl.ru> Dear all, I have a certain doubt about using the counter of Nat for termination proofs. Consider the function for listing binary numbers: ---------------------------------------- pred : Bin ? Bin pred = fromBits ? minusCarry 1b ? toBits downFrom : Bin ? List Bin downFrom 0# = [ 0# ] downFrom (bs 1#) = (bs 1#) ? (downFrom (pred (bs 1#))) ---------------------------------------- Bin is intended to be used in order to avoid certain expensive operations with Nat. downFrom is fast, but it has termination problem. It needs a terminating version which is also fast. I try: --------------------------------------------------------------------- downFrom x = aux x (to? x) refl where aux : (x : Bin) ? (cnt : ?) ? to? x ? cnt ? List Bin aux 0# _ _ = [ 0# ] aux (bs 1#) 0 bs1N?0 = ?-elim (to?-bs1?0 bs bs1N?0) aux (bs 1#) (suc cnt) bs1N?cnt' = bs1 ? (aux (pred bs1) cnt eq) where bs1 = bs 1# eq : to? (pred bs1) ? cnt eq = begin to? (pred bs1) ?? to?-pred-homo bs1 ? predN (to? bs1) ?? cong predN bs1N?cnt' ? predN (suc cnt) ?? refl ? cnt ? --------------------------------------------------------------------- It applies a certain theorem of to?-pred-homo. It also uses the to? conversion for the counter cnt, and the counter serves termination proof. I do not know how to avoid potentially large data for the counter (never looked into sized types). But I have an impression that here the usage of to? does not explode the evaluation cost. Because * the (suc cnt) data always appears fast from to? bs1 (?), and the next counter is cnt, * the cnt value is evaluated lazily, it never becomes large in memory (?). What people think of this? As an experiment, I try ------------------------- test : Bin ? List String test x = "x = " ? showB x ? "\nxL = " ? showB xL ? [] where xs = downFrom x; xL = last 0# xs ------------------------- - build x ? (pred x) ? pred (pred x) ? ... ? 0# ? [] and print the last elment (x is input from file). Running this shows a linear cost order: the time for (x *2) is 2 * (time for x). How people think, is this a reliable approach? Thanks, ------ Sergei From mechvel at botik.ru Tue Dec 19 19:43:57 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Tue, 19 Dec 2017 21:43:57 +0300 Subject: [Agda] original Nat Message-ID: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> Please, what is a regular way to switch between the built-in Nat arithmetic and the original one (implemented in Agda) ? Data.Nat.Base of lib-0.14 contains open import Agda.Builtin.Nat public using ( zero; suc; _+_; _*_ ) renaming ( Nat to ?; _-_ to _?_ ) But I do not find the module Agda.Builtin.Nat. I need to use the Nat arithmetic programmed in Agda (?; _+_, _*_, _?_, _?_ ...) as in early days. Thanks, ------ Sergei From ulf.norell at gmail.com Wed Dec 20 09:08:23 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 20 Dec 2017 09:08:23 +0100 Subject: [Agda] original Nat In-Reply-To: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> References: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> Message-ID: Natural number operations _are_ implemented in Agda, and you'll find the definitions in Agda.Builtin.Nat. The way that they are built in is that when called on closed terms (for instance 101 + 52), the type checker evaluates that using Haskell integer arithmetic rather than the Agda definitions. You can read more here: http://agda.readthedocs.io/en/latest/language/built-ins.html#natural-numbers Agda.Builtin.Nat is shipped with Agda. You can find its location either by middle-clicking the module name in Emacs, or by calling Agda from the command line with `-v2`: Bla.agda: import Agda.Builtin.Nat $ agda -v2 Bla.agda Checking Bla (Bla.agda). Loading Agda.Builtin.Bool (/SOME_PATH/Agda-2.5.4/lib/prim/Agda/Builtin/Bool.agdai). Loading Agda.Builtin.Nat (/SOME_PATH/Agda-2.5.4/lib/prim/Agda/Builtin/Nat.agdai). Finished Bla. / Ulf On Tue, Dec 19, 2017 at 7:43 PM, Sergei Meshveliani wrote: > Please, what is a regular way to switch between the built-in Nat > arithmetic and the original one (implemented in Agda) ? > > Data.Nat.Base of lib-0.14 contains > > open import Agda.Builtin.Nat public using ( zero; suc; _+_; _*_ ) > renaming ( Nat to ?; _-_ to _?_ ) > > But I do not find the module Agda.Builtin.Nat. > > I need to use the Nat arithmetic programmed in Agda > (?; _+_, _*_, _?_, _?_ ...) as in early days. > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Dec 20 12:04:28 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 20 Dec 2017 14:04:28 +0300 Subject: [Agda] original Nat In-Reply-To: References: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> Message-ID: <1513767868.3055.68.camel@one.mechvel.pereslavl.ru> On Wed, 2017-12-20 at 09:08 +0100, Ulf Norell wrote: > Natural number operations _are_ implemented in Agda, and you'll find > the definitions in > Agda.Builtin.Nat. The way that they are built in is that when called > on closed terms (for > instance 101 + 52), the type checker evaluates that using Haskell > integer arithmetic rather > than the Agda definitions. > > > You can read more > here: http://agda.readthedocs.io/en/latest/language/built-ins.html#natural-numbers > > > Agda.Builtin.Nat is shipped with Agda. You can find its location > either by middle-clicking > the module name in Emacs, or by calling Agda from the command line > with `-v2`: > > > Bla.agda: > import Agda.Builtin.Nat > $ agda -v2 Bla.agda > [..] Thank you. Now, I find it on my machine on /home/mechvel/.cabal/share/x86_64-linux-ghc-7.10.2/Agda-2.5.3/lib/prim/Agda/Builtin/Nat.agda The problem is as follows. I have prepared a new certified arithmetic for Bin, including * _<_ and <-cmp comparison based on lexicographic ordering on bit lists, * _?_, divMod, gcd, * proofs for all important things, like CommutativeMonoid for _+_ and _*_, and other properties. The aim is to avoid any built-in arithmetic, with keeping a reasonable cost order. For example, (divMod x y) needs to cost somewhat O(l^2) for l = max (bitLength x) (bitLength y). But: in some paces it uses the counter cnt : ? for termination proof (I do not know how to arrange some termination proofs without using to?). It is initially obtained by (Bin.to? b), and works in the loops by pattern-matching against (1+ cnt). Now, I need a performance test showing that, for example, divMod x y has the intended cost order. And it does so. But: (Bin.to? b) applies Nat._+_ and (Nat._*_ 2) in a loop at the running time. The cost order for operating with cnt can be small due to the two reasons: (1) lazy evaluation of to?, with stepping from (1+ cnt) to cnt a few number of times, (2) built-in performance for Nat._+_ and (Nat._*_ 2). I need to make sure that the source of (2) can be removed. For this, I, probably, need to switch out built-ins for all Nat items, with letting them evaluate really in _unary_ system. For example, (Nat.+ 101 52) to compute in 53 steps of pattern matching. Right? How does one arrange this? Needs one to edit the file .../share/x86_64-linux-ghc-7.10.2/Agda-2.5.3/lib/prim/Agda/Builtin/Nat.agda with removing all the lines containing the pragma of {-# BUILTIN ... #-} ? Thanks, ------ Sergei > > On Tue, Dec 19, 2017 at 7:43 PM, Sergei Meshveliani > wrote: > Please, what is a regular way to switch between the built-in > Nat > arithmetic and the original one (implemented in Agda) ? > > Data.Nat.Base of lib-0.14 contains > > open import Agda.Builtin.Nat public using ( zero; suc; _+_; > _*_ ) > renaming ( Nat to ?; _-_ > to _?_ ) > > But I do not find the module Agda.Builtin.Nat. > > I need to use the Nat arithmetic programmed in Agda > (?; _+_, _*_, _?_, _?_ ...) as in early days. > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From ulf.norell at gmail.com Wed Dec 20 12:09:16 2017 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 20 Dec 2017 12:09:16 +0100 Subject: [Agda] original Nat In-Reply-To: <1513767868.3055.68.camel@one.mechvel.pereslavl.ru> References: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> <1513767868.3055.68.camel@one.mechvel.pereslavl.ru> Message-ID: Removing the BUILTIN pragmas would do it, but I would suggest using a different, but isomorphic, type for your termination measures. That way you don't have to mess with the builtin libraries. / Ulf On Wed, Dec 20, 2017 at 12:04 PM, Sergei Meshveliani wrote: > On Wed, 2017-12-20 at 09:08 +0100, Ulf Norell wrote: > > Natural number operations _are_ implemented in Agda, and you'll find > > the definitions in > > Agda.Builtin.Nat. The way that they are built in is that when called > > on closed terms (for > > instance 101 + 52), the type checker evaluates that using Haskell > > integer arithmetic rather > > than the Agda definitions. > > > > > > You can read more > > here: http://agda.readthedocs.io/en/latest/language/built-ins. > html#natural-numbers > > > > > > Agda.Builtin.Nat is shipped with Agda. You can find its location > > either by middle-clicking > > the module name in Emacs, or by calling Agda from the command line > > with `-v2`: > > > > > > Bla.agda: > > > import Agda.Builtin.Nat > > > $ agda -v2 Bla.agda > > [..] > > > Thank you. > > Now, I find it on my machine on > > /home/mechvel/.cabal/share/x86_64-linux-ghc-7.10.2/Agda- > 2.5.3/lib/prim/Agda/Builtin/Nat.agda > > > > The problem is as follows. > > I have prepared a new certified arithmetic for Bin, including > * _<_ and <-cmp comparison based on lexicographic ordering on bit lists, > * _?_, divMod, gcd, > * proofs for all important things, like CommutativeMonoid for _+_ and > _*_, and other properties. > > The aim is to avoid any built-in arithmetic, with keeping a reasonable > cost order. For example, (divMod x y) needs to cost somewhat O(l^2) > for l = max (bitLength x) (bitLength y). > > But: > in some paces it uses the counter cnt : ? for termination proof > (I do not know how to arrange some termination proofs without using > to?). > It is initially obtained by (Bin.to? b), and works in the loops by > pattern-matching against (1+ cnt). > > Now, I need a performance test showing that, for example, divMod x y > has the intended cost order. > And it does so. > But: > (Bin.to? b) applies Nat._+_ and (Nat._*_ 2) in a loop at the > running time. > > The cost order for operating with cnt can be small due to the two > reasons: > (1) lazy evaluation of to?, with stepping from (1+ cnt) to cnt > a few number of times, > (2) built-in performance for Nat._+_ and (Nat._*_ 2). > > I need to make sure that the source of (2) can be removed. > For this, I, probably, need to switch out built-ins for all Nat items, > with letting them evaluate really in _unary_ system. For example, > (Nat.+ 101 52) to compute in 53 steps of pattern matching. > > Right? > > How does one arrange this? > > Needs one to edit the file > .../share/x86_64-linux-ghc-7.10.2/Agda-2.5.3/lib/prim/Agda/ > Builtin/Nat.agda > > with removing all the lines containing the pragma of > {-# BUILTIN ... #-} > ? > > Thanks, > > ------ > Sergei > > > > > > On Tue, Dec 19, 2017 at 7:43 PM, Sergei Meshveliani > > wrote: > > Please, what is a regular way to switch between the built-in > > Nat > > arithmetic and the original one (implemented in Agda) ? > > > > Data.Nat.Base of lib-0.14 contains > > > > open import Agda.Builtin.Nat public using ( zero; suc; _+_; > > _*_ ) > > renaming ( Nat to ?; _-_ > > to _?_ ) > > > > But I do not find the module Agda.Builtin.Nat. > > > > I need to use the Nat arithmetic programmed in Agda > > (?; _+_, _*_, _?_, _?_ ...) as in early days. > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Wed Dec 20 12:56:12 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 20 Dec 2017 14:56:12 +0300 Subject: [Agda] original Nat In-Reply-To: References: <1513709037.2604.11.camel@one.mechvel.pereslavl.ru> <1513767868.3055.68.camel@one.mechvel.pereslavl.ru> Message-ID: <1513770972.3530.22.camel@one.mechvel.pereslavl.ru> On Wed, 2017-12-20 at 12:09 +0100, Ulf Norell wrote: > Removing the BUILTIN pragmas would do it, but I would suggest > using a different, but isomorphic, type for your termination measures. > That way you don't have to mess with the builtin libraries. > I thought of this. But: this my Bin3 library proves the isomorphism of to? : Bin -> ? with respect to +, *, monotonicity of to? for _<_, and so on. And this all uses many items from Data.Nat.Properties, and the latter items refer to the items of Data.Nat: Nat._+_, Nat._*_, Nat._?_. So that I would need to also have the version of Nat.Properties with a different import. And I wonder of whether this is all that will be needed. Also may it have sense for Agda to provide somewhat --primitiveNat key for type-checking or/and compiling without built-ins for operations on ? ? ------ Sergei > > On Wed, Dec 20, 2017 at 12:04 PM, Sergei Meshveliani > wrote: > On Wed, 2017-12-20 at 09:08 +0100, Ulf Norell wrote: > > Natural number operations _are_ implemented in Agda, and > you'll find the definitions in > > Agda.Builtin.Nat. The way that they are built in is that > when called on closed terms (for > > instance 101 + 52), the type checker evaluates that using > Haskell integer arithmetic rather than the Agda definitions. > > > > > > You can read more > > here: > http://agda.readthedocs.io/en/latest/language/built-ins.html#natural-numbers > > > > > > Agda.Builtin.Nat is shipped with Agda. You can find its > location > > either by middle-clicking > > the module name in Emacs, or by calling Agda from the > command line > > with `-v2`: > > > > > > Bla.agda: > > > import Agda.Builtin.Nat > > > $ agda -v2 Bla.agda > > [..] > > > Thank you. > > Now, I find it on my machine on > > /home/mechvel/.cabal/share/x86_64-linux-ghc-7.10.2/Agda-2.5.3/lib/prim/Agda/Builtin/Nat.agda > > > > The problem is as follows. > > I have prepared a new certified arithmetic for Bin, > including > * _<_ and <-cmp comparison based on lexicographic ordering on > bit lists, > * _?_, divMod, gcd, > * proofs for all important things, like CommutativeMonoid for > _+_ and > _*_, and other properties. > > The aim is to avoid any built-in arithmetic, with keeping a > reasonable > cost order. For example, (divMod x y) needs to cost somewhat > O(l^2) > for l = max (bitLength x) (bitLength y). > > But: > in some paces it uses the counter cnt : ? for termination > proof > (I do not know how to arrange some termination proofs without > using > to?). > It is initially obtained by (Bin.to? b), and works in the > loops by > pattern-matching against (1+ cnt). > > Now, I need a performance test showing that, for example, > divMod x y > has the intended cost order. > And it does so. > But: > (Bin.to? b) applies Nat._+_ and (Nat._*_ 2) in a loop at > the > running time. > > The cost order for operating with cnt can be small due to > the two > reasons: > (1) lazy evaluation of to?, with stepping from (1+ cnt) to > cnt > a few number of times, > (2) built-in performance for Nat._+_ and (Nat._*_ 2). > > I need to make sure that the source of (2) can be removed. > For this, I, probably, need to switch out built-ins for all > Nat items, > with letting them evaluate really in _unary_ system. For > example, > (Nat.+ 101 52) to compute in 53 steps of pattern matching. > > Right? > > How does one arrange this? > > Needs one to edit the file > .../share/x86_64-linux-ghc-7.10.2/Agda-2.5.3/lib/prim/Agda/Builtin/Nat.agda > > with removing all the lines containing the pragma of > {-# BUILTIN ... > #-} > ? > > Thanks, > > ------ > Sergei > > > > > > On Tue, Dec 19, 2017 at 7:43 PM, Sergei Meshveliani > > > wrote: > > Please, what is a regular way to switch between the > built-in > > Nat > > arithmetic and the original one (implemented in > Agda) ? > > > > Data.Nat.Base of lib-0.14 contains > > > > open import Agda.Builtin.Nat public using ( zero; > suc; _+_; > > _*_ ) > > renaming ( Nat > to ?; _-_ > > to _?_ ) > > > > But I do not find the module Agda.Builtin.Nat. > > > > I need to use the Nat arithmetic programmed in Agda > > (?; _+_, _*_, _?_, _?_ ...) as in early days. > > > > Thanks, > > > > ------ > > Sergei > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > From mechvel at botik.ru Wed Dec 20 17:27:28 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Wed, 20 Dec 2017 19:27:28 +0300 Subject: [Agda] numeric literals Message-ID: <1513787248.2636.17.camel@one.mechvel.pereslavl.ru> People, I have a certain library for Bin which uses exclusively naive unary Nat arithmetic. To arrange this, I copy Data.Nat.Base to my root directory as Nat.agda, also copy there .../lib/prim/Agda/Builtin/Nat.agda, with removing the BUILTIN pragma, and removed various unneeded items from both. Also copied there Data.Nat.Properties as NatProp. And changed everywhere the import to Nat and NatProp. After this, Agda does not understand the literals 0 and 1 in the code in this Bin3 library, so that I need to write zero and (suc zero) respectively. Can anybody, please, explain, how does this occur that numeric literals are lost? How to return them? Thanks, ------ Sergei From m.escardo at cs.bham.ac.uk Wed Dec 20 18:56:18 2017 From: m.escardo at cs.bham.ac.uk (=?UTF-8?B?TWFydMOtbiBIw7Z0emVsIEVzY2FyZMOz?=) Date: Wed, 20 Dec 2017 17:56:18 +0000 Subject: [Agda] How to get rid of warning In-Reply-To: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> References: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> Message-ID: On 16/12/17 17:00, abela at chalmers.se wrote: > Mmh, are you sure it is not in any of your emacs configuration files, like > > .emacs > .emacs.d/init.el > > or other configuration files along that line, or any file you include? Absolutely sure. This has just happened again (Agda version 2.6.0-3b39f0f). The only occurrence of "agda" in .emacs* is in agda-mode locate. I am now suspecting that this may be because in ~/agda (from github) I have a directory "std-lib". Could that be the culprit? Martin > > > On 16.12.2017 12:06, Mart?n H?tzel Escard? wrote: >> How do I get rid of this warning? >> >> " >> Warning (agda2): Note that the variable agda2-include-dirs is >> no longer used. You may want to update your configuration. You >> have at least two choices: >> * Use the library management system. >> * Set the include path using agda2-program-args. >> >> One way to avoid seeing this warning is to make sure that >> agda2-include-dirs is not bound. >> Warning (agda2): Note that the variable agda2-include-dirs is >> no longer used. You may want to update your configuration. You >> have at least two choices: >> * Use the library management system. >> * Set the include path using agda2-program-args. >> >> One way to avoid seeing this warning is to make sure that >> agda2-include-dirs is not bound. >> " >> >> I don't want to use any library, mine or somebody else's. >> >> I don't have a .agda directory, deliberately. (In another computer, I >> have it, with the path files empty, but I still get the above warning.) >> >> This variable "agda2-include-dirs" is not in my .emacs. Where is it? >> How do I "update my configuration" to get rid of this warning? >> >> Thanks. >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > -- http://www.cs.bham.ac.uk/~mhe From nad at cse.gu.se Wed Dec 20 22:22:42 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 20 Dec 2017 22:22:42 +0100 Subject: [Agda] numeric literals In-Reply-To: <1513787248.2636.17.camel@one.mechvel.pereslavl.ru> References: <1513787248.2636.17.camel@one.mechvel.pereslavl.ru> Message-ID: <95cfaf14-bed8-f24f-66e8-c2c9834fbfda@cse.gu.se> On 2017-12-20 17:27, Sergei Meshveliani wrote: > Can anybody, please, explain, how does this occur that numeric literals > are lost? > How to return them? http://agda.readthedocs.io/en/v2.5.3/language/literal-overloading.html -- /NAD From nad at cse.gu.se Wed Dec 20 22:29:42 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 20 Dec 2017 22:29:42 +0100 Subject: [Agda] How to get rid of warning In-Reply-To: References: Message-ID: <20cd743b-2ff4-f262-d660-97c156f52eb7@cse.gu.se> On 2017-12-16 12:06, Mart?n H?tzel Escard? wrote: > This variable "agda2-include-dirs" is not in my .emacs. Where is it? The following command might give you some useful information: (find-lisp-object-file-name 'agda2-include-dirs 'defvar) -- /NAD From abela at chalmers.se Thu Dec 21 05:33:30 2017 From: abela at chalmers.se (Andreas Abel) Date: Thu, 21 Dec 2017 05:33:30 +0100 Subject: [Agda] How to get rid of warning In-Reply-To: References: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> Message-ID: > Could that be the culprit? Not unless you believe in black magic. The warning is produced by the following code in agda2-mode.el ... (if (boundp 'agda2-include-dirs) (display-warning 'agda2 "Note that the variable agda2-include-dirs is no longer used. You may want to update your configuration. You ... On 20.12.2017 18:56, Mart?n H?tzel Escard? wrote: > > > On 16/12/17 17:00, abela at chalmers.se wrote: >> Mmh, are you sure it is not in any of your emacs configuration files, >> like >> >> ?? .emacs >> ?? .emacs.d/init.el >> >> or other configuration files along that line, or any file you include? > > Absolutely sure. This has just happened again (Agda version > 2.6.0-3b39f0f). The only occurrence of "agda" in .emacs* is in agda-mode > locate. I am now suspecting that this may be because in ~/agda (from > github) I have a directory "std-lib". Could that be the culprit? > > Martin > > > >> >> >> On 16.12.2017 12:06, Mart?n H?tzel Escard? wrote: >>> How do I get rid of this warning? >>> >>> " >>> Warning (agda2): Note that the variable agda2-include-dirs is >>> no longer used. You may want to update your configuration. You >>> have at least two choices: >>> * Use the library management system. >>> * Set the include path using agda2-program-args. >>> >>> One way to avoid seeing this warning is to make sure that >>> agda2-include-dirs is not bound. >>> Warning (agda2): Note that the variable agda2-include-dirs is >>> no longer used. You may want to update your configuration. You >>> have at least two choices: >>> * Use the library management system. >>> * Set the include path using agda2-program-args. >>> >>> One way to avoid seeing this warning is to make sure that >>> agda2-include-dirs is not bound. >>> " >>> >>> I don't want to use any library, mine or somebody else's. >>> >>> I don't have a .agda directory, deliberately. (In another computer, I >>> have it, with the path files empty, but I still get the above warning.) >>> >>> This variable "agda2-include-dirs" is not in my .emacs. Where is it? >>> How do I "update my configuration" to get rid of this warning? >>> >>> Thanks. >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From icfp.publicity at googlemail.com Thu Dec 21 08:18:53 2017 From: icfp.publicity at googlemail.com (Lindsey Kuper) Date: Wed, 20 Dec 2017 23:18:53 -0800 Subject: [Agda] Call for Papers: PACMPL issue ICFP 2018 Message-ID: <5a3b605df178d_2ce43fdc19055bec80312@landin.local.mail> PACMPL issue ICFP 2018 Call for Papers accepted papers to be invited for presentation at The 23rd ACM SIGPLAN International Conference on Functional Programming St. Louis, Missouri, USA http://icfp18.sigplan.org/ ### Important dates Submissions due: 16 March 2018 (Friday) Anywhere on Earth https://icfp18.hotcrp.com Author response: 2 May (Wednesday) - 4 May (Friday) 14:00 UTC Notification: 18 May (Friday) Final copy due: 22 June (Friday) Conference: 24 September (Monday) - 26 September (Wednesday) ### About PACMPL Proceedings of the ACM on Programming Languages (PACMPL ) is a Gold Open Access journal publishing research on all aspects of programming languages, from design to implementation and from mathematical formalisms to empirical studies. Each issue of the journal is devoted to a particular subject area within programming languages and will be announced through publicized Calls for Papers, like this one. ### Scope PACMPL issue ICFP 2018 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * *Language Design*: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; type systems; interoperability; domain-specific languages; and relations to imperative, object-oriented, or logic programming. * *Implementation*: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * *Software-Development Techniques*: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling. * *Foundations*: formal semantics; lambda calculus; rewriting; type theory; monads; continuations; control; state; effects; program verification; dependent types. * *Analysis and Transformation*: control-flow; data-flow; abstract interpretation; partial evaluation; program calculation. * *Applications*: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed-systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; multimedia and 3D graphics programming; scripting; system administration; security. * *Education*: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. PACMPL issue ICFP 2018 also welcomes submissions in two separate categories — Functional Pearls and Experience Reports — that must be marked as such at the time of submission and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the principal editor if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions **Deadline**: The deadline for submissions is Friday, March 16, 2018, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from . There is a limit of 27 pages for a full paper or 14 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. See also PACMPL's Information and Guidelines for Authors at . **Submission**: Submissions will be accepted at Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 14:00 UTC on Wednesday, May 2, 2018, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the principal editor will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for PACMPL issue ICFP 2018. We anticipate that there will be a need to clarify and expand on this process, and we will maintain a list of frequently asked questions and answers on the conference website to address common concerns. **PACMPL issue ICFP 2018 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the review meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on May 18, 2018. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 22, 2018), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. **PACMPL issue ICFP 2018 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Small format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: copyright transfer to ACM; retaining copyright but granting ACM exclusive publication rights; or open access on payment of a fee. Further information about ACM author rights is available from . * At least one author of each accepted submissions will be expected to attend and present their paper at the conference. The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. * We intend that the proceedings will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by a committee, separate from the program committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the proceedings, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, PACMPL issue ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works — or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal PACMPL issue ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the proceedings and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The program committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results — the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The principal editor will be happy to advise on any concerns about which category to submit to. ### ICFP Organizers General Chair: Robby Findler (Northwestern University, USA) Artifact Evaluation Co-Chairs: Simon Marlow (Facebook, UK) Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Matthew Fluet (Rochester Institute of Technology, USA) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Co-Chairs: Jose Calderon (Galois, Inc., USA) Nicolas Wu (University of Bristol, UK) Workshops Co-Chair: David Christiansen (Indiana University, USA) Christophe Scholliers (Universiteit Gent, Belgium) ### PACMPL issue ICFP 2018 Principal Editor: Matthew Flatt (Univesity of Utah, USA) Review Committee: Sandrine Blazy (IRISA, University of Rennes 1, France) David Christiansen (Indiana University, USA) Martin Elsman (University of Copenhagen, Denmark) Marco Gaboardi (University at Buffalo, CUNY, USA) Sam Lindley (University of Edinburgh, UK) Heather Miller (Northweastern University, USA / EPFL, Switzerland) J. Garrett Morris (University of Kansas, USA) Henrik Nilsson (University of Nottingham, UK) Fran?ois Pottier (Inria, France) Alejandro Russo (Chalmers University of Technology, Sweden) Ilya Sergey (University College London, UK) Michael Sperber (Active Group GmbH, Germany) Wouter Swierstra (Utrecht University, UK) ?ric Tanter (University of Chile, Chile) Katsuhiro Ueno (Tohoku University, Japan) Niki Vazou (University of Maryland, USA) Jeremy Yallop (University of Cambridge, UK) External Review Committee: Michael D. Adams (University of Utah, USA) Amal Ahmed (Northeastern University, USA) Nada Amin (University of Cambridge, USA) Zena Ariola (University of Oregon) Lars Bergstrom (Mozilla Research) Lars Birkedal (Aarhus University, Denmark) Edwin Brady ( University of St. Andrews, UK) William Byrd (University of Alabama at Birmingham, USA) Giuseppe Castagna (CRNS / University of Paris Diderot, France) Sheng Chen (University of Louisiana at Lafayette, USA) Koen Claessen (Chalmers University ot Technology, Sweden) Ugo Dal Lago (University of Bologna, Italy / Inria, France) David Darais (University of Vermont, USA) Joshua Dunfield (Queen?s University, Canada) Richard Eisenberg (Bryn Mawr College, USA) Matthew Fluet (Rochester Institute of Technology, USA) Nate Foster (Cornell University, USA) Jurriaan Hage (Utrecht University, Netherlands) David Van Horn (University of Maryland, USA) Zhenjiang Hu (National Institute of Informatics, Japan) Suresh Jagannathan (Purdue University, USA) Simon Peyton Jones (Microsoft Research, UK) Naoki Kobayashi (University of Tokyo, Japan) Neelakantan Krishnaswami (University of Cambridge, UK) Kazutaka Matsuda (Tohoku University, Japan) Trevor McDonell (University of New South Wales, Australia) Hernan Melgratti (University of Buenos Aires, Argentina) Akimasa Morihata (University of Tokyo, Japan) Aleksandar Nanevski (IMDEA Software Institute, Spain) Kim Nguy?n (University of Paris-Sud, France) Cosmin Oancea (DIKU, University of Copenhagen, Denmark) Bruno C. d. S. Oliveira (University of Hong Kong, China) Tomas Petricek (University of Cambridge, UK) Benjamin Pierce (University of Pennsylvania, USA) Christine Rizkallah (University of Pennsylvania, USA) Tom Schrijvers (KU Leuven, Belgium) Manuel Serrano (Inria, France) Jeremy Siek (Indiana University, USA) Josef Svenningsson (Chalmers University of Technology, Sweden) Nicolas Tabareau (Inria, France) Dimitrios Vytiniotis (Microsoft Research, UK) Philip Wadler (University of Edinburgh, UK) Meng Wang (University of Kent, UK) From nad at cse.gu.se Thu Dec 21 09:45:33 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 21 Dec 2017 09:45:33 +0100 Subject: [Agda] How to get rid of warning In-Reply-To: <20cd743b-2ff4-f262-d660-97c156f52eb7@cse.gu.se> References: <20cd743b-2ff4-f262-d660-97c156f52eb7@cse.gu.se> Message-ID: <70169312-079b-45bc-0fd2-3de03006fcdb@cse.gu.se> On 2017-12-20 22:29, Nils Anders Danielsson wrote: > The following command might give you some useful information: > > (find-lisp-object-file-name 'agda2-include-dirs 'defvar) The methods described in the answers to the following Emacs Stack Exchange question are perhaps more likely to work: https://emacs.stackexchange.com/questions/27962/tracking-down-a-write-to-a-variable -- /NAD From sandro.stucki at gmail.com Thu Dec 21 09:58:19 2017 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Thu, 21 Dec 2017 09:58:19 +0100 Subject: [Agda] How to get rid of warning In-Reply-To: References: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> Message-ID: > How do I get rid of this warning? I had the same problem and eventually "solved" it by putting the following in my .emacs file: (makunbound 'agda2-include-dirs) Of course that doesn't solve the mystery of why the warning appears in the first place (I also don't see where this variable is bound in any of my config files either), but if you don't care about that and just want the warning gone, it should do the trick. Cheers /Sandro On Thu, Dec 21, 2017 at 5:33 AM, Andreas Abel wrote: >> Could that be the culprit? > > Not unless you believe in black magic. > > The warning is produced by the following code in agda2-mode.el > > ... > (if (boundp 'agda2-include-dirs) > (display-warning 'agda2 "Note that the variable agda2-include-dirs is > no longer used. You may want to update your configuration. You > ... > > > On 20.12.2017 18:56, Mart?n H?tzel Escard? wrote: >> >> >> >> On 16/12/17 17:00, abela at chalmers.se wrote: >>> >>> Mmh, are you sure it is not in any of your emacs configuration files, >>> like >>> >>> .emacs >>> .emacs.d/init.el >>> >>> or other configuration files along that line, or any file you include? >> >> >> Absolutely sure. This has just happened again (Agda version >> 2.6.0-3b39f0f). The only occurrence of "agda" in .emacs* is in agda-mode >> locate. I am now suspecting that this may be because in ~/agda (from github) >> I have a directory "std-lib". Could that be the culprit? >> >> Martin >> >> >> >>> >>> >>> On 16.12.2017 12:06, Mart?n H?tzel Escard? wrote: >>>> >>>> How do I get rid of this warning? >>>> >>>> " >>>> Warning (agda2): Note that the variable agda2-include-dirs is >>>> no longer used. You may want to update your configuration. You >>>> have at least two choices: >>>> * Use the library management system. >>>> * Set the include path using agda2-program-args. >>>> >>>> One way to avoid seeing this warning is to make sure that >>>> agda2-include-dirs is not bound. >>>> Warning (agda2): Note that the variable agda2-include-dirs is >>>> no longer used. You may want to update your configuration. You >>>> have at least two choices: >>>> * Use the library management system. >>>> * Set the include path using agda2-program-args. >>>> >>>> One way to avoid seeing this warning is to make sure that >>>> agda2-include-dirs is not bound. >>>> " >>>> >>>> I don't want to use any library, mine or somebody else's. >>>> >>>> I don't have a .agda directory, deliberately. (In another computer, I >>>> have it, with the path files empty, but I still get the above warning.) >>>> >>>> This variable "agda2-include-dirs" is not in my .emacs. Where is it? How >>>> do I "update my configuration" to get rid of this warning? >>>> >>>> Thanks. >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www.cse.chalmers.se/~abela/ > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From m.escardo at cs.bham.ac.uk Thu Dec 21 11:00:44 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 21 Dec 2017 10:00:44 +0000 Subject: [Agda] How to get rid of warning In-Reply-To: References: <6025ed61-ee16-d2ec-0ad2-dc64fa304830@chalmers.se> Message-ID: <0684b791-d82b-e099-d9f7-bc1f1bd86b22@cs.bham.ac.uk> On 21/12/17 08:58, sandro.stucki at gmail.com wrote: >> How do I get rid of this warning? > > I had the same problem and eventually "solved" it by putting the > following in my .emacs file: > > (makunbound 'agda2-include-dirs) This black magic does work for me. Thanks. What is more strange is this, without makunbound. If I do ~/xxx$ emacs black.agda I don't get the error. However, if I do ~/yyy$ emacs white.agda and then ctrl-c ctrl-f ../xxx/black.agda, then I do get the error. There is nothing in xxx that binds any variable. Also a recursive grep in .emacs.d for "agda" finds nothing, and a grep in .emacs finds '(shell-command-to-string "agda-mode locate")))' only. I couldn't make the suggestions by other people work because I have emacs 25.2.2 which doesn't support them. As I write, this happens in a machine running ubuntu 17.10, Agda version 2.6.0-75c88fa NB. I do have a ~/.agda/ directory, but with empty files "defaults" and "libraries". It doesn't help if I get rid of this directory. For the moment I am adopting the solution by Sandro. Martin > > Of course that doesn't solve the mystery of why the warning appears in > the first place (I also don't see where this variable is bound in any > of my config files either), but if you don't care about that and just > want the warning gone, it should do the trick. > > Cheers > /Sandro > > > > On Thu, Dec 21, 2017 at 5:33 AM, Andreas Abel wrote: >>> Could that be the culprit? >> >> Not unless you believe in black magic. >> >> The warning is produced by the following code in agda2-mode.el >> >> ... >> (if (boundp 'agda2-include-dirs) >> (display-warning 'agda2 "Note that the variable agda2-include-dirs is >> no longer used. You may want to update your configuration. You >> ... >> >> >> On 20.12.2017 18:56, Mart?n H?tzel Escard? wrote: >>> >>> >>> >>> On 16/12/17 17:00, abela at chalmers.se wrote: >>>> >>>> Mmh, are you sure it is not in any of your emacs configuration files, >>>> like >>>> >>>> .emacs >>>> .emacs.d/init.el >>>> >>>> or other configuration files along that line, or any file you include? >>> >>> >>> Absolutely sure. This has just happened again (Agda version >>> 2.6.0-3b39f0f). The only occurrence of "agda" in .emacs* is in agda-mode >>> locate. I am now suspecting that this may be because in ~/agda (from github) >>> I have a directory "std-lib". Could that be the culprit? >>> >>> Martin >>> >>> >>> >>>> >>>> >>>> On 16.12.2017 12:06, Mart?n H?tzel Escard? wrote: >>>>> >>>>> How do I get rid of this warning? >>>>> >>>>> " >>>>> Warning (agda2): Note that the variable agda2-include-dirs is >>>>> no longer used. You may want to update your configuration. You >>>>> have at least two choices: >>>>> * Use the library management system. >>>>> * Set the include path using agda2-program-args. >>>>> >>>>> One way to avoid seeing this warning is to make sure that >>>>> agda2-include-dirs is not bound. >>>>> Warning (agda2): Note that the variable agda2-include-dirs is >>>>> no longer used. You may want to update your configuration. You >>>>> have at least two choices: >>>>> * Use the library management system. >>>>> * Set the include path using agda2-program-args. >>>>> >>>>> One way to avoid seeing this warning is to make sure that >>>>> agda2-include-dirs is not bound. >>>>> " >>>>> >>>>> I don't want to use any library, mine or somebody else's. >>>>> >>>>> I don't have a .agda directory, deliberately. (In another computer, I >>>>> have it, with the path files empty, but I still get the above warning.) >>>>> >>>>> This variable "agda2-include-dirs" is not in my .emacs. Where is it? How >>>>> do I "update my configuration" to get rid of this warning? >>>>> >>>>> Thanks. >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >>>> >>> >> >> -- >> Andreas Abel <>< Du bist der geliebte Mensch. >> >> Department of Computer Science and Engineering >> Chalmers and Gothenburg University, Sweden >> >> andreas.abel at gu.se >> http://www.cse.chalmers.se/~abela/ >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From mechvel at botik.ru Thu Dec 21 12:52:21 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Thu, 21 Dec 2017 14:52:21 +0300 Subject: [Agda] no-built-in version Message-ID: <1513857141.9421.25.camel@scico.botik.ru> Dear Agda team, The current Standard library (lib-0.14) uses a built-in arithmetic for Nat, and certain other built-in items. But it has sense to _also_ have a no-built-in version. Because there everything is proved down to bottom (and let the unary arithmetic evaluate 51 + 103 in 52 pattern matching steps). In my Bin3 library for Bin, I need to test the performance of certain operations with Bin, in a situation when everything needed is proved. But Standard library is involved, with certain its operations on ?. And these latter are performed as built in. This breaks the performance test. Then I tried to copy a piece of Standard library and make it free from built-ins, and to use in Bin3. But this Standard library transformation occurs too difficult for me, technically, too many obstacles. So that now I am trying my home-made toNat that is equivalent to to?, but has cost(x) = O( 2^ (bitLength x) ) -- as it is in the naive unary arithmetic. I do not know, how will this work. Anyway this is not a regular approach. Generally: please, can a pure no-built-in version of Standard library be provided? Regards, ------ Sergei From henning at basold.eu Thu Dec 21 15:33:45 2017 From: henning at basold.eu (Henning Basold) Date: Thu, 21 Dec 2017 15:33:45 +0100 Subject: [Agda] CMCS 2018: Final Call for Papers Message-ID: <6395e0a1-4ece-be74-061a-e074466ac6be@basold.eu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Call for Papers The 14th International Workshop on Coalgebraic Methods in Computer Science (CMCS'18) Thessaloniki, Greece, 14 - 15 April 2018 (co-located with ETAPS 2018) www.coalg.org/cmcs18 Flyer - --------- This call for papers is available as a flyer, which can also be printed and used as a poster, at http://www.coalg.org/cmcs18/files/2017/10/cmcs18_flyer.pdf Objectives and scope - -------------------- Established in 1998, the CMCS workshops aim to bring together researchers with a common interest in the theory of coalgebras, their logics, and their applications. As the workshop series strives to maintain breadth in its scope, areas of interest include neighbouring fields as well. Topics of interest include, but are not limited to, the following: - - the theory of coalgebras (including set theoretic and categorical approaches); - - coalgebras as computational and semantical models (for programming languages, dynamical systems, term rewriting, etc.); - - coalgebras in (functional, logic, answer set, object-oriented, concurrent, and constraint) programming; - - coalgebraic data types, type systems and behavioural typing; - - coinductive definition and proof principles for coalgebras (including "up-to" techniques); - - coalgebras and algebras; - - coalgebras and (modal) logic; - - coalgebraic specification and verification; - - coalgebra and control theory (notably of discrete event and hybrid systems); - - coalgebra in quantum computing; - - coalgebra and game theory; - - tools exploiting coalgebraic techniques. Venue and event - --------------- CMCS'18 will be held in Thessaloniki, Greece, co-located with ETAPS 2018, on 14 - 15 April 2018. Keynote speaker - --------------- Samson Abramsky (University of Oxford, United Kingdom) Invited speakers - ---------------- Clemens Kupke (University of Strathclyde, United Kingdom) Daniela Petrisan (University Diderot Paris 7, France) Invited tutorial speakers - ------------------------- There will be a special session on quantum computation, with invited tutorials by Bob Coecke (University of Oxford, United Kingdom) Aleks Kissinger (Radboud University Nijmegen, The Netherlands) Important dates - --------------- Abstract regular papers 5 January 2018 Submission regular papers 12 January 2018 Notification regular papers 12 February 2018 Camera-ready copy 19 February 2018 Submission short contributions 23 February 2018 Notification short contributions 9 March 2018 Proceedings - ----------- The proceedings of CMCS 2018 will include all accepted regular papers and will be published post-conference as a Springer volume in the IFIP-LNCS series. Accepted short contributions will be bundled in a technical report. Programme committee - ------------------- Filippo Bonchi (University of Pisa, Italy) Marcello Bonsangue (LIACS, Leiden University, The Netherlands) Corina Cirstea (University of Southampton, United Kingdom) Fredrik Dahlqvist (University College London, United Kingdom) Ugo Dal Lago (University of Bologna, Italy) Sergey Goncharov (FAU Erlangen-N?rnberg, Germany) Helle Hvid Hansen (Delft University of Technology, The Netherlands) Ichiro Hasuo (National Institute of Informatics, Japan) Bart Jacobs (Radboud University Nijmegen, The Netherlands) Bartek Klin (University of Warsaw, Poland) Paul Levy (University of Birmingham, United Kingdom) Stefan Milius (FAU Erlangen-N?rnberg, Germany) Lawrence Moss (Indiana University, United States) Dirk Pattinson (Australian National University, Australia) Dusko Pavlovic (University of Hawai?i at M?noa, United States) Daniela Petrisan (University Diderot Paris 7, France) Damien Pous (CNRS, ENS Lyon, France) Juriaan Rot (Radboud University Nijmegen, The Netherlands) Jan Rutten (CWI/Radboud University Nijmegen, The Netherlands) Lutz Schr?der (FAU Erlangen-N?rnberg, Germany) Alexandra Silva (University College London, United Kingdom) Ana Sokolova (University of Salzburg, Austria) Henning Urbat (Technische Universit?t Braunschweig, Germany) Jamie Vicary (University of Oxford, United Kingdom) Publicity chair - --------------- Henning Basold (CNRS, ENS Lyon, France) PC chair - -------- Corina Cirstea (University of Southampton, United Kingdom) Steering committee - ------------------ Filippo Bonchi (University of Pisa, Italy) Marcello Bonsangue (LIACS, Leiden University, The Netherlands) Corina Cirstea (University of Southampton, United Kingdom) Ichiro Hasuo (National Institute of Informatics, Japan) Bart Jacobs (Radboud University Nijmegen, The Netherlands) Bartek Klin (University of Warsaw, Poland) Alexander Kurz (University of Leicester, United Kingdom) Marina Lenisa (University of Udine, Italy) Stefan Milius (chair), FAU Erlangen-N?rnberg, Germany Larry Moss (Indiana University, United States) Dirk Pattinson (Australian National University, Australia) Jan Rutten (CWI/Radboud University Nijmegen, The Netherlands) Lutz Schr?der (FAU Erlangen-N?rnberg, Germany) Alexandra Silva (University College London, United Kingdom) Submission guidelines - --------------------- We solicit two types of contributions: regular papers and short contributions. Regular papers must be original, unpublished, and not submitted for publication elsewhere. They should not exceed 20 pages in length in Springer LNCS style. Short contributions may describe work in progress, or summarise work submitted to a conference or workshop elsewhere. They should be no more than two pages. Regular papers and short contributions should be submitted electronically as a PDF file via the Easychair system at http://www.easychair.org/conferences/?conf=cmcs2018. -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEMnUmuprSDishxVMiatBsEc2xMm4FAlo7xjcACgkQatBsEc2x Mm5GEg//Zdnprk3lo8DUuAMGdJcx9ZJjsUKE4V1mLuWfdeC5eAX1Iv4r8MeWGMwn NHb+6VnVxPTotTK8CivzoUyaxwV36a3VTEjml3msuZmjK0Hok+3BLObbf5aQwWY5 sdVmjm24T9T3A0dQsLeCdFTiaWSA/VOk2nYDW9ROF6o+glvGXBNgjyJVzUcIKy+e jmo2n2ht4RofDoDNsp7uqP4PhN2YXfcKMVftfL4UyDHOWf2Qjh+GJaoPBBRfn5+J hgVe8BLi4gvJKEe8eMihNDFF0aTvhVwjZ8wZyjh3gdeo8mtT83B++EZTSOnJPzED EUV6xiwwPUIgdNDsO75utwmAx98CoqHiSTnZ2LOUMRnNid1SIlU9mLmbcBVGSdma p/VkN9w/YyDIN/LcD9rJCDTv/LrmeunEM9n+nvTRvRMfy5INV0u0o/iXvbDUSdJO ZhV/ykzzCUMtqYPZRNaI5HeIZs3fm+Olh4uFzHLqdR+Sjn2hO0Z+8RJGs43E08O0 Z02BkpE3i+t5ytC1CnyOv9KHmAm0t7KDlk4f/PY/1t+nZXGe0gQlRbTYcHRoLJtD Cr6I58w4+tqQk77ThrdNvsX+dxsl/RGSaKXoVLMOZWDeQM5kv9Gu6oP16bb+QzZp aEQtijjqsYST5aN9icasf4K+WOp5jJd2TQxPQyBLzZcd4v1Suu4= =8SXX -----END PGP SIGNATURE----- From m.escardo at cs.bham.ac.uk Fri Dec 22 21:33:13 2017 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 22 Dec 2017 20:33:13 +0000 Subject: [Agda] Font questions again Message-ID: <9d535cc0-a461-6290-2aea-aa24be87528e@cs.bham.ac.uk> I want to use the powerset symbol, which is \MCP (calligraphic capital P). If I do agda-input-show-translations, then I get to see this symbol properly rendered, saying that it should be typed as \MCP. However, when I use \MCP in an agda file, the symbol is not rendered (by the same emacs session) and I instead see a square with a matrix of hexadecimal numbers inside it. Let me try it here to see what the message is displayed like: ?. I have (set-fontset-font "fontset-default" 'unicode "DejaVu Sans") in my .emacs as suggested here in this list some time ago (I think by Paolo Capriotti), which works for many symbols, but not this. Why can emacs display it in the agda-input-show-translations buffer, but not in my agda buffer? Any clues? Thanks, Martin From leo at halfaya.org Sat Dec 23 00:04:53 2017 From: leo at halfaya.org (John Leo) Date: Fri, 22 Dec 2017 15:04:53 -0800 Subject: [Agda] Font questions again In-Reply-To: <9d535cc0-a461-6290-2aea-aa24be87528e@cs.bham.ac.uk> References: <9d535cc0-a461-6290-2aea-aa24be87528e@cs.bham.ac.uk> Message-ID: Hi Martin, Nice to meet you at the UniMath workshop. I tried this out and the character displays fine for me; I'm using a Mac, GNU Emacs, and whatever the default font is (seems to be a Mac font). One thing to try is would be to do M-x describe-char on both instances of ?; it should show which font is being used to render it. In both cases I get: display: by this font (glyph code) mac-ct:-*-STIXGeneral-normal-normal-normal-*-16-*-*-*-p-0-iso10646-1 (#x9D6) Of course why emacs would be using a different font for each buffer would be a different question.... John On Fri, Dec 22, 2017 at 12:33 PM, Martin Escardo wrote: > > I want to use the powerset symbol, which is \MCP (calligraphic capital > P). > > If I do agda-input-show-translations, then I get to see this symbol > properly rendered, saying that it should be typed as \MCP. > > However, when I use \MCP in an agda file, the symbol is not rendered > (by the same emacs session) and I instead see a square with a matrix > of hexadecimal numbers inside it. > > Let me try it here to see what the message is displayed like: ?. > > I have > > (set-fontset-font "fontset-default" 'unicode "DejaVu Sans") > > in my .emacs as suggested here in this list some time ago (I think by > Paolo Capriotti), which works for many symbols, but not this. > > Why can emacs display it in the agda-input-show-translations buffer, > but not in my agda buffer? Any clues? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hancock at fastmail.fm Sun Dec 24 14:46:51 2017 From: hancock at fastmail.fm (Peter Hancock) Date: Sun, 24 Dec 2017 13:46:51 +0000 Subject: [Agda] Naive person's questions about agda vs. haskell symbol notation Message-ID: <513c86fb-ce32-660b-7fd1-c31215c404ce@fastmail.fm> I have never properly learnt to use Agda's fancy notational features, except in a basic ad-hoc way, that accomplishes most of what I want. I'm not referring to unicode symbols and whatnot, but the business of making symbols by scattering '_' characters in some line-noise. I'd like some hints and tips about how to get the most out of this feature. RTFM with a pointer would be fine. Away from the keyboard, I often use some haskell-like apparatus for dealing with infix symbols. Namely: * "section notation", as in (*), (*a), (a*), where * is binary infix. Anything that avoids having to write a lambda-expression or think of a bound-variable name is great. * "backtick" notation, as in (a `foo` b), where foo is a name. Something that turns a short name into an infix symbol is great. * I very much like the notation (a <| b |> c) for "if b, then a else c" that allows three-place relations to masquerade as infix relations. How much of this can be supported or emulated with Agda's symbol-wizardry? Hank From mietek at bak.io Sun Dec 24 16:25:54 2017 From: mietek at bak.io (=?utf-8?Q?Mi=C3=ABtek_Bak?=) Date: Sun, 24 Dec 2017 15:25:54 +0000 Subject: [Agda] Naive person's questions about agda vs. haskell symbol notation In-Reply-To: <513c86fb-ce32-660b-7fd1-c31215c404ce@fastmail.fm> References: <513c86fb-ce32-660b-7fd1-c31215c404ce@fastmail.fm> Message-ID: <63E17BF1-3534-4E83-BF3B-185D7A1D5B8D@bak.io> Agda supports section notation. For example: data Nat : Set where zero : Nat suc : Nat ? Nat {-# BUILTIN NATURAL Nat #-} -- For the literals _+_ : Nat ? Nat ? Nat zero + m = m suc n + m = suc (n + m) plus = _+_ postinc = _+ 1 preinc = 1 +_ In general, Agda supports mixfix operator notation. For example: data Bool : Set where true : Bool false : Bool if_then_else_ : {A : Set} ? Bool ? A ? A ? A if true then x else y = x if false then x else y = y _<|_|>_ = if_then_else_ Agda?s new documentation website has a page on mixfix operators: http://agda.readthedocs.io/en/latest/language/mixfix-operators.html As far as I know, there is no equivalent to the backtick notation. Instead, we default to declaring infix operators, and then we use the full name with the underscores whenever the prefix form is required. Using the prefix form is required to bind implicit arguments. For example: _<|_|>'_ : {A : Set} ? Bool ? A ? A ? A _<|_|>'_ {A} b x y = if_then_else_ {A} b x y -- Mietek > On 24 Dec 2017, at 13:46, Peter Hancock wrote: > > I have never properly learnt to use Agda's fancy notational features, > except in a basic ad-hoc way, that accomplishes most of what I want. I'm > not referring to unicode symbols and whatnot, but the business of making > symbols by scattering '_' characters in some line-noise. > > I'd like some hints and tips about how to get the most out of this feature. > RTFM with a pointer would be fine. > > Away from the keyboard, I often use some haskell-like apparatus for dealing with infix > symbols. Namely: > > * "section notation", as in (*), (*a), (a*), where * is binary infix. > Anything that avoids having to write a lambda-expression or think > of a bound-variable name is great. > * "backtick" notation, as in (a `foo` b), where foo is a name. Something > that turns a short name into an infix symbol is great. > * I very much like the notation (a <| b |> c) for "if b, then a else c" > that allows three-place relations to masquerade as infix relations. > > How much of this can be supported or emulated with Agda's symbol-wizardry? > > Hank > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From liamoc at cse.unsw.edu.au Sun Dec 24 16:42:41 2017 From: liamoc at cse.unsw.edu.au (Liam O'Connor) Date: Mon, 25 Dec 2017 02:42:41 +1100 Subject: [Agda] Naive person's questions about agda vs. haskell symbol notation In-Reply-To: <63E17BF1-3534-4E83-BF3B-185D7A1D5B8D@bak.io> References: <513c86fb-ce32-660b-7fd1-c31215c404ce@fastmail.fm> <63E17BF1-3534-4E83-BF3B-185D7A1D5B8D@bak.io> Message-ID: The backtick notation can of course be defined: postulate max : ? ? ? ? ? _`_`_ : ?{a b c : Set} ? a ? (a ? b ? c) ? b ? c a ` f ` b = f a b test = 43 ` max ` 10 ~L On 25 December 2017 at 2:26:08 am, Mi?tek Bak (mietek at bak.io) wrote: Agda supports section notation. For example: data Nat : Set where zero : Nat suc : Nat ? Nat {-# BUILTIN NATURAL Nat #-} -- For the literals _+_ : Nat ? Nat ? Nat zero + m = m suc n + m = suc (n + m) plus = _+_ postinc = _+ 1 preinc = 1 +_ In general, Agda supports mixfix operator notation. For example: data Bool : Set where true : Bool false : Bool if_then_else_ : {A : Set} ? Bool ? A ? A ? A if true then x else y = x if false then x else y = y _<|_|>_ = if_then_else_ Agda?s new documentation website has a page on mixfix operators: http://agda.readthedocs.io/en/latest/language/mixfix-operators.html As far as I know, there is no equivalent to the backtick notation. Instead, we default to declaring infix operators, and then we use the full name with the underscores whenever the prefix form is required. Using the prefix form is required to bind implicit arguments. For example: _<|_|>'_ : {A : Set} ? Bool ? A ? A ? A _<|_|>'_ {A} b x y = if_then_else_ {A} b x y -- Mietek > On 24 Dec 2017, at 13:46, Peter Hancock wrote: > > I have never properly learnt to use Agda's fancy notational features, > except in a basic ad-hoc way, that accomplishes most of what I want. I'm > not referring to unicode symbols and whatnot, but the business of making > symbols by scattering '_' characters in some line-noise. > > I'd like some hints and tips about how to get the most out of this feature. > RTFM with a pointer would be fine. > > Away from the keyboard, I often use some haskell-like apparatus for dealing with infix > symbols. Namely: > > * "section notation", as in (*), (*a), (a*), where * is binary infix. > Anything that avoids having to write a lambda-expression or think > of a bound-variable name is great. > * "backtick" notation, as in (a `foo` b), where foo is a name. Something > that turns a short name into an infix symbol is great. > * I very much like the notation (a <| b |> c) for "if b, then a else c" > that allows three-place relations to masquerade as infix relations. > > How much of this can be supported or emulated with Agda's symbol-wizardry? > > Hank > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at botik.ru Sun Dec 24 20:58:43 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Sun, 24 Dec 2017 22:58:43 +0300 Subject: [Agda] `let' in function signature Message-ID: <1514145523.2834.9.camel@one.mechvel.pereslavl.ru> Please, what is wrong in the below program? --------------------------------------------------------------- open import Relation.Binary.PropositionalEquality using (_?_) open import Data.Nat using (?; suc; pred; _*_; _^_) postulate anything : ? {a} {A : Set a} ? A postulate pSum : ? ? ? ? ? pSum-eq : (q n : ?) ? let q' = suc n in (pSum q' n) * q ? pred (q' ^ (suc n)) -- (1) pSum-eq 1 0 = goal where postulate goal : (pSum 2 0) * 1 ? pred (2 ^ 1) pSum-eq _ _ = anything ---------------------------------------------------------------- Agda 2.5.3 reports 2 != 1 of type ? when checking that the expression goal has type pSum 1 ?.zero * 1 ? pred (1 ^ 1) After replacing q' with (suc q) in the line (1), the type check succeeds. Is this a bug? Regards, ------ Sergei From james.wood.100 at strath.ac.uk Sun Dec 24 21:06:02 2017 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 24 Dec 2017 20:06:02 +0000 Subject: [Agda] `let' in function signature In-Reply-To: <1514145523.2834.9.camel@one.mechvel.pereslavl.ru> References: <1514145523.2834.9.camel@one.mechvel.pereslavl.ru> Message-ID: Did you mean let q' = suc q, rather than suc n? James On 24/12/17 19:58, Sergei Meshveliani wrote: > Please, what is wrong in the below program? > > --------------------------------------------------------------- > open import Relation.Binary.PropositionalEquality using (_?_) > open import Data.Nat using (?; suc; pred; _*_; _^_) > > postulate anything : ? {a} {A : Set a} ? A > postulate pSum : ? ? ? ? ? > > pSum-eq : (q n : ?) ? let q' = suc n > in > (pSum q' n) * q ? pred (q' ^ (suc n)) -- (1) > pSum-eq 1 0 = goal > where > postulate goal : (pSum 2 0) * 1 ? pred (2 ^ 1) > > pSum-eq _ _ = anything > ---------------------------------------------------------------- > > Agda 2.5.3 reports > > 2 != 1 of type ? > when checking that the expression goal has type > pSum 1 ?.zero * 1 ? pred (1 ^ 1) > > After replacing q' with (suc q) in the line (1), the type check > succeeds. > > Is this a bug? > > Regards, > > ------ > Sergei > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at botik.ru Sun Dec 24 22:17:29 2017 From: mechvel at botik.ru (Sergei Meshveliani) Date: Mon, 25 Dec 2017 00:17:29 +0300 Subject: [Agda] `let' in function signature In-Reply-To: References: <1514145523.2834.9.camel@one.mechvel.pereslavl.ru> Message-ID: <1514150249.3084.2.camel@one.mechvel.pereslavl.ru> Yes, thank you. Please, withdraw my request ------ Sergei On Sun, 2017-12-24 at 20:06 +0000, James Wood wrote: > Did you mean let q' = suc q, rather than suc n? Yes, thank you. Please, withdraw my request. Sorry for noise. ------ Sergei > On 24/12/17 19:58, Sergei Meshveliani wrote: > > Please, what is wrong in the below program? > > > > --------------------------------------------------------------- > > open import Relation.Binary.PropositionalEquality using (_?_) > > open import Data.Nat using (?; suc; pred; _*_; _^_) > > > > postulate anything : ? {a} {A : Set a} ? A > > postulate pSum : ? ? ? ? ? > > > > pSum-eq : (q n : ?) ? let q' = suc n > > in > > (pSum q' n) * q ? pred (q' ^ (suc n)) -- (1) > > pSum-eq 1 0 = goal > > where > > postulate goal : (pSum 2 0) * 1 ? pred (2 ^ 1) > > > > pSum-eq _ _ = anything > > ---------------------------------------------------------------- > > > > Agda 2.5.3 reports > > > > 2 != 1 of type ? > > when checking that the expression goal has type > > pSum 1 ?.zero * 1 ? pred (1 ^ 1) > > > > After replacing q' with (suc q) in the line (1), the type check > > succeeds. > > > > Is this a bug? > > > > Regards, > > > > ------ > > Sergei > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From matthewdaggitt at gmail.com Sat Dec 30 14:47:04 2017 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Sat, 30 Dec 2017 13:47:04 +0000 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex Message-ID: I've been trying to get literate agda up and running as per the instructions in the documentation and I'm having problems getting unicode symbols to appear inside code blocks. I've run "agda --latex code.lagda" to get the following "code.tex" file below . \documentclass{article} \usepackage{agda} \begin{document} ? \begin{code}% % \>[4]\AgdaKeyword{data}\AgdaSpace{}% \AgdaDatatype{?}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaPrimitiveType{Set}\AgdaSpace{}% \AgdaKeyword{where}\<% \end{code} \end{document} When I compile it using XeLatex (or LuaLatex) everything compiles without errors and it all appears fine (including the first ? symbol outside of the code block) except that the ? symbol inside the \AgdaDatatype{} command doesn't appear. The same problem occurs when I place any unicode character inside the \AgdaDatatype{} command. I've tried adding in various combinations of the following package imports (even though according to the documentation they shouldn't be necessary in XeLatex): \usepackage{bbm} \usepackage[greek,english]{babel} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{autofe} Does anyone have any suggestions? Thanks, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Sat Dec 30 16:07:12 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 30 Dec 2017 10:07:12 -0500 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex In-Reply-To: References: Message-ID: Agda, XeLaTeX and LuaLaTeX versions? Also attach `code.lagda` please. On 30 December 2017 at 08:47, Matthew Daggitt wrote: > I've been trying to get literate agda up and running as per the instructions > in the documentation and I'm having problems getting unicode symbols to > appear inside code blocks. I've run "agda --latex code.lagda" to get the > following "code.tex" file below . > > > > \documentclass{article} > > > > \usepackage{agda} > > > > \begin{document} > > > > ? > > > > \begin{code}% > > % > > \>[4]\AgdaKeyword{data}\AgdaSpace{}% > > \AgdaDatatype{?}\AgdaSpace{}% > > \AgdaSymbol{:}\AgdaSpace{}% > > \AgdaPrimitiveType{Set}\AgdaSpace{}% > > \AgdaKeyword{where}\<% > > \end{code} > > > > \end{document} > > When I compile it using XeLatex (or LuaLatex) everything compiles without > errors and it all appears fine (including the first ? symbol outside of the > code block) except that the ? symbol inside the \AgdaDatatype{} command > doesn't appear. The same problem occurs when I place any unicode character > inside the \AgdaDatatype{} command. I've tried adding in various > combinations of the following package imports (even though according to the > documentation they shouldn't be necessary in XeLatex): > > \usepackage{bbm} > > \usepackage[greek,english]{babel} > > \usepackage{ucs} > > \usepackage[utf8x]{inputenc} > > \usepackage{autofe} > > Does anyone have any suggestions? > > Thanks, > Matthew > > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente > a su destinatario y puede contener informaci?n confidencial, material > privilegiado o informaci?n protegida por derecho de autor. Est? prohibida > cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, > distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje > por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? > contenida es responsabilidad exclusiva de su remitente por lo tanto la > Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The > information contained in this email is addressed to its recipient only and > may contain confidential information, privileged material or information > protected by copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial reproduction. > If you receive this message by error, please contact the sender and delete > it. The information contained herein is the sole responsibility of the > sender therefore Universidad EAFIT is not responsible for what the message > contains. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From nad at cse.gu.se Sat Dec 30 18:15:07 2017 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Sat, 30 Dec 2017 18:15:07 +0100 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex In-Reply-To: References: Message-ID: <38d90447-0d57-a9a6-d112-a7fdd5105959@cse.gu.se> On 2017-12-30 14:47, Matthew Daggitt wrote: > When I compile it using XeLatex (or LuaLatex) everything compiles > without errors and it all appears fine (including the first ? symbol > outside of the code block) except that the ? symbol inside the > \AgdaDatatype{} command doesn't appear. This is a known problem: LaTeX backend + XeLaTeX/LuaLaTeX ? no lambda https://github.com/agda/agda/issues/2225 I assume that the output from XeLaTeX includes something like the following: Missing character: There is no ? in font cmss10! This can be handled in different ways. I've used newunicodechar, but this solution does not play well together with microtype, which is used by acmart. For my latest paper I decided to use pdfLaTeX instead. (I used \DeclareUnicodeCharacter, and gave the nofontsetup and noinputencodingsetup options to agda.sty.) -- /NAD From matthewdaggitt at gmail.com Sat Dec 30 20:39:58 2017 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Sat, 30 Dec 2017 19:39:58 +0000 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex In-Reply-To: <38d90447-0d57-a9a6-d112-a7fdd5105959@cse.gu.se> References: <38d90447-0d57-a9a6-d112-a7fdd5105959@cse.gu.se> Message-ID: Thank you very much for the link to the issue. I'm only trying to typeset a small amount so the \newunicodechar workaround is fine for now. It might be worth splicing it into the documentation as it seems it's been open for a while. I am getting slightly different symptoms as I'm getting no errors at all in the log, so there is no Missing character: There is no ? in font cmss10! error appearing. My code.lagda file is as follows: \documentclass{article} \usepackage{agda} \begin{document} \begin{code} data ? : Set where \end{code} \end{document} And my code.tex is file is: \documentclass{article} \usepackage{agda} \begin{document} \begin{code}% % \>[4]\AgdaKeyword{data}\AgdaSpace{}% \AgdaDatatype{?}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaPrimitiveType{Set}\AgdaSpace{}% \AgdaKeyword{where}\<% \end{code} \end{document} My tex version is: XeTeX 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) kpathsea version 6.2.1 On Sat, Dec 30, 2017 at 5:15 PM, Nils Anders Danielsson wrote: > On 2017-12-30 14:47, Matthew Daggitt wrote: > >> When I compile it using XeLatex (or LuaLatex) everything compiles >> without errors and it all appears fine (including the first ? symbol >> outside of the code block) except that the ? symbol inside the >> \AgdaDatatype{} command doesn't appear. >> > > This is a known problem: > > LaTeX backend + XeLaTeX/LuaLaTeX ? no lambda > https://github.com/agda/agda/issues/2225 > > I assume that the output from XeLaTeX includes something like the > following: > > Missing character: There is no ? in font cmss10! > > This can be handled in different ways. I've used newunicodechar, but > this solution does not play well together with microtype, which is used > by acmart. For my latest paper I decided to use pdfLaTeX instead. (I > used \DeclareUnicodeCharacter, and gave the nofontsetup and > noinputencodingsetup options to agda.sty.) > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Sun Dec 31 04:54:17 2017 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sun, 31 Dec 2017 04:54:17 +0100 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex In-Reply-To: References: <38d90447-0d57-a9a6-d112-a7fdd5105959@cse.gu.se> Message-ID: <30e448cf-e761-5511-0d32-a47e098159a2@ifi.lmu.de> > data ? : Set where > \AgdaDatatype{?}\AgdaSpace{}% How did \bN become a lambda? On 30.12.2017 20:39, Matthew Daggitt wrote: > Thank you very much for the link to the issue. I'm only trying to > typeset a small amount so the \newunicodechar workaround is fine for > now. It might be worth splicing it into the documentation as it seems > it's been open for a while. > > I am getting slightly different symptoms as I'm getting no errors at all > in the log, so there is no > > ? Missing character: There is no ? in font cmss10! > > error appearing. My code.lagda file is as follows: > > \documentclass{article} > > \usepackage{agda} > > > \begin{document} > > > \begin{code} > > data ? : Set where > > \end{code} > > > \end{document} > > > And my code.tex is file is: > > > \documentclass{article} > > \usepackage{agda} > > > \begin{document} > > > \begin{code}% > > % > > \>[4]\AgdaKeyword{data}\AgdaSpace{}% > > \AgdaDatatype{?}\AgdaSpace{}% > > \AgdaSymbol{:}\AgdaSpace{}% > > \AgdaPrimitiveType{Set}\AgdaSpace{}% > > \AgdaKeyword{where}\<% > > \end{code} > > > \end{document} > > > My tex version is: > > XeTeX 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) kpathsea version 6.2.1 > > > On Sat, Dec 30, 2017 at 5:15 PM, Nils Anders Danielsson > wrote: > > On 2017-12-30 14:47, Matthew Daggitt wrote: > > When I compile it using XeLatex (or LuaLatex) everything compiles > without errors and it all appears fine (including the first ? symbol > outside of the code block) except that the ? symbol inside the > \AgdaDatatype{} command doesn't appear. > > > This is a known problem: > > ? LaTeX backend + XeLaTeX/LuaLaTeX ? no lambda > https://github.com/agda/agda/issues/2225 > > > I assume that the output from XeLaTeX includes something like the > following: > > ? Missing character: There is no ? in font cmss10! > > This can be handled in different ways. I've used newunicodechar, but > this solution does not play well together with microtype, which is used > by acmart. For my latest paper I decided to use pdfLaTeX instead. (I > used \DeclareUnicodeCharacter, and gave the nofontsetup and > noinputencodingsetup options to agda.sty.) > > -- > /NAD > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From asr at eafit.edu.co Sun Dec 31 09:46:49 2017 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 31 Dec 2017 03:46:49 -0500 Subject: [Agda] Disappearing unicode in Literate Agda - XeLatex In-Reply-To: References: <38d90447-0d57-a9a6-d112-a7fdd5105959@cse.gu.se> Message-ID: On 30 December 2017 at 14:39, Matthew Daggitt wrote: > I am getting slightly different symptoms as I'm getting no errors at all in > the log, so there is no > > Missing character: There is no ? in font cmss10! > > error appearing. My code.lagda file is as follows: > > \documentclass{article} > > \usepackage{agda} > > > \begin{document} > > > \begin{code} > > data ? : Set where > > \end{code} > > > \end{document} > > > My tex version is: > > XeTeX 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) > kpathsea version 6.2.1 > Using the same version of XeLaTeX (but not installed via Debian) $ xelatex --version XeTeX 3.14159265-2.6-0.99992 (TeX Live 2015) kpathsea version 6.2.1 I see the missing character warning: $ grep Missing code.log Missing character: There is no ? in font cmss10! Missing character: There is no ? in font cmss10! Missing character: There is no ? in font cmss10! -- Andr?s La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. From kaposi.ambrus at gmail.com Sun Dec 31 17:07:28 2017 From: kaposi.ambrus at gmail.com (Ambrus Kaposi) Date: Sun, 31 Dec 2017 17:07:28 +0100 Subject: [Agda] Call for Conference Grant Applications (Inclusiveness Target Countries) Message-ID: Call for Conference Grant Applications The European research network on types for programming and verification (EUTypes COST Action, https://eutypes.cs.ru.nl) supports attendance of young researchers presenting work on type theory at international conferences via travel grants. The rules are described here: https://eutypes.cs.ru.nl/ConfGrants The main points are: * Only researchers from ITCs participating in the action are eligible. As of September 2017, the ITCs involved in EUTypes are: Bosnia and Herzegovina, Czechia, Estonia, Hungary, Lithuania, Macedonia, Poland, Portugal, Romania, Serbia, Slovenia. * Only PhD students and Early Career Investigators (researchers whose PhD degree is at most 8 years old) are eligible. * The grantee must give a talk or present a poster on the topic of type theory. Applications have to be submitted through the e-COST system: https://e-services.cost.eu/conferencegrant Please inform researchers in your country who might be interested. Many thanks, Ambrus Kaposi EUTypes conference grant coordinator