GF OAA interface

Björn Bringert, bringert@cs.chalmers.se

Introduction

The Open Agent Architecture (OAA) is "a framework for integrating a community of heterogeneous software agents in a distributed environment".

Solvables

The OAA agent declares these solvables:

parse

parse(Grammar,Lang,Text,Tree)

Parameters

Grammar
The name of the grammar.
Lang
The name of the concrete syntax that should be used for parsing. If Lang is not instantiated, the parser will try all available languages in the given grammar, and return results for each language that the text can be parsed in.
Text
The text to parse. Must be instantiated.
Tree
The parse tree. Normally not instantiated. The parse tree from the parser is unified with this value. Parse trees are represented as ICL structs.

Examples

linearize

linearize(Grammar,Lang,Tree,Text)

Parameters

Grammar
The name of the grammar.
Lang
The name of the concrete syntax that should be used for linearization. If Lang is not instantiated, linearizations for all available languages in the given grammar will be returned.
Tree
The abstract syntax tree to linearize. Must be instantiated.
Text
The linearization of the given tree.

Examples

translate

translate(Grammar,FromLang,Input,ToLang,Output)

Parameters

Grammar
The name of the grammar.
FromLang
The name of the concrete syntax that should be used for parsing the input text. If Lang is not instantiated, all available languages in the given grammar will be tried.
Input
The input text. Must be instantiated.
ToLang
The name of the concrete syntax that should be used for linearizing the output.
Output
The output text. Normally not instantiated.

Examples