This project uses Javascript to convert various cooking units.
This project uses Javascript to find your mysery celebrity dating match.
This project uses Javascript to schedule your appointment with our specialty medical team.
All of these projects are hosted on GitHub, which is a great tool I use at Epicodus to collaborate on projects with other students. If you have any projects that you would like my assistance with, contact me at<EMAIL_ADDRESS>and I will get back to you as soon as I can.
I'm 27 years old, born in Lodi California, but have been living in the Portland Metro Area since I was 10. I went to Roosevelt high school in St. Johns, and later studied at Portland Community College before joining the US Navy. I was dischaged last September and have been working for Goodwill in Loss Prevention. I am leaving that job shortly.
My hobbies include:


Methods
(static) create(templatePath, capabilityopt, regionopt) → {Promise}
Creates a Cloudformation stack
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
templatePath |
String | The path to your Cloudformation template. | |
capability |
String |
<optional> |
Capability to specify when creating your stack. Defaults to 'CAPABILITY_IAM'. All capabilities can be found here. |
region |
String |
<optional> |
The region to create the Cloudformation stack in. Defaults to eu-west-1. |
- Source:
Returns:
Resolves when the stack enters the
CREATE_COMPLETE
state.
- Type
- Promise
(static) delete(templatePath, regionopt) → {Promise}
Deletes a Cloudformation stack
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
templatePath |
String | The path to your Cloudformation template. | |
region |
String |
<optional> |
The region where the Cloudformation stack is. Defaults to eu-west-1. |
- Source:
Returns:
Resolves when the stack enters the
DELETE_COMPLETE
state.
- Type
- Promise
(static) update(templatePath, capabilityopt, regionopt) → {Promise}
Updates a Cloudformation stack
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
templatePath |
String | The path to your Cloudformation template. | |
capability |
String |
<optional> |
Capability to specify when creating your stack. Defaults to 'CAPABILITY_IAM'. All capabilities can be found here. |
region |
String |
<optional> |
The region where the Cloudformation stack is. Defaults to eu-west-1. |
- Source:
Returns:
Resolves when the stack enters the
UPDATE_COMPLETE
state.
- Type
- Promise


data class PaymentSessionData : Parcelable
A data class representing the state of the associated PaymentSession.
cartTotal |
The cart total value, excluding shipping and tax items. val cartTotal: Long |
isPaymentReadyToCharge |
Whether the payment data is ready for making a charge. This can be used to set a buy button to enabled for prompt a user to fill in more information. val isPaymentReadyToCharge: Boolean |
paymentMethod |
The selected payment method for the associated PaymentSession. val paymentMethod: PaymentMethod? |
shippingInformation |
Where the items being purchased should be shipped. val shippingInformation: ShippingInformation? |
shippingMethod |
How the items being purchased should be shipped. val shippingMethod: ShippingMethod? |
shippingTotal |
The current value of the shipping items in the associated PaymentSession val shippingTotal: Long |
useGooglePay |
When val useGooglePay: Boolean |


|
PortAudio
2.0
|
In addition to the functions described elsewhere in this tutorial, PortAudio provides a number of Utility functions that are useful in a variety of circumstances. You'll want to read the portaudio.h reference, which documents the entire V19 API for details, but we'll try to cover the basics here.
PortAudio offers two functions to determine the PortAudio Version. This is most useful when you are using PortAudio as a dynamic library, but it may also be useful at other times.
PortAudio allows you to get error text from an error number.
PortAudio Streams exist in 3 states: Active, Stopped, and Callback Stopped. If a stream is in callback stopped state, you'll need to stop it before you can start it again. If you need to query the state of a PortAudio stream, there are two functions for doing so:
If you need to retrieve info about a given stream, such as latency, and sample rate info, there's a function for that too:
If you need to synchronise other activities such as display updates or MIDI output with the PortAudio callback you need to know the current time according to the same timebase used by the stream callback timestamps.
To determine how much CPU is being used by the callback, use these:
These functions allow you to determine the size of a sample from its format and sleep for a given amount of time. The sleep function should not be used for precise timing or synchronization because it makes few guarantees about the exact length of time it waits. It is most useful for testing.
Previous: Closing a Stream and Terminating PortAudio | Next: Enumerating and Querying PortAudio Devices


Nembrotha Kubaryana (Sea Slug)
Maui is second largest island in the Hawaiian chain of islands. The Big Island is the largest.
Honolulu is located on Oahu. Oahu is the most populous island in the chain.
Hawaii is between the Tropic of Cancer at approximately 20° North Latitude.
The temperature ranges from a low of 59° on the coolest night in Winter° to 98° on the warmest days of Summer.
The daily high temperature is usually in the low to high 80s year round.
Pilikai Dive Boat (Andy Schwenk Photo Credit)
Makena, Maui
.
Nene Hawaiian Goose
This page is about trying new displays on an HTML page. It has little form or design at this point.


|
|---|
| For yourselves, brethren, know our entrance in unto you, that it was not in vain:
|
|---|
| ᎢᏨᏒᏰᏃ ᎢᏥᎦᏔᎭ, ᎢᏓᎵᏅᏟ, ᏄᏍᏛ ᏫᏨᎷᏤᎸᎢ, ᎾᏍᎩ ᎠᏎᏉᏉ ᏂᎨᏒᎾ ᎨᏒᎢ.
|
|---|
I-tsv-sv-ye-no i-tsi-ga-ta-ha, i-da-li-nv-tli, nu-s-dv wi-tsv-lu-tse-lv-i, na-s-gi a-se-quo-quo ni-ge-sv-na ge-sv-i.
|
|---|
|
|---|
| But even after that we had suffered before, and were shamefully entreated, as ye know, at Philippi, we were bold in our God to speak unto you the gospel of God with much contention.
|
|---|
| ᎾᏍᏉᏍᎩᏂ ᎢᎬᏱ ᏃᎩᎩᎵᏲᏦᎢ ᎠᎴ ᏂᎪᎩᏐᏢᏃᎢ ᏈᎵᎩᏱ, ᎾᏍᎩ ᏥᏥᎦᏔᎭ, ᏃᏥᏍᎦᎢᎲᎾ ᎣᎦᏁᎳᏅᎯ ᎣᏣᎵᏍᎦᏍᏙᏛ ᎢᏨᏃᎮᎮᎸᎩ ᎣᏍᏛ ᎧᏃᎮᏛ ᎤᏁᎳᏅᎯ ᎤᏤᎵᎦ, ᏔᎵ ᎤᏛᏛᎩ ᎤᏣᏘ ᎠᏟᏂᎬᏁᏗ ᎨᏒᎢ.
|
|---|
Na-s-quo-s-gi-ni i-gv-yi no-gi-gi-li-yo-tso-i a-le ni-go-gi-so-tlv-no-i Qui-li-gi-yi, na-s-gi tsi-tsi-ga-ta-ha, no-tsi-s-ga-i-hv-na O-ga-ne-la-nv-hi o-tsa-li-s-ga-s-do-dv i-tsv-no-he-he-lv-gi o-s-dv ka-no-he-dv U-ne-la-nv-hi u-tse-li-ga, ta-li u-dv-dv-gi u-tsa-ti a-tli-ni-gv-ne-di ge-sv-i.
|
|---|
|
|---|
| For our exhortation was not of deceit, nor of uncleanness, nor in guile:
|
|---|
| ᎢᏨᏬᏁᏔᏅᏰᏃ ᎥᏝ ᎠᏓᎴᎾᏍᏗᏍᎩ ᏱᎨᏎᎢ, ᎥᏝ ᎠᎴ ᎦᏓᎭᎢ, ᎥᏝ ᎠᎴ ᎠᏠᏄᎮᏛ;
|
|---|
I-tsv-wo-ne-ta-nv-ye-no v-tla a-da-le-na-s-di-s-gi yi-ge-se-i, v-tla a-le ga-da-ha-i, v-tla a-le a-tlo-nu-he-dv;
|
|---|
|
|---|
| But as we were allowed of God to be put in trust with the gospel, even so we speak; not as pleasing men, but God, which trieth our hearts.
|
|---|
| ᎤᏁᎳᏅᎯᏍᎩᏂ ᏰᎵᏉ ᏧᏰᎸᏅ ᎣᎦᎨᏅᏗᏍᏗᏱ ᎣᏍᏛ ᎧᏃᎮᏛ, ᎾᏍᎩᏯ ᎣᏥᏁᎦ; ᎥᏝ ᏴᏫᏉ ᎣᏏᏳ ᎤᏂᏰᎸᏗ, ᎤᏁᎳᏅᎯᏍᎩᏂ ᎾᏍᎩ ᏗᎪᎵᏰᏍᎩ ᏥᎩ ᏗᎩᎾᏫ.
|
|---|
U-ne-la-nv-hi-s-gi-ni ye-li-quo tsu-ye-lv-nv o-ga-ge-nv-di-s-di-yi o-s-dv ka-no-he-dv, na-s-gi-ya o-tsi-ne-ga; v-tla yv-wi-quo o-si-yu u-ni-ye-lv-di, U-ne-la-nv-hi-s-gi-ni na-s-gi di-go-li-ye-s-gi tsi-gi di-gi-na-wi.
|
|---|
|
|---|
| For neither at any time used we flattering words, as ye know, nor a cloke of covetousness; God is witness:
|
|---|
| ᎥᏝ ᎠᎴ ᎣᏥᏬᏂᏍᎬ ᎢᎸᎯᏳ ᎠᏎᏉ ᎠᏓᎸᏉᏙᏗ ᎨᏒ ᏲᏨᏗᏍᎨᎢ, ᎾᏍᎩ ᏥᏥᎦᏔᎭ, ᎥᏝ ᎠᎴ ᎪᎱᏍᏗ ᏲᏨᏗᏍᎨ ᏲᏧᏢᏗᏍᎨ ᏧᎬᏩᎶᏗ ᎠᎬᎥᎯᏍᏗ ᎨᏒᎢ; ᎤᏁᎳᏅᎯ ᎠᎦᏔᎯ;
|
|---|
V-tla a-le o-tsi-wo-ni-s-gv i-lv-hi-yu a-se-quo a-da-lv-quo-do-di ge-sv yo-tsv-di-s-ge-i, na-s-gi tsi-tsi-ga-ta-ha, v-tla a-le go-hu-s-di yo-tsv-di-s-ge yo-tsu-tlv-di-s-ge tsu-gv-wa-lo-di a-gv-v-hi-s-di ge-sv-i; U-ne-la-nv-hi a-ga-ta-hi;
|
|---|
|
|---|
| Nor of men sought we glory, neither of you, nor yet of others, when we might have been burdensome, as the apostles of Christ.
|
|---|
| ᎥᏝ ᎠᎴ ᏴᏫ ᎪᎩᎸᏉᏙᏗᏱ ᏲᎩᏲᎮᎢ, ᎥᏝ ᏂᎯ ᏱᏨᏲᏎᎮᎢ, ᎥᏝ ᎠᎴ ᏅᏩᎾᏓᎴᎢ; ᏰᎵᏉ ᎡᎦᏃ ᎦᎨᏛ ᎢᏗᎦᏲᏨᏁᏗ ᎨᏒᎩ, ᎦᎶᏁᏛ ᎣᎩᏅᏏᏛ ᎨᏒ ᎢᏳᏍᏗ.
|
|---|
V-tla a-le yv-wi go-gi-lv-quo-do-di-yi yo-gi-yo-he-i, v-tla ni-hi yi-tsv-yo-se-he-i, v-tla a-le nv-wa-na-da-le-i; ye-li-quo e-ga-no ga-ge-dv i-di-ga-yo-tsv-ne-di ge-sv-gi, Ga-lo-ne-dv o-gi-nv-si-dv ge-sv i-yu-s-di.
|
|---|
|
|---|
| But we were gentle among you, even as a nurse cherisheth her children:
|
|---|
| ᎣᎦᏓᏅᏘᏳᏍᎩᏂ ᎨᏒᎩ ᎢᏨᏰᎳᏗᏙᎲᎢ, ᎾᏍᎩᏯ ᏧᏓᏍᏓᎢ ᏥᏓᏍᏆᏂᎪᏗᏍᎪ ᏧᏪᏥ;
|
|---|
O-ga-da-nv-ti-yu-s-gi-ni ge-sv-gi i-tsv-ye-la-di-do-hv-i, na-s-gi-ya tsu-da-s-da-i tsi-da-s-qua-ni-go-di-s-go tsu-we-tsi;
|
|---|
|
|---|
| So being affectionately desirous of you, we were willing to have imparted unto you, not the gospel of God only, but also our own souls, because ye were dear unto us.
|
|---|
| ᎤᏣᏘᏃ ᎢᏨᎨᏳᏒ ᎢᏳᏍᏗ, ᎣᎦᏝᏴᏉ ᏗᏨᏲᎯᏎᏗᏱ ᎥᏝ ᎣᏍᏛ ᎧᏃᎮᏛ ᎤᏩᏒ ᎤᏁᎳᏅᎯ ᎤᏤᎵᎦ, ᎾᏍᏉᏍᎩᏂ ᎣᎬᏒ ᏙᏨᏅᎢ, ᏅᏓᎦᎵᏍᏙᏗᏍᎬᎩ ᎢᏨᎨᏳᎢᏳ ᎨᏒᎢ.
|
|---|
U-tsa-ti-no i-tsv-ge-yu-sv i-yu-s-di, o-ga-tla-yv-quo di-tsv-yo-hi-se-di-yi v-tla o-s-dv ka-no-he-dv u-wa-sv U-ne-la-nv-hi u-tse-li-ga, na-s-quo-s-gi-ni o-gv-sv do-tsv-nv-i, nv-da-ga-li-s-do-di-s-gv-gi i-tsv-ge-yu-i-yu ge-sv-i.
|
|---|
|
|---|
| For ye remember, brethren, our labour and travail: for labouring night and day, because we would not be chargeable unto any of you, we preached unto you the gospel of God.
|
|---|
| ᎢᏣᏅᏔᏉᏰᏃ, ᎢᏓᎵᏅᏟ, ᏙᎩᎸᏫᏍᏓᏁᎸ ᎠᎴ ᏙᎩᏯᏪᏥᏙᎸᎢ; ᏗᎬᏩᎩᏨᏗᏰᏃ ᏙᎩᎸᏫᏍᏓᏁᎲ ᏃᎦᏚᎵᏍᎬᎾ ᎨᏒ ᎢᏳᏍᏗ ᎠᏏᏴᏫ ᏂᏣᏛᏅ ᎦᎨᏛ ᎢᏲᏨᏴᏁᏗᏱ, ᎢᏨᏯᎵᏥᏙᏁᎸᎩ ᎣᏍᏛ ᎧᏃᎮᏛ ᎤᏁᎳᏅᎯ ᎤᏤᎵᎦ.
|
|---|
I-tsa-nv-ta-quo-ye-no, i-da-li-nv-tli, do-gi-lv-wi-s-da-ne-lv a-le do-gi-ya-we-tsi-do-lv-i; di-gv-wa-gi-tsv-di-ye-no do-gi-lv-wi-s-da-ne-hv no-ga-du-li-s-gv-na ge-sv i-yu-s-di a-si-yv-wi ni-tsa-dv-nv ga-ge-dv i-yo-tsv-yv-ne-di-yi, i-tsv-ya-li-tsi-do-ne-lv-gi o-s-dv ka-no-he-dv U-ne-la-nv-hi u-tse-li-ga.
|
|---|
|
|---|
| Ye are witnesses, and God also, how holily and justly and unblameably we behaved ourselves among you that believe:
|
|---|
| ᏂᎯ ᎢᏥᎦᏔᎯ ᏂᏣᎵᏍᏗᎭ, ᎠᎴ ᎾᏍᏉ ᎤᏁᎳᏅᎯ, ᏂᎦᎥ ᎾᏍᎦᏅᎾ ᎨᏒ ᎠᎴ ᏚᏳᎪᏛ ᎨᏒ, ᎠᎴ ᎦᎫᎯᏍᏙᏗ ᏂᎨᏒᎾ ᎨᏒ ᎣᎨᏙᎸ ᎢᏨᏰᎳᏗᏙᎸ ᏂᎯ ᎢᏦᎯᏳᎯ;
|
|---|
Ni-hi i-tsi-ga-ta-hi ni-tsa-li-s-di-ha, a-le na-s-quo U-ne-la-nv-hi, ni-ga-v na-s-ga-nv-na ge-sv a-le du-yu-go-dv ge-sv, a-le ga-gu-hi-s-do-di ni-ge-sv-na ge-sv o-ge-do-lv i-tsv-ye-la-di-do-lv ni-hi i-tso-hi-yu-hi;
|
|---|
|
|---|
| As ye know how we exhorted and comforted and charged every one of you, as a father doth his children,
|
|---|
| ᎾᏍᎩ ᏥᏥᎦᏔᎭ ᎢᏥᏏᏴᏫᎭ ᏂᏨᏪᏎᎸ ᎢᏨᏬᏁᏔᏅ, ᎠᎴ ᎢᏨᎦᎵᏍᏓᏛ, ᎠᎴ ᎢᏨᏰᏯᏔᏅᎢ, ᎾᏍᎩᏯ ᎠᎦᏴᎵᎨ ᏥᏂᏕᎦᏪᏎᎰ ᏧᏪᏥ,
|
|---|
Na-s-gi tsi-tsi-ga-ta-ha i-tsi-si-yv-wi-ha ni-tsv-we-se-lv i-tsv-wo-ne-ta-nv, a-le i-tsv-ga-li-s-da-dv, a-le i-tsv-ye-ya-ta-nv-i, na-s-gi-ya a-ga-yv-li-ge tsi-ni-de-ga-we-se-ho tsu-we-tsi,
|
|---|
|
|---|
| That ye would walk worthy of God, who hath called you unto his kingdom and glory.
|
|---|
| ᎾᏍᎩ ᏂᎯ ᎢᏤᏙᎲ ᎤᏁᎳᏅᎯ ᎣᏏᏳ ᎤᏰᎸᏗ ᎢᏤᎵᏍᏗᏱ, ᎾᏍᎩ ᎢᏥᏯᏅᏛ ᏥᎩ ᏫᏥᎷᎯᏍᏗᏱ ᎤᏤᎵᎪᎯ ᎠᎴ ᎤᏤᎵ ᎦᎸᏉᏗᏳ ᏗᎨᏒᎢ.
|
|---|
Na-s-gi ni-hi i-tse-do-hv U-ne-la-nv-hi o-si-yu u-ye-lv-di i-tse-li-s-di-yi, na-s-gi i-tsi-ya-nv-dv tsi-gi wi-tsi-lu-hi-s-di-yi u-tse-li-go-hi a-le u-tse-li ga-lv-quo-di-yu di-ge-sv-i.
|
|---|
|
|---|
| For this cause also thank we God without ceasing, because, when ye received the word of God which ye heard of us, ye received it not as the word of men, but as it is in truth, the word of God, which effectually worketh also in you that believe.
|
|---|
| ᎾᏍᎩ ᎾᏍᏉ ᏅᏗᎦᎵᏍᏙᏗᎭ ᏃᏥᏲᎯᏍᏗᏍᎬᎾ ᎣᏣᎵᎡᎵᏤᎭ ᎤᏁᎳᏅᎯ, ᎾᏍᎩ ᎢᏳᏃ ᏕᏣᏓᏂᎸᏨ ᎧᏃᎮᏛ ᎤᏁᎳᏅᎯ ᎤᏤᎵᎦ, ᎾᏍᎩ ᎠᏴ ᏍᎩᏯᏛᎦᏁᎸᎯ, ᎥᏝ ᏴᏫᏉ ᎤᎾᏤᎵ ᎧᏃᎮᏛ ᎢᏳᏍᏗ ᏱᏗᏣᏓᏂᎸᏤᎢ, ᎤᏁᎳᏅᎯᏍᎩᏂ ᎤᏤᎵ ᎧᏃᎮᏛ, ᎤᏙᎯᏳᎯᏯ ᏥᎩ, ᎾᏍᎩᏯ ᏕᏣᏓᏂᎸᏨᎩ, ᎾᏍᎩ ᎾᏍᏉ ᎤᏣᏘ ᏥᏚᎸᏫᏍᏓᏁᎭ ᏕᏣᏓᏅᏛ ᏂᎯ ᎾᏍᎩ ᎢᏦᎯᏳᏅᎯ.
|
|---|
Na-s-gi na-s-quo nv-di-ga-li-s-do-di-ha no-tsi-yo-hi-s-di-s-gv-na o-tsa-li-e-li-tse-ha U-ne-la-nv-hi, na-s-gi i-yu-no de-tsa-da-ni-lv-tsv ka-no-he-dv U-ne-la-nv-hi u-tse-li-ga, na-s-gi a-yv s-gi-ya-dv-ga-ne-lv-hi, v-tla yv-wi-quo u-na-tse-li ka-no-he-dv i-yu-s-di yi-di-tsa-da-ni-lv-tse-i, U-ne-la-nv-hi-s-gi-ni u-tse-li ka-no-he-dv, u-do-hi-yu-hi-ya tsi-gi, na-s-gi-ya de-tsa-da-ni-lv-tsv-gi, na-s-gi na-s-quo u-tsa-ti tsi-du-lv-wi-s-da-ne-ha de-tsa-da-nv-dv ni-hi na-s-gi i-tso-hi-yu-nv-hi.
|
|---|
|
|---|
| For ye, brethren, became followers of the churches of God which in Judaea are in Christ Jesus: for ye also have suffered like things of your own countrymen, even as they have of the Jews:
|
|---|
| ᏂᎯᏰᏃ, ᎢᏓᎵᏅᏟ, ᏗᏥᏍᏓᏩᏕᎩ ᏂᏣᎵᏍᏔᏅᎩ ᏧᎾᏁᎶᏗ ᏚᎾᏓᏡᎬ ᎤᏁᎳᏅᎯ ᏧᏤᎵᎦ ᏧᏗᏱ ᎠᏁᎯ, ᎾᏍᎩ ᎦᎶᏁᏛ ᏥᏌ ᎬᏬᎯᏳᎲᏍᎩ ᏥᎩ; ᏂᎯᏰᏃ ᎾᏍᏉ ᎤᏠᏱ ᏕᏥᎩᎵᏲᏤᎸᎩ ᏗᏣᏤᎵᎦ ᏴᏫ, ᎾᏍᎩᏯ ᎾᏍᎩ ᏥᏚᏂᎩᎵᏲᏤᎴ ᎠᏂᏧᏏ;
|
|---|
Ni-hi-ye-no, i-da-li-nv-tli, di-tsi-s-da-wa-de-gi ni-tsa-li-s-ta-nv-gi tsu-na-ne-lo-di du-na-da-tlu-gv U-ne-la-nv-hi tsu-tse-li-ga Tsu-di-yi a-ne-hi, na-s-gi Ga-lo-ne-dv Tsi-sa gv-wo-hi-yu-hv-s-gi tsi-gi; ni-hi-ye-no na-s-quo u-tlo-yi de-tsi-gi-li-yo-tse-lv-gi di-tsa-tse-li-ga yv-wi, na-s-gi-ya na-s-gi tsi-du-ni-gi-li-yo-tse-le A-ni-tsu-si;
|
|---|
|
|---|
| Who both killed the Lord Jesus, and their own prophets, and have persecuted us; and they please not God, and are contrary to all men:
|
|---|
| ᎾᏍᎩ ᎾᏍᏉ ᏧᏂᎸᎩ ᎤᎬᏫᏳᎯ ᏥᏌ, ᎠᎴ ᎠᎾᏙᎴᎰᏍᎩ ᎤᏅᏒ ᏧᎾᏤᎵᎦ, ᎠᎴ ᎠᏴ ᎪᎦᏕᏯᏙᏔᏅᎩ; ᎠᎴ ᎥᏝ ᎣᏏᏳ ᎤᏰᎸᏗ ᎤᏁᎳᏅᎯ ᏱᎾᎾᏛᏁᎭ, ᎠᎴ ᎾᏂᎥ ᏴᏫ ᏓᏂᎦᏘᎴᎦ;
|
|---|
Na-s-gi na-s-quo tsu-ni-lv-gi U-gv-wi-yu-hi Tsi-sa, a-le a-na-do-le-ho-s-gi u-nv-sv tsu-na-tse-li-ga, a-le a-yv go-ga-de-ya-do-ta-nv-gi; a-le v-tla o-si-yu u-ye-lv-di U-ne-la-nv-hi yi-na-na-dv-ne-ha, a-le na-ni-v yv-wi da-ni-ga-ti-le-ga;
|
|---|
|
|---|
| Forbidding us to speak to the Gentiles that they might be saved, to fill up their sins alway: for the wrath is come upon them to the uttermost.
|
|---|
| ᎪᎩᏅᏍᏓᏕᎰᎢ ᏦᏥᏬᏁᏙᏗᏱ ᏧᎾᏓᎴᏅᏛ ᏴᏫ, ᎾᏍᎩ ᎦᎨᏥᏍᏕᎸᏗ ᎢᏳᎵᏍᏙᏗᏱ, ᎤᏂᎧᎵᎢᏍᏗᏱ ᏂᎪᎯᎸ ᎤᏂᏍᎦᏅᏨᎢ; ᎤᏔᎳᏬᎯᏍᏗᏍᎩᏂ ᎨᏒ ᏩᏍᏛ ᎢᏴᏛ ᎤᏂᎷᏤᎸ.
|
|---|
Go-gi-nv-s-da-de-ho-i tso-tsi-wo-ne-do-di-yi tsu-na-da-le-nv-dv yv-wi, na-s-gi ga-ge-tsi-s-de-lv-di i-yu-li-s-do-di-yi, u-ni-ka-li-i-s-di-yi ni-go-hi-lv u-ni-s-ga-nv-tsv-i; u-ta-la-wo-hi-s-di-s-gi-ni ge-sv wa-s-dv i-yv-dv u-ni-lu-tse-lv.
|
|---|
|
|---|
| But we, brethren, being taken from you for a short time in presence, not in heart, endeavoured the more abundantly to see your face with great desire.
|
|---|
| ᎠᏴᏍᎩᏂ ᎢᏓᎵᏅᏟ, ᏞᎦ ᎣᎦᏓᏓᎴᏔᏅ ᏦᏥᏰᎸᎢ, ᎥᏝᏃ ᏦᎩᎾᏫᏱ, ᎤᏟ ᎢᎦᎢ ᎣᎦᏟᏂᎬᏁᎸᎩ ᏕᏣᎧᏛ ᏦᎩᎪᏩᏛᏗᏱ, ᎤᏣᏘ ᎠᏚᎸᏗ ᎣᎬᏔᏅᎩ.
|
|---|
A-yv-s-gi-ni i-da-li-nv-tli, tle-ga o-ga-da-da-le-ta-nv tso-tsi-ye-lv-i, v-tla-no tso-gi-na-wi-yi, u-tli i-ga-i o-ga-tli-ni-gv-ne-lv-gi de-tsa-ka-dv tso-gi-go-wa-dv-di-yi, u-tsa-ti a-du-lv-di o-gv-ta-nv-gi.
|
|---|
|
|---|
| Wherefore we would have come unto you, even I Paul, once and again; but Satan hindered us.
|
|---|
| ᎾᏍᎩ ᎢᏳᏍᏗ ᎣᎦᏚᎵᏍᎬᎩ ᏫᏨᎷᏤᏗᏱ, ᎠᎴ ᎠᏴ, ᏉᎳ, Ꮀ ᎤᎬᏫᏳᏒᎩ, ᏌᏉ ᎠᎴ ᏔᎵᏁ ᎠᏆᏚᎸᎲᎩ; ᎠᏎᏃ ᏎᏓᏂ ᎣᎩᏲᏍᏙᏓᏁᎲᎩ.
|
|---|
Na-s-gi i-yu-s-di o-ga-du-li-s-gv-gi wi-tsv-lu-tse-di-yi, a-le a-yv, Quo-la, ho u-gv-wi-yu-sv-gi, sa-quo a-le ta-li-ne a-qua-du-lv-hv-gi; a-se-no Se-da-ni o-gi-yo-s-do-da-ne-hv-gi.
|
|---|
|
|---|
| For what is our hope, or joy, or crown of rejoicing? Are not even ye in the presence of our Lord Jesus Christ at his coming?
|
|---|
| ᎦᏙᏰᏃ ᎤᏚᎩ ᎣᎬᎭ, ᎠᎴ ᎦᏙ ᎣᏍᏛ ᏱᎦᏓᏅᏓᏗᎭ, ᎠᎴ ᎦᏙ ᎤᏍᏗ ᎠᎵᏍᏚᎶ ᎣᎦᎵᎮᎵᏍᏙᏗ? ᏝᏍᎪ ᏂᎯ ᏱᎨᏎᏍᏗ ᎠᎦᏔᎲ ᎢᎦᏤᎵ ᎤᎬᏫᏳᎯ ᏥᏌ ᎦᎶᏁᏛ ᎾᎯᏳ ᎦᎷᏨᎭ?
|
|---|
Ga-do-ye-no u-du-gi o-gv-ha, a-le ga-do o-s-dv yi-ga-da-nv-da-di-ha, a-le ga-do u-s-di a-li-s-du-lo o-ga-li-he-li-s-do-di? Tla-s-go ni-hi yi-ge-se-s-di a-ga-ta-hv i-ga-tse-li U-gv-wi-yu-hi Tsi-sa Ga-lo-ne-dv na-hi-yu ga-lu-tsv-ha?
|
|---|
|
|---|
| For ye are our glory and joy.
|
|---|
| ᏂᎯᏰᏃ ᎦᎸᏉᏗᏳ ᎢᏍᎩᏴᏁᎯ ᎠᎴ ᏍᎩᏯᎵᎮᎵᏍᏗᏍᎩ.
|
|---|
Ni-hi-ye-no ga-lv-quo-di-yu i-s-gi-yv-ne-hi a-le s-gi-ya-li-he-li-s-di-s-gi.
|
|---|


With this menu entry you can access the dialog Password Quality Meter.
Users tend to choose simple passwords which are easy to remember. Mostly, these passwords are not secure.
Particularly with regard to password-protected files like archives (ZIP, RAR) or PDF documents, an attacker - once having the document in his hands - has an infinite amount of time to guess the password.
There are commercial as well as free programs you can use to conveniently crack passwords. This is especially useful when you have forgotten your own password and you do not have a decrypted copy of the document.
If you want to use secure passwords which you can remember, then you should have a look into this subject. There are popular tools helping you to choose passwords. These "password quality meters" are little programs that analyze your password and give you feedback instantly.
Often, the feedback is a colored progress bar ("red" is insecure, "green" is secure), a percentage information or the "password entropy in bit". The CrypTool password quality meter offers all of these indicators. Additionally, CrypTool provides further information (i.e. whether parts of the password can be found in dictionaries).
Unlike most password quality meters, CrypTool doesn't only analyze each character independently, but penalizes the password quality when the password consists of dictionary entries, serials like "1234" or patterns like "ghjghjghj": Because in such a case an attacker can reach his goal much faster.
Just try out the following strategy for choosing passwords: Think of a sentence and insert the initials of every word - with regard to case sensitivity - in the password. Example: The sentence "My password shall not be hacked within one hour!" leads to the password "Mpsnbhw1h!".


--- layout: default title: ICTE'17 - Keynote Speakers meta: The list of keynote speakers who will be presenting their lectures within the topics of traffic engineering at ICTE. keyword: traffic engineering, transportation engineering, traffic engineering conference, transportation engineering conference, civil engineering conference, public transportation conference, transportation safety conference, public transportation, transportation safety ---
We are very happy to announce the following keynote speakers for the 2nd International Conference on Traffic Engineering (ICTE'17):
Dr. Manfred Boltze
Manfred Boltze (59) studied Civil Engineering received his doctor degree in 1988 for his work in the area of computerized simulation and optimization of road traffic signal control. After 10 years of working as a consultant, he was appointed as Professor for Transport Planning and Traffic Engineering in the Department of Civil and Environmental Engineering at Technische Universität Darmstadt, Germany.
He contributed to various working groups to establish German guidelines in the area of transport planning and traffic engineering, e.g. from 1999 to 2007 he chaired the working group “Urban Traffic Control”. He was a member of the Scientific Advisory Board at the German Federal Minister of Transport and Digital Infrastructure (2009-2015). With international projects, memberships in internatio-nal organisations and manifold contacts with foreign universities, Manfred Boltze is an active member of the international traffic and transport science community. From 2009 until 2014 he was the Director of the Vietnamese-German Transport Research Centre at the Vietnamese-German University (VGU) in Hochiminh City, and at the same university he also coordinated the interdisciplinary study program “M.Sc. Traffic and Transport”. He was also the chairman of the Scientific Committee preparing for the World Conference on Transport Research held 2016 in Shanghai.
His research work focuses on the manifold aspects of traffic management, covering conceptual, technical as well as institutional aspects. Highlights of his research in the recent years have been in the areas of ITS application, traffic signal control, and quality management for traffic and transport systems. Latest research areas also cover environment-responsive traffic control and the impacts of transport on human health.
Topic of Keynote: Principles of a Sustainable Traffic Management
Keynote Abstract


Status:
-
Result:
-
Search for serial port as it is plugged in
Get serial port by id: COM1
Advertise steering
Ping


How to validate json schema in Java?¶
In this entry, we’ll consider typical problems that arise when you’re setting off parsing json with following validation. At the end of it, I’ll show how you can do it in concise and declarative fashion with Validol library.
Problems¶
Parsing JSON is usually a no-brainer. There are at least a couple of great libraries that do that: Jackson and GSON. The problem is that there seems to be no nice way to combine them with validation facility. That’s where the following problems unfold.
Validation is often an imperative code-clutter¶
Typically, json schema validation looks like a huge, highly temporally coupled sequence of imperative instructions. In library-independent java-like pseudo-code, it looks like the following:
JsonObject jsonObject = JSON.parse(request);
if (!jsonObject.has("guest")) {
return error("guest block is required");
}
if (!jsonObject.get("guest").has("name")) {
return error("guest name is required");
}
String name = jsonObject.get("guest").get("name");
if (name.length > 70) {
return error("guest name must be shorter than 70 characters");
}
if (name.length < 3) {
return error("guest name must be at least 3 characters");
}
if (!Pattern.compile("[a-Z]+").matcher(name).matches() {
return error("guest name must contain only alpha characters");
}
JSON Schema could be not so desirable to deal with¶
Those who want to break free from this imperative spaghetti hell often turn to quite complicated and intricate beast called JSON Schema. It’s a specification describing the structure and validation rules of json documents. Besides having a steep learning curve, it is a little bit too verbose. And things get worse quickly: JSON schema definition file grows twice as fast as the validated json itself.
Among the pluses, this format is a declarative one, which is a huge step forward comparing to the previous option. And there are couple of libraries supporting it.
Solution¶
Validol provides both parsing and validating capabilities, as well as solves both validation problems: it is declarative and concise.
Check out a quick example. Suppose we have a registration request. It has a couple of blocks, payment
being one of them.
For brevity sake, I’ll put only this one in the request:
{
"payment":{
"expires_at":"12/29",
"card_number":12345612341234
}
}
Here is how the actual validation code looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | public class ValidatedRegistrationRequest implements Validatable<RegistrationRequest>
{
private String jsonRequestString;
private Connection dbConnection;
public ValidatedRegistrationRequest(String jsonRequestString, Connection dbConnection)
{
this.jsonRequestString = jsonRequestString;
this.dbConnection = dbConnection;
}
@Override
public Result<RegistrationRequest> result() throws Exception
{
return
new FastFail<>(
new WellFormedJson(
new Unnamed<>(Either.right(new Present<>(this.jsonRequestString)))
),
requestJsonObject ->
new UnnamedBlocOfNameds<>(
List.of(
new FastFail<>(
new IsJsonObject(
new Required(
new IndexedValue("payment", requestJsonObject)
)
),
paymentJsonObject ->
new NamedBlocOfNameds<>(
"payment",
List.of(
new CardIsNotExpired(
new AsString(
new Required(
new IndexedValue("expires_at", paymentJsonObject)
)
)
),
new CardNumberIsNotBlacklisted(
new CardNumberSatisfiesLuhnAlgorithm(
new Required(
new IndexedValue("card_number", paymentJsonObject)
)
),
this.dbConnection
)
),
Payment.class
)
)
),
RegistrationRequest.class
)
)
.result()
;
}
}
|
Let’s see what’s going on here, line by line:
Line 1
Declaration of ValidatedRegistrationRequest
.Line 6
Its constructor accepts not yet parsed json string. It might come from an incoming request, from received response, or from pretty much anywhere else.Line 13
: Validation starts when this method is invoked.Lines 16
: The higher-level validation object is FastFail
block. If the first argument is invalid, an error is returned right away.Lines 17-19
: json is checked whether it’s well-formed or not. If the latter, validation fails fast and returns a corresponding error.Line 20
: if json is well-formed, a closure is invoked, and json data is passed as its single argument.Line 21
: json data is validated. Its structure is an unnamed block of named blocks. It corresponds to a JSON Object.Line 26
: The first (and the only) block is called payment
.Line 25
: It’s required.Line 24
: It must be a json object.Line 23
: If not, an error will be returned right away because it’s a FailFast
object.Line 29
: Otherwise, a closure is invoked.Line 30
: Payment block is a named block consisting of other named entries – objects or scalars.Line 36
: The first one is called expires_at
Line 35
: It’s required.Line 34
: And represented as a string.Line 33
: Finally, check that it’s not expired.Line 43
: Second parameter is called card_number
.Line 42
: It’s required as well.Line 41
: It must satisfy Luhn algorithm.Line 40
: And it should not be blacklisted in our database, hence …Line 46
: … this.dbConnection
parameter.Line 49
: If all previous validation checks are successful, an object of class Payment
is created.Line 53
: Finally, RegistrationRequest
is created and returned.Here is how a calling code looks when validation is successful:
Result<RegistrationRequest> result = new ValidatedRegistrationRequest(jsonRequestString).result();
result.isSuccessful();
result.value().raw().payment().cardNumber(); //<PHONE_NUMBER>1234
Further reading¶
For more detailed example, check out Validol’s quick-start entry. Also, there are plenty of higher-level unit tests. And finally feel free to contribute!


| Modifier and Type | Class and Description |
|---|---|
class |
BadDiscoveryListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in a
manner consistent with the specification. |
class |
RemoveGroupsLocsDiscard
This class acts as a regression test for bug ID 4510435.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AddAttributesRace
Regression test for bug #4671109.
|
class |
LeaseRenewDurRFE
This class verifies that the current implementation of the
JoinManager utility class has correctly implemented
the following RFE:
6202650 - JoinManager should allow configurable control of the
lease renewal interval |
class |
RaceAttrsVsTerminateISE
Regression test for bug #4953710 (ISE = IllegalStateException).
|
class |
RaceAttrsVsTerminateULE
Regression test for bug #4953710 (ULE = UnknownLeaseException).
|
class |
RegisterStorm
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAddAttributesOrder
This class verifies that the current implementation of the
JoinManager utility class executes the tasks which perform
attribute replacement and attribute augmentation respectively in the
correct order; resulting in an attribute state that is expected, and
is consistent across all lookup services with which the service is
registered. |
class |
TerminateSemantics
With respect to the current implementation of the
JoinManager
utility, this class verifies that if any of the public methods of that
utility are invoked after the join manager has been terminated, an
IllegalStateException results. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddDiscoveryListenerAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the addDiscoveryListener method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
AddLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the addLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
BadLocatorDiscoveryListener
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies that if the
addDiscoveryListener method is invoked after the lookup locator
discovery utility has been terminated, an IllegalStateException
results. |
class |
DelayDiscoveryAfterDiscard
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the discard method is invoked, discovery for the
the discarded ServiceRegistrar is delayed. |
class |
DiscardAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the discard method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
GetDiscoveredLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the getDiscoveredLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
GetLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the getLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
GetRegistrarsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the getRegistrars method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
GetUndiscoveredLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the getUndiscoveredLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
RemoveDiscoveryListenerAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the removeDiscoveryListener method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
RemoveLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the removeLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
class |
SetLocatorsAfterTerminate
With respect to the current implementation of the
LookupLocatorDiscovery utility, this class verifies
that if the setLocators method is invoked
after the lookup locator discovery utility has been terminated, an
IllegalStateException results. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddGroupsAfterTerminate
With respect to the current implementation of the
LookupDiscovery utility, this class verifies
that if the addGroups method is invoked
after the lookup discovery utility has been terminated, an
IllegalStateException results. |
class |
GetGroupsAfterTerminate
With respect to the current implementation of the
LookupDiscovery utility, this class verifies
that if the getGroups method is invoked
after the lookup discovery utility has been terminated, an
IllegalStateException results. |
class |
RemoveGroupsAfterTerminate
With respect to the current implementation of the
LookupDiscovery utility, this class verifies
that if the removeGroups method is invoked
after the lookup discovery utility has been terminated, an
IllegalStateException results. |
class |
RestoreContextForTasks
With respect to the current implementation of the
LookupDiscovery utility, this class verifies
that any tasks that it adds/schedules in its TaskManager or
WakupManager is done in using the unprivileged context of
the original caller. |
class |
SetGroupsAfterTerminate
With respect to the current implementation of the
LookupDiscovery utility, this class verifies
that if the setGroups method is invoked
after the lookup discovery utility has been terminated, an
IllegalStateException results. |
| Modifier and Type | Class and Description |
|---|---|
class |
CacheTerminateSemantics
With respect to the current implementation of the
LookupCache
interface returned by the createLookupCache method of the
current implementation of the ServiceDiscoveryManager utility,
this class verifies that - except for the terminate method
itself - if any of the public methods of the lookup cache are invoked
after that cache has been terminated, an IllegalStateException
results. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddListenerEvent
This class verifies that bug 4712396 has been fixed.
|
class |
DiscardDownReDiscover
This class verifies that the
ServiceDiscoveryManager handles
the "discard problem" in the manner described in the specification. |
class |
DiscardServiceDown
This class verifies that the
ServiceDiscoveryManager handles
the "discard problem" in the manner described in the specification. |
class |
DiscardServiceUp
This class verifies that the
ServiceDiscoveryManager handles
the "discard problem" in the manner described in the specification. |
class |
LookupDropProxyTaskRace
This test attempts to simulate the following race condition that
can occur between an instance of LookupTask and an instance of
ProxyRegDropTask:
- 1 LUS {L0}
- 1 service s0 registered in L0
- 1 cache C0 with template matching s0
Upon creation of the cache, LookupTask is initiated for L0.
|
class |
LookupTaskRace
This test attempts to simulate the following race condition that
can occur between different instances of LookupTask:
- 2 LUS's {L0,L1}
- 1 service s0 registered in L0 and L1
- 1 cache C0 with template matching s0
Upon creation of the cache, 2 LookupTasks are queued; one for L0 and
one for L1.
|
class |
LookupTaskServiceIdMapRace
This test attempts to simulate the following race condition that
can occur between an instance of UnmapProxyTask (created and queued
in LookupTask) and instances of NewOldServiceTask that are created
and queued by NotifyEventTask:
- 1 LUS {L0}
- N (~250) services {s0, s1, ..., sN-1}, to be registered in L0
- M (~24) SDMs, each with 1 cache with template matching all si's
{SDM_0/C0, SDM_1/C1, ...
|
class |
NotifyEventDropProxyTaskRace
This test attempts to simulate the following race condition that
can occur between an instance of LookupTask and an instance of
ProxyRegDropTask:
- 1 LUS {L0}
- 1 services {s0}, to be registered in L0
- 1 cache C0 with template matching s0
This test attempts to simulate the race that appears to be possible
between the NotifyEventTask and the ProxyRegDropTask.
|
class |
ReRegisterBadEquals
This class verifies that when services that are to be discovered are
implemented with a poorly defined or non-existent ("bad") equals() method,
the event mechanism of the cache will operate in a predictable fashion,
sending an expected number of serviceAdded and serviceRemoved events.
|
class |
ReRegisterGoodEquals
This class verifies that when services that are to be discovered are
implemented with a well defined ("good") equals() method, the event
mechanism of the cache will operate in a predictable fashion, sending
a number of serviceAdded and serviceRemoved events.
|
class |
ServiceDiscardCacheTerminate
This class verifies that the
ServiceDiscoveryManager handles
the "discard problem" in the manner described in the specification. |
| Modifier and Type | Class and Description |
|---|---|
class |
MemberGroupsProblem
This class verifies that the
ServiceStarter utility correctly
handles exceptional conditions related to the setting of the member
groups of a lookup service that is started. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBaseTest
This class is an abstract class that acts as the base class which
most, if not all, tests of the
LookupDiscovery utility
class should extend. |
class |
AddNewDiscoveryChangeListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
AddNewDiscoveryListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
DiscardUnreachable
With respect to the
discard method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
Discovered
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
DiscoveredAll
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
GroupsAddNewDiscoveryChangeListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
GroupsAddNewDiscoveryListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
GroupsDiscardUnreachable
With respect to the
discard method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
GroupsDiscovered
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
GroupsDiscoveredAll
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
GroupsMulticastMonitorChange
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the changed
events that occur as a result of the replacement of one or more of the
member groups of discovered lookup services. |
class |
GroupsMulticastMonitorReplace
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the complete replacement of
the member groups of previously discovered lookup services. |
class |
GroupsMulticastMonitorReplaceAll
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
GroupsMulticastMonitorReplaceNone
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the replacement of the member
groups of discovered lookup services with NO_GROUPS. |
class |
GroupsMulticastMonitorStop
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
GroupsMulticastMonitorTerminate
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the termination of discovered
lookup services and the multicast announcements those lookups broadcast. |
class |
GroupsSetGroupsReplaceAll
With respect to the
setGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
LocsAddNewDiscoveryChangeListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
LocsAddNewDiscoveryListener
With respect to the
addDiscoveryListener method, this class
verifies that the LookupDiscoveryManager utility operates in
a manner consistent with the specification. |
class |
LocsDiscardUnreachable
With respect to the
discard method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
LocsDiscovered
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
LocsDiscoveredAll
This class verifies that the
LookupDiscoveryManager utility
operates in a manner consistent with the specification. |
class |
LocsMulticastMonitorChange
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the changed
events that occur as a result of the replacement of one or more of the
member groups of discovered lookup services. |
class |
LocsMulticastMonitorReplace
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the complete replacement of
the member groups of discovered lookup services. |
class |
LocsMulticastMonitorReplaceAll
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
LocsMulticastMonitorReplaceNone
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the replacement of the member
groups of discovered lookup services with NO_GROUPS. |
class |
LocsMulticastMonitorStop
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
LocsMulticastMonitorTerminate
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the termination of discovered
lookup services and the multicast announcements those lookups broadcast. |
class |
LocsSetGroupsReplaceAll
With respect to the
setGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
MulticastMonitorChange
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the changed
events that occur as a result of the replacement of one or more of the
member groups of discovered lookup services. |
class |
MulticastMonitorReplace
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the complete replacement of
the member groups of discovered lookup services. |
class |
MulticastMonitorReplaceAll
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
MulticastMonitorReplaceNone
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the replacement of the member
groups of discovered lookup services with NO_GROUPS. |
class |
MulticastMonitorStop
This class verifies that the
LookupDiscoveryManager utility
monitors, in a manner consistent with the specification, the mulitcast
announcements received from lookup services it has discovered. |
class |
MulticastMonitorTerminate
This class verifies that the
LookupDiscoveryManager utility
handles, in a manner consistent with the specification, the "passive"
discarded events that occur as a result of the termination of discovered
lookup services and the multicast announcements those lookups broadcast. |
class |
RemoveGroupsAll
With respect to the
removeGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsSome
With respect to the
removeGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
SetGroupsReplaceAll
With respect to the
setGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
class |
SetGroupsReplaceSome
With respect to the
setGroups method, this class verifies
that the LookupDiscoveryManager utility operates in a manner
consistent with the specification. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddAttributes
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesDup
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesNullElement
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesNullSet
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesProp
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesPropNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
AddAttributesServiceControlled
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
Equality
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetAttributes
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetAttributesNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetDiscoveryManager
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetJoinSetCallback
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetJoinSetCallbackNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetJoinSetServiceID
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetJoinSetServiceIDNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
GetLeaseRenewalManager
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
LDMNullPublicGroup
This class verifies that when
null is input to the
discoveryMgr parameter of either version of the constructor
of the JoinManager utility class, those constructors
operate as specified. |
class |
ModifyAttributes
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesAllToOne
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesClassMismatch
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesDeleteAll
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesDeleteOne
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesDup
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesLengthMismatch
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesOne
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesProp
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesPropNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ModifyAttributesServiceControlled
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
Register
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
RegisterAttributes
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
RegisterProp
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
ServiceIDNotify
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributes
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributesDup
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributesNullElement
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributesNullSet
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributesProp
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
SetAttributesPropNew
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
TerminateDiscovery
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
class |
TerminateLeases
This class verifies that the
JoinManager utility class
operates in a manner consistent with the specification. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddDiscoveryListenerNull
With respect to the
addDiscoveryListener method, this class
verifies that the LookupLocatorDiscovery utility operates
in a manner consistent with the specification. |
class |
AddLocators
With respect to the
addLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
AddLocatorsDups
With respect to the
addLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
AddLocatorsEmpty
With respect to the
addLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
AddLocatorsNull
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
AddLocatorsNullElement
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
ConstructorDups
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
ConstructorNullElement
This class verifies that the
LookupLocatorDiscovery utility
class operates in a manner consistent with the specification. |
class |
DiscardDNE
With respect to the
discard method, this class verifies that
the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
DiscardNull
With respect to the
discard method, this class verifies that
the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
DiscoveredDelay
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveredStagger
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnAddLocsAfterEmpty
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnAddLocsAfterNull
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnSetLocsAfterEmpty
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnSetLocsAfterNull
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryEndsOnTerminate
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetDiscoveredLocators
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetDiscoveredLocatorsEmpty
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetDiscoveredLocatorsNew
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetLocators
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetLocatorsEmpty
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetLocatorsNew
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetRegistrars
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetRegistrarsNew
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetUndiscoveredLocators
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetUndiscoveredLocatorsEmpty
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
GetUndiscoveredLocatorsNew
This class verifies that the
LookupLocatorDiscovery utility
operates in a manner consistent with the specification. |
class |
RemoveDiscoveryListener
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
RemoveDiscoveryListenerDNE
With respect to the
removeDiscoveryListener method, this class
verifies that the LookupLocatorDiscovery utility operates
in a manner consistent with the specification. |
class |
RemoveLocatorsAll
With respect to the
removeLocators method, this class
verifies that the LookupLocatorDiscovery utility operates
in a manner consistent with the specification. |
class |
RemoveLocatorsDups
With respect to the
removeLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveLocatorsEmpty
With respect to the
removeLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveLocatorsNull
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
RemoveLocatorsNullElement
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
RemoveLocatorsSome
With respect to the
removeLocators method, this class
verifies that the LookupLocatorDiscovery utility operates
in a manner consistent with the specification. |
class |
SetLocatorsDups
With respect to the
setLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
SetLocatorsEmpty
With respect to the
setLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
SetLocatorsNull
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
SetLocatorsNullElement
This class verifies that the
LookupLocatorDiscovery
utility operates in a manner consistent with the specification. |
class |
SetLocatorsReplaceAll
With respect to the
setLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
class |
SetLocatorsReplaceSome
With respect to the
setLocators method, this class verifies
that the LookupLocatorDiscovery utility operates in a manner
consistent with the specification. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddGroups
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
AddGroupsAllGroups
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
AddGroupsDups
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
AddGroupsNoGroups
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
AddGroupsNullElement
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
AddGroupsUnsupportedOperation
With respect to the
addGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
ConstructorAllGroups
This class verifies that the
LookupDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnAddGroupsAfterEmpty
This class verifies that the
LookupDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnSetGroupsAfterEmpty
This class verifies that the
LookupDiscovery utility
operates in a manner consistent with the specification. |
class |
DiscoveryBeginsOnSetGroupsAllAfterEmpty
This class verifies that the
LookupDiscovery utility
operates in a manner consistent with the specification. |
class |
GetGroups
With respect to the
getGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
GetGroupsAllGroups
With respect to the
getGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
GetGroupsNew
With respect to the
getGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
GetGroupsNoGroups
With respect to the
getGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
MulticastMonitorAllChange
This class verifies that the
LookupDiscovery utility
monitors the multicast announcements sent from the lookup service
in a manner consistent with the specification. |
class |
MulticastMonitorStopReplace
This class verifies that the
LookupDiscovery utility
monitors the multicast announcements sent from lookup services
in a manner consistent with the specification. |
class |
RemoveGroupsAllGroups
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsDups
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsNoGroups
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsNullElement
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsRemoveAll
With respect to the
removeGroups method, this class
verifies that the LookupDiscovery utility operates
in a manner consistent with the specification. |
class |
RemoveGroupsRemoveNone
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
RemoveGroupsRemoveSome
With respect to the
removeGroups method, this class
verifies that the LookupDiscovery utility operates
in a manner consistent with the specification. |
class |
RemoveGroupsUnsupportedOperation
With respect to the
removeGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
SetGroupsAllGroups
With respect to the
setGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
SetGroupsDups
With respect to the
setGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
SetGroupsNoGroups
With respect to the
setGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
class |
SetGroupsNullElement
With respect to the
setGroups method, this class verifies
that the LookupDiscovery utility operates in a manner
consistent with the specification. |
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultDiscoverPublic
With respect to the lookup discovery processing performed by the
ServiceDiscoveryManager utility class, this class verifies
that that utility operates as specified. |
| Modifier and Type | Class and Description |
|---|---|
class |
AddListenerNPE
This class verifies that the
addListener method of
the LookupCache employed by the
ServiceDiscoveryManager helper utility operates as
specified. |
class |
CacheDiscard
This class verifies that the
discard method of the
LookupCache operates as specified. |
class |
CacheLookup
With respect to the
lookup method defined by the
LookupCache interface, this class verifies that the
version that returns a single instance of ServiceItem
operates as specified when invoked under the following condition:
template matching performed by the service discovery manager is
based on service type only
the lookup cache applies no first-stage filtering to the results
of the template matching
the lookup method of the lookup cache applies no second-stage
filtering to the results of the template matching; that is, null
is input as the filter parameter of the lookup method
ServiceItem lookup(ServiceItemFilter filter);
|
class |
CacheLookupFilterFilter
With respect to the
lookup method defined by the
LookupCache interface, this class verifies that the
version that returns a single instance of ServiceItem
operates as specified when invoked under the following condition:
template matching performed by the service discovery manager is
based on service type only
the lookup cache applies first-stage filtering to the results
of the template matching
the lookup method of the lookup cache applies second-stage
filtering to the results of the template matching and the
first-stage filtering
ServiceItem lookup(ServiceItemFilter filter);
|
class |
CacheLookupFilterNoFilter
With respect to the
lookup method defined by the
LookupCache interface, this class verifies that the
version that returns a single instance of ServiceItem
operates as specified when invoked under the following condition:
template matching performed by the service discovery manager is
based on service type only
the lookup cache applies first-stage filtering to the results
of the template matching
the lookup method of the lookup cache applies no second-stage
filtering to the results of the template matching and the
first-stage filtering; that is, null is input as the filter
parameter of the lookup method
ServiceItem lookup(ServiceItemFilter filter);
|
class |
CacheLookupNoFilterFilter
With respect to the
lookup method defined by the
LookupCache interface, this class verifies that the
version that returns a single instance of ServiceItem
operates as specified when invoked under the following condition:
template matching performed by the service discovery manager is
based on service type only
the lookup cache applies no first-stage filtering to the results
of the template matching
the lookup method of the lookup cache applies second-stage
filtering to the results of the template matching
ServiceItem lookup(ServiceItemFilter filter);
|
| Modifier and Type | Class and Description |
|---|---|
class |
AddAttrServiceChanged
This class verifies that the event mechanism defined by the
LookupCache interface operates as specified with respect
to serviceAdded events when the set of attributes
associated with a set of registered services is augmented (add attributes). |
class |
ModifyAttrServiceChanged
This class verifies that the event mechanism defined by the
LookupCache interface operates as specified with respect
to serviceChanged events when the set of attributes
associated with a set of registered services is modified. |
class |
SetAttrServiceChanged
This class verifies that the event mechanism defined by the
LookupCache interface operates as specified with respect
to serviceRemoved events when the set of attributes
associated with a set of registered services is replaced. |
| Modifier and Type | Class and Description |
|---|---|
class |
Lookup
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the non-blocking version that returns a single instance of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
ServiceItem lookup(ServiceTemplate tmpl, ServiceItemFilter filter);
|
class |
LookupFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the non-blocking version that returns a single instance of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
ServiceItem lookup(ServiceTemplate tmpl, ServiceItemFilter filter);
|
class |
LookupMax
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the non-blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
ServiceItem[] lookup(ServiceTemplate tmpl,
int maxMatches,
ServiceItemFilter filter);
|
class |
LookupMaxFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the non-blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
ServiceItem[] lookup(ServiceTemplate tmpl,
int maxMatches,
ServiceItemFilter filter);
|
class |
LookupMinEqualsMax
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
the minimum number of desired services is equal to the maximum
number of desired services
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
|
class |
LookupMinEqualsMaxFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
the minimum number of desired services is equal to the maximum
number of desired services
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
|
class |
LookupMinLessMax
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
the minimum number of desired services is less than the maximum
number of desired services
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
|
class |
LookupMinLessMaxFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
the minimum number of desired services is less than the maximum
number of desired services
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
|
class |
LookupMinMaxNoBlock
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
the number of services available for discovery is greater than the
acceptable minimum number of services input to the lookup method
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
If there are more services available to be discovered than the acceptable
minimum number of services (minMatches ), then no blocking
should occur; rather, the lookup method should return
immediately after discovering the acceptable number of services. |
class |
LookupMinMaxNoBlockFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns an array of instances of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
the number of services available for discovery is greater than the
acceptable minimum number of services input to the lookup method
ServiceItem[] lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches
ServiceItemFilter filter,
long waitDur);
If, after filtering, there are more services available to be discovered
than the acceptable minimum number of services (minMatches ),
then no blocking should occur; rather, the lookup method
should return immediately after discovering the acceptable number of
services. |
class |
LookupWait
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns a single instance of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
ServiceItem lookup(ServiceTemplate tmpl,
ServiceItemFilter filter,
long waitDur);
|
class |
LookupWaitFilter
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns a single instance of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies filtering to the results
of the template matching
ServiceItem lookup(ServiceTemplate tmpl,
ServiceItemFilter filter,
long waitDur);
|
class |
LookupWaitNoBlock
With respect to the
lookup method defined by the
ServiceDiscoveryManager utility class, this class verifies
that the blocking version that returns a single instance of
ServiceItem operates as specified when invoked under
the following condition:
template matching performed by the service discovery manager is
based on service type only
the service discovery manager applies no filtering to the results
of the template matching
at least 1 matching service is already available for discovery
when the lookup method is called
ServiceItem lookup(ServiceTemplate tmpl,
ServiceItemFilter filter,
long waitDur);
If at least 1 matching service is already available to be discovered when
the lookup method is called (that is, the lookup
method does not have to wait for the desired service to be registered),
then the lookup method will not block. |
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.


ToyImpArBool19
- We begin a new direction that will continue for the rest of the course.
- Up to now most of our attention has been focused on various aspects of Coq itself, while from now on we'll mostly be using Coq to formalize other things. (We'll continue to pause from time to time to introduce a few additional aspects of Coq and ssreflect.)
- From the next lecture on, we might even start a separate folder for that.
- Our first case study is a simple imperative programming language called Imp, embodying a tiny core fragment of conventional mainstream languages such as C and Java.
Z ::= X;;
Y ::= 1;;
WHILE not (Z = 0) DO
Y ::= Y * Z;;
Z ::= Z - 1
END
Y ::= 1;;
WHILE not (Z = 0) DO
Y ::= Y * Z;;
Z ::= Z - 1
END
Set Warnings "-notation-overridden,-parsing".
From Coq Require Import ssreflect ssrbool ssrfun.
From Coq Require Import List.
Import List.ListNotations.
(*Require Import Coq.Bool.Bool.*)
From Coq Require Import Arith.
Import Arith.EqNat.
From Coq Require Import ssreflect ssrbool ssrfun.
From Coq Require Import List.
Import List.ListNotations.
(*Require Import Coq.Bool.Bool.*)
From Coq Require Import Arith.
Import Arith.EqNat.
This is where "=?" comes from
Arithmetic and Boolean Expressions
- structure of an interpreter,
- the processes of lexing and parsing,
- the notion of ASTs (Abstract Syntax Trees)...
Inductive aexp : Type :=
| ANum : nat → aexp
| APlus : aexp → aexp → aexp
| AMinus : aexp → aexp → aexp
| AMult : aexp → aexp → aexp.
Inductive bexp : Type :=
| BTrue : bexp
| BFalse : bexp
| BEq : aexp → aexp → bexp
| BLe : aexp → aexp → bexp
| BNot : bexp → bexp
| BAnd : bexp → bexp → bexp.
| ANum : nat → aexp
| APlus : aexp → aexp → aexp
| AMinus : aexp → aexp → aexp
| AMult : aexp → aexp → aexp.
Inductive bexp : Type :=
| BTrue : bexp
| BFalse : bexp
| BEq : aexp → aexp → bexp
| BLe : aexp → aexp → bexp
| BNot : bexp → bexp
| BAnd : bexp → bexp → bexp.
In this chapter, we'll elide the translation from the
concrete syntax that a programmer would actually write to these
abstract syntax trees — the process that, for example, would
translate the string "1+2*3" to the AST APlus (ANum
1) (AMult (ANum 2) (ANum 3)). The optional chapter ImpParser
develops a simple implementation of a lexical analyzer and parser
that can perform this translation. You do not need to
understand that chapter to understand this one, but if you haven't
taken a course where these techniques are covered (e.g., a
compilers course) you may want to skim it.
For comparison, here's a conventional BNF (Backus-Naur Form)
grammar defining the same abstract syntax:
Compared to the Coq version above...
It's good to be comfortable with both sorts of notations:
informal ones for communicating between humans and formal ones for
carrying out implementations and proofs.
a ::= nat
| a + a
| a - a
| a * a
b ::= true
| false
| a = a
| a ≤ a
| not b
| b and b
| a + a
| a - a
| a * a
b ::= true
| false
| a = a
| a ≤ a
| not b
| b and b
- The BNF is more informal — for example, it gives some
suggestions about the surface syntax of expressions (like the
fact that the addition operation is written + and is an
infix symbol) while leaving other aspects of lexical analysis
and parsing (like the relative precedence of +, -, and
*, the use of parens to explicitly group subexpressions,
etc.) unspecified. Some additional information (and human
intelligence) would be required to turn this description into
a formal definition, for example when implementing a
compiler.
The Coq version consistently omits all this information and concentrates on the abstract syntax only.
- On the other hand, the BNF version is lighter and easier to
read. Its informality makes it flexible, which is a huge
advantage in situations like discussions at the blackboard,
where conveying general ideas is more important than getting
every detail nailed down precisely.
Indeed, there are dozens of BNF-like notations and people switch freely among them, usually without bothering to say which form of BNF they're using because there is no need to: a rough-and-ready informal understanding is all that's important.
Fixpoint aeval (a : aexp) : nat :=
match a with
| ANum n ⇒ n
| APlus a1 a2 ⇒ (aeval a1) + (aeval a2)
| AMinus a1 a2 ⇒ (aeval a1) - (aeval a2)
| AMult a1 a2 ⇒ (aeval a1) * (aeval a2)
end.
Example test_aeval1:
aeval (APlus (ANum 2) (ANum 2)) = 4.
match a with
| ANum n ⇒ n
| APlus a1 a2 ⇒ (aeval a1) + (aeval a2)
| AMinus a1 a2 ⇒ (aeval a1) - (aeval a2)
| AMult a1 a2 ⇒ (aeval a1) * (aeval a2)
end.
Example test_aeval1:
aeval (APlus (ANum 2) (ANum 2)) = 4.
Proof. by []. Qed.
Similarly, evaluating a boolean expression yields a boolean.
Fixpoint beval (b : bexp) : bool :=
match b with
| BTrue ⇒ true
| BFalse ⇒ false
| BEq a1 a2 ⇒ (aeval a1) =? (aeval a2)
| BLe a1 a2 ⇒ (aeval a1) <=? (aeval a2)
| BNot b1 ⇒ ~~(beval b1)
| BAnd b1 b2 ⇒ (beval b1) && (beval b2)
end.
match b with
| BTrue ⇒ true
| BFalse ⇒ false
| BEq a1 a2 ⇒ (aeval a1) =? (aeval a2)
| BLe a1 a2 ⇒ (aeval a1) <=? (aeval a2)
| BNot b1 ⇒ ~~(beval b1)
| BAnd b1 b2 ⇒ (beval b1) && (beval b2)
end.
Optimization
Fixpoint optimize_0plus (a:aexp) : aexp :=
match a with
| ANum n ⇒
ANum n
| APlus (ANum 0) e2 ⇒
optimize_0plus e2
| APlus e1 e2 ⇒
APlus (optimize_0plus e1) (optimize_0plus e2)
| AMinus e1 e2 ⇒
AMinus (optimize_0plus e1) (optimize_0plus e2)
| AMult e1 e2 ⇒
AMult (optimize_0plus e1) (optimize_0plus e2)
end.
match a with
| ANum n ⇒
ANum n
| APlus (ANum 0) e2 ⇒
optimize_0plus e2
| APlus e1 e2 ⇒
APlus (optimize_0plus e1) (optimize_0plus e2)
| AMinus e1 e2 ⇒
AMinus (optimize_0plus e1) (optimize_0plus e2)
| AMult e1 e2 ⇒
AMult (optimize_0plus e1) (optimize_0plus e2)
end.
To make sure our optimization is doing the right thing we
can test it on some examples and see if the output looks OK.
Example test_optimize_0plus:
optimize_0plus (APlus (ANum 2)
(APlus (ANum 0)
(APlus (ANum 0) (ANum 1))))
= APlus (ANum 2) (ANum 1).
optimize_0plus (APlus (ANum 2)
(APlus (ANum 0)
(APlus (ANum 0) (ANum 1))))
= APlus (ANum 2) (ANum 1).
Proof. by []. Qed.
Theorem optimize_0plus_sound: ∀a,
aeval (optimize_0plus a) = aeval a.
Proof.
elim.
- (* ANum *) by [].
- (* APlus *) case.
+ (* a1 = ANum n *) case.
* (* n = 0 *) by [].
* (* n <> 0 *) by move⇒ /= n _ a →.
+ (* a1 = APlus a2 a3 *) by move⇒ /= a1 a2 → a3 →.
+ (* a1 = AMinus a2 a3 *) by move⇒ /= a1 a2 → a3 →.
+ (* a1 = AMult a2 a3 *) by move⇒ /= a1 a2 → a3 →.
- (* AMinus *) by move⇒ /= a1 → a2 →.
- (* AMult *) by move⇒ /= a1 → a2 →. Qed.
aeval (optimize_0plus a) = aeval a.
Proof.
elim.
- (* ANum *) by [].
- (* APlus *) case.
+ (* a1 = ANum n *) case.
* (* n = 0 *) by [].
* (* n <> 0 *) by move⇒ /= n _ a →.
+ (* a1 = APlus a2 a3 *) by move⇒ /= a1 a2 → a3 →.
+ (* a1 = AMinus a2 a3 *) by move⇒ /= a1 a2 → a3 →.
+ (* a1 = AMult a2 a3 *) by move⇒ /= a1 a2 → a3 →.
- (* AMinus *) by move⇒ /= a1 → a2 →.
- (* AMult *) by move⇒ /= a1 → a2 →. Qed.
Coq Automation
Tacticals
"I had an impulse
to clear it all away
Oh I used the tactics—make everybody pay.
Just something that I knew I had to do."
—Joy Division
Oh I used the tactics—make everybody pay.
Just something that I knew I had to do."
—Joy Division
The try Tactical
Theorem silly1 : ∀ae, aeval ae = aeval ae.
Proof. try reflexivity. (* this just does reflexivity *) Qed.
Theorem silly2 : ∀(P : Prop), P → P.
Proof.
move⇒ P HP.
try reflexivity. (* just reflexivity would have failed *)
by []. (* we can still finish the proof in some other way *)
Qed.
Proof. try reflexivity. (* this just does reflexivity *) Qed.
Theorem silly2 : ∀(P : Prop), P → P.
Proof.
move⇒ P HP.
try reflexivity. (* just reflexivity would have failed *)
by []. (* we can still finish the proof in some other way *)
Qed.
There is no real reason to use try in completely manual
proofs like these, but we'll see below that it is very useful for
doing automated proofs in conjunction with the ; tactical.
Using try and ; together, we can get rid of the repetition in
the proof that was bothering us a little while ago.
Theorem optimize_0plus_sound': ∀a,
aeval (optimize_0plus a) = aeval a.
Proof.
elim;
(* Most cases follow directly by the IH... *)
try (by move⇒ /= a → a1 ->).
(* ... but the remaining cases -- ANum and APlus --
are different: *)
- (* ANum *) by [].
- (* APlus *)
case;
(* Again, most cases follow directly by the IH: *)
try (by move⇒ /= a1 a2 → a3 ->).
(* The interesting case, on which the try...
does nothing, is when e1 = ANum n. In this
case, we have to destruct n (to see whether
the optimization applies) and rewrite with the
induction hypothesis. *)
+ (* a1 = ANum n *) by case ⇒ [| n]; move⇒ /= _ a →.
Qed.
aeval (optimize_0plus a) = aeval a.
Proof.
elim;
(* Most cases follow directly by the IH... *)
try (by move⇒ /= a → a1 ->).
(* ... but the remaining cases -- ANum and APlus --
are different: *)
- (* ANum *) by [].
- (* APlus *)
case;
(* Again, most cases follow directly by the IH: *)
try (by move⇒ /= a1 a2 → a3 ->).
(* The interesting case, on which the try...
does nothing, is when e1 = ANum n. In this
case, we have to destruct n (to see whether
the optimization applies) and rewrite with the
induction hypothesis. *)
+ (* a1 = ANum n *) by case ⇒ [| n]; move⇒ /= _ a →.
Qed.
Coq experts often use this "...; try... " idiom after a tactic
like elim to take care of many similar cases all at once.
Naturally, this practice has an analog in informal proofs.
Here is an informal proof of this theorem that matches the
structure of the formal one:
Theorem: For all arithmetic expressions a,
This proof can still be improved: the first case (for a =
ANum n) is very trivial — even more trivial than the cases that
we said simply followed from the IH — yet we have chosen to write
it out in full. It would be better and clearer to drop it and just
say, at the top, "Most cases are either immediate or direct from
the IH. The only interesting case is the one for APlus..." We
can make the same improvement in our formal proof too. Here's how
it looks:
aeval (optimize_0plus a) = aeval a.
Proof: By induction on a. Most cases follow directly from the IH.
The remaining cases are as follows:
- Suppose a = ANum n for some n. We must show
aeval (optimize_0plus (ANum n)) = aeval (ANum n).This is immediate from the definition of optimize_0plus.
- Suppose a = APlus a1 a2 for some a1 and a2. We
must show
aeval (optimize_0plus (APlus a1 a2))Consider the possible forms of a1. For most of them, optimize_0plus simply calls itself recursively for the subexpressions and rebuilds a new expression of the same form as a1; in these cases, the result follows directly from the IH.
= aeval (APlus a1 a2).The interesting case is when a1 = ANum n for some n. If n = ANum 0, thenoptimize_0plus (APlus a1 a2) = optimize_0plus a2and the IH for a2 is exactly what we need. On the other hand, if n = S n' for some n', then again optimize_0plus simply calls itself recursively, and the result follows from the IH. ☐
Theorem optimize_0plus_sound'': ∀a,
aeval (optimize_0plus a) = aeval a.
Proof.
elim;
(* Most cases follow directly by the IH
or are immediate by definition *)
try by do [move⇒ /= a → a1 → | ].
(* The interesting case is when a = APlus a1 a2. *)
- (* APlus *)
case; try by move⇒ /= a1 a2 → a3 →.
+ (* a1 = ANum n *) by case ⇒ [| ?]; move⇒ /= _ a →.
Qed.
aeval (optimize_0plus a) = aeval a.
Proof.
elim;
(* Most cases follow directly by the IH
or are immediate by definition *)
try by do [move⇒ /= a → a1 → | ].
(* The interesting case is when a = APlus a1 a2. *)
- (* APlus *)
case; try by move⇒ /= a1 a2 → a3 →.
+ (* a1 = ANum n *) by case ⇒ [| ?]; move⇒ /= _ a →.
Qed.
The ; Tactical (General Form)
T; [T1 | T2 | ... | Tn]
is a tactic that first performs T and then performs T1 on the
first subgoal generated by T, performs T2 on the second
subgoal, etc.
T; [T' | T' | ... | T']
Defining New Tactic Notations
- The Tactic Notation idiom illustrated below gives a handy way to
define "shorthand tactics" that bundle several tactics into a
single command.
- For more sophisticated programming, Coq offers a small built-in
programming language called Ltac with primitives that can
examine and modify the proof state. The details are a bit too
complicated to get into here (and it is generally agreed that
Ltac is not the most beautiful part of Coq's design!), but they
can be found in the reference manual and other books on Coq, and
there are many examples of Ltac definitions in the Coq standard
library that you can use as examples.
- There is also an OCaml API, which can be used to build tactics that access Coq's internal structures at a lower level, but this is seldom worth the trouble for ordinary Coq users.
Tactic Notation "simpl_and_try" tactic(c) :=
move⇒ /=;
try c.
move⇒ /=;
try c.
This defines a new tactical called simpl_and_try that takes one tactic c
as an argument and is defined to be equivalent to the tactic move⇒ /=; try
c. For example, writing "simpl_and_try reflexivity." in a proof would be
the same as writing "move⇒ /=; try reflexivity."
The done Tactic, aka by []
Ltac my_done :=
trivial; hnf; intros; solve
[ do ![solve [trivial | apply: sym_equal; trivial]
| discriminate | contradiction | split]
| case not_locked_false_eq_true; assumption
| match goal with H : ¬_ ⊢ _ ⇒ solve [case H; trivial] end ].
There are some unknown tactics and lemmas involved:
- trivial: similar to reflexivity
- hnf: normalizes the goal to so-called "head normal form"
- solve: apply the first tactic in the list that solves the goal
(generates no subgoal)
- sym_equal: lemma corresponding to the symmetry tactic
- contradiction: Try to find a hypothesis H in the current
context that is logically equivalent to False. If one is found,
solve the goal.
- not_locked_false_eq_true: specific to ssreflect's term
tagging mechanisms: locked t is a term that is provably equal
to t, but not convertible to t
- assumption: Try to find a hypothesis H in the context that exactly matches the goal; if one is found, behave a bit like apply H... or rather exact H, which we didn't spend much time on (used by the done tactic).
The omega Tactic
- numeric constants, addition (+ and S), subtraction (-
and pred), and multiplication by constants (this is what
makes it Presburger arithmetic),
- equality (= and ≠) and inequality (≤), and
- the logical connectives ∧, ∨, ¬, and →,
Require Import Coq.omega.Omega.
Example silly_presburger_example : ∀m n o p,
m + n ≤ n + o ∧ o + 3 = p + 3 →
m ≤ p.
Proof.
by move⇒ *; omega.
Qed.
Example silly_presburger_example : ∀m n o p,
m + n ≤ n + o ∧ o + 3 = p + 3 →
m ≤ p.
Proof.
by move⇒ *; omega.
Qed.
There are alternatives, like lia, the linear integer arithmetic sover.
On the other hand, there are still performance issues
- It can do some goals involving nontrivial multiplication
- It was supposed to be generally faster
- Part of a larger family of arithmetic solvers, including nia (for non-linear arithmetic), lra (for real and rational arithmetic)
- As of now, the speed-up claim does not always hold, sometimes to the contrary
- Moreover, the present implementation of lia may stil fail where omega succeeds
- Some (Pierre Letouzey) argued that omega should be replaced not by lia, but by zify;romega. However, romega is deprecated since 8.9 in favour of lia
- We're ecumenic here, experiment with whatever works
- Not sure if both these libraries are supposed to be loaded at the same time, but we can try
Require Import Coq.micromega.Lia.
Example silly_presburger_example2 : ∀m n o p,
m + n ≤ n + o ∧ o + 3 = p + 3 →
m ≤ p.
Proof.
by move⇒ *; lia.
Qed.
Example silly_presburger_example2 : ∀m n o p,
m + n ≤ n + o ∧ o + 3 = p + 3 →
m ≤ p.
Proof.
by move⇒ *; lia.
Qed.
"For it is unworthy of excellent men to lose hours like
slaves in the labor of calculation which could be relegated to
anyone else if machines were used." —Gottfried Wilhelm Leibniz, 1685
"The Leibniz calculator, which he called the Stepped Reckoner, was based on a new mechanical feature, the stepped drum or Leibniz Wheel. It was a cylinder with nine bar-shaped teeth of different lengths, which increased in equal steps around the drum. This brilliant concept has been used in many later calculators, for example the famous barrel-shaped Curta calculator. When the first wooden prototype of the Stepped Reckoner was constructed Leibniz was able to show it to the Royal Society in London. Although the model did not work properly, the Society members were impressed and asked him to create a proper working model. The final version was only completed in 1674."
"Although it is believed only two Stepped Reckoners have been constructed, the machine itself was actually lost for more than 200 years. Apparently it was stored in an attic of one of the buildings of the University of Goettingen where a crew of workmen who came to fix a leaking roof accidentally found it in 1879. This model resides in the Hannover State Library. The other model is in the Deutches Museum in Muenchen. In the 20th century a number of replicas of the Leibniz calculator have been built, one of them by IBM. Although quite a few stamps have been issued to commemorate this great scientist, only one philatelic item, a Romanian Postal Card issued in 2004, pictures the Stepped Reckoner."
A Few More Handy Tactics
- move: {H}: Delete hypothesis H from the context. In plain Ltac called clear.
- subst x: Find an assumption x = e or e = x in the
context, replace x with e throughout the context and
current goal, and clear the assumption.
- subst: Substitute away all assumptions of the form x = e
or e = x. (Note we often use ⇒ → in this way)
- constructor: Try to find a constructor c (from some
Inductive definition in the current environment) that can be
applied to solve the current goal. If one is found, behave like
apply c.
- try solve: Tries to solve goal altogether, otherwise leaves
it unchanged. We'll see it below.
- have: a good and compact alternative to assert, we already discussed it.
Evaluation as a Relation
Module aevalR_first_try.
Inductive aevalR : aexp → nat → Prop :=
| E_ANum : ∀(n: nat),
aevalR (ANum n) n
| E_APlus : ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (APlus e1 e2) (n1 + n2)
| E_AMinus: ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (AMinus e1 e2) (n1 - n2)
| E_AMult : ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (AMult e1 e2) (n1 * n2).
Inductive aevalR : aexp → nat → Prop :=
| E_ANum : ∀(n: nat),
aevalR (ANum n) n
| E_APlus : ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (APlus e1 e2) (n1 + n2)
| E_AMinus: ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (AMinus e1 e2) (n1 - n2)
| E_AMult : ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (AMult e1 e2) (n1 * n2).
As is often the case with relations, we'll find it
convenient to define infix notation for aevalR. We'll write e
\\ n to mean that arithmetic expression e evaluates to value
n. (This notation is one place where the limitation to ASCII
symbols becomes a little bothersome. The standard notation for
the evaluation relation is a double down-arrow. We'll typeset it
like this in the HTML version of the notes and use a double slash
as the closest approximation in .v files.)
Notation "e '\\' n"
:= (aevalR e n)
(at level 50, left associativity)
: type_scope.
:= (aevalR e n)
(at level 50, left associativity)
: type_scope.
Note it's not a great notation. From next lecture on, might replace it with sth else.
In fact, Coq provides a way to use this notation in the definition
of aevalR itself. This avoids situations where we're working on
a proof involving statements in the form e \\ n but we have to
refer back to a definition written using the form aevalR e n.
We do this by first "reserving" the notation, then giving the
definition together with a declaration of what the notation
means.
Reserved Notation "e '\\' n" (at level 50, left associativity).
Inductive aevalR : aexp → nat → Prop :=
| E_ANum : ∀(n:nat),
(ANum n) \\ n
| E_APlus : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (APlus e1 e2) \\ (n1 + n2)
| E_AMinus : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (AMinus e1 e2) \\ (n1 - n2)
| E_AMult : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (AMult e1 e2) \\ (n1 * n2)
where "e '\\' n" := (aevalR e n) : type_scope.
Inductive aevalR : aexp → nat → Prop :=
| E_ANum : ∀(n:nat),
(ANum n) \\ n
| E_APlus : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (APlus e1 e2) \\ (n1 + n2)
| E_AMinus : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (AMinus e1 e2) \\ (n1 - n2)
| E_AMult : ∀(e1 e2: aexp) (n1 n2 : nat),
(e1 \\ n1) → (e2 \\ n2) → (AMult e1 e2) \\ (n1 * n2)
where "e '\\' n" := (aevalR e n) : type_scope.
Inference Rule Notation
| E_APlus : ∀(e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (APlus e1 e2) (n1 + n2)
...would be written like this as an inference rule:
aevalR e1 n1 →
aevalR e2 n2 →
aevalR (APlus e1 e2) (n1 + n2)
| e1 \\ n1 | |
| e2 \\ n2 | (E_APlus) |
| APlus e1 e2 \\ n1+n2 |
| (E_ANum) | |
| ANum n \\ n |
| e1 \\ n1 | |
| e2 \\ n2 | (E_APlus) |
| APlus e1 e2 \\ n1+n2 |
| e1 \\ n1 | |
| e2 \\ n2 | (E_AMinus) |
| AMinus e1 e2 \\ n1-n2 |
| e1 \\ n1 | |
| e2 \\ n2 | (E_AMult) |
| AMult e1 e2 \\ n1*n2 |
Equivalence of the Definitions
Theorem aeval_iff_aevalR : ∀a n,
(a \\ n) ↔ aeval a = n.
(a \\ n) ↔ aeval a = n.
Proof.
split.
- (* -> *)
by elim⇒ *; subst.
- (* <- *)
by elim: a n ⇒ /=;
do [ (move⇒ n n0 →; constructor)
| (move⇒ a IHa1 a0 IHa2 n <-;
first [ apply: E_APlus
| apply: E_AMinus
| apply: E_AMult];
try apply: IHa1;
try apply: IHa2)].
Qed.
split.
- (* -> *)
by elim⇒ *; subst.
- (* <- *)
by elim: a n ⇒ /=;
do [ (move⇒ n n0 →; constructor)
| (move⇒ a IHa1 a0 IHa2 n <-;
first [ apply: E_APlus
| apply: E_AMinus
| apply: E_AMult];
try apply: IHa1;
try apply: IHa2)].
Qed.
Or, stated in a more ssreflectish way:
Lemma aevalP {a : aexp} {n : nat} : reflect (a \\ n) ((aeval a) =? n).
Proof.
apply /equivP; do ?(symmetry; apply aeval_iff_aevalR).
case eqn: (aeval a =? n); constructor.
- by apply Nat.eqb_eq in eqn.
- by apply Nat.eqb_neq in eqn.
Qed.
(* Sun Jul 14 22:07:54 MSK 2019 *)
Proof.
apply /equivP; do ?(symmetry; apply aeval_iff_aevalR).
case eqn: (aeval a =? n); constructor.
- by apply Nat.eqb_eq in eqn.
- by apply Nat.eqb_neq in eqn.
Qed.
(* Sun Jul 14 22:07:54 MSK 2019 *)


Rachel Naomi Design
About
CSS Dev Conf
TU Talk
Mentorship
EUX 16
Enterprise UX Conference 2016
You can find my notes from the conference
Day 1
Day 2
Workshop


--- layout: post title: Capistrano 1.3.1 categories: - releases author: jamis published: true date: 2007-01-06 04:54:00.000000000 +00:00 ---
I’ve been remiss in announcing recent Capistrano releases, so I’m making up for lost time now. Capistrano 1.3.1 is now available!
Capistrano, for those of you that are late to the game, is a utility for executing commands in parallel on multiple remote machines. It comes with support for vastly simplifying the deployment process of Rails applications, but can be customized to work with virtually any environment.
Since 1.2.0, the following enhancements and changes have been made:
role :app, "app1.host.com" role :web<EMAIL_ADDRESS>role :db, "db1.host.com:1234" role :file, "fileuser@file1.host.com:1234"
:as
option to sudo
, to specify which user a command should be run as:sudo "spinner", :as => "app"
Feel free to read the changelog several other fixes and tweaks.