부분계산

feanor의 이미지

부분계산(partial evaluation, PE)과 전문화(specialization)에 관심이 있는데, 한국어로 된 자료 중 1999년 한양대에서 정보통신부에 제출한 "Haskell의 부분계산기 설계 및 구현"이 괜찮아 보입니다. (PDF로 있고 무료입니다.)

http://ref.daum.net/item/924744

보고서 중 "부분계산의 일반적인 개념"을 이해한 대로 옮겨보면,

부분계산이란 두 개의 입력을 받는 프로그램 program이 있을 때 program(static, dynamic) = output 이라고 하면, 프로그램 program과 컴파일 시간에 알려진 입력 static으로부터 PE(program, static) = residual 을 만들어서 residual(dynamic) = output 이 되게 하는 것입니다.

인터프리터는 컴파일 시간에 알려진 입력인 소스코드와 입력이라는 두 개의 입력을 받는 프로그램이므로 interpreter(source, input) = output 이라고 할 수 있습니다.

인터프리터와 소스코드를 부분계산하면 등식에 의해 PE(interpreter, source) = target 이고 target(input) = output 이 됩니다. 즉 source가 target으로 컴파일 된 것입니다.

위 상황에서 PE와 인터프리터를 부분계산하면 등식에 의해 PE(PE, interpreter) = compiler 이고 compiler(source) = target 이 됩니다. 즉 interpreter로부터 compiler를 만든 것입니다.

위 상황에서 PE와 PE를 부분계산하면 등식에 의해 PE(PE, PE) = compiler-generator 이고 compiler-generator(interpreter) = compiler 가 됩니다. 즉 부분계산기만 있으면 컴파일러 생성기를 만들 수 있습니다. 컴파일러 생성기가 있으면 인터프리터를 컴파일러로 바꿀 수 있으므로 컴파일러를 짤 필요가 없어집니다.

요악하면

interpreter(source, input) = output
PE(interpreter, source) = target, target(input) = output
PE(PE, interpreter) = compiler, compiler(source) = target
PE(PE, PE) = compiler-generator, compiler-generator(interpreter) = compiler

마지막 세 등식을 제 1 후타무라 투영, 제 2 후타무라 투영, 제 3 후타무라 투영이라고 부르는 것 같습니다.

댓글

jj의 이미지

10년전의 결과물이 아직도 역할을 하는군요...

--
Life is short. damn short...

--
Life is short. damn short...

mechatec의 이미지

대부분의 개발언어들도 10년 이상된것들이 아닌가요? ㅎㅎ
수학은 2천년이 더 되었고 공학은 수백년이 넘었는데요 ㅋㅋ
얼마나된 기술,이론,공식,결과물 등등 에서 얼마나 되었냐는
큰 의미가 없는듯합니다. 중요한 것은 적정한 때에 적정한 것을
잘 활용하는 것이 아닐까합니다.
==================================================================================
나 자신의 위치와
나 자신의 가치는
내가 스스로 만들어 가는 것이다.
help~me~!

==================================================================================
나 자신의 위치와
나 자신의 가치는
내가 스스로 만들어 가는 것이다.
help~me~!

hongminhee의 이미지

khris의 이미지

다행히도 국가부처에 제출한것인 덕분에 쉽게 찾을 수 있었습니다.

https://www.knowledge.go.kr/SearchSF1/search_view.jsp?mdno=25281804

───────────────────────
yaourt -S gothick elegant
khris'log

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.