Take advantage of the growing trend in functional programming.C# is the number-one language used by .NET developers and one of the most popular programming languages in the world. It has many built-in functional progr...
ISBN:
(数字)9780470970287
ISBN:
(纸本)9780470744581
Take advantage of the growing trend in functional programming.C# is the number-one language used by .NET developers and one of the most popular programming languages in the world. It has many built-in functional programming features, but most are complex and little understood. With the shift to functional programming increasing at a rapid pace, you need to know how to leverage your existing skills to take advantage of this trend. Functional programming in C# leads you along a path that begins with the historic value of functional ideas. Inside, C# MVP and functional programming expert Oliver Sturm explains the details of relevant language features in C# and describes theory and practice of using functional techniques in C#, including currying, partial application, composition, memoization, and monads. Next, he provides practical and versatile examples, which combine approaches to solve problems in several different areas, including complex scenarios like concurrency and high-performance calculation frameworks as well as simpler use cases like Web Services and business logic *** how C# developers can leverage their existing skills to take advantage of functional programmingUses very little math theory and instead focuses on providing solutions to real development problems with functional programming methods, unlike traditional functional programming titlesIncludes examples ranging from simple cases to more complex scenariosLet Functional programming in C# show you how to get in front of the shift toward functional programming.
Music composition used to be a pen and paper activity. These days music is often composed with the aid of computer software, even to the point where the computer composes parts of the score autonomously. The compositi...
详细信息
Music composition used to be a pen and paper activity. These days music is often composed with the aid of computer software, even to the point where the computer composes parts of the score autonomously. The composition of most styles of music is governed by rules. We show that by approaching the automation, analysis and verification of composition as a knowledge representation task and formalising these rules in a suitable logical language, powerful and expressive intelligent composition tools can be easily built. This application paper describes the use of answer set programming to construct an automated system, named Anton, that can compose melodic, harmonic and rhythmic music, diagnose errors in human compositions and serve as a computer-aided composition tool. The combination of harmonic, rhythmic and melodic composition in a single framework makes Anton unique in the growing area of algorithmic composition. With near real-time composition, Anton reaches the point where it can not only be used as a component in an interactive composition tool but also has the potential for live performances and concerts or automatically generated background music in a variety of applications. With the use of a fully declarative language and an "off-the-shelf" reasoning engine, Anton provides the human composer a tool which is significantly simpler, more compact and more versatile than other existing systems.
We introduce the notion of well-founded recursive order-sorted equational logic (OS) theories modulo axioms. Such theories define functions by well-founded recursion and are inherently terminating. Moreover, for well-...
详细信息
ISBN:
(纸本)9781450307765
We introduce the notion of well-founded recursive order-sorted equational logic (OS) theories modulo axioms. Such theories define functions by well-founded recursion and are inherently terminating. Moreover, for well-founded recursive theories important properties such as confluence and sufficient completeness are modular for so-called fair extensions. This enables us to incrementally check these properties for hierarchies of such theories that occur naturally in modular rule-based functional programs. Well-founded recursive OS theories modulo axioms contain only commutativity and associativity-commutativity axioms. In order to support arbitrary combinations of associativity, commutativity and identity axioms, we show how to eliminate identity and (under certain conditions) associativity (without commutativity) axioms by theory transformations in the last part of the paper.
Most interactive theorem provers provide support for some form of user-customizable proof automation. In a number of popular systems, such as Coq and Isabelle, this automation is achieved primarily through tactics, wh...
详细信息
ISBN:
(纸本)9781450308656
Most interactive theorem provers provide support for some form of user-customizable proof automation. In a number of popular systems, such as Coq and Isabelle, this automation is achieved primarily through tactics, which are programmed in a separate language from that of the prover's base logic. While tactics are clearly useful in practice, they can be difficult to maintain and compose because, unlike lemmas, their behavior cannot be specified within the expressive type system of the prover itself. We propose a novel approach to proof automation in Coq that allows the user to specify the behavior of custom automated routines in terms of Coq's own type system. Our approach involves a sophisticated application of Coq's canonical structures, which generalize Haskell type classes and facilitate a flexible style of dependently-typed logicprogramming. Specifically, just as Haskell type classes are used to infer the canonical implementation of an overloaded term at a given type, canonical structures can be used to infer the canonical proof of an overloaded lemma for a given instantiation of its parameters. We present a series of design patterns for canonical structure programming that enable one to carefully and predictably coax Coq's type inference engine into triggering the execution of user-supplied algorithms during unification, and we illustrate these patterns through several realistic examples drawn from Hoare Type theory. We assume no prior knowledge of Coq and describe the relevant aspects of Coq type inference from first principles.
We study the computability of conditional probability, a fundamental notion in probability theory and Bayesian statistics. In the elementary discrete setting, a ratio of probabilities defines conditional probability. ...
详细信息
ISBN:
(纸本)9780769544120
We study the computability of conditional probability, a fundamental notion in probability theory and Bayesian statistics. In the elementary discrete setting, a ratio of probabilities defines conditional probability. In more general settings, conditional probability is defined axiomatically, and the search for more constructive definitions is the subject of a rich literature in probability theory and statistics. However, we show that in general one cannot compute conditional probabilities. Specifically, we construct a pair of computable random variables (X, Y) in the unit interval whose conditional distribution P[Y| X] encodes the halting problem. Nevertheless, probabilistic inference has proven remarkably successful in practice, even in infinite-dimensional continuous settings. We prove several results giving general conditions under which conditional distributions are computable. In the discrete or dominated setting, under suitable computability hypotheses, conditional distributions are computable. Likewise, conditioning is a computable operation in the presence of certain additional structure, such as independent absolutely continuous noise.
The proceedings contain 17 papers. The topics discussed include: the challenges of constraint-based test generation;towards automatic synthesis of software verification tools;incremental checking of well-founded recur...
ISBN:
(纸本)9781450307765
The proceedings contain 17 papers. The topics discussed include: the challenges of constraint-based test generation;towards automatic synthesis of software verification tools;incremental checking of well-founded recursive specifications modulo axioms;graph-transformation verification using monadic second-order logic;a modular semantics for higher-order declarative programming with constraints;minimally strict polymorphic functions;protocol analysis in Maude-NPA using unification modulo homomorphic encryption;symbolic analysis of network security policies using rewrite systems;a contextual semantics for concurrent Haskell with futures;maintaining distributed logic programs incrementally;CLP projection for constraint handling rules;dependent session types via intuitionistic linear type theory;linearity and recursion in a typed lambda-calculus;and nested proof search as reduction in the lambda-calculus.
Within the world of automation the trend of model-driven object oriented (oo) engineering has brought up fundamental questions about the applicability of these programming paradigms for Programmable logic Controller (...
详细信息
ISBN:
(纸本)9783642217081
Within the world of automation the trend of model-driven object oriented (oo) engineering has brought up fundamental questions about the applicability of these programming paradigms for Programmable logic Controller (PLC) software. The authors present the results of previously conducted experiments on the usability of the classic procedural paradigm (IEC 61131-3) in machine and plant automation compared to model based approaches for PLC programming, in particular Unified Modeling Language (UML) and domain specific modeling languages. Extrapolating these experiments, we propose a way of enhancing usability evaluations by two means: First we present an improved modeling tool. Second, in order to determine the complexity of the tasks required to develop a PLC-program and to create constant boundary conditions for experimental studies, we propose using Hierarchical Task Analysis (HTA) on both model-driven oo and the state of the art programming approach, concerning typical scenarios. Finally the results of our work are discussed.
The proceedings contain 25 papers. The topics discussed include: verified software toolchain;proving isolation properties for software transactional memory;typing copyless message passing;measure transformer semantics...
ISBN:
(纸本)9783642197178
The proceedings contain 25 papers. The topics discussed include: verified software toolchain;proving isolation properties for software transactional memory;typing copyless message passing;measure transformer semantics for Bayesian machine learning;transfer function synthesis without quantifier elimination;semantics of concurrent revisions;type-based access control in data-centric systems;linear absolute value relation analysis;dataflow analysis for datarace-free programs;compiling information-flow security to minimal trusted computing bases;improving strategies via SMT solving;typing local control and state using flow analysis;barriers in concurrent separation logic;from exponential to polynomial-time security typing via principal types;secure the clones: static enforcement of policies for secure object copying;and a testing theory for a higher-order cryptographic language.
In this paper, we describe the research lines in logicprogramming, carried out in Cosenza over a period of more than twenty years, which have recently produced promising industrial exploitation follow-ups. The resear...
详细信息
In this paper, we describe the research lines in logicprogramming, carried out in Cosenza over a period of more than twenty years, which have recently produced promising industrial exploitation follow-ups. The research lines have changed over the time but they have kept the initial interest on combining logicprogramming with databases techniques, that has been continuously renewed to cope with new challenges, in our attempt to use theory to solve practical problems.
We present the design, implementation and evaluation of an algorithm that checks audit logs for compliance with privacy and security policies. The algorithm, which we name reduce, addresses two fundamental challenges ...
详细信息
ISBN:
(纸本)9781450310758
We present the design, implementation and evaluation of an algorithm that checks audit logs for compliance with privacy and security policies. The algorithm, which we name reduce, addresses two fundamental challenges in compliance checking that arise in practice. First, in order to be applicable to realistic policies, reduce operates on policies expressed in a first-order logic that allows restricted quantification over in finite domains. We build on ideas from logicprogramming to identify the restricted form of quantified formulas. The logic can, in particular, express all 84 disclosure-related clauses of the HIPAA Privacy Rule, which involve quantification over the in finite set of messages containing personal information. Second, since audit logs are inherently incomplete (they may not contain sufficient information to determine whether a policy is violated or not), reduce proceeds iteratively: in each iteration, it provably checks as much of the policy as possible over the current log and outputs a residual policy that can only be checked when the log is extended with additional information. We prove correctness, termination, time and space complexity results for reduce. We implement reduce and optimize the base implementation using two heuristics for database indexing that are guided by the syntactic structure of policies. The implementation is used to check simulated audit logs for compliance with the HIPAA Privacy Rule. Our experimental results demonstrate that the algorithm is fast enough to be used in practice.
暂无评论