EDIT (2): Since there are two answers and I haven't accepted any of them I figured I'd motivate what I'd consider an answer here: Either something strongly suggesting any such approach would be impossible/not at all useful or, alternatively, a reference to a research (field) or examples of an at least somewhat general such system beyond text adventure games/interactive fiction.
While I won't pretend I've done any deeper investigation I've noticed that all the game engines/frameworks I have looked into seemed to be something like a glorified graphics engine in the sense that they speak of shapes/entities in a two or three dimensional euclidean space with, possibly, some form of concurrency model "tucked on" allowing one to specify some form of logic attached to these "entities".
Game "rules" and narrative is then written in a somewhat ad-hoc (with respect to the engine) way on top of these primitives.
Obviously the above description is rather simplified (take more specialised engines such as the infinity engine which does include some form of quest/narrative system), and I realise that this model can work quite well (a lot of people seem to have used it).
I'm wondering, though, what attempts have been made to create engines/frameworks that take notions such as (high level) description of
game rules/logic or narrative (or at least a non-spatial aspect of the game) as their primary basis?
EDIT (4): This doesn't mean that the game would not include any spatial/graphical aspects, just that rather than having spatial entities to which you associate logic, you have a notion of plot (or gameplay or "board game rules") which you then describe a graphical interface to/realisation of.
Especially I'd be interested in any declarative approaches that try to capture some kind of (semi-)formal semantics of some reasonably large class of games, in a way useful for actual implementation (as opposed to, for example, a framework exclusively for qualitative analysis of games/narrative).
EDIT (1): I figured I'd add a toy example to illustrate.
Say we were interested in creating point & click style adventures (think SCUMM games). One might analyse these as being based on a notion of more or less linear and discrete progression from a starting situation to an end.
Focusing on the notion of discrete progression, and allowing for some non-linearity, one might choose the theory of (bounded) DAGs as ones basic theory. Specifying a game of this type, in its (relative to this theory) most abstract form thus corresponds to adding additional axioms to this theory (either so that the theory specifies a specific graph or simply enough to capture whatever one thinks is required to capture ones "plot").
Turning this into an actual game now turns into the HCI/Interface design problem of embedding this theory into something playable (i.e. building a model of the theory/finding an homo(iso?)morphism of graphs from the collection of user interface states with transitions into the DAG "specifying the game").
In the above hypothetical scenario I can see at least three things that should be possible to capture in libraries. Firstly one needs tools for transforming/reasoning about DAGs or graphs in general. Secondly a user interface library clever enough to help in verifying that our representation of our graph as a playable game actually models the graph (thus for example, at least partially/informally, proving the game has no stuck states, due to the boundedness condition). Finally a collection of higher level libraries for specifying the graph could be given; such as a library for expressing characters and their interaction and generating (parts of) graphs in terms of such.
Why keep the "middle" theory of DAGs, rather than just have the low level implementation with some help libraries on top? The answer is all the usual reasons for a formal semantics. Given that we have decided on a formal foundation we can verify certain properties of the game allowing one to reason about things like optimisations in the low level interface library (as long as it models the DAG we can do what we want), without having to worry about incomparability with the high level description (of characters/dialogue e.t.c.), as those descriptions must themselves describe such structures.
I'm in no way implying the above approach in specific would work, and the idea isn't that a DAG has to be what is actually kept in memory (rather it forms something akin to a computational formalism such as a lambda calculus), but I hope that this illustrates the kind of approach I'm curious about.
In short, I guess an alternative title to this question might have been: How would Dijkstra have written computer games?