Skip to content
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

KaSa and unused sites #102

Closed
pirbo opened this issue Mar 24, 2015 · 4 comments
Closed

KaSa and unused sites #102

pirbo opened this issue Mar 24, 2015 · 4 comments

Comments

@pirbo
Copy link
Member

pirbo commented Mar 24, 2015

In the test suite, there is a degenerated case (models/test_suite/cflows/side-effects2/side-effects.ka) where a site is defined in the signature of an agent but never mention neither in rules nor in observables.
This site is not in the contact map generated using ExportToKasim module. Therefore, when I asks for its neigh borough, I receive Exception Not_Found.
Is the omission intentional ?
If it is, is there somewhere where I could have explicitly the information "This site is useless and so dropped" ?

@feret
Copy link
Contributor

feret commented Mar 24, 2015

KaSa completely and deliberately ignores the explicit signature, when computing the contact map.
The signature is implicitly inferred by scanning the rules, initial states, perturbations.

The only case when the explicit and implicit signatures would differ is when a site is never used.
In such a case, it is better to ignore it since this is just garbage.

Why don't you use the signature provided by the contact map instead ?

The check that the implicit and explicit signature match can be incorporated in the sanity check that KaSa will do when the static analysis is finished. But this is just warning.

What do you think ?

@pirbo
Copy link
Member Author

pirbo commented Mar 24, 2015

I think (but I would like to discuss further) that :

  • a Signature.s (today in folder pattern/) is what I need to deal easily with the int internal representation for agents, sites, internal states and the string external representation.
  • it would be very useful for intercommunication that KaSa and KaSim use the same internal representation for these elements of signature
  • For now, I build the conversion tables using the explicit signatures given by the user (Signature.create result.Ast.signatures in grammar/eval.ml) but I would be extremely grateful to KaSa if it provides a more smartly done Signature.s that I could use !
  • Of course, Signature interface can/should be freely extended 😃

@feret
Copy link
Contributor

feret commented Mar 24, 2015

Well the contact map that is exported to KaSim contains enough
information

(you have all the agent types, all the sites per agents, and all the
internal states per sites, and additionaly you will have the pairing
relation between sites).

If you need it, you can either convert the contact map into a
Signature.t or I can add a method to export a value of type
Signature.t.

Cheers.
Jerome.


Jerome Feret
DI - Ecole Normale Superieure
45, rue d'Ulm
75230 Paris Cedex 5

phone: +33 1 44 32 37 66
fax : +33 1 44 32 21 51
mail : feret@ens.fr

On Tue, 24 Mar 2015, Pierre Boutillier wrote:

I think (but I would like to discuss further) that :

  • a Signature.s (today in folder pattern/) is what I need to deal easily with the int internal representation for agents, sites, internal
    states and the string external representation.
  • it would be very useful for intercommunication that KaSa and KaSim use the same internal representation for these elements of signature
  • For now, I build the conversion tables using the explicit signatures given by the user (Signature.create result.Ast.signatures in
    grammar/eval.ml) but I would be extremely grateful to KaSa if it provides a more smartly done Signature.s that I could use !
  • Of course, Signature interface can/should be freely extended 😃


Reply to this email directly or view it on GitHub.[AARtszLvgdZvy3z9mwCN5FTx3ctJRtrmks5n4YKAgaJpZM4DzvZ2.gif]

@feret
Copy link
Contributor

feret commented Mar 24, 2015

I have added an export to get produce an element of type Signature.s.
Unfortunately, I cannot find the function to print the elements of these type.

Could you check, that you have what you want ?

  1. I put all the agents Free
  2. I put dummy positions (since I do not use the agent declaration)

Cheers.
Jerome.

@pirbo pirbo closed this as completed Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants