To clarify: Right now the star rating indicates the difficulty of the hardest patterns in the map in their respective categories (speed and aim) in a way similar to how best performances of a player are weighted. The hardest pattern weights the most, the second hardest less and so on. Of course the "pattern" thing is just an abstract way of looking at it.
A consequence of this system is that map length is considered in star rating only up to a certain amount of hard patterns. This leads to the nice property that when taking a part of a map, then the star difficulty of that part is always smaller or equal to the difficulty of the entire map, which makes sense intuitively. The star difficulty thus focuses on the hard parts of a map and shall be interpreted as upper physical difficulty to FC. Note the physical - OD and AR are not taken into account. Keep in mind that this doesn't mean, that accuracy is completely unaffected by star rating. It is inherently harder to get a good accuracy on physically harder maps since you can't entirely focus your body on doing so.
It seems to me that it's best to leave AR, OD and map length as external parameters since this way it is easier for people to judge which maps they can play and which they can't play. If everything was condensed into a single number players would have to try out maps a lot more to see whether the difficulty is of the kind they want to have. The next step is to show aim and speed difficulty seperately as well, to further help with that notion and potentially even make a radar chart showing up in the game.
Dry details
In reality the map is divided into sections of equal length (between 250ms and 1s, I don't remember exactly) and for each section the highest difficulty of the hitobjects within is chosen. These sections are then sorted decreasingly by their difficulty and a similar weighting algorithm as the one used for player's best performances is used on these.
A consequence of this system is that map length is considered in star rating only up to a certain amount of hard patterns. This leads to the nice property that when taking a part of a map, then the star difficulty of that part is always smaller or equal to the difficulty of the entire map, which makes sense intuitively. The star difficulty thus focuses on the hard parts of a map and shall be interpreted as upper physical difficulty to FC. Note the physical - OD and AR are not taken into account. Keep in mind that this doesn't mean, that accuracy is completely unaffected by star rating. It is inherently harder to get a good accuracy on physically harder maps since you can't entirely focus your body on doing so.
It seems to me that it's best to leave AR, OD and map length as external parameters since this way it is easier for people to judge which maps they can play and which they can't play. If everything was condensed into a single number players would have to try out maps a lot more to see whether the difficulty is of the kind they want to have. The next step is to show aim and speed difficulty seperately as well, to further help with that notion and potentially even make a radar chart showing up in the game.