  We present a formal, mathematical foundation for modeling and reasoning about
the behavior of $synchronous$, $stochastic$ $Spiking$ $Neural$ $Networks$
$(SNNs)$, which have been widely used in studies of neural computation. Our
approach follows paradigms established in the field of concurrency theory.
  Our SNN model is based on directed graphs of neurons, classified as input,
output, and internal neurons. We focus here on basic SNNs, in which a neuron's
only state is a Boolean value indicating whether or not the neuron is currently
firing. We also define the $external$ $behavior$ of an SNN, in terms of
probability distributions on its external firing patterns. We define two
operators on SNNs: a $composition$ $operator$, which supports modeling of SNNs
as combinations of smaller SNNs, and a $hiding$ $operator$, which reclassifies
some output behavior of an SNN as internal. We prove results showing how the
external behavior of a network built using these operators is related to the
external behavior of its component networks. Finally, we define the notion of a
$problem$ to be solved by an SNN, and show how the composition and hiding
operators affect the problems that are solved by the networks.
  We illustrate our definitions with three examples: a Boolean circuit
constructed from gates, an $Attention$ network constructed from a
$Winner$-$Take$-$All$ network and a $Filter$ network, and a toy example
involving combining two networks in a cyclic fashion.
