-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
copilot-libraries
: implementation of PTLTL operator since
is non-standard
#443
Comments
since
operator in PTLTLcopilot-libraries
: implementation of PTLTL operator since
is non-standard
Description The function In the standard definition, Type
Additional context
Requester
Method to check presence of bug The following Copilot spec: module Main where
import Language.Copilot
import Prelude hiding ((++))
spec :: Spec
spec = do
observer "output" (since input1 input2)
where
input1 = [True, True, False, True, True] ++ true
input2 = [False, True, True, True, False] ++ false
-- Interpret the spec for 10 ticks
main = interpret 10 spec Behaves differently with the current vs the expected implementation of Expected result The implementation of The spec above should print:
Desired result The implementation of The spec above should print:
Proposed solution Modify the implementation of Further notes None. |
Change Manager: Confirmed that the issue exists. |
Technical Lead: Confirmed that the issue should be addressed. |
Technical Lead: Issue scheduled for fixing in Copilot 3.16.1. Fix assigned to: @InnovativeInventor . EDIT: Milestone was renamed 3.16.1 upon release. It was originally named 3.17. |
…Language#443. The current implementation of `Copilot.Library.PTLTL.since` does not conform to the standard semantics of since, as a temporal operator. `since` is an existential claim; it must be true when there exists *any* prior period in which s2 holds and before which s1 has been continuously true. The current implementation only looks for the first time s2 is true, which is non-standard. This commit fixes the implementation and updates the comment to reflect the correct semantics.
…efs Copilot-Language#443. The current implementation of `Copilot.Library.PTLTL.since` does not conform to the standard semantics of since, as a temporal operator. `since` is an existential claim; it must be true when there exists *any* prior period in which s2 holds and after which s1 has been continuously true. The current implementation only looks for the first time s2 is true, which is non-standard. This commit fixes the implementation and updates the comment to reflect the correct semantics.
Implementor: Solution implemented, review requested. |
Change Manager: Verified that:
|
Change Manager: Implementation ready to be merged. |
There appears to be a subtle bug in the definition of
since
inPTLTL.hs
.copilot/copilot-libraries/src/Copilot/Library/PTLTL.hs
Lines 42 to 46 in 9e2b8ff
since
is an existential claim; it should be true when there exists any prior period in whichs2
holds and after whichs1
continuously holds.1 2 3 However, thesince
operator defined inPTLTL.hs
will only listen for the first true value in s2, which is incorrect.The following is a self-contained definition of
since
that is more correct.Note that the corrected
since
definition will look for any points2
is true and after whichs1
holds.Counterexample stream
The following is a counterexample input stream and specification on which
sinceMine
(defined above) is more correct than thesince
operator (defined inPTLTL.hs
.Counterexample input and specification
Output of input and counterexample specification
since
, as defined in the literature, should return true for the entire stream. At any given point, there is a prior period in whichinput2
is true and after whichinput1
is continuously true. However, thesince
implementation inPTLTL.hs
does not return true for the entire stream.Footnotes
See page 198. Orna Lichtenstein, Amir Pnueli, and Lenor Zuck. 1985. The glory of the past. In: Parikh, R. (eds) Logics of Programs. Logic of Programs 1985. Lecture Notes in Computer Science, vol 193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-15648-8_16 ↩
See page 59. Rajeev Alur and Thomas A. Henzinger. 1993. Real-Time Logics: Complexity and Expressiveness. Information and Computation, Volume 104, Issue 1. https://doi.org/10.1006/inco.1993.1025. ↩
See page 9. Johan Anthony Wilem Kamp. (1968). Tense Logic and the Theory of Linear Order. Ph.D. Dissertation. University of California Los Angles, Los Angles, CA. https://www.proquest.com/openview/408039eb4ed228dc4cba3fe7e1774163/1?pq-origsite=gscholar&cbl=18750&diss=y#. ↩
The text was updated successfully, but these errors were encountered: