IP Library Granted Patent US 8,453,126
Granted Patent B1
US 8,453,126 · App. 12/512,983 · Granted May 28, 2013

System and method for converting base SAS runtime macro language scripts to JAVA target language

Inventor: Pavel Ganelin (Rockville, MD)
Assignee: Dulles Research LLC
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,453,126
App. No.
12/512,983
Granted
May 28, 2013
Kind
B1
Abstract

A system and method for automated conversion of a SAS runtime macro language (RML) program to a target language program such as JAVA. RML macros are identified and converted for inclusion in the RML program. A lexer is applied to generate a stream of tokens, including a token type for ambiguous tokens. A context dependent parsing module, including a token filter to resolve ambiguous tokens, assists the parser in generating an abstract syntax tree (AST), which is modified to express RML specific control flow constructs with target language program elements. The elements of the modified AST are replaced with target language templates from a library, with template parameters filled from the corresponding AST element. A run time library is provided for execution of the target language program.

Claims (78)

1. A computer implemented method for converting a runtime macro language (“RML”) readable program to a target language readable program, by lexing and parsing, comprising:

analyzing by the computer the RML readable program into a stream of tokens, one or more of the tokens being ambiguous;

parsing by the computer the stream of tokens to generate an abstract syntax tree (AST), using a context dependent parsing module adapted to RML to resolve the ambiguous tokens;

processing by the computer the AST to identify target language objects and identify RML specific constructs, each said RML specific construct affecting the control flow of the RML readable program;

modifying by the computer the AST to express the affected control flow of the RML readable program with target language program elements;

traversing by the computer the modified AST and for each element in the modified AST:

selecting a corresponding template of target language code from a template library;

filling the template with parameters corresponding to the element in the modified AST; and

placing the filled target language code template into an output target language readable program.

2. The method of claim 1 , further comprising:

filtering by the computer the RML readable program to identify RML macros; and

replacing by the computer each identified RML macro with corresponding RML code in the RML readable program, said corresponding RML code being added to the RML readable program before said analyzing step.

3. The method of claim 1 , further comprising adapting by the computer the context dependent parsing module to resolve at least the following attributes of RML:

keywords that are not reserved;

ambiguous language constructions; and

RML options not following a pattern and not describable in Backus-Naur form.

4. The method of claim 3 , wherein the step of analyzing further comprises:

applying a lexer that is a deterministic finite automaton (DFA), the DFA lexer being modified to add an ambiguous token type used where the DFA lexer cannot determine a token type.

5. The method of claim 4 , wherein the context dependent parsing module further comprises filters for filtering the stream of tokens by looking at tokens surrounding each token in the stream, said filters performing one or more of the following transformations:

remove a token from the stream;

change a type of token;

split a token into multiple tokens;

merge tokens; and

change the relative order of tokens.

6. The method of claim 4 , further comprising creating by the computer lookup tables to resolve statement options by statement name, current statement, and option name.

7. The method of claim 1 , wherein the step of modifying the AST further comprises:

mapping RML types to target language types;

converting LINK statements to method calls; and

removing GOTO statements.

8. The method of claim 1 , further comprising providing a target language run-time library for execution of the target language readable program.

9. A computer implemented system for converting a runtime macro language (“RML”) readable program to a target language readable program, by lexing and parsing, the computer implemented system having a processor operable to execute software modules, comprising:

means for analyzing the RML readable program into a stream of tokens, one or more of the tokens being ambiguous;

means for parsing the stream of tokens to generate an abstract syntax tree (AST), using a context dependent parsing module adapted to RML to resolve the ambiguous tokens;

means for processing the AST to identify target language objects and identify RML specific constructs, each said RML specific construct affecting the control flow of the RML readable program;

means for modifying the AST to express the affected control flow of the RML readable program with target language program elements;

means for traversing the modified AST and for each element in the modified AST:

means for selecting a corresponding template of target language code from a template library;

means for filling the template with parameters corresponding to the element in the modified AST; and

means for placing the filled target language code template into an output target language readable program.

10. The system of claim 9 , further comprising:

means for filtering the RML readable program to identify RML macros; and

means for replacing each identified RML macro with corresponding RML code in the RML readable program.

11. The system of claim 9 , wherein the context dependent parsing module is adapted to resolve at least the following attributes of RML:

keywords that are not reserved;

ambiguous language constructions; and

RML options not following a pattern and not describable in Backus-Naur form.

12. The system of claim 11 , wherein the means for analyzing further comprises:

means for applying a lexer that is a deterministic finite automaton (DFA), the DFA lexer being modified to add an ambiguous token type used where the DFA lexer cannot determine a token type.

13. The system of claim 12 , wherein the context dependent parsing module further comprises filters for filtering the stream of tokens by looking at tokens surrounding each token in the stream, said filters performing one or more of the following transformations:

remove a token from the stream;

change a type of a token;

split a token into multiple tokens;

merge tokens; and

change the relative order of tokens.

14. The system of claim 12 , further comprising means for creating lookup tables to resolve statement options by statement name, current statement, and option name.

15. The system of claim 9 , wherein the means for modifying the AST further comprises:

means for mapping RML types to target language types;

means for converting LINK statements to method calls; and

means for removing GOTO statements.

16. The system of claim 9 , further comprising a target language run-time library for execution of the target language readable program.

17. A computer implemented system for converting a runtime macro language (“RML”) readable program to a target language readable program, by lexing and parsing, the computer implemented system having computer codes stored thereon and having a processor operable to execute the computer codes, comprising:

first computer code executable by the processor for analyzing the RML readable program into a stream of tokens, one or more of the tokens being ambiguous;

second computer code executable by the processor for parsing the stream of tokens to generate an abstract syntax tree (AST), using a context dependent parsing module adapted to RML to resolve the ambiguous tokens;

third computer code executable by the processor for processing the AST to identify target language objects and identify RML specific constructs, each said RML specific construct affecting the control flow of the RML readable program;

fourth computer code executable by the processor for modifying the AST to express the affected control flow of the RML readable program with target language program elements;

fifth computer code executable by the processor for traversing the modified AST and for each element in the modified AST:

sixth computer code for selecting a corresponding template of target language code from a template library;

seventh computer code filling the template with parameters corresponding to the element in the modified AST; and

eighth computer code for placing the filled target language code template into an output target language readable program.

18. The computer implemented system of claim 17 , further comprising:

ninth computer code executable by the processor for filtering the RML readable program to identify RML macros; and

tenth computer code executable by the processor for replacing each identified RML macro with corresponding RML code in the RML readable program, said corresponding RML code being added to the RML readable program before said analyzing step.

19. The computer implemented system of claim 17 , wherein said context dependent parsing module is adapted to resolve at least the following attributes of RML:

keywords that are not reserved;

ambiguous language constructions; and

RML options not following a pattern and not describable in Backus-Naur form.

20. The computer implemented system of claim 17 , wherein said first computer code for analyzing further comprises:

twelfth code for applying a lexer that is a deterministic finite automaton (DFA), the DFA lexer being modified to add an ambiguous token type used where the DFA lexer cannot determine a token type.

Assignments (4)
RELEASE OF SECURITY INTEREST Recorded Apr 7, 2025
From: CITIBANK, N.A.
To: DATAROBOT, INC.; ALGORITHMIA, INC.; DULLES RESEARCH, LLC
Reel/Frame 070750/0866 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 5, 2024
From: DULLES RESEARCH, LLC.
To: DATAROBOT, INC.
Reel/Frame 067633/0656 →
SECURITY INTEREST Recorded Mar 22, 2023
From: DATAROBOT, INC.; ALGORITHMIA, INC.; DULLES RESEARCH, LLC
To: CITIBANK, N.A.
Reel/Frame 063263/0926 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 27, 2013
From: GANELIN, PAVEL
To: DULLES RESEARCH LLC
Reel/Frame 030490/0765 →
Continuity (1)
Provisional Application 61084996 · Jul 30, 2008