Skip to content

bldl/temporal-rocq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

190 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mechanization of the ECMAScipt (JavaScript) Proposal "Temporal" in Rocq

Our mission is to prove the correctness of a selection of the functions in the ECMAScript Temporal Proposal.

Changes to Specification

Based on our findings, the specification text of the proposal has been changed. Our mechanization is now updated without the inconsistencies we found, but there are links to the proofs of the inconsistencies in the Previous Inconsistencies section below.

Developers

  • Aria Bjørnbakken Eide (University of Bergen, Norway)
  • Vebjørn Søreide Øiestad (University of Bergen, Norway)

Supervisor

  • Mikhail Barash (Bergen Language Design Laboratory, University of Bergen, Norway)

Project Presentations

We have presented the preliminary results of this work at RocqPL @ POPL 2026 (video, abstract).

Creating Makefile and Building Project

$ rocq makefile -f _CoqProject -o Makefile
$ make

or just

$ ./build.sh

Mechanized Functions

Section 3

section title spec text mechanization
3.5.1 ISO Date Records spec ISODateRecord.v
3.5.2 CreateISODateRecord spec CreateISODateRecord.v
3.5.6 3.5.7 RegulateISODate spec RegulateISODate.v
3.5.7 3.5.8 IsValidISODate spec IsValidISODate.v
3.5.9 3.5.10 PadISOYear spec PadISOYear.v
3.5.10 3.5.11 TemporalDateToString spec TemporalDateToString.v
3.5.12 3.5.13 CompareISODate spec CompareISODate.v

Section 4

section title spec text mechanization
4.5.1 Time Records spec TimeRecord.v
4.5.2 CreateTimeRecord spec CreateTimeRecord.v
4.5.3 MidnightTimeRecord spec MidnightTimeRecord.v
4.5.4 NoonTimeRecord spec NoonTimeRecord.v
4.5.5 DifferenceTime spec DifferenceTime.v
4.5.8 RegulateTime spec RegulateTime.v
4.5.9 IsValidTime spec IsValidTime.v
4.5.10 BalanceTime spec BalanceTime.v
4.5.13 TimeRecordToString spec TimeRecordToString.v
4.5.14 CompareTimeRecord spec CompareTimeRecord.v
4.5.15 AddTime spec AddTime.v

Section 5

section title spec text mechanization
5.5.1 ISO Date-Time Records spec ISODateTimeRecord.v
5.5.3 CombineISODateAndTimeRecord spec CombineISODateAndTimeRecord.v
5.5.9 ISODateTimeToString spec ISODateTimeToString.v
5.5.10 CompareISODateTime spec CompareISODateTime.v

Section 7

section title spec text mechanization
7.5.1 Date Duration Records spec DateDurationRecord.v
7.5.14 DateDurationSign spec DateDurationSign.v
7.5.21 TimeDurationFromComponents spec TimeDurationFromComponents.v
7.5.22 AddTimeDuration spec AddTimeDuration.v
7.5.23 Add24HourDaysToTimeDuration spec Add24HourDaysToTimeDuration.v
7.5.24 AddTimeDurationToEpochNanoseconds spec AddTimeDurationToEpochNanoseconds.v
7.5.25 CompareTimeDuration spec CompareTimeDuration.v
7.5.26 TimeDurationFromEpochNanosecondsDifference spec TimeDurationFromEpochNanosecondsDifference.v
7.5.28 TimeDurationSign spec TimeDurationSign.v

Section 8

section title spec text mechanization
8.5.1 IsValidEpochNanoseconds spec IsValidEpochNanoseconds.v
8.5.4 CompareEpochNanoseconds spec CompareEpochNanoseconds.v
8.5.5 AddInstant spec AddInstant.v

Section 9

section title spec text mechanization
9.5.1 ISO Year-Month Records spec ISOYearMonthRecord.v
9.5.3 ISOYearMonthWithinLimits spec ISOYearMonthWithinLimits.v
9.5.4 BalanceISOYearMonth spec BalanceISOYearMonth.v

Section 11

section title spec text mechanization
11.1.5 FormatOffsetTimeZoneIdentifier spec FormatOffsetTimeZoneIdentifier.v
11.1.6 FormatUTCOffsetNanoseconds spec FormatUTCOffsetNanoseconds.v

Section 12

section title spec text mechanization
12.1 Calendar Types spec CalendarType.v
12.3.15 FormatCalendarAnnotation spec FormatCalendarAnnotation.v
12.3.17 ISODaysInMonth spec ISODaysInMonth.v

Section 13

section title spec text mechanization
13.2 EpochDaysToEpochMs spec EpochDaysToEpochMs.v
13.3 Date Equations spec DateEquations.v
13.8 NegateRoundingMode spec NegateRoundingMode.v
13.14 ValidateTemporalRoundingIncrement spec ValidateTemporalRoundingIncrement.v
13.16 ToSecondsStringPrecisionRecord spec ToSecondsStringPrecisionRecord.v
13.18 ValidateTemporalUnitValue spec ValidateTemporalUnitValue.v
13.20 LargerOfTwoTemporalUnits spec LargerOfTwoTemporalUnits.v
13.21 IsCalendarUnit spec IsCalendarUnit.v
13.22 TemporalUnitCategory spec TemporalUnitCategory.v
13.23 MaximumTemporalDurationRoundingIncrement spec MaximumTemporalDurationRoundingIncrement.v
13.25 FormatFractionalSeconds spec FormatFractionalSeconds.v
13.26 FormatTimeString spec FormatTimeString.v
13.27 GetUnsignedRoundingMode spec GetUnsignedRoundingMode.v

Previous Inconsistencies

Other Findings

Notes

Theorems

Proven

Unproven

About

Formalisation of parts of the TC39 Temporal proposal in Rocq.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors