Toward a general methodology for specifying expert systems