Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

프로젝트 undefined behavior 관련 질문 #73

Open
dlwocks31 opened this issue Dec 20, 2023 · 1 comment
Open

프로젝트 undefined behavior 관련 질문 #73

dlwocks31 opened this issue Dec 20, 2023 · 1 comment

Comments

@dlwocks31
Copy link

안녕하세요,

#58 에서 = 를 제외한 비교 연산자는 허용되지 않는 자료형의 경우 undefined behavior인 것을 확인했습니다.

그렇다면 여기서 undefined behavior를 원하는 대로 정의한 다음 해당 behavior를 이용해 4번 calculator를 구현해도 될까요?

예를 들어서, <> 를 string에 대해서 Lexicographic order를 반환하는 것으로 정의한 뒤, 이를 calculator 구현에 사용하는 것이 가능할 지 문의드립니다.

물론 이를 악용한다면 예를 들어서 "Vstring % 0은 Vstring의 calculator eval 결과로 정의한다." 와 같은 비상식적인 경우도 가능하겠지만, 그렇지 않은 상식적인 경우에 대해서 문의드립니다.

@MerHS
Copy link
Contributor

MerHS commented Dec 20, 2023

prob 4은 조교가 제작한 interpreter를 기반으로 채점할 것입니다.
그러므로 undefined behavior를 사용한 코드는 채점이 되지 않거나 0점을 받을 수 있으니 주의해주시기 바랍니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants