scholarly journals A refinement calculus for logic programs

2002 ◽  
Vol 2 (4-5) ◽  
pp. 425-460 ◽  
Author(s):  
IAN HAYES ◽  
ROBERT COLVIN ◽  
DAVID HEMER ◽  
PAUL STROOPER ◽  
RAY NICKSON

Existing refinement calculi provide frameworks for the stepwise development of imperative programs from specifications. This paper presents a refinement calculus for deriving logic programs. The calculus contains a wide-spectrum logic programming language, including executable constructs such as sequential conjunction, disjunction, and existential quantification, as well as specification constructs such as general predicates, assumptions and universal quantification. A declarative semantics is defined for this wide-spectrum language based on executions. Executions are partial functions from states to states, where a state is represented as a set of bindings. The semantics is used to define the meaning of programs and specifications, including parameters and recursion. To complete the calculus, a notion of correctness-preserving refinement over programs in the wide-spectrum language is defined and refinement laws for developing programs are introduced. The refinement calculus is illustrated using example derivations and prototype tool support is discussed.

2007 ◽  
Vol 8 (01) ◽  
pp. 1-31 ◽  
Author(s):  
ROBERT COLVIN ◽  
IAN J. HAYES ◽  
PAUL STROOPER

AbstractThe refinement calculus for logic programs is a framework for deriving logic programs from specifications. It is based on a wide-spectrum language that can express both specifications and code, and a refinement relation that models the notion of correct implementation. In this paper we extend and generalise earlier work oncontextual refinement. Contextual refinement simplifies the refinement process by abstractly capturing the context of a subcomponent of a program, which typically includes information about the values of the free variables. This paper also extends and generalisesmodule refinement. Amoduleis a collection of procedures that operate on a common data type; module refinement between a specification moduleAand an implementation moduleCallows calls to the procedures ofAto be systematically replaced with calls to the corresponding procedures ofC. Based on the conditions for module refinement, we present a method forcalculatingan implementation module from a specification module. Both contextual and module refinement within the refinement calculus have been generalised from earlier work and the results are presented in a unified framework.


2021 ◽  
Vol 72 ◽  
pp. 285-328
Author(s):  
Adnan Darwiche ◽  
Pierre Marquis

Quantified Boolean logic results from adding operators to Boolean logic for existentially and universally quantifying variables. This extends the reach of Boolean logic by enabling a variety of applications that have been explored over the decades. The existential quantification of literals (variable states) and its applications have also been studied in the literature. In this paper, we complement this by introducing and studying universal literal quantification and its applications, particularly to explainable AI. We also provide a novel semantics for quantification, discuss the interplay between variable/literal and existential/universal quantification, and identify some classes of Boolean formulas and circuits on which quantification can be done efficiently. Literal quantification is more fine-grained than variable quantification as the latter can be defined in terms of the former, leading to a refinement of quantified Boolean logic with literal quantification as its primitive.


2013 ◽  
Vol 78 (4) ◽  
pp. 1036-1054 ◽  
Author(s):  
Manuel Bodirsky ◽  
Michael Pinsker ◽  
Todor Tsankov

AbstractFor a fixed countably infinite structure Γ with finite relational signature τ, we study the following computational problem: input are quantifier-free τ-formulas ϕ0, ϕ1, …, ϕn that define relations R0, R1, …, Rn over Γ. The question is whether the relation R0 is primitive positive definable from R1, …, Rn, i.e., definable by a first-order formula that uses only relation symbols for R1, …, Rn, equality, conjunctions, and existential quantification (disjunction, negation, and universal quantification are forbidden).We show decidability of this problem for all structures Γ that have a first-order definition in an ordered homogeneous structure Δ with a finite relational signature whose age is a Ramsey class and determined by finitely many forbidden substructures. Examples of structures Γ with this property are the order of the rationals, the random graph, the homogeneous universal poset, the random tournament, all homogeneous universal C-relations, and many more. We also obtain decidability of the problem when we replace primitive positive definability by existential positive, or existential definability. Our proof makes use of universal algebraic and model theoretic concepts, Ramsey theory, and a recent characterization of Ramsey classes in topological dynamics.


Author(s):  
David Maplesden ◽  
John Hosking ◽  
John Grundy

In this chapter we describe the Design pattern modeling language, a notation supporting the specification of Design pattern solutions and their instantiation into UML design models. DPML uses a simple set of visual abstractions and readily lends itself to tool support. DPML Design pattern solution specifications are used to construct visual, formal specifications of Design patterns. DPML instantiation diagrams are used to link a Design pattern solution specification to instances of a UML model, indicating the roles played by different UML elements in the generic Design pattern solution. A prototype tool is described, together with an evaluation of the language and tool.


Quality security requirements help secure software development to succeed. While considerable research can be discovered in the field of demands elicitation, less attention has been paid to the writing of full security specifications. The demands engineers (REs) are still challenged and tedious in implementing and reporting full safety needs derived from Natural language. This is due to their tendency to misunderstand the real needs and the security terms used by inexperienced REs leading to incomplete security requirements. Motivated from these problems, we have developed a prototype tool, called SecureMEReq to improve the writing of complete security requirements. This tool provides four important key-features, which are (1) extraction of template-based components from client-stakeholders; (2) analysis of template-based density from SRCLib; (3) analysis of requirements syntax density from SecLib; and (4) analysis of completeness prioritization. To do this, we used our pattern libraries: SecLib and SRCLib to support the automation process of elicitation, especially in writing the security requirements. Our evaluation results show that our prototype tool is capable to facilitate the writing of complete security requirements and useful in assisting the REs to elicit the security requirements.


1996 ◽  
Vol 07 (04) ◽  
pp. 359-406 ◽  
Author(s):  
JAN A. PLAZA

We consider propositional logic programs with negations. We define notions of constructive transformation and constructive completion of a program. We use these notions to characterize SLDNF-resolution in classical, intuitionistic and intermediate logics, and also to derive a characterization in modal logics of knowledge. We show that the three-valued and four-valued fix-point or declarative semantics for program P are equivalent to the two-valued semantics for the constructive version of P. We argue that it would be beneficial to replace Negation as Failure by constructive transformation, and it would be beneficial to use the semantics for the constructive version of the program instead of multivalued semantics for the original program.


1977 ◽  
Vol 42 (1) ◽  
pp. 63-63 ◽  
Author(s):  
Nobuyoshi Motoháshi

In [1], H. Africk proved that Scott's interpolation theorem does not hold in the infinitary logic Lω1ω. In this paper we shall show that there is an interpolation theorem in Lω1ω which can be considered as an extension of Scott's interpolation theorem in Lω1ω by using a technique developed in Motohashi [2] and [3]. We use the terminology in [1]. Therefore {Ri; i ∈ J} is the set of predicate symbols in our language. Now let us divide the set of all the free variables into mutually disjoint infinite sets {VI; I ⊆ J}. Suppose that ℱ ⊆ (J). Then a formula in Lω1ω is said to be an ℱ′-formula if it is obtained from atomic formula of the form Ri(X1, …, Xn) for some I ∈ i ∈ I and X1, …, Xn in V1,, by applying ¬ (negation), ∧ (countable conjunction), ∨ (countable disjunction), → (implication), ∀ (universal quantification), and ∃ (existential quantification). Notice that every ℱ-sentence in [1] is an ℱ′. sentence (ℱ′-closed formula) in our sense.Then we have the following theorem which is an immediate consequence of the interpolation theorem in [2].Theorem. Let A and ? be sentences. There is an ℱ′-sentence C such that A→C and C→B are provable iff whenever and are ℱ-isomorphic structures and satisfies A, then satisfies B.


2009 ◽  
Vol 9 (3) ◽  
pp. 309-341 ◽  
Author(s):  
VAN HUNG LE ◽  
FEI LIU ◽  
DINH KHANG TRAN

AbstractThe paper introduces fuzzy linguistic logic programming, which is a combination of fuzzy logic programming, introduced by P. Vojtáš, and hedge algebras in order to facilitate the representation and reasoning on human knowledge expressed in natural languages. In fuzzy linguistic logic programming, truth values are linguistic ones, e.g., VeryTrue, VeryProbablyTrue and LittleFalse, taken from a hedge algebra of a linguistic truth variable, and linguistic hedges (modifiers) can be used as unary connectives in formulae. This is motivated by the fact that humans reason mostly in terms of linguistic terms rather than in terms of numbers, and linguistic hedges are often used in natural languages to express different levels of emphasis. The paper presents: (a) the language of fuzzy linguistic logic programming; (b) a declarative semantics in terms of Herbrand interpretations and models; (c) a procedural semantics which directly manipulates linguistic terms to compute a lower bound to the truth value of a query, and proves its soundness; (d) a fixpoint semantics of logic programs, and based on it, proves the completeness of the procedural semantics; (e) several applications of fuzzy linguistic logic programming; and (f) an idea of implementing a system to execute fuzzy linguistic logic programs.


Sign in / Sign up

Export Citation Format

Share Document