1 / 13

An Automatic Generation of Dynamic Finite State Automata Parser for VMF

An Automatic Generation of Dynamic Finite State Automata Parser for VMF. Objectives. VMF 급 메시지를 위한 동적 FSA 파서 개발 효율적이고 정확한 메시지 처리 의미 분석을 위한 동적 State Diagram 구성 메시지 기반의 파서 생성기 개발 높은 유연성과 유지 보수성을 지향 최대한으로 자동화된 VMF 파서 개발을 지원. Key Features. 입력 : RE, DNF 등으로 구성된 FVMF

marla
Download Presentation

An Automatic Generation of Dynamic Finite State Automata Parser for VMF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Automatic Generation of Dynamic Finite State Automata Parser for VMF

  2. Objectives • VMF급 메시지를 위한 동적 FSA 파서 개발 • 효율적이고 정확한 메시지 처리 • 의미 분석을 위한 동적 State Diagram 구성 • 메시지 기반의 파서 생성기 개발 • 높은 유연성과 유지 보수성을 지향 • 최대한으로 자동화된 VMF 파서 개발을 지원

  3. Key Features • 입력: RE, DNF 등으로 구성된 FVMF • 출력: 메시지 기반 파서의 C 소스 코드 • FVMF는 Text 또는 C structure 등의 다양한 형식으로 저장됨. • 파서 생성기 또한 다양한 입력 형식을 지원. • 생성된 파서는 Syntactic 분석과 Semantic 분석을 동시에 수행. • 메모리 최적화의 단계적 설정이 가능

  4. FSA Parser for VMF 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… 0110101101100… ε Start Data BIT(1) G1 1 F1 1 Data 0 0 0 0 BIT(9) F2 1 1 0 G4 …

  5. Parser (overall) • 크게 세 부분으로 구성 • State Data Structures • State Diagram을 Data Structure로 표현 • State, Transition, 처리 규칙 등을 포함 • State Callback Functions • Process Routines • Non-dynamic procedures • Scripts (Makefile, etc.)

  6. Parser (Data Structures) • State and Transition • 한 state는 조건을 수반한 여러 transition들을 가짐 • 한 transition은 하나의 state를 ‘next state’로 가짐 • 처리 규칙 • 데이터 구조는 아직 미정 typedef struct state { int num_transitions; Transition** transition; } State; typedef struct transition { int condition; State* next_state; } Transition;

  7. Parser (Callback Function) • 각 State에서 필요한 동작들을 함수로 정의 • Callback 함수를 사용하여 필요할 때마다 호출 • 함수 내에서 가능한 Action • 메시지 필드 해석 • 메시지 필드 데이터 대조 • 메모리 할당 • 메모리 할당 해제 • Etc.

  8. Parser (Callback Function) • 각 state는 담당 함수의 pointer를 보유 typedef struct state { int num_transitions; int (*function)(); Transition** transition; } State; typedef struct transition { int condition; State* next_state; } Transition;

  9. Parser (Processing Routine) • 동적 생성이 필요하지 않은 정적인 부분 • Data Structure에 맞추어 Parsing을 진행 • Data Structure에 맞추어 State Diagram을 동적으로 변경 • 메시지 입력, 버퍼 관리, 메시지 해석 결과 출력 • 생성된 소스 코드의 Compile Script • 기타 Resource

  10. Parser (Processing Routine) • 핵심 동작의 알고리즘은 정적으로 구현 State* cur_State = startState; While (cur_State->num_transitions != 0) { for (i = 0; i <= cur_State->num_transitions; i++) if (cur_Condition == cur_State->transitions[i]->condition) { nextState = cur_state->transitions[i]->next_state; break; } cur_state->function(); cur_state = nextState; }

  11. Memory Optimization • 모든 state 들의 메모리를 미리 할당하는 경우 많은 메모리가 요구될 수 있음 • 동적이고 효율적인 메모리 관리 • 처리가 끝난 state들은 메모리 Free • 앞으로 처리될 state들 동적으로 할당 • Sliding Window 개념 도입 • Window size의 조정으로 메모리 최적화의 단계를 설정 가능

  12. Generator Structure

  13. Future Work • 향상된 Automata를 구현한 관련 연구 Survey • 처리 규칙을 포함한 Semantic 분석 알고리즘 연구 • Sliding Window 알고리즘의 적용 • Requirement Specification 및 기타 Design 문서 작성 • Parser의 시범적 구현

More Related