The opinion of the court was delivered by: GOURLEY
In this state habeas corpus proceeding, petitioner attacks the constitutionality of a Pennsylvania statute known as the Barr-Walker Act, 1951, P.L. 1851, 19 Pa.P.S. § 1166 et seq.
' § 1166. Indeterminate sentence for certain sex offenses
'For the better administration of justice and the more efficient punishment, treatment and rehabilitation of persons convicted of the crime of indecent assault, incest, assault with intent to commit sodomy, solicitation to commit sodomy, sodomy, assault with intent to ravish or rape, if the court is of the opinion that any such person, if at large, constitutes a threat of bodily harm to members of the public, or is an habitual offender and mentally ill, the court, in lieu of the sentence now provided by law, for each such crime, may sentence such person to a State institution for an indeterminate term having a minimum of one day and a maximum of his natural life.
' § 1167. Psychiatric examination of person convicted
'No person, convicted of a crime punishable in the discretion of the court, under the provisions of this act, with imprisonment in a State institution for an indeterminate term having a minimum of one day and a maximum of his natural life, shall be so sentenced until (1) a complete psychiatric examination shall have been made of him through the facilities of the Department of Welfare, as hereinafter provided, or by a psychiatrist designated by the court, the results of whose examination shall be transmitted to and accepted by the Department of Welfare in lieu of an examination made through its own facilities, and (2) a complete written report thereof shall have been submitted to the court. Such report shall include all facts and findings necessary to assist the court in determining whether it shall impose sentence under the provisions of this act upon the person convicted in lieu of the sentence otherwise provided by law.
' § 1168. Temporary confinement of sex offenders
'(a) To enable the court to procure such a psychiatric examination and to afford the Department of Welfare time in which to make the same, the court is hereby authorized and empowered to postpone sentence upon any person convicted of any one or more of the crimes enumerated in section one of this act, and to order the person so convicted to temporary confinement in the prison or jail in which such person was confined prior to his trial or would have been confined if not free on bail. Such period of temporary confinement shall not exceed a period of sixth (60) days unless the court, on the request of the psychiatric examiner, extends the observation period for an additional time not exceeding thirty (30) days. It shall be the duty of the Department of Welfare to make a psychiatric examination of the prisoner and report to the court thereon within the period allowed by the court.
'(b) If, for any reason, such examination is not made and a report thereon given to the court within such period of temporary confinement, the provisions of this act shall thereupon not be available to the court, and it shall sentence the prisoner to such sentence as provided by law; and the period of temporary confinement herein provided for shall be considered as a part of the sentence so imposed, whether it be for the purpose of determining the length of the sentence by the court or for the purpose of parole.
' § 1169. Psychiatric examination; order; place
'Whenever a court shall desire the Department of Welfare to make a psychiatric examination of and a report on a person convicted of any one or more of the crimes enumerated in section one of this act, it shall make an order to that effect; and it shall be the duty of the clerk of court to promptly notify the Department of Welfare of such order. The Department of Welfare shall thereupon make such a psychiatric examination of the person so convicted, either at a clinic, State hospital, or other State institution designated by the court, or at the place where such person is in temporary confinement, or it may request that he be brought to any clinic established by the Department of Welfare for such purposes, or State hospital, or other State institution. In the latter event, if agreeable to the court, it shall order the person so convicted to be taken in custody to such institution.
' § 1170. Arraignment and sentence; expenses of transportation and maintenance; place of confinement
'(a) Whenever a court, after psychiatric examination of and report on a person convicted of any one or more of the crimes enumerated in section one of this act, shall be of the opinion that it would be to the best interests of justice to sentence such person under the provisions of this act, he shall cause such person to be arraigned before him and sentenced to such State institution as shall have been designated by the Department of Welfare in its report to the court. The cost of transporting such person to the State institution designated by the department and the cost of his maintenance therein shall be borne by the commonwealth and the several counties to the extent and in the manner provided by law.
'(b) The costs of maintenance of any person so convicted, while in temporary confinement as hereinbefore provided, and costs of transportation, shall be borne by the county, and the cost of the psychiatric examination of and report on such person shall be borne by the Department of Welfare: Provided, That where the psychiatric examination is made by a psychiatrist designated by the court, the costs thereof shall be borne by the county.
'(c) The Department of Welfare, in its report to the court, is hereby authorized to designate a county jail, penitentiary, industrial school, or any other State institution, as the place of confinement of the person who is the subject of such report, if the court elects to sentence such person under the provisions of this act.
'1171. Department of Welfare to provide psychiatric and psychological services; clinics
'It shall be the duty of the Department of Welfare, from funds appropriated to it, to provide psychiatric and psychological services to the courts, as provided in section four of this act, and to the Pennsylvania Board of Parole in the further examination, diagnosis and treatment of persons sentenced under the ...