-
Notifications
You must be signed in to change notification settings - Fork 4
Predefined Data Structures
This page lists and briefly explains all built-in graph grammars of Attestor. These grammars can be used without providing a grammar file (see command line options). Every predefined grammar makes certain assumptions about the the underlying classes, e.g. the names of selectors. These assumptions can be modified using the renaming option.
Furthermore, notice that a collection of customized graph grammars is found in the examples repository.
For each predefined grammar, we collect the name of the grammar, which is used to tell Attestor to use the grammar's rules for abstraction. Moreover, we provide a grammar file that can be modified to create a customized grammar. We also describe a class definition of the underlying data structure and key figures about types, selectors, nonterminals, and external nodes belonging to the grammar.
RefSLL
A complete grammar file is found here.
class ListNode {
public ListNode next;
}
- Node types: 1
ListNode
- Selectors: 1
-
next
: pointer to successor of a list element
-
- Nonterminals: 1
RefSLList
- External nodes: 2
- 0: head of the list segment
- 1: tail of the list segment
RefDLL
A complete grammar file is found here.
class DLListNode {
public DLListNode next;
public DLListNode prev;
}
- Node types: 1
DLListNode
- Selectors: 2
-
next
: pointer to successor of a list element -
prev
: pointer to predecessor of a list element
-
- Nonterminals: 1
RefDLList
- External nodes: 4
- 0: predecessor of the head of the list segment
- 1: head of the list segment
- 2: tail of the list segment
- 3: successor of the tail of the list segment
RefBT
A complete grammar file is found here.
class BTNode {
public BTNode left;
public BTNode right;
}
- Node types: 2
-
NULL
: null location -
BTNode
: element of the binary tree
-
- Selectors: 2
-
left
: pointer to left child of a node in the tree -
right
: pointer to right child of a node in the tree
-
- Nonterminals: 2
-
RefBT
: Binary tree -
RefTP
: Binary tree segment
-
- External nodes: 2
- 0: null location
- 1: root of the tree