Given a compact smooth manifold $M$, it's relatively well known that $C^\infty(M)$ determines $M$ up to diffeomorphism. That is, if $M$ and $N$ are two smooth manifolds and there is an $\mathbb{R}$-algebra isomorphism between $C^\infty(M)$ and $C^\infty(N)$, then $M$ and $N$ are diffeomorphic.

(See, for example, Milnor and Stasheff's "Characteristic Classes" book where an exercise walks one through the proof of this fact).

Thus, in some sense, all the information about the manifold is contained in $C^\infty(M)$.

Further, the tools of logic/set theory/model theory etc. have clearly been applied with greater success to purely algebraic structures than to, say, differential or Riemannian geometry. This is partly do the fact that many interesting algebraic structures can be defined via first-order formulas, whereas in the geometric setting, one often uses (needs?) second-order formulas.

So, my question is two-fold:

First, is there a known characterization of when a given (commutive, unital) $\mathbb{R}$-algebra is isomorphic to $C^\infty(M)$ for some compact smooth manifold $M$? I imagine the answer is either known, very difficult, or both.

Second, has anyone applied the machinery of logic/etc to, say, prove an independence result in differential or Riemannian geometry? What are the references?