Logic in mathematics and philosophy What are the relations between logic as an area of (modern) philosophy and mathematical logic.
The world "modern" refers to 20th century and later, and I am curious mainly about the second half of the 20th century.
Background and motivation
Logic is an ancient area of philosophy which, while extensively beein studied in Universities for centuries, not much happened (unlike other areas of philosophy) from ancient times until the end of the 19th century. The development of logic in the first part of the 20th century since Frege, Russell and others is a turning point both in logic as an area of philosophy and in mathematical logic. In the first half of the 20th century there were close connections between the development of logic as an area of philosophy and the development of mathematical logic. Later, in addition to its interest for mathematicians and philosophers logic became a central applied field in computer science.
My question is about relations between logic as part of philosophy and mathematical logic from the second half of the 20th century when its seems that connections between these two areas have weakened. So I am asking about formal models developed in philosophy that had become important in mathematical logic and about works in philosophical logic that were motivated or influenced by developments in mathematical logic.
I am quite curious also about the reasons for the much weaker connections between mathematical logic and formal models developed by philosophers at the later part of the 20th century. (This makes this question much less board than it seems. Another thing I am curious about is to what extent for the applications to computer science formal models described by philosophers turned out to be useful.
Update: To complement the excellent answers already given I will try to ask some additional researchers in relevant fields to contribute directly or through me.
Update While it was clear in some of the answers let me make it explicit that I refer also to relations between philosophy and set theory.
Related MO question: In what ways did Leibniz's philosophy foresee modern mathematics?
Has philosophy ever clarified mathematics?
 A: Since Gil Kalai has asked about " formal models developed in philosophy that had become important in mathematical logic and about works in philosophical logic that were motivated or influenced by developments in mathematical logic," it is worth pointing out a series of well-organized interviews with 39 logicians, mathematicians, and philosophers conducted by Vincent F. Hendricks and John Symons which seek to answer just this question. These interviews are collected in two volumes, Formal Philosophy (2005) and Masses of Formal Philosophy (2006). Extracts from both collections are available at http://formalphilosophy.com/. These interviews make for insightful reading.
A: [Edition. In this answer I wrote about "philosophical logic" and "mathematical logic" in usual sense of these terms. But I also think that the difference between them is very conventional. For example, people studying knowledge formally by means of modal epistemic logics (as formal models) and those who studying provability logics to a large extent (if one forgets about actual motivations) are doing the same things -- they are investigating various modal logics.]
"My question is about relations between logic as part of philosophy and mathematical logic from the second half of the 20th century when its seems that connections between these two areas have weakened." 
"I am quite curious also about the reasons for the much weaker connections between mathematical logic and formal models developed by philosophers at the later part of the 20th century." 
The main reason is that mathematical logic concerns with models of mathematical thought, but philosophical logic builds models for various parts of philosophy which are very different from mathematics (i. e. they may use modalities, analogy, induction and so on).
To give one example of "formal models developed in philosophy that had become important in mathematical logic", Provability logic is such an example. To quote from Stanford Encyclopedia of philosophy:
"Provability logic is a modal logic that is used to investigate what arithmetical theories can express in a restricted language about their provability predicates."
So, provability logics are modal logics which capture provability in formal systems of mathematical logic. Provability logic is regarded as an area of mathematical logic (which represented by Robert M. Solovay,  George Boolos, Sergei Artemov, Lev Beklemishev, Giorgi Japaridze, Dick de Jongh and so on) and it uses models, ideas and techniques from modal logic which is (in any case, was) part of philosophical logic.
"Another thing I am curious about is to what extent for the applications to computer science formal models described by philosophers turned out to be useful."
Again, the original papers by Kripke was by no means concerned with computer science. Kripke discovered another way of interpreting the modalities and the context was philosophical one. But today the whole field of program verification in CS is based on modal logic. A lot of specific modal logics are developed in CS which model specific aspects (temporal logics, dynamic logics and so on). Crucial results about them such as expresiveness, decidability and completeness are proved using essentialy the same ideas as those from original papers in philosophical context. 
Finally, to speak "about works in philosophical logic that were motivated or influenced by developments in mathematical logic", I quote from what I said in the meta thread:
"A new interesting field in philosophy is growing in this century often called Formal Philosophy (this term I believe has its origin from the title of Richard Montague's collected papers book). People of this field (among them R. Montague, H. Putnam, E. Zalta, D. Bonnay...) are trying to solve philosophical problems using formal logic. Particularly, and this is important, many of them try to formalize such kinds of reasoning as modality, induction, analogy, simplicity, naturality, generalization and so on as well as concrete philosophical theories (which are of course in the domain of philosophical logic) using formalisms and methods of mathematical logic.


*

*Works by Montague show that natural language is not SO MUCH different from formal languages, its syntax and semantics has strong structure. You may say that they are semiformal. That is why we may apply all the techniques and results from mathematical logic, in which specificaly mathematical languages are formalized and deeply studied. As a result we have a field of formal theory of natural language and its aspects (grammar, semantics, development and so on). You may see the broad range of topics presented on this conference: http://lacl.gforge.inria.fr/lacl-2011/appel.html. This opens the way for doing philosophy of language by formalizing the problems and answer them by mathematical proof. 

*The work of Hilary Putnam presents attempts to tackle the problems of philosophy of mind and philosophy of language by comparing with formal models. To quote from his "Models and reality" paper: 
"In this paper I want to take up Skolem's arguments, not with the aim of refuting them, but with the aim of extending them in somewhat the direction he seemed to be indicating. It is not my claim that the "Lowenheim-Skolem paradox" is an antinomy in formal logic; but I shall argue that it is an antinomy, or something close to it, in philosophy of language. Moreover, I shall argue that the resolution of the antinomy - the only resolution that I myself can see as making sense - has profound implications for the greate metaphysical dispute about realism which has always been the central dispute in the philosophy of language." See his collected papers.

*Edward Zalta in his Principia Metaphysica has formalization of general notions of abstract and concrete objects. In mathematics (today) the most basic objects are sets. In Leibniz' Monadology (which is pure philosophical theory) they are monads. Zalta formalizes the monads and does Monadology formally. As well as Plato's theory of forms, theory of meinongian objects, theory of situations, the theory of worlds, theory of times. Moreover, Zalta claims that his formalization enables to obtain new useful abstract notions (objects) automaticaly by mechanized theorem proving. See his home page."
A: I agree with the commentators that the question is rather too broad, but here's an attempt to answer it anyway.
Readers of MO will likely have less familiarity with non-mathematical logic, so it might help to begin by skimming the tables of contents of the 18-volume (!) Handbook of Philosophical Logic to get some feeling for what people mean by "philosophical logic."  [Edit: The preceding link no longer works; one can find some content using Google Books and the Wayback Machine.]  It includes many topics that will likely be unfamiliar to mathematicians, such as temporal logic, multi-modal logic, non-monotonic reasoning, labelled deductive systems, and fallacy theory.
Roughly speaking, philosophical logic is the general study of reasoning and related topics.  As in other areas of philosophy, this study is not necessarily formal.  However, the success of formal methods in mathematical logic has led philosophers to try to formalize many other kinds of reasoning.  Formalized modal logics are perhaps the best known of these.  These are not always classified as "mathematical logic" because in mathematics one does not typically reason formally about concepts such as possibility, necessity, belief, etc.  On the other hand, once a system of logic has been made sufficiently formal, it can of course be subject to mathematical study.  Thus the boundary between (for example) formal modal logic and traditional mathematical logic is somewhat blurry.  A notable example of the cross-fertilization that is possible here is Fitting and Smullyan's book on Set Theory and the Continuum Problem, which develops the (highly mathematical) subject of forcing from the perspective of modal logic, providing a fresh and completely rigorous approach to a now-classical mathematical subject.
If I had to summarize in one sentence, I would say that mathematical logic is the subfield of philosophical logic devoted to logical systems that have been sufficiently formalized to admit mathematical study.  This is a slightly broader definition of mathematical logic than is customary, but I think it's a good definition in the context of this MO question, which tacitly seems to be asking if mathematicians have anything to learn from so-called "philosophical logic."
A: Perhaps this (by G.-C. Rota, in "The Pernicious Influence of Mathematics upon Philosophy") is relevant:
The fake philosophical terminology of mathematical logic has misled philosophers into believing that mathematical logic deals with the truth in the philosophical sense. But this is a mistake. Mathematical logic deals not with the truth, but with the game of truth.
A: [I would like to vote up David Corfield's answer - but don't yet have the reputation. Also, having a taught philosophical logic in seminars and now studying mathematical logic, I don't understand what the term 'epistemic' logic mean in reference to mathematics - also, I don't know much about provability theory - so please vote down this answer if it is rubbish]
Here's my threppence... In terms of teaching, the motivations for students are usually qutie different. Many philosophy departments teach logic, but not for the same reasons that CS or mathematics departments teach it. For philosophers, Logic is a 'toolkit' for developing arguments, structuring them properly and getting a cohesive thread that can be read and understood by other philosophers.
Beyond this, philosophical logic develops into a number of descriptive and analytical disciplines (analytical, here, in the philosophical sense, opp. to continental philosophy), such as theory of mind, ontology, etc. etc. As such, teaching logic in philosophy depts. has its own challenges, as it is discouraged to be completely abstract, which makes concepts like Ex Falso Quodlibet quite challenging for students to understand.
Mathematical logic looks a lot more at what logical/non-logical symbols you have, how they relate to each other at what theorems are provable ($\phi \vee \neg \phi$) or un-provable (also called undecidable; $\phi \wedge \neg\phi$), and this is done by many means - model theory, recursion/computability theory, etc. etc., and theorem results give exact boundaries and thresholds for mathematical and logical systems. That said, most research seems to be in PA or fragments of PA (such as $PA^-$, $I\Sigma_1$ or $I\Sigma_n$ - the first of which is usually enough to do most mathematics, certainly all that we get from secondary school).
When considering truth, Tarski's 1969 paper on formal language states clearly that formal languages do have a way of expressing truth, which is not naturally inherent in natural language. In addition, the strength of a system is also well defined (Strength of T = {$ \phi : T \vdash \phi^\ast $}, where $\phi^\ast$ is a translation of $\phi$ into the language of T).
As to what philosophical models have influenced mathematics? I'm not sure exactly what to say. The only think that you normally get from mathematicians is derision of 'philosophical rubbish'! Which isn't very helpful to you... ;)
[Finally, thanks to @grshutt for the interviews - they are quite interesting indeed!]
A: Here is an answer via a picture (Joel Davis Hamkins)  
See also this and this blog posts.
A: It is easier to list the differences than similarities between the two kinds of logic.
Mathematical logic is the branch of mathematics that studies mathematical activity. It has all the usual properties of a mathematical branch. It uses the standard mathematical methods, such as the axiomatic method, informal set theory, and symbolic notation. It idealizes away from the actual situation by ignoring many aspects of actual mathematical activity, for example, it focuses mostly on how mathematical statements are proved and what they mean, but says little about conjectures, analogies, elegance, or about mathematics as a human activity. It phrases its results in terms of mathematical theorems (as opposed to, say, critical essays or historical studies).
Philosophical logic on the other hand attempts to attack its object of interest, which we could broadly characterize as reasoning, as a whole and from many different angles, as is customary in philosophy. Thus, apart from using the deductive method, we might consider linguistic aspects of logic, or logic as it relates to religion, we might learn something about logic by looking at its historical development, we may put it in the sociological context, etc. Consequently, no single treatment of logic will be accepted as a comprehensive one by (good) philosophers. In fact, it will be hard to get philosophers to agree on what precisely philosophical logic is.
It is naive to think of mathematical logic as being superior to philosophical logic. Certainly, mathematical logic is superior to philosophical logic in certain aspects, but one should never forget that the scope of mathematical logic is very narrow and it is therefore not surprising that mathematical logic boasts with deeper and technically more complicated insights than philosophical logic.
A: There is a general pattern of inquiry in mathematics and the sciences by which an investigation begins in philosophy, using philosophical ideas that may be initially quite vague, but which become increasingly clear upon further philosophical analysis, in such a way that the ideas eventually mature and the investigation finds a home in its natural discipline, unmoored from the philosophical origin. The history of science is replete with
instances of this philosophy-into-science phenomenon.
And so is mathematics. Consider, for example, the work of Alan
Turing, much of which is essentially philosophical in nature. Before
Turing, Gödel had despaired that we could achieve an
acceptable answer to the question, What does it mean to say that
a function is computable? Philosophers have speculated that Gödel 
had had in mind a diagonal argument, whereby if we had an
effective means of enumerating the computable functions, then we
could diagonalize against them (and this diagonalization succeeds
with Gödel's primitive recursive functions, showing that they
do not capture the notion of computability). So Gödel had
expected a hierarchy of computability. Meanwhile, Turing undertook
a philosophical inquiry into what it means for a human to
undertake a rote computational procedure, arriving in this way at his Turing
machine concept, an idea so robust that it gave birth to the
entire fields of computability theory and complexity theory, if
not also helping us into the modern computer age. (Meanwhile,
Gödel's hierarchy expectation is surely realized in
complexity theory and many other parts of the subject.) So this is
a clear case where philosophical ideas, which
vexed even our greatest thinkers, matured into purely mathematical
developments, and extremely important ones at that.
Other prominent examples would be (1) the resolution of the
truth/proof distinction, from Frege and Russell through to Hilbert
and then Gödel's refutation of Hilbert, and (2) Cantor's
ideas on cardinality and the transfinite. These were cases where
purely philosophical ideas eventually transformed into our current
purely mathematical investigations.
But the phenomenon is not at all restricted to such high-profile
historical cases like this; rather, it is a pervasive and on-going
phenomenon, by which philosophical developments, even small ones,
often proceed into mathematics, and one can sometimes witness the
process in philosophy department seminars. A contemporary
analogue of Turing's investigation, for example, would be the current
work on the question, What is an
algorithm? (for example, see Y.
Gurevich, What is an algorithm? and A. Blass, Y. Gurevich, Algorithms: a quest for absolute definitions).
In his plenary talk at the recent JMM in Baltimore, Jeremy Avigad
challenged mathematical logicians to develop better philosophical
ideas concerning some fundamental concepts, such as what it means
to verify mathematics at an appropriate level of abstraction,
and to develop formal methods for everyday mathematical language
and formal methods of everyday proof, among others. This kind of
analysis begins as philosophy and ends up as mathematics.
With respect to your suggestion that connections between
philosophical logic and mathematical logic have weakened, I
disagree. In the case of set theory, these connections appear if
anything to be strengthening, and set theoretic research is
increasingly preoccupied with philosophical concerns. The fact of
the matter is that set theory is currently grappling with several
extremely difficult and troubling philosophical issues, concerning
for example the criteria by which we adopt new axioms in
mathematics and set theory (such as large cardinal and determinacy
axioms) and the nature of mathematical truth (such as the raging
debate on pluralism, and the question of definiteness of truth) in a context of a pervasive independence
phenomenon. We still don't have agreement on the status of the
continuum
hypothesis,
and the obstacles are philosophical rather than mathematical.
The situation is complicated by the fact that many of the most
interesting philosophical issues in set theory concern highly
technical parts of the subject, especially forcing and large
cardinals. For progress, therefore, we need philosophically minded
set theorists who can operate in both realms. Several set theorists are now undertaking explicitly philosophical
work, including Woodin, who has just taken up a joint appointment
in philosophy and mathematics at Harvard. (And my own work has
become in part explicitly philosophical.) There is an increasing
interaction between set theorists and the philosophers of set
theory. In recent years, for example, we've had conferences
devoted specifically to this interaction, with participation both
from mathematicians and
philosophers, such as the NYU Conference on philosophy of mathematics, 2009,
the Workshop on set theory and the philosophy of mathematics at U Penn 2010,
the conference on Set theory and higher-order logic: foundational issues and mathematical developments in London, the Workshop on infinity and truth, NUS 2011 and the
EFI series at Harvard 2012. Several of those meetings have published proceedings volumes.
Postscript. Lastly, let me mention that this appears to be my one-thousandth 
answer on MathOverflow. (I have apparently typed over three
million characters, for which I should apologize for my lack of greater brevity.) I have
learned enormously from all the great mathematical posts here, and
I am grateful to be a part of this remarkable community. Thank
you, MathOverflow; it's been great.
A: I agree with Timothy and Andrej's answers, and will complement them by suggesting a few books by philosophers and philosophically-inclined logicians which I have found very interesting. I am sure the list could be made much longer, and even more varied:


*

*Michael Dummett, The Logical Basis of Metaphysics

*Alain Badiou, Number and Numbers
The first two books are, in a sense, complements. Dummett is an analytic philosopher and intuitionist, whose writing has been profoundly influential among constructive mathematicians. Badiou is a continental philosopher, and a set-theoretic realist (sort of). But both are deeply concerned with what mathematics can say about our understanding, and vice-versa.  

*David Lewis, Counterfactuals

*Judea Pearl, Causality 
Lewis is a philosopher, and Pearl is a computer scientist. It's worth reading both of these books to see the clear line of intellectual descent from Lewis to Pearl. (This is greatly helped by the fact that Pearl does not hesitate to mark his intellectual trail.) 

*John L. Bell, A Primer of Infinitesimal Analysis
I think that anyone who wants to really understand physics needs to understand how physicists' practices differ from the official formalizations of theories like calculus. For example, basically every physicist ever makes heavy use of infinitesimals in preference to epsilon-delta arguments. This raises the question: how does this make any darn sense? 
Bell has used synthetic differential geometry to study this question, and was an early advocate of the use of topos-theoretic methods to formalize physical theories (an idea which Isham and Doering have recently made use of in their work on quantum gravity). 
A: There was some comment in the meta thread to the effect that answers from non-experts are useless.
Nevertheless, I thought to indulge myself with a few remarks (that actually address only a small part of the question). The objective is to get  experts to correct me,
if they can be troubled to do so. With such a contribution, perhaps this answer can be useful to others as well. 
My answer to the original question is that there are no substantial relations at this point. This is because
mathematical logic is concerned mainly with mathematics;
while
philosophical logic is concerned mainly with philosophy.
This characterization is obviously an oversimplification, but I wonder if it does not capture the
distinction in all essentials.
Here is a short Wikipedia description of the research of A. C. Grayling, who, I gather,
is a rather distinguished person in  philosophical logic:
`His principal interests in technical philosophy lie at the intersection of theory of knowledge, metaphysics, and philosophical logic, through which he attempts to define the relationship between mind and world, thereby challenging philosophical scepticism. Grayling uses philosophical logic to counter the arguments of the sceptic in order to try to shed light on the traditional ideas of the realism debate and developing associated views on truth and meaning.'
This sounds like philosophy to me.
On the other hand, if we examine the work of leading people in model theory (the only branch of mathematical logic with which I have some passing
 acquaintance) like Udi Hrushovski, Angus Macintyre, Anand Pillay, and Boris Zilber,
it is hard not to think it looks like `generalized algebraic geometry.' Indeed, applications to algebraic geometry and number theory
form a mainstay of their work.
As to the reasons, I gathered some insight from some amusing passages in the preface of Van Dalen's textbook on logic (which I do not have on hand right now).
He writes  of the 'sacred' tradition of mathematical logic closely related to Hilbert's programme and the incompleteness phenomena, where
foundations were handled with great care and awe. He then goes on to describe his own encounter with recursion theory lectures
by Hartley Rogers, where logic was treated like any other branch of mathematics, say linear algebra or complex analysis.
This he refers to as the 'profane' tradition, obviously more distant from philosophical origins. I wonder if it isn't the case that mathematical logicians simply became bored with
 the sacred tradition (in keeping with the twentieth century trend to find many sacred things boring). 
 In any case, it seems relatively clear that the profane tradition is more dominant among current day practitioners.
 One way to see this, according to an old conversation with Hrushovski, is that  papers in mathematical logic contain as many mistakes as those in algebraic geometry.
Because of my ignorance, I may be missing the possibility that Proof Theory and Set Theory are still somewhat close to philosophy.
But the simple-minded answer  still seems to be a reasonable one.

Just after posting the above, I noticed an obvious flaw in my own argument. I could have written, for example,
mathematical gauge theory is concerned mainly with mathematics;
while
physical gauge theory is concerned mainly with physics.
But it would be ridiculous to claim that there are no substantial relations between the two. So if my conclusion is correct, it would require a more elaborate discussion. Oh well, perhaps later.

Here is a response to my own objection. The difference between the two cases mentioned above has little to do with logic and gauge theory in particular. That is, mathematical logic and philosophical logic have little in common simply because mathematics and philosophy have little in common. Therefore, difference of purpose is enough to produce a divergence in methods and ideas. Physical problems, on the other hand, are resolved in the language of mathematics. Hence, commonality of origin becomes enough to maintain a tight thread between, say, the two gauge theories.
This superficial analysis is all I have time for now, but maybe it's plausible.
A: A more recently developed candidate might be Linear Logic, which is a successful formalization of modes of reasoning of considerable philosophic interest. I highly recommend Jean-Yves Girard's inimitable papers, starting with the seminal Linear Logic (1987). 
For those who know nothing of linear logic, a core idea is that it is a logic which takes into account conservation of resources. A metaphor might be chemical reactions or economic transactions. To give a simple-minded illustration: in classical logic, given propositions $A \to B$ and $A \to C$, one can infer the proposition $A \to B \wedge C$. But this may be in conflict with some everyday interpretations. Take for example $A$ to be "I have a dollar", $B$ to be "I can buy that chocolate bar", and $C$ to be "I can buy that bottle of milk". The propositions "if I have a dollar, then I can buy that chocolate bar", and "if I have a dollar, then I can buy that bottle of milk" may be true, but the vendor may not accept "if I have a dollar, then I can buy that chocolate bar and I can buy that bottle of milk" under the everyday interpretation. 
Thus, in contrast to classical logic, in which we are allowed to use the same premise repeatedly throughout a deduction (or not at all) -- formally codified by weakening and contraction rules for "and " and "or" -- linear logic discards those rules, or at least introduces a distinction between two notions of "and", and also a modality for relating them. It retains an advantage of classical logic that negation is symmetrical (a contravariant equivalence), and an advantage of intuitionistic logic in that it admits a rich semantics (richer than classical logic) in the sense of a "propositions as types" paradigm (as explained in Girard's Proofs and Types for example). 
If classical propositional logic is algebraized in the form of Boolean algebra, then you could say that linear logic is algebraized in the form of symmetric monoidal categories, more exactly of $\ast$-autonomous categories when negation is taken into account. (A $\ast$-autonomous category is, roughly, a symmetric monoidal category equipped with a contravariant self-equivalence that is suitably compatible with the tensor; the notion was introduced by Barr with an eye toward dualities in functional analysis, among other things.) It has captured considerable interest on the part of theoretical computer scientists. 
A: The inclusion by Neel of a computer scientist is indicative of the ways in which that discipline mediates between mathematical and philosophical logic. Temporal and modal logics are good cases of a situation where initial philosophical motivation gets swept up by more practical concerns, e.g., model checking in the case of temporal logic. Mathematical sophistication then usually increases. Now to work on (first-order) modal logic you had better have your sheaf theory up to scratch.
A: Here is Harvey Friedman's take on the question (presented here with his kind permission). 
"From my point of view, it is foundations of mathematics that is by far the most interesting - not mathematical logic or philosophical logic. This is where the real progress is being made that is of general intellectual interest. I know that this doesn't answer your question, but it does indicate where my interests lie." 
To my request Harvey briefly explained his distinction between "Foundation of mathematics," "mathematical logic" and "philosophical logic".
"1) Foundations of Mathematics. Here the "practice of mathematics" (mathematical practice) is regarded as an object of study, without questioning its "correctness", "validity", etcetera. Mathematical practice is treated as a phenomenon to be modeled - not an activity to be questioned. A crude model of mathematical practice is the ZFC system. Finer models are given by fragments of ZFC. There have been startling discoveries, starting with Goedel. Advances are judged according to how much insight is gained about mathematical practice. The future is huge, as there are all sorts of aspects of mathematical practice that at present have not been properly modeled or only partly modeled - but hold promise for deeper modeling. E.g., classification, simplicity, naturalness.  
2) Mathematical Logic. This is a branch of mathematics that investigates the various fundamental mathematical structures emanating out of Foundations of Mathematics - for their own sake. There is no aim to address issues in Foundations of Mathematics. A subarea of Mathematical Logic is clarifying: there has been some reasonably successful attempts to apply these investigations to problems and contexts in mathematics, creating a useful mathematical tool. The most common name for this is Applied Model Theory.
3) Philosophical Logic. This attempts to analyze and treat logical notions in their most rudimentary form, independently of how they are used in mathematics. Mathematics, like everything else, is something to be questioned, justified, criticized, etc. I have not worked in this, because I do not sense realistic prospects for spectacular findings - or at least, the realistic prospects are much higher in 1. 
Foundations of Mathematics is between mathematics and philosophy, and has a different perspective than either of the two. "
