Logic circuit simulator