View : 1070 Download: 0

시각언어 컴파일러-컴파일러

Title
시각언어 컴파일러-컴파일러
Other Titles
The visual language compiler-compiler : VisCC
Authors
김경아
Issue Date
2001
Department/Major
대학원 컴퓨터학과
Publisher
이화여자대학교 대학원
Degree
Doctor
Advisors
이기호
Abstract
Visual languages are programming languages in which relationships between data and other programming elements such as data transformations are expressed via various visual techniques. When they are chosen for programming, it is generally required that the entire programs must be coded in visual manner without resorting to the conventional textual techniques. Futhermore, visual programs are represented and considered as images in the two dimensional-space, which, in turn, are used to build up more complicated programs in the following stages. Compared to the conventional programming technique, visual programming offers tools that allow explicit and concrete depiction of data relations by direct manipulation of visual elements without requiring much knowledge on computer programming. This implies that, unlike other conventional languages such as C/C++, visual languages provide easy-to-use programming tools even for those who do not have expertise in programming. Due to such favorable properties, visual languages have been popular in building applications such as various graphical user interfaces and tutoring systems. They have also been very effective in more professional areas such as parallel programming, information retrieval, visual information query, and so on. As visual languages attract more attention, it is necessary to develop a variety of basic programming tools like compilers, interpreters, and debuggers, designed for visual programming. In particular, there are two major approaches in developing compilers for visual languages. The first one is to directly code a compiler according to the specification of source language and target language. The other one is to exploit automatic compiler generation tools by writing meta language programs and feed them into a compiler-compiler. This indirect method allows compiler developers to save time in development as well as to easily modify the source language specification without introducing much trouble. When the second approach is applied, two most fundamental problems to be solved are how to design formal specification method, and how to automatically generate parsing algorithm. For textual programming languages, a variety of methodologies based on context-free grammars and the corresponding parsing algorithms have been developed. On the other hand, it is not tractable to apply the same approach to the visual languages since visual programming is based on two-dimensional images as well as texts. The previous works on language specification and parsing method for visual languages still suffer from difficulties in automatic generation. The reasons for this can be analysed in each of the three major aspects of language development: formal specification, syntax analysis, and compiler generation. First, it is important to clarify, during the syntax definition stage of the syntax-directed implementation process, the syntactic semantics, necessary for syntax representation, and semantics. Due to the deficiency in properly handling the two types of semantics, most previous researches on grammar specification are not well-suited to specify compiler-compiler for visual languages. Secondly, unlike the conventional parsing techniques that use parsing tables, most of the current syntax analysis methods for visual languages can not easily represent parsing states and actions during the syntax analysis process. With such deficiencies, it is pretty complicated to perform syntax analysis and hence to automatically generate a syntax analyzer. Third, the above two problems are combined to cause more difficulties in the compiler generation process. Having mechanical regularity is important to the efficient development of automatic compiler generation tools. However, the current tools still need to take care of a good deal of language-dependent aspects, that hinder regularity, and that only results in high complexity of automatic generation of compilers. In an effort to resolve this problem, we use an object-oriented paradigm to define a grammar and a parsing method. Even though object-orientation has been a popular design paradigm for languages and software, it has seldom been used as a visual language specification paradigm. In this thesis, we define a new grammar, named the Pictorial Class Grammar(PCG), for visual language specification. We also describe a new parsing algorithm using a graph, which formulates dependencies between classes for instantiating objects. In this thesis, we develop a visual language compiler using syntax-directed translation. VisCC(Visual Language Compiler-Compiler) is a visual language compiler-compiler for constructing a visual language compiler automatically, using syntax-directed translation. The grammar formalism underlying the VisCC is the Pictorial Class Grammar, which is a naturally extendable attributed multiset grammar considering object-oriented concepts in addition to syntax definitions. Hence, it has been possible to encapsulate syntax definition as one unit to obtain an efficient automatically generated parser for the Pictorial Class Grammar. We use a translation scheme to describe semantic actions. Unlike other systems, we suggest separating the specification and the generation of semantic actions. Because of this, it provides a very efficient method for modification. ; 시각언어는 프로그래밍에서 데이터간의 관계 또는 데이터로의 전이를 표현하기 위해 시각 기술(visual technique)을 사용하여 수행하는 프로그래밍 언어의 한 분야이다. 이는 텍스트 표현에 의지하지 않고, 시각적 방법으로 모든 프로그램을 수행하며, 2차원 공간상에서 프로그램을 작성하고, 생성된 이미지(그림)는 다음 단계에서 수행을 위한 처리를 불러일으키는 입력으로 사용한다. 이러한 시각언어는 기존의 텍스트 프로그래밍 언어에 비해 프로그래밍 개념이 적고, 실재성 및 관계의 명시적 서술 방법을 제공하는 장점으로 인해 프로그래머가 아닌 사람들을 위한 프로그래밍 방법을 제공하고, 직접적인 조작에 의한 사용자 인터페이스의 구축, 교육용 시스템, 병렬 프로그램의 정의에 유용하며, 병렬 프로그래밍 언어, 정보 검색, 시각 질의 시스템, 자료구조의 고급 수준 설계 지원 등의 다양한 분야에 활용되고 있다[9, 11, 39]. 시각언어에 대한 관심이 증대되면서 시각언어를 위한 다양한 도구(컴파일러, 인터프리터, 디버거 등)의 개발이 요구되고 있다[12, 13, 14, 18, 23, 24, 34, 38]. 컴파일러와 같은 프로그래밍 도구의 개발 방식은 크게 두 가지 방법으로 구분한다. 첫째는 직접 개발 방식(direct development approach)으로 원시언어와 목적언어의 명세서에 따라 직접 구현자에 의해 개발 구현되는 방식이다. 둘째는 간접 개발 방식(indirect development approach)으로 메타언어(meta languages)와 자동화 도구를 활용하여 개발한다[1, 3, 5, 8, 32, 33, 41]. 이러한 간접 개발 방식은 언어 설계의 변경시 컴파일러의 구성이 용이하고, 언어 설계자의 의도가 생성된 컴파일러에 정확히 반영되고, 개발시간이 단축된다는 장점이 있다[1, 2, 8, 41]. 간접 개발 방식을 사용할 때 반드시 필요한 두 가지 요소는 자동 생성 가능한 파싱 알고리즘과 개발 대상 언어를 형식적으로 정의할 수 있는 방법이다[1, 2, 6, 8, 41]. 기존의 텍스트 프로그래밍 언어에서는 일반적으로 문맥 자유 문법과 파싱 테이블을 이용한 파싱 알고리즘을 사용한다. 그러나, 시각언어는 기존의 텍스트 프로그래밍 언어와는 달리 문자이외에 그림을 이용한 2차원 형태로 프로그래밍하므로 기존의 프로그래밍 언어에서 사용하는 방법을 그대로 적용할 수 없다[3, 4, 5, 18, 20, 21, 22, 26, 30, 35, 43]. 뿐만 아니라, 시각언어를 위해 개발된 기존 문법과 파싱 방법도 자동 생성이라는 관점에서 많은 한계점을 가지고 있다. 이러한 문제점 및 복잡성을 야기시키는 요인을 보다 구체적으로 기술하면 다음과 같다. 첫째는 형식적 명세 방법에 대한 문제이다. 시각언어의 구문 정의 과정에서 구문의 표현에 해당하는 정적인 구문 의미와 실질적인 언어 의미를 정확히 구분하는 것은 문법-지시적(syntax-directed) 구현 과정에 반드시 필요한 작업이다. 그러나 기존 시각언어 문법은 복잡한 시각언어의 정적인 구문과 의미를 구별하여 처리할 수 있는 방법을 제공하는데 어려움이 있어, 자동화 도구에 활용하는데 제한점이 있다. 둘째는 구문 분석 방법에 대한 문제이다. 기존 시각언어 구문 분석 방법은 텍스트 프로그래밍 언어의 파싱 테이블과 같은, 문법에서부터 구성되어 구문 분석 상태와 행동을 나타내는 구조가 결여되어 있다. 이로 인해 실질적인 구문 분석 방법에 많은 복잡함을 유발시키고 그 결과 컴파일러의 자동 생성에 어려움이 있다. 셋째는 형식적 명세 방법과 구문 분석 방법으로부터 야기되는 컴파일러 프로그램 생성과정의 문제이다. 컴파일러를 자동 생성하기 위해서는 일련의 규칙이 필요하다. 이러한 규칙에 따라 컴파일러 프로그램을 생성하는 과정에서 언어 의존적인 부분이 적을수록 컴파일러의 자동 생성은 효율적으로 수행될 수 있다. 그러나 기존의 시각언어 컴파일러 자동화 도구는 기반으로 하는 문법과 구문 분석 방법의 한계로 자동 생성 과정에 많은 어려움이 있다. 본 연구에서는 이러한 문제점을 해결하기 위해 지금까지 주로 소프트웨어와 프로그래밍 언어의 설계 단계에서 사용된 객체지향 패러다임을 시각언어의 명세 단계 및 분석 단계에 적용하여 Pictorial Class Grammar(PCG)라는 새로운 문법을 정의한다. 한편, 이 문법으로 정의된 시각언어의 구문을 분석하기 위해 클래스를 기반으로 한 구문 분석 방법을 설계한다. 새로이 제안된 명세 방법과 구문 분석 방법을 이용하여 언어 설계자가 실질적으로 시각언어의 개발에 사용할 수 있는 문법 기반 시각언어 컴파일러-컴파일러인 VisCC를 개발하였다. 본 논문에서 개발한 시각언어 컴파일러-컴파일러, VisCC의 중요한 특성 및 요소는 다음과 같다. Pictorial Class Grammar(PCG)는 객체의 모임인 언어를 생성하기 위한 형식 모델인 속성 다중집합 문법(Attributed Multiset Grammar)[22]과 객체지향 패러다임을 결합한 새로운 유형의 시각언어 문법이다. PCG는 구문 정보를 하나의 단위로 처리하기 위해서 클래스 개념을 사용한다. 즉 하나의 구문 구조를 표현하는 비단말을 하나의 클래스로 처리하여, 구문을 정의하기 위해서 사용하는 다양한 속성과 제약 조건 등을 하나의 클래스로 캡슐화 시키는 방법을 제공한다. PCG 구문 분석기(파서)는 클래스간의 의존 관계를 이용하여 비구조적인 그림 표현으로부터 시각 프로그램의 구문 구조를 구성하기 위한 알고리즘이다. 이는 객체지향 패러다임을 이용하여 간단하고, 이해하고 구현하기 쉽고, 효율적인 구문 분석 방법을 제공한다. 특히 기존 시스템에서 제공하지 못한 구문 분석 모델링 방법을 제공함으로써 컴파일러 자동 생성 과정에 효과적인 방법을 제공한다. VisCC는 문법-지시적 변환을 사용하여 시각언어 컴파일러를 자동 생성하는 시각언어 컴파일러-컴파일러이다. VisCC는 자동화에 적합하도록 정의된 Pictorial Class Grammar와 구문 분석 과정을 모델링하는 그래프를 사용하여, 문법으로부터 대상 시각언어의 컴파일러 소스 프로그램을 생성하는 과정의 복잡성을 제거한다. 또한 시각언어의 그래픽 객체 정의를 통해 어휘 부분과 구분 부분을 분리할 수 있는 방법과 의미 수행 코드를 이용한 문법-지시적 변환 방법을 사용하여 다양한 프로그래밍 개발 환경을 제공한다.
Fulltext
Show the fulltext
Appears in Collections:
일반대학원 > 컴퓨터공학과 > Theses_Ph.D
Files in This Item:
There are no files associated with this item.
Export
RIS (EndNote)
XLS (Excel)
XML


qrcode

BROWSE