Skip to content

Document partial_order_concurrency [DOC-140] #4087

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

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

xbauch
Copy link
Contributor

@xbauch xbauch commented Feb 5, 2019

This PR is only a part of DOC-140. There are no functional changes to the code.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

/// Build identifier for the read/write clock variable
/// \param e: either shared read or shared write event
/// \param axiom: the clock variable to be used
/// \return irep id representing the clock variable of the event
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use "Identifier" instead of "irep id"

// produces the symbol ID for an event
/// Produce the symbol ID for an event
/// \param event: SSA step for the event
/// \return identifier of the lhs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop "of the lhs"

// produces an address ID for an event
/// Produce an address ID for an event
/// \param event: SSA step for the event
/// \return identifier of the lhs (without L2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say "L1-renamed identifier"

@xbauch xbauch force-pushed the docu/partial_order_concurrency branch from 40f0612 to a367fd5 Compare February 5, 2019 15:44
@xbauch
Copy link
Contributor Author

xbauch commented Feb 5, 2019

@tautschnig Thanks for the quick review, I rewrote the documentation as suggested.

@@ -35,6 +38,10 @@ class partial_order_concurrencyt:public messaget
AX_PROPAGATION=8
};

/// Build identifier for the read/write clock variable
/// \param e: either shared read or shared write event
/// \param axiom: the clock variable to be used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this parameter indicates the axiom that the resulting clock id is part of. Would that be right @tautschnig?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; should I make it explicit in the description?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should make it explicit for all the appearances of axiom.


\section Concurrency

\subsection Partial Order Reduction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd name it just Partial Order Concurrency as it's not really partial order reduction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean that its used to implement memory models but the ordering is never used for reduction?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a different technique. The encoding starts with unconstrained reads (i.e., with shared reads essentially being nondet), and then additional constraints are added to make the model stronger to yield e.g. TSO or SC.


\section Concurrency

\subsection Partial Order Reduction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symbol_exprt clock(event_it e, axiomt axiom);

/// Initialise the __clock_type__ so that it can be used to number events
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialize

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I guess it is called Oxford spelling after all. Spelling changed.

@xbauch xbauch force-pushed the docu/partial_order_concurrency branch from a367fd5 to d4542d4 Compare February 5, 2019 16:32
@xbauch
Copy link
Contributor Author

xbauch commented Feb 5, 2019

I see, so the partial ordering is used to replace thread interleaving rather than reduce it. I changed the sub-section title in the readme.

@xbauch xbauch force-pushed the docu/partial_order_concurrency branch from d4542d4 to 0f4d498 Compare February 5, 2019 17:29
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: 0f4d498).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99823236

@tautschnig tautschnig merged commit 3fe7c67 into diffblue:develop Feb 5, 2019
@xbauch xbauch deleted the docu/partial_order_concurrency branch June 10, 2019 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants