A striking geometric property of elastic bodies with dislocations is that the deformation tensor cannot be written as the gradient of a one-to-one immersion, its curl being nonzero but equal to the density of the dislocations, a measure concentrated on the dislocation lines. In this work, we discuss the mathematical properties of such constrained deformations and study a variational problem in finite-strain elasticity, where Cartesian maps allow us to consider deformations in L p with 1 ≤ p < 2, as required for dislocation-induced strain singularities. Firstly we address the problem of mathematical modeling of dislocations. It is a key purpose of the paper to build a framework where dislocations are described in terms of integral 1-currents and to extract from this theoretical setting a series of notions having a mechanical meaning in the theory of dislocations. In particular, the paper aims at classifying integral 1-currents, with modeling purposes. In the second part of the paper, two variational problems are solved for two classes of dislocations, at the mesoscopic, and at the continuum scale. By continuum it is here meant that a countable family of dislocations is considered, allowing for branching and cluster formation, with possible complex geometric patterns. Therefore, modeling assumptions of the defect part of the energy must also be provided, and discussed.