SMS: Threshold logic: a synthesis approach