-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AGREE and AADL string types #22
Labels
enhancement
New feature or request
Comments
I am confused about the hashing. You'd need a perfect hash to support
equality and an order-preserving hash (does such a thing even exist?) for
comparisons. What am I missing?
Konrad.
…On Thu, Jun 6, 2019 at 1:23 PM kfhoech ***@***.***> wrote:
Would it be useful to have very limited support for AADL string types?
It would be fairly simple to implement a very limited semantics where only
two operations are available: assignment from a literal constant or another
string, and comparison.
An implementation would use a hash of the string literal (as an integer)
as the string value. Thus, only assignment and comparison would be directly
supported.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22?email_source=notifications&email_token=AAIOAD2CTGRQ3SLZCQMG3A3PZFIYHA5CNFSM4HVGXGI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYC4NVQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIOADZGIUFF3LCSJVMORHLPZFIYHANCNFSM4HVGXGIQ>
.
|
I guess there is indeed such a thing!
https://stackoverflow.com/questions/28043857/hash-function-with-order-preserving
…On Thu, Jun 6, 2019 at 2:48 PM Konrad Slind ***@***.***> wrote:
I am confused about the hashing. You'd need a perfect hash to support
equality and an order-preserving hash (does such a thing even exist?) for
comparisons. What am I missing?
Konrad.
On Thu, Jun 6, 2019 at 1:23 PM kfhoech ***@***.***> wrote:
> Would it be useful to have very limited support for AADL string types?
>
> It would be fairly simple to implement a very limited semantics where
> only two operations are available: assignment from a literal constant or
> another string, and comparison.
>
> An implementation would use a hash of the string literal (as an integer)
> as the string value. Thus, only assignment and comparison would be directly
> supported.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#22?email_source=notifications&email_token=AAIOAD2CTGRQ3SLZCQMG3A3PZFIYHA5CNFSM4HVGXGI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYC4NVQ>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAIOADZGIUFF3LCSJVMORHLPZFIYHANCNFSM4HVGXGIQ>
> .
>
|
For comparison, I meant only equality/non-equality. Not sort ordering. But with that hash, I suppose that's possible too. |
Might be overkill for what you need. Perfect hashes are usually expensive
to compute.
Mike
…On Thu, Jun 6, 2019 at 2:59 PM kfhoech ***@***.***> wrote:
For comparison, I meant only equality/non-equality. Not sort ordering. But
with that hash, I suppose that's possible too.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22?email_source=notifications&email_token=ABHZVORS73ZP24ZZMNV54GLPZFUD5A5CNFSM4HVGXGI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXD7TKI#issuecomment-499644841>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHZVOUCDJBFTWCO5FNTXULPZFUD5ANCNFSM4HVGXGIQ>
.
--
Michael Whalen
Adjunct Professor, University of Minnesota Software Engineering Center
(UMSEC)
200 Union St. 4-192
Minneapolis, MN 55455
Office: 612-624-5130
Cell: 651-442-8834
|
The hash computation would need be done only for string literals at translation time, right? That should be fairly inexpensive as we would expect the count of such hashes to be small. |
In my work to date, I haven't come across a need for AADL string types. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would it be useful to have very limited support for AADL string types?
It would be fairly simple to implement a very limited semantics where only two operations are available: assignment from a literal constant or another string, and comparison.
An implementation would use a hash of the string literal (as an integer) as the string value. Thus, only assignment and comparison would be directly supported.
The text was updated successfully, but these errors were encountered: