Situational logic
Situational logic (also situational analysis) is a concept advanced by Karl Popper in his The Poverty of Historicism. Situational logic is a process by which a social scientist tries to reconstruct the problem situation confronting an agent in order to understand that agent's choice.

Noretta Koertge (1975) provides a helpful clarificatory summary.

First provide a description of the situation: 
''Agent A was in a situation of type C''. 
This situation is then analysed
''In a situation of type C, the appropriate thing to do is X.''
The rationality principle may then be called upon:
''agents always act appropriately to their situation''
Finally we have the explanadum:
''(therefore) A did X.''

Notes

References 

Philosophy of social science
Logic
Analysis