We address the problem of engineering self-organizing electronic institutions for resource allocation in open, embedded, and resource-constrained systems. In such systems, there is decentralized control, competition for resources and an expectation of both intentional and unintentional errors. The "optimal" distribution of resources is then less important than the endurance of the distribution mechanism. Under these circumstances, we propose to model resource allocation as a common-pool resource management problem, and develop a formal characterization of Elinor Ostrom's socio-economic principles for self-governing institutions. This article applies a method for sociologically inspired computing to give a complete axiomatization of six of Ostrom's eight principles in the Event Calculus. A testbed is implemented for experimenting with the axiomatization. The experimental results show that these principles support enduring institutions, in terms of longevity and membership, and also provide insight into calibrating the transaction and running costs associated with implementing the principles against the behavioral profile of the institutional membership. We conclude that it is possible to express Ostrom's principles in logical form and that they are necessary and sufficient conditions for enduring self-organizing electronic institutions to manage sustainable common-pool resources.