Ecdar / Ecdar/j-Ecdar

Symbol Table for identifiers and scopes

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
4
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The ``UniqueNamedContainer`` is used to handle identifiers for ``UniquelyNamed``. This allows to basic rules: Local identifier declarations (local in relation to its owner) and global between all owners. However, with its current implementation there are some significant drawbacks:
* We cannot use declaration rules local to some of the automata.
* We use the string identifier to compare identities.
* Each named object has a heap-allocated string identifier.
* We have to do string manipulation to ensure the uniqueness of the identifiers.
* We concatenate strings.
* It isn't easy to copy an identifier and ensure its uniqueness.

Possible solution: Introduce the concept of a symbol table and use a number to map to the identifier as a string. Then change all string identifiers e.g., ``Clock`` and ``Location``. With the symbol table, we should add the option for scopes. This would allow using identifiers to be relevant for higher scopes. This could be used to reduce the amount of clocks used in an automaton.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.